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_INTERPRETER_INTERPRETER_ASSEMBLER_H_ | 5 #ifndef V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ |
6 #define V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ | 6 #define V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ |
7 | 7 |
8 #include "src/allocation.h" | 8 #include "src/allocation.h" |
9 #include "src/base/smart-pointers.h" | 9 #include "src/base/smart-pointers.h" |
10 #include "src/builtins.h" | 10 #include "src/builtins.h" |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 compiler::Node* DispatchTableRawPointer(); | 164 compiler::Node* DispatchTableRawPointer(); |
165 | 165 |
166 // Returns the accumulator value without checking whether bytecode | 166 // Returns the accumulator value without checking whether bytecode |
167 // uses it. This is intended to be used only in dispatch and in | 167 // uses it. This is intended to be used only in dispatch and in |
168 // tracing as these need to bypass accumulator use validity checks. | 168 // tracing as these need to bypass accumulator use validity checks. |
169 compiler::Node* GetAccumulatorUnchecked(); | 169 compiler::Node* GetAccumulatorUnchecked(); |
170 | 170 |
171 // Returns the frame pointer for the interpreted frame of the function being | 171 // Returns the frame pointer for the interpreted frame of the function being |
172 // interpreted. | 172 // interpreted. |
173 compiler::Node* GetInterpretedFramePointer(); | 173 compiler::Node* GetInterpretedFramePointer(); |
| 174 compiler::Node* BytecodeInnerPointer(); |
174 | 175 |
175 // Saves and restores interpreter bytecode offset to the interpreter stack | 176 // Saves and restores interpreter bytecode offset to the interpreter stack |
176 // frame when performing a call. | 177 // frame when performing a call. |
177 void CallPrologue() override; | 178 void CallPrologue() override; |
178 void CallEpilogue() override; | 179 void CallEpilogue() override; |
179 | 180 |
180 // Increment the dispatch counter for the (current, next) bytecode pair. | 181 // Increment the dispatch counter for the (current, next) bytecode pair. |
181 void TraceBytecodeDispatch(compiler::Node* target_index); | 182 void TraceBytecodeDispatch(compiler::Node* target_index); |
182 | 183 |
183 // Traces the current bytecode by calling |function_id|. | 184 // Traces the current bytecode by calling |function_id|. |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 | 233 |
233 // Dispatch to the bytecode handler with code entry point |handler_entry|. | 234 // Dispatch to the bytecode handler with code entry point |handler_entry|. |
234 compiler::Node* DispatchToBytecodeHandlerEntry( | 235 compiler::Node* DispatchToBytecodeHandlerEntry( |
235 compiler::Node* handler_entry, compiler::Node* bytecode_offset); | 236 compiler::Node* handler_entry, compiler::Node* bytecode_offset); |
236 | 237 |
237 OperandScale operand_scale() const { return operand_scale_; } | 238 OperandScale operand_scale() const { return operand_scale_; } |
238 | 239 |
239 Bytecode bytecode_; | 240 Bytecode bytecode_; |
240 OperandScale operand_scale_; | 241 OperandScale operand_scale_; |
241 CodeStubAssembler::Variable interpreted_frame_pointer_; | 242 CodeStubAssembler::Variable interpreted_frame_pointer_; |
| 243 CodeStubAssembler::Variable bytecode_inner_pointer_; |
242 CodeStubAssembler::Variable accumulator_; | 244 CodeStubAssembler::Variable accumulator_; |
243 AccumulatorUse accumulator_use_; | 245 AccumulatorUse accumulator_use_; |
244 bool made_call_; | 246 bool made_call_; |
245 | 247 |
246 bool disable_stack_check_across_call_; | 248 bool disable_stack_check_across_call_; |
247 compiler::Node* stack_pointer_before_call_; | 249 compiler::Node* stack_pointer_before_call_; |
248 | 250 |
249 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); | 251 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); |
250 }; | 252 }; |
251 | 253 |
252 } // namespace interpreter | 254 } // namespace interpreter |
253 } // namespace internal | 255 } // namespace internal |
254 } // namespace v8 | 256 } // namespace v8 |
255 | 257 |
256 #endif // V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ | 258 #endif // V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ |
OLD | NEW |