Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(126)

Unified Diff: src/compiler/raw-machine-assembler.cc

Issue 1528643004: [turbofan] Fix RawMachineAssembler for multiple return values. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/raw-machine-assembler.cc
diff --git a/src/compiler/raw-machine-assembler.cc b/src/compiler/raw-machine-assembler.cc
index 2030a1910c029e8d7cdc81a375df66cc4543ea87..0b707b42814d6ce64d37e1e743b208542fe9b7f2 100644
--- a/src/compiler/raw-machine-assembler.cc
+++ b/src/compiler/raw-machine-assembler.cc
@@ -154,8 +154,9 @@ Node* RawMachineAssembler::CallRuntime1(Runtime::FunctionId function,
Node* arg1, Node* context) {
CallDescriptor* descriptor = Linkage::GetRuntimeCallDescriptor(
zone(), function, 1, Operator::kNoProperties, CallDescriptor::kNoFlags);
+ int return_count = static_cast<int>(descriptor->ReturnCount());
- Node* centry = HeapConstant(CEntryStub(isolate(), 1).GetCode());
+ Node* centry = HeapConstant(CEntryStub(isolate(), return_count).GetCode());
Node* ref = AddNode(
common()->ExternalConstant(ExternalReference(function, isolate())));
Node* arity = Int32Constant(1);
@@ -168,8 +169,9 @@ Node* RawMachineAssembler::CallRuntime2(Runtime::FunctionId function,
Node* arg1, Node* arg2, Node* context) {
CallDescriptor* descriptor = Linkage::GetRuntimeCallDescriptor(
zone(), function, 2, Operator::kNoProperties, CallDescriptor::kNoFlags);
+ int return_count = static_cast<int>(descriptor->ReturnCount());
- Node* centry = HeapConstant(CEntryStub(isolate(), 1).GetCode());
+ Node* centry = HeapConstant(CEntryStub(isolate(), return_count).GetCode());
Node* ref = AddNode(
common()->ExternalConstant(ExternalReference(function, isolate())));
Node* arity = Int32Constant(2);
@@ -184,8 +186,9 @@ Node* RawMachineAssembler::CallRuntime4(Runtime::FunctionId function,
Node* arg4, Node* context) {
CallDescriptor* descriptor = Linkage::GetRuntimeCallDescriptor(
zone(), function, 4, Operator::kNoProperties, CallDescriptor::kNoFlags);
+ int return_count = static_cast<int>(descriptor->ReturnCount());
- Node* centry = HeapConstant(CEntryStub(isolate(), 1).GetCode());
+ Node* centry = HeapConstant(CEntryStub(isolate(), return_count).GetCode());
Node* ref = AddNode(
common()->ExternalConstant(ExternalReference(function, isolate())));
Node* arity = Int32Constant(4);
@@ -220,8 +223,9 @@ Node* RawMachineAssembler::TailCallRuntime1(Runtime::FunctionId function,
CallDescriptor* desc = Linkage::GetRuntimeCallDescriptor(
zone(), function, kArity, Operator::kNoProperties,
CallDescriptor::kSupportsTailCalls);
+ int return_count = static_cast<int>(desc->ReturnCount());
- Node* centry = HeapConstant(CEntryStub(isolate(), 1).GetCode());
+ Node* centry = HeapConstant(CEntryStub(isolate(), return_count).GetCode());
Node* ref = AddNode(
common()->ExternalConstant(ExternalReference(function, isolate())));
Node* arity = Int32Constant(kArity);
@@ -243,8 +247,9 @@ Node* RawMachineAssembler::TailCallRuntime2(Runtime::FunctionId function,
CallDescriptor* desc = Linkage::GetRuntimeCallDescriptor(
zone(), function, kArity, Operator::kNoProperties,
CallDescriptor::kSupportsTailCalls);
+ int return_count = static_cast<int>(desc->ReturnCount());
- Node* centry = HeapConstant(CEntryStub(isolate(), 1).GetCode());
+ Node* centry = HeapConstant(CEntryStub(isolate(), return_count).GetCode());
Node* ref = AddNode(
common()->ExternalConstant(ExternalReference(function, isolate())));
Node* arity = Int32Constant(kArity);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698