Index: src/compiler/raw-machine-assembler.cc |
diff --git a/src/compiler/raw-machine-assembler.cc b/src/compiler/raw-machine-assembler.cc |
index 0d4b8cb20079b0e28fd45fa435c6b48611e99709..dfc985f867b7a3f0823ddb9b52be7b71eb9e5eba 100644 |
--- a/src/compiler/raw-machine-assembler.cc |
+++ b/src/compiler/raw-machine-assembler.cc |
@@ -247,6 +247,27 @@ Node* RawMachineAssembler::TailCallN(CallDescriptor* desc, Node* function, |
return tail_call; |
} |
+Node* RawMachineAssembler::TailCallRuntime0(Runtime::FunctionId function, |
+ Node* context) { |
+ const int kArity = 0; |
+ CallDescriptor* desc = Linkage::GetRuntimeCallDescriptor( |
+ zone(), function, kArity, Operator::kNoProperties, |
+ CallDescriptor::kSupportsTailCalls); |
+ int return_count = static_cast<int>(desc->ReturnCount()); |
+ |
+ Node* centry = HeapConstant(CEntryStub(isolate(), return_count).GetCode()); |
+ Node* ref = AddNode( |
+ common()->ExternalConstant(ExternalReference(function, isolate()))); |
+ Node* arity = Int32Constant(kArity); |
+ |
+ Node* nodes[] = {centry, ref, arity, context}; |
+ Node* tail_call = MakeNode(common()->TailCall(desc), arraysize(nodes), nodes); |
+ |
+ NodeProperties::MergeControlToEnd(graph(), common(), tail_call); |
+ schedule()->AddTailCall(CurrentBlock(), tail_call); |
+ current_block_ = nullptr; |
+ return tail_call; |
+} |
Node* RawMachineAssembler::TailCallRuntime1(Runtime::FunctionId function, |
Node* arg1, Node* context) { |