| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 // Dispatch to bytecode handler. | 136 // Dispatch to bytecode handler. |
| 137 compiler::Node* DispatchToBytecodeHandler(compiler::Node* handler) { | 137 compiler::Node* DispatchToBytecodeHandler(compiler::Node* handler) { |
| 138 return DispatchToBytecodeHandler(handler, BytecodeOffset()); | 138 return DispatchToBytecodeHandler(handler, BytecodeOffset()); |
| 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, |
| 147 BailoutReason bailout_reason); |
| 146 | 148 |
| 147 protected: | 149 protected: |
| 148 Bytecode bytecode() const { return bytecode_; } | 150 Bytecode bytecode() const { return bytecode_; } |
| 149 static bool TargetSupportsUnalignedAccess(); | 151 static bool TargetSupportsUnalignedAccess(); |
| 150 | 152 |
| 151 private: | 153 private: |
| 152 // Returns a tagged pointer to the current function's BytecodeArray object. | 154 // Returns a tagged pointer to the current function's BytecodeArray object. |
| 153 compiler::Node* BytecodeArrayTaggedPointer(); | 155 compiler::Node* BytecodeArrayTaggedPointer(); |
| 154 // Returns the offset from the BytecodeArrayPointer of the current bytecode. | 156 // Returns the offset from the BytecodeArrayPointer of the current bytecode. |
| 155 compiler::Node* BytecodeOffset(); | 157 compiler::Node* BytecodeOffset(); |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 compiler::Node* DispatchTo(compiler::Node* new_bytecode_offset); | 218 compiler::Node* DispatchTo(compiler::Node* new_bytecode_offset); |
| 217 | 219 |
| 218 // Dispatch to the bytecode handler with code offset |handler|. | 220 // Dispatch to the bytecode handler with code offset |handler|. |
| 219 compiler::Node* DispatchToBytecodeHandler(compiler::Node* handler, | 221 compiler::Node* DispatchToBytecodeHandler(compiler::Node* handler, |
| 220 compiler::Node* bytecode_offset); | 222 compiler::Node* bytecode_offset); |
| 221 | 223 |
| 222 // Dispatch to the bytecode handler with code entry point |handler_entry|. | 224 // Dispatch to the bytecode handler with code entry point |handler_entry|. |
| 223 compiler::Node* DispatchToBytecodeHandlerEntry( | 225 compiler::Node* DispatchToBytecodeHandlerEntry( |
| 224 compiler::Node* handler_entry, compiler::Node* bytecode_offset); | 226 compiler::Node* handler_entry, compiler::Node* bytecode_offset); |
| 225 | 227 |
| 226 // Abort operations for debug code. | |
| 227 void AbortIfWordNotEqual(compiler::Node* lhs, compiler::Node* rhs, | |
| 228 BailoutReason bailout_reason); | |
| 229 | |
| 230 OperandScale operand_scale() const { return operand_scale_; } | 228 OperandScale operand_scale() const { return operand_scale_; } |
| 231 | 229 |
| 232 Bytecode bytecode_; | 230 Bytecode bytecode_; |
| 233 OperandScale operand_scale_; | 231 OperandScale operand_scale_; |
| 234 CodeStubAssembler::Variable accumulator_; | 232 CodeStubAssembler::Variable accumulator_; |
| 235 AccumulatorUse accumulator_use_; | 233 AccumulatorUse accumulator_use_; |
| 236 bool made_call_; | 234 bool made_call_; |
| 237 | 235 |
| 238 bool disable_stack_check_across_call_; | 236 bool disable_stack_check_across_call_; |
| 239 compiler::Node* stack_pointer_before_call_; | 237 compiler::Node* stack_pointer_before_call_; |
| 240 | 238 |
| 241 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); | 239 DISALLOW_COPY_AND_ASSIGN(InterpreterAssembler); |
| 242 }; | 240 }; |
| 243 | 241 |
| 244 } // namespace interpreter | 242 } // namespace interpreter |
| 245 } // namespace internal | 243 } // namespace internal |
| 246 } // namespace v8 | 244 } // namespace v8 |
| 247 | 245 |
| 248 #endif // V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ | 246 #endif // V8_INTERPRETER_INTERPRETER_ASSEMBLER_H_ |
| OLD | NEW |