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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/interpreter/interpreter.cc ('k') | src/interpreter/interpreter-intrinsics.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef V8_INTERPRETER_INTERPRETER_INTRINSICS_H_
6 #define V8_INTERPRETER_INTERPRETER_INTRINSICS_H_
7
8 #include "src/allocation.h"
9 #include "src/base/smart-pointers.h"
10 #include "src/builtins.h"
11 #include "src/frames.h"
12 #include "src/interpreter/bytecodes.h"
13 #include "src/interpreter/interpreter-assembler.h"
14 #include "src/runtime/runtime.h"
15
16 namespace v8 {
17 namespace internal {
18
19 namespace compiler {
20 class Node;
21 } // namespace compiler
22
23 #define INTRINSICS_LIST(V) \
24 V(IsJSReceiver, is_js_receiver, 1) \
25 V(IsArray, is_array, 1)
26
27 namespace interpreter {
28
29 class IntrinsicsHelper {
30 public:
31 explicit IntrinsicsHelper(InterpreterAssembler* assembler);
32
33 compiler::Node* InvokeIntrinsic(compiler::Node* function_id,
34 compiler::Node* context,
35 compiler::Node* first_arg_reg,
36 compiler::Node* arg_count);
37
38 static bool IsSupported(Runtime::FunctionId function_id);
39
40 private:
41 enum InstanceTypeCompareMode {
42 kInstanceTypeEqual,
43 kInstanceTypeGreaterThanOrEqual
44 };
45 compiler::Node* CompareInstanceType(compiler::Node* map, int type,
46 InstanceTypeCompareMode mode);
47 void AbortIfArgCountMismatch(int expected, compiler::Node* actual);
48 InterpreterAssembler* assembler_;
49
50 #define DECLARE_INTRINSIC_HELPER(name, lower_case, count) \
51 compiler::Node* name(compiler::Node* input);
52 INTRINSICS_LIST(DECLARE_INTRINSIC_HELPER)
53 #undef DECLARE_INTRINSIC_HELPER
54
55 DISALLOW_COPY_AND_ASSIGN(IntrinsicsHelper);
56 };
57
58 } // namespace interpreter
59 } // namespace internal
60 } // namespace v8
61
62 #endif
OLDNEW
« 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