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 #include "src/compiler/interpreter-assembler.h" | 5 #include "src/compiler/interpreter-assembler.h" |
6 | 6 |
7 #include <ostream> | 7 #include <ostream> |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/compiler/graph.h" | 10 #include "src/compiler/graph.h" |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 interpreter::Bytecodes::GetOperandType(bytecode_, operand_index)); | 219 interpreter::Bytecodes::GetOperandType(bytecode_, operand_index)); |
220 return BytecodeOperandShort(operand_index); | 220 return BytecodeOperandShort(operand_index); |
221 default: | 221 default: |
222 UNREACHABLE(); | 222 UNREACHABLE(); |
223 return nullptr; | 223 return nullptr; |
224 } | 224 } |
225 } | 225 } |
226 | 226 |
227 | 227 |
228 Node* InterpreterAssembler::BytecodeOperandReg(int operand_index) { | 228 Node* InterpreterAssembler::BytecodeOperandReg(int operand_index) { |
229 DCHECK_EQ(interpreter::OperandType::kReg8, | 229 #ifdef DEBUG |
230 interpreter::Bytecodes::GetOperandType(bytecode_, operand_index)); | 230 interpreter::OperandType operand_type = |
| 231 interpreter::Bytecodes::GetOperandType(bytecode_, operand_index); |
| 232 DCHECK(operand_type == interpreter::OperandType::kReg8 || |
| 233 operand_type == interpreter::OperandType::kMaybeReg8); |
| 234 #endif |
231 return BytecodeOperandSignExtended(operand_index); | 235 return BytecodeOperandSignExtended(operand_index); |
232 } | 236 } |
233 | 237 |
234 | 238 |
235 Node* InterpreterAssembler::Int32Constant(int value) { | 239 Node* InterpreterAssembler::Int32Constant(int value) { |
236 return raw_assembler_->Int32Constant(value); | 240 return raw_assembler_->Int32Constant(value); |
237 } | 241 } |
238 | 242 |
239 | 243 |
240 Node* InterpreterAssembler::IntPtrConstant(intptr_t value) { | 244 Node* InterpreterAssembler::IntPtrConstant(intptr_t value) { |
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
642 return raw_assembler_->schedule(); | 646 return raw_assembler_->schedule(); |
643 } | 647 } |
644 | 648 |
645 | 649 |
646 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); } | 650 Zone* InterpreterAssembler::zone() { return raw_assembler_->zone(); } |
647 | 651 |
648 | 652 |
649 } // namespace compiler | 653 } // namespace compiler |
650 } // namespace internal | 654 } // namespace internal |
651 } // namespace v8 | 655 } // namespace v8 |
OLD | NEW |