Index: src/interpreter/interpreter.cc |
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc |
index f36ba9efeb45b3ab8038b23f10600ceabe813876..dcd3c44e5473c18fc2343b8d1d6a2994c8bceb27 100644 |
--- a/src/interpreter/interpreter.cc |
+++ b/src/interpreter/interpreter.cc |
@@ -334,10 +334,10 @@ void Interpreter::DoMod(compiler::InterpreterAssembler* assembler) { |
} |
-// Call <receiver> <arg_count> |
+// Call <callable> <receiver> <arg_count> |
// |
-// Call a JS function with receiver and |arg_count| arguments in subsequent |
-// registers. The JSfunction or Callable to call is in the accumulator. |
+// Call a JSfunction or Callable in |callable| with receiver and |arg_count| |
+// arguments in subsequent registers. |
void Interpreter::DoCall(compiler::InterpreterAssembler* assembler) { |
Node* function_reg = __ BytecodeOperandReg8(0); |
Node* function = __ LoadRegister(function_reg); |
@@ -350,6 +350,21 @@ void Interpreter::DoCall(compiler::InterpreterAssembler* assembler) { |
} |
+// CallRuntime <function_id> <first_arg> <arg_count> |
+// |
+// Call the runtime function |function_id| with first argument in register |
+// |first_arg| and |arg_count| arguments in subsequent registers. |
+void Interpreter::DoCallRuntime(compiler::InterpreterAssembler* assembler) { |
+ Node* function_id = __ BytecodeOperandIdx16(0); |
+ Node* first_arg_reg = __ BytecodeOperandReg8(1); |
+ Node* first_arg = __ RegisterLocation(first_arg_reg); |
+ Node* args_count = __ BytecodeOperandCount8(2); |
+ Node* result = __ CallRuntime(function_id, first_arg, args_count); |
+ __ SetAccumulator(result); |
+ __ Dispatch(); |
+} |
+ |
+ |
// TestEqual <src> |
// |
// Test if the value in the <src> register equals the accumulator. |