Index: src/interpreter/interpreter.cc |
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc |
index d1afce6b3e69f9f293dc3b7086cce882bfda04f5..af1cab89ab98d04c900f6d58fe5f01501adeeff8 100644 |
--- a/src/interpreter/interpreter.cc |
+++ b/src/interpreter/interpreter.cc |
@@ -11,6 +11,7 @@ |
#include "src/interpreter/bytecode-generator.h" |
#include "src/interpreter/bytecodes.h" |
#include "src/interpreter/interpreter-assembler.h" |
+#include "src/interpreter/interpreter-intrinsics.h" |
#include "src/zone.h" |
namespace v8 { |
@@ -1039,6 +1040,26 @@ void Interpreter::DoCallRuntime(InterpreterAssembler* assembler) { |
DoCallRuntimeCommon(assembler); |
} |
+// InvokeIntrinsic <function_id> <first_arg> <arg_count> |
+// |
+// Implements the semantic equivalent of calling the runtime function |
+// |function_id| with the first argument in |first_arg| and |arg_count| |
+// arguments in subsequent registers. |
+void Interpreter::DoInvokeIntrinsic(InterpreterAssembler* assembler) { |
+ Node* function_id = __ BytecodeOperandIdx(0); |
+ Node* first_arg_reg = __ BytecodeOperandReg(1); |
+ Node* arg_count = __ BytecodeOperandCount(2); |
+ Node* context = __ GetContext(); |
+ IntrinsicsHelper helper(assembler); |
+ Node* result = |
+ helper.InvokeIntrinsic(function_id, context, first_arg_reg, arg_count); |
+ __ SetAccumulator(result); |
+ __ Dispatch(); |
+} |
+ |
+void Interpreter::DoInvokeIntrinsicWide(InterpreterAssembler* assembler) { |
+ DoInvokeIntrinsic(assembler); |
+} |
// CallRuntime <function_id> <first_arg> <arg_count> |
// |