Commit c0291e12 authored by franzih's avatar franzih Committed by Commit bot

[Interpreter] Add CallRuntime() for 5 arguments.

CodeAssembler::CallRuntime() with 5 arguments was declared but
not implemented.

BUG=

Review-Url: https://codereview.chromium.org/2503523002
Cr-Commit-Position: refs/heads/master@{#40973}
parent 71a7bca9
......@@ -416,6 +416,16 @@ Node* CodeAssembler::CallRuntime(Runtime::FunctionId function_id, Node* context,
return return_value;
}
Node* CodeAssembler::CallRuntime(Runtime::FunctionId function_id, Node* context,
Node* arg1, Node* arg2, Node* arg3, Node* arg4,
Node* arg5) {
CallPrologue();
Node* return_value = raw_assembler_->CallRuntime5(function_id, arg1, arg2,
arg3, arg4, arg5, context);
CallEpilogue();
return return_value;
}
Node* CodeAssembler::TailCallRuntime(Runtime::FunctionId function_id,
Node* context) {
return raw_assembler_->TailCallRuntime0(function_id, context);
......
......@@ -276,6 +276,21 @@ Node* RawMachineAssembler::CallRuntime4(Runtime::FunctionId function,
ref, arity, context);
}
Node* RawMachineAssembler::CallRuntime5(Runtime::FunctionId function,
Node* arg1, Node* arg2, Node* arg3,
Node* arg4, Node* arg5, Node* context) {
CallDescriptor* descriptor = Linkage::GetRuntimeCallDescriptor(
zone(), function, 5, Operator::kNoProperties, CallDescriptor::kNoFlags);
int return_count = static_cast<int>(descriptor->ReturnCount());
Node* centry = HeapConstant(CEntryStub(isolate(), return_count).GetCode());
Node* ref = AddNode(
common()->ExternalConstant(ExternalReference(function, isolate())));
Node* arity = Int32Constant(5);
return AddNode(common()->Call(descriptor), centry, arg1, arg2, arg3, arg4,
arg5, ref, arity, context);
}
Node* RawMachineAssembler::TailCallN(CallDescriptor* desc, Node* function,
Node** args) {
......
......@@ -718,6 +718,9 @@ class V8_EXPORT_PRIVATE RawMachineAssembler {
// Call to a runtime function with four arguments.
Node* CallRuntime4(Runtime::FunctionId function, Node* arg1, Node* arg2,
Node* arg3, Node* arg4, Node* context);
// Call to a runtime function with five arguments.
Node* CallRuntime5(Runtime::FunctionId function, Node* arg1, Node* arg2,
Node* arg3, Node* arg4, Node* arg5, Node* context);
// Call to a C function with zero arguments.
Node* CallCFunction0(MachineType return_type, Node* function);
// Call to a C function with one parameter.
......
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