Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(268)

Unified Diff: src/interpreter/interpreter.cc

Issue 1645763003: [Interpreter] TurboFan implementation of intrinsics. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Merged with oth@'s changes. Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/interpreter/bytecodes.cc ('k') | src/interpreter/interpreter-intrinsics.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/interpreter.cc
diff --git a/src/interpreter/interpreter.cc b/src/interpreter/interpreter.cc
index 4aa14b5c15ec1c479c3d1c96140e53c49b7e1038..b5eaef8b846d281c2423e8a55179c3be71507603 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/log.h"
#include "src/zone.h"
@@ -894,6 +895,23 @@ 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 = __ BytecodeOperandRuntimeId(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::DoCallRuntimeForPairCommon(InterpreterAssembler* assembler) {
// Call the runtime function.
Node* function_id = __ BytecodeOperandRuntimeId(0);
« no previous file with comments | « src/interpreter/bytecodes.cc ('k') | src/interpreter/interpreter-intrinsics.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698