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,
linkage()->GetRuntimeCallDescriptor(f, nargs, properties);
Node* ref = ExternalConstant(ExternalReference(f, isolate()));
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 + 2, arity);
PatchOperator(node, common()->Call(desc));
......
......@@ -17,12 +17,16 @@ Node* JSGraph::ImmovableHeapConstant(Handle<HeapObject> object) {
}
Node* JSGraph::CEntryStubConstant() {
if (!c_entry_stub_constant_.is_set()) {
c_entry_stub_constant_.set(
ImmovableHeapConstant(CEntryStub(isolate(), 1).GetCode()));
Node* JSGraph::CEntryStubConstant(int result_size) {
if (result_size == 1) {
if (!c_entry_stub_constant_.is_set()) {
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 {
cache_(zone()) {}
// Canonicalized global constants.
Node* CEntryStubConstant();
Node* CEntryStubConstant(int result_size);
Node* UndefinedConstant();
Node* TheHoleConstant();
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