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 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
143 DispatchToBytecodeHandler(handler, BytecodeOffset()); | 143 DispatchToBytecodeHandler(handler, BytecodeOffset()); |
144 } | 144 } |
145 | 145 |
146 // Dispatch bytecode as wide operand variant. | 146 // Dispatch bytecode as wide operand variant. |
147 void DispatchWide(OperandScale operand_scale); | 147 void DispatchWide(OperandScale operand_scale); |
148 | 148 |
149 // Abort with the given bailout reason. | 149 // Abort with the given bailout reason. |
150 void Abort(BailoutReason bailout_reason); | 150 void Abort(BailoutReason bailout_reason); |
151 | 151 |
152 protected: | 152 protected: |
153 Bytecode bytecode() const { return bytecode_; } | |
153 static bool TargetSupportsUnalignedAccess(); | 154 static bool TargetSupportsUnalignedAccess(); |
154 | 155 |
155 private: | 156 private: |
157 // Returns the accumulator value without checking whether bytecode uses it. | |
rmcilroy
2016/04/05 12:59:23
nit - mention it should only be used for passing a
oth
2016/04/05 14:12:10
Done.
| |
158 compiler::Node* GetAccumulatorUnchecked(); | |
156 // Returns a raw pointer to start of the register file on the stack. | 159 // Returns a raw pointer to start of the register file on the stack. |
157 compiler::Node* RegisterFileRawPointer(); | 160 compiler::Node* RegisterFileRawPointer(); |
158 // Returns a tagged pointer to the current function's BytecodeArray object. | 161 // Returns a tagged pointer to the current function's BytecodeArray object. |
159 compiler::Node* BytecodeArrayTaggedPointer(); | 162 compiler::Node* BytecodeArrayTaggedPointer(); |
160 // Returns the offset from the BytecodeArrayPointer of the current bytecode. | 163 // Returns the offset from the BytecodeArrayPointer of the current bytecode. |
161 compiler::Node* BytecodeOffset(); | 164 compiler::Node* BytecodeOffset(); |
162 // Returns a raw pointer to first entry in the interpreter dispatch table. | 165 // Returns a raw pointer to first entry in the interpreter dispatch table. |
163 compiler::Node* DispatchTableRawPointer(); | 166 compiler::Node* DispatchTableRawPointer(); |
164 | 167 |
165 // Saves and restores interpreter bytecode offset to the interpreter stack | 168 // Saves and restores interpreter bytecode offset to the interpreter stack |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
210 | 213 |
211 // Abort operations for debug code. | 214 // Abort operations for debug code. |
212 void AbortIfWordNotEqual(compiler::Node* lhs, compiler::Node* rhs, | 215 void AbortIfWordNotEqual(compiler::Node* lhs, compiler::Node* rhs, |
213 BailoutReason bailout_reason); | 216 BailoutReason bailout_reason); |
214 | 217 |
215 OperandScale operand_scale() const { return operand_scale_; } | 218 OperandScale operand_scale() const { return operand_scale_; } |
216 | 219 |
217 Bytecode bytecode_; | 220 Bytecode bytecode_; |
218 OperandScale operand_scale_; | 221 OperandScale operand_scale_; |
219 CodeStubAssembler::Variable accumulator_; | 222 CodeStubAssembler::Variable accumulator_; |
223 AccumulatorUse accumulator_use_; | |
220 CodeStubAssembler::Variable context_; | 224 CodeStubAssembler::Variable context_; |
221 CodeStubAssembler::Variable bytecode_array_; | 225 CodeStubAssembler::Variable bytecode_array_; |
222 | 226 |
223 bool disable_stack_check_across_call_; | 227 bool disable_stack_check_across_call_; |
224 compiler::Node* stack_pointer_before_call_; | 228 compiler::Node* stack_pointer_before_call_; |
225 | 229 |
226 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); | 230 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); |
227 }; | 231 }; |
228 | 232 |
229 } // namespace interpreter | 233 } // namespace interpreter |
230 } // namespace internal | 234 } // namespace internal |
231 } // namespace v8 | 235 } // namespace v8 |
232 | 236 |
233 #endif // V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ | 237 #endif // V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ |
OLD | NEW |