| 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 } | 139 } |
| 140 | 140 |
| 141 // Dispatch bytecode as wide operand variant. | 141 // Dispatch bytecode as wide operand variant. |
| 142 void DispatchWide(OperandScale operand_scale); | 142 void DispatchWide(OperandScale operand_scale); |
| 143 | 143 |
| 144 // Abort with the given bailout reason. | 144 // Abort with the given bailout reason. |
| 145 void Abort(BailoutReason bailout_reason); | 145 void Abort(BailoutReason bailout_reason); |
| 146 void AbortIfWordNotEqual(compiler::Node* lhs, compiler::Node* rhs, | 146 void AbortIfWordNotEqual(compiler::Node* lhs, compiler::Node* rhs, |
| 147 BailoutReason bailout_reason); | 147 BailoutReason bailout_reason); |
| 148 | 148 |
| 149 // Returns the offset from the BytecodeArrayPointer of the current bytecode. |
| 150 compiler::Node* BytecodeOffset(); |
| 151 |
| 149 protected: | 152 protected: |
| 150 Bytecode bytecode() const { return bytecode_; } | 153 Bytecode bytecode() const { return bytecode_; } |
| 151 static bool TargetSupportsUnalignedAccess(); | 154 static bool TargetSupportsUnalignedAccess(); |
| 152 | 155 |
| 153 private: | 156 private: |
| 154 // Returns a tagged pointer to the current function's BytecodeArray object. | 157 // Returns a tagged pointer to the current function's BytecodeArray object. |
| 155 compiler::Node* BytecodeArrayTaggedPointer(); | 158 compiler::Node* BytecodeArrayTaggedPointer(); |
| 156 // Returns the offset from the BytecodeArrayPointer of the current bytecode. | |
| 157 compiler::Node* BytecodeOffset(); | |
| 158 // Returns a raw pointer to first entry in the interpreter dispatch table. | 159 // Returns a raw pointer to first entry in the interpreter dispatch table. |
| 159 compiler::Node* DispatchTableRawPointer(); | 160 compiler::Node* DispatchTableRawPointer(); |
| 160 | 161 |
| 161 // Returns the accumulator value without checking whether bytecode | 162 // Returns the accumulator value without checking whether bytecode |
| 162 // uses it. This is intended to be used only in dispatch and in | 163 // uses it. This is intended to be used only in dispatch and in |
| 163 // tracing as these need to bypass accumulator use validity checks. | 164 // tracing as these need to bypass accumulator use validity checks. |
| 164 compiler::Node* GetAccumulatorUnchecked(); | 165 compiler::Node* GetAccumulatorUnchecked(); |
| 165 | 166 |
| 166 // Saves and restores interpreter bytecode offset to the interpreter stack | 167 // Saves and restores interpreter bytecode offset to the interpreter stack |
| 167 // frame when performing a call. | 168 // frame when performing a call. |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 237 compiler::Node* stack_pointer_before_call_; | 238 compiler::Node* stack_pointer_before_call_; |
| 238 | 239 |
| 239 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); | 240 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); |
| 240 }; | 241 }; |
| 241 | 242 |
| 242 } // namespace interpreter | 243 } // namespace interpreter |
| 243 } // namespace internal | 244 } // namespace internal |
| 244 } // namespace v8 | 245 } // namespace v8 |
| 245 | 246 |
| 246 #endif // V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ | 247 #endif // V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ |
| OLD | NEW |