Index: src/compiler/interpreter-assembler.cc |
diff --git a/src/compiler/interpreter-assembler.cc b/src/compiler/interpreter-assembler.cc |
index a04a93f1525cc023502dedd2c24d02696f50e5dc..bd93807a84d653e34ac2ce4614c8fc776e0e3948 100644 |
--- a/src/compiler/interpreter-assembler.cc |
+++ b/src/compiler/interpreter-assembler.cc |
@@ -148,6 +148,12 @@ Node* InterpreterAssembler::StoreRegister(Node* value, Node* reg_index) { |
} |
+Node* InterpreterAssembler::NextRegister(Node* reg_index) { |
+ // Register indexes are negative, so the next index is minus one. |
+ return IntPtrAdd(reg_index, Int32Constant(-1)); |
+} |
+ |
+ |
Node* InterpreterAssembler::BytecodeOperand(int operand_index) { |
DCHECK_LT(operand_index, interpreter::Bytecodes::NumberOfOperands(bytecode_)); |
DCHECK_EQ(interpreter::OperandSize::kByte, |
@@ -554,13 +560,11 @@ Node* InterpreterAssembler::CallIC(CallInterfaceDescriptor descriptor, |
} |
-Node* InterpreterAssembler::CallRuntime(Node* function_id, Node* first_arg, |
+Node* InterpreterAssembler::CallRuntime(CallDescriptor* descriptor, |
+ Handle<Code> call_stub, |
+ Node* function_id, Node* first_arg, |
Node* arg_count) { |
- Callable callable = CodeFactory::InterpreterCEntry(isolate()); |
- CallDescriptor* descriptor = Linkage::GetStubCallDescriptor( |
- isolate(), zone(), callable.descriptor(), 0, CallDescriptor::kNoFlags); |
- |
- Node* code_target = HeapConstant(callable.code()); |
+ Node* code_target = HeapConstant(call_stub); |
// Get the function entry from the function id. |
Node* function_table = raw_assembler_->ExternalConstant( |
@@ -582,6 +586,29 @@ Node* InterpreterAssembler::CallRuntime(Node* function_id, Node* first_arg, |
} |
+Node* InterpreterAssembler::CallRuntime(Node* function_id, Node* first_arg, |
+ Node* arg_count) { |
+ Callable callable = CodeFactory::InterpreterCEntry(isolate()); |
+ CallDescriptor* descriptor = Linkage::GetStubCallDescriptor( |
+ isolate(), zone(), callable.descriptor(), 0, CallDescriptor::kNoFlags); |
+ |
+ return CallRuntime(descriptor, callable.code(), function_id, first_arg, |
+ arg_count); |
+} |
+ |
+ |
+Node* InterpreterAssembler::CallRuntimePair(Node* function_id, Node* first_arg, |
+ Node* arg_count) { |
+ Callable callable = CodeFactory::InterpreterCEntryPair(isolate()); |
+ CallDescriptor* descriptor = Linkage::GetStubCallDescriptor( |
+ isolate(), zone(), callable.descriptor(), 0, CallDescriptor::kNoFlags, |
+ Operator::kNoProperties, MachineType::AnyTagged(), 2); |
+ |
+ return CallRuntime(descriptor, callable.code(), function_id, first_arg, |
+ arg_count); |
+} |
+ |
+ |
Node* InterpreterAssembler::CallRuntime(Runtime::FunctionId function_id, |
Node* arg1) { |
CallPrologue(); |