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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
149 compiler::Node* DispatchTableRawPointer(); | 149 compiler::Node* DispatchTableRawPointer(); |
150 | 150 |
151 // Saves and restores interpreter bytecode offset to the interpreter stack | 151 // Saves and restores interpreter bytecode offset to the interpreter stack |
152 // frame when performing a call. | 152 // frame when performing a call. |
153 void CallPrologue() override; | 153 void CallPrologue() override; |
154 void CallEpilogue() override; | 154 void CallEpilogue() override; |
155 | 155 |
156 // Traces the current bytecode by calling |function_id|. | 156 // Traces the current bytecode by calling |function_id|. |
157 void TraceBytecode(Runtime::FunctionId function_id); | 157 void TraceBytecode(Runtime::FunctionId function_id); |
158 | 158 |
| 159 // Updates the bytecode array's interrupt budget by |weight| and calls |
| 160 // Runtime::kInterrupt if counter reaches zero. |
| 161 void UpdateInterruptBudget(compiler::Node* weight); |
| 162 |
159 // Returns the offset of register |index| relative to RegisterFilePointer(). | 163 // Returns the offset of register |index| relative to RegisterFilePointer(). |
160 compiler::Node* RegisterFrameOffset(compiler::Node* index); | 164 compiler::Node* RegisterFrameOffset(compiler::Node* index); |
161 | 165 |
162 compiler::Node* BytecodeOperand(int operand_index); | 166 compiler::Node* BytecodeOperand(int operand_index); |
163 compiler::Node* BytecodeOperandSignExtended(int operand_index); | 167 compiler::Node* BytecodeOperandSignExtended(int operand_index); |
164 compiler::Node* BytecodeOperandShort(int operand_index); | 168 compiler::Node* BytecodeOperandShort(int operand_index); |
165 compiler::Node* BytecodeOperandShortSignExtended(int operand_index); | 169 compiler::Node* BytecodeOperandShortSignExtended(int operand_index); |
166 | 170 |
167 // Returns BytecodeOffset() advanced by delta bytecodes. Note: this does not | 171 // Returns BytecodeOffset() advanced by delta bytecodes. Note: this does not |
168 // update BytecodeOffset() itself. | 172 // update BytecodeOffset() itself. |
(...skipping 16 matching lines...) Expand all Loading... |
185 compiler::Node* stack_pointer_before_call_; | 189 compiler::Node* stack_pointer_before_call_; |
186 | 190 |
187 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); | 191 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); |
188 }; | 192 }; |
189 | 193 |
190 } // namespace interpreter | 194 } // namespace interpreter |
191 } // namespace internal | 195 } // namespace internal |
192 } // namespace v8 | 196 } // namespace v8 |
193 | 197 |
194 #endif // V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ | 198 #endif // V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ |
OLD | NEW |