OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef V8_COMPILER_INTERPRETER_ASSEMBLER_H_ | 5 #ifndef V8_COMPILER_INTERPRETER_ASSEMBLER_H_ |
6 #define V8_COMPILER_INTERPRETER_ASSEMBLER_H_ | 6 #define V8_COMPILER_INTERPRETER_ASSEMBLER_H_ |
7 | 7 |
8 // Clients of this interface shouldn't depend on lots of compiler internals. | 8 // Clients of this interface shouldn't depend on lots of compiler internals. |
9 // Do not include anything from src/compiler here! | 9 // Do not include anything from src/compiler here! |
10 #include "src/allocation.h" | 10 #include "src/allocation.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 | 58 |
59 // Accumulator. | 59 // Accumulator. |
60 Node* GetAccumulator(); | 60 Node* GetAccumulator(); |
61 void SetAccumulator(Node* value); | 61 void SetAccumulator(Node* value); |
62 | 62 |
63 // Context. | 63 // Context. |
64 Node* GetContext(); | 64 Node* GetContext(); |
65 void SetContext(Node* value); | 65 void SetContext(Node* value); |
66 | 66 |
67 // Loads from and stores to the interpreter register file. | 67 // Loads from and stores to the interpreter register file. |
| 68 Node* LoadRegister(interpreter::Register reg); |
68 Node* LoadRegister(Node* reg_index); | 69 Node* LoadRegister(Node* reg_index); |
69 Node* StoreRegister(Node* value, Node* reg_index); | 70 Node* StoreRegister(Node* value, Node* reg_index); |
70 | 71 |
71 // Returns the location in memory of the register |reg_index| in the | 72 // Returns the location in memory of the register |reg_index| in the |
72 // interpreter register file. | 73 // interpreter register file. |
73 Node* RegisterLocation(Node* reg_index); | 74 Node* RegisterLocation(Node* reg_index); |
74 | 75 |
75 // Constants. | 76 // Constants. |
76 Node* Int32Constant(int value); | 77 Node* Int32Constant(int value); |
77 Node* IntPtrConstant(intptr_t value); | 78 Node* IntPtrConstant(intptr_t value); |
(...skipping 21 matching lines...) Expand all Loading... |
99 | 100 |
100 // Load the TypeFeedbackVector for the current function. | 101 // Load the TypeFeedbackVector for the current function. |
101 Node* LoadTypeFeedbackVector(); | 102 Node* LoadTypeFeedbackVector(); |
102 | 103 |
103 // Call JSFunction or Callable |function| with |arg_count| (not including | 104 // Call JSFunction or Callable |function| with |arg_count| (not including |
104 // receiver) and the first argument located at |first_arg|. | 105 // receiver) and the first argument located at |first_arg|. |
105 Node* CallJS(Node* function, Node* first_arg, Node* arg_count); | 106 Node* CallJS(Node* function, Node* first_arg, Node* arg_count); |
106 | 107 |
107 // Call an IC code stub. | 108 // Call an IC code stub. |
108 Node* CallIC(CallInterfaceDescriptor descriptor, Node* target, Node* arg1, | 109 Node* CallIC(CallInterfaceDescriptor descriptor, Node* target, Node* arg1, |
| 110 Node* arg2, Node* arg3); |
| 111 Node* CallIC(CallInterfaceDescriptor descriptor, Node* target, Node* arg1, |
109 Node* arg2, Node* arg3, Node* arg4); | 112 Node* arg2, Node* arg3, Node* arg4); |
110 Node* CallIC(CallInterfaceDescriptor descriptor, Node* target, Node* arg1, | 113 Node* CallIC(CallInterfaceDescriptor descriptor, Node* target, Node* arg1, |
111 Node* arg2, Node* arg3, Node* arg4, Node* arg5); | 114 Node* arg2, Node* arg3, Node* arg4, Node* arg5); |
112 | 115 |
113 // Call runtime function. | 116 // Call runtime function. |
114 Node* CallRuntime(Node* function_id, Node* first_arg, Node* arg_count); | 117 Node* CallRuntime(Node* function_id, Node* first_arg, Node* arg_count); |
115 Node* CallRuntime(Runtime::FunctionId function_id, Node* arg1); | 118 Node* CallRuntime(Runtime::FunctionId function_id, Node* arg1); |
116 Node* CallRuntime(Runtime::FunctionId function_id, Node* arg1, Node* arg2); | 119 Node* CallRuntime(Runtime::FunctionId function_id, Node* arg1, Node* arg2); |
| 120 Node* CallRuntime(Runtime::FunctionId function_id, Node* arg1, Node* arg2, |
| 121 Node* arg3, Node* arg4); |
117 | 122 |
118 // Jump relative to the current bytecode by |jump_offset|. | 123 // Jump relative to the current bytecode by |jump_offset|. |
119 void Jump(Node* jump_offset); | 124 void Jump(Node* jump_offset); |
120 | 125 |
121 // Jump relative to the current bytecode by |jump_offset| if the | 126 // Jump relative to the current bytecode by |jump_offset| if the |
122 // word values |lhs| and |rhs| are equal. | 127 // word values |lhs| and |rhs| are equal. |
123 void JumpIfWordEqual(Node* lhs, Node* rhs, Node* jump_offset); | 128 void JumpIfWordEqual(Node* lhs, Node* rhs, Node* jump_offset); |
124 | 129 |
125 // Returns from the function. | 130 // Returns from the function. |
126 void Return(); | 131 void Return(); |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
188 bool code_generated_; | 193 bool code_generated_; |
189 | 194 |
190 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); | 195 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); |
191 }; | 196 }; |
192 | 197 |
193 } // namespace compiler | 198 } // namespace compiler |
194 } // namespace internal | 199 } // namespace internal |
195 } // namespace v8 | 200 } // namespace v8 |
196 | 201 |
197 #endif // V8_COMPILER_INTERPRETER_ASSEMBLER_H_ | 202 #endif // V8_COMPILER_INTERPRETER_ASSEMBLER_H_ |
OLD | NEW |