Teach TurboFan to call C functions with result_size > 1.

Happily, this fixes WIN64 failures too.

BUG=
R=titzer@chromium.org

Review URL: https://codereview.chromium.org/709033002

Cr-Commit-Position: refs/heads/master@{#25216}
git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@25216 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 2b026851
...@@ -223,7 +223,7 @@ void JSGenericLowering::ReplaceWithRuntimeCall(Node* node, ...@@ -223,7 +223,7 @@ void JSGenericLowering::ReplaceWithRuntimeCall(Node* node,
linkage()->GetRuntimeCallDescriptor(f, nargs, properties); linkage()->GetRuntimeCallDescriptor(f, nargs, properties);
Node* ref = ExternalConstant(ExternalReference(f, isolate())); Node* ref = ExternalConstant(ExternalReference(f, isolate()));
Node* arity = Int32Constant(nargs); Node* arity = Int32Constant(nargs);
PatchInsertInput(node, 0, jsgraph()->CEntryStubConstant()); PatchInsertInput(node, 0, jsgraph()->CEntryStubConstant(fun->result_size));
PatchInsertInput(node, nargs + 1, ref); PatchInsertInput(node, nargs + 1, ref);
PatchInsertInput(node, nargs + 2, arity); PatchInsertInput(node, nargs + 2, arity);
PatchOperator(node, common()->Call(desc)); PatchOperator(node, common()->Call(desc));
......
...@@ -17,12 +17,16 @@ Node* JSGraph::ImmovableHeapConstant(Handle<HeapObject> object) { ...@@ -17,12 +17,16 @@ Node* JSGraph::ImmovableHeapConstant(Handle<HeapObject> object) {
} }
Node* JSGraph::CEntryStubConstant() { Node* JSGraph::CEntryStubConstant(int result_size) {
if (!c_entry_stub_constant_.is_set()) { if (result_size == 1) {
c_entry_stub_constant_.set( if (!c_entry_stub_constant_.is_set()) {
ImmovableHeapConstant(CEntryStub(isolate(), 1).GetCode())); c_entry_stub_constant_.set(
ImmovableHeapConstant(CEntryStub(isolate(), 1).GetCode()));
}
return c_entry_stub_constant_.get();
} }
return c_entry_stub_constant_.get();
return ImmovableHeapConstant(CEntryStub(isolate(), result_size).GetCode());
} }
......
...@@ -32,7 +32,7 @@ class JSGraph : public ZoneObject { ...@@ -32,7 +32,7 @@ class JSGraph : public ZoneObject {
cache_(zone()) {} cache_(zone()) {}
// Canonicalized global constants. // Canonicalized global constants.
Node* CEntryStubConstant(); Node* CEntryStubConstant(int result_size);
Node* UndefinedConstant(); Node* UndefinedConstant();
Node* TheHoleConstant(); Node* TheHoleConstant();
Node* TrueConstant(); Node* TrueConstant();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment