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

Unified Diff: src/interpreter/interpreter-intrinsics.h

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/interpreter.cc ('k') | src/interpreter/interpreter-intrinsics.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/interpreter-intrinsics.h
diff --git a/src/interpreter/interpreter-intrinsics.h b/src/interpreter/interpreter-intrinsics.h
new file mode 100644
index 0000000000000000000000000000000000000000..e27c678e25c69275aac8756ffe2ed0342957433e
--- /dev/null
+++ b/src/interpreter/interpreter-intrinsics.h
@@ -0,0 +1,62 @@
+// Copyright 2015 the V8 project authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef V8_INTERPRETER_INTERPRETER_INTRINSICS_H_
+#define V8_INTERPRETER_INTERPRETER_INTRINSICS_H_
+
+#include "src/allocation.h"
+#include "src/base/smart-pointers.h"
+#include "src/builtins.h"
+#include "src/frames.h"
+#include "src/interpreter/bytecodes.h"
+#include "src/interpreter/interpreter-assembler.h"
+#include "src/runtime/runtime.h"
+
+namespace v8 {
+namespace internal {
+
+namespace compiler {
+class Node;
+} // namespace compiler
+
+#define INTRINSICS_LIST(V) \
+ V(IsJSReceiver, is_js_receiver, 1) \
+ V(IsArray, is_array, 1)
+
+namespace interpreter {
+
+class IntrinsicsHelper {
+ public:
+ explicit IntrinsicsHelper(InterpreterAssembler* assembler);
+
+ compiler::Node* InvokeIntrinsic(compiler::Node* function_id,
+ compiler::Node* context,
+ compiler::Node* first_arg_reg,
+ compiler::Node* arg_count);
+
+ static bool IsSupported(Runtime::FunctionId function_id);
+
+ private:
+ enum InstanceTypeCompareMode {
+ kInstanceTypeEqual,
+ kInstanceTypeGreaterThanOrEqual
+ };
+ compiler::Node* CompareInstanceType(compiler::Node* map, int type,
+ InstanceTypeCompareMode mode);
+ void AbortIfArgCountMismatch(int expected, compiler::Node* actual);
+ InterpreterAssembler* assembler_;
+
+#define DECLARE_INTRINSIC_HELPER(name, lower_case, count) \
+ compiler::Node* name(compiler::Node* input);
+ INTRINSICS_LIST(DECLARE_INTRINSIC_HELPER)
+#undef DECLARE_INTRINSIC_HELPER
+
+ DISALLOW_COPY_AND_ASSIGN(IntrinsicsHelper);
+};
+
+} // namespace interpreter
+} // namespace internal
+} // namespace v8
+
+#endif
« no previous file with comments | « src/interpreter/interpreter.cc ('k') | src/interpreter/interpreter-intrinsics.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698