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/interpreter/bytecode-array-iterator.h" | 5 #include "src/interpreter/bytecode-array-iterator.h" |
6 | 6 |
7 #include "src/objects-inl.h" | 7 #include "src/objects-inl.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 uint32_t operand = GetRawOperand(operand_index, operand_type); | 82 uint32_t operand = GetRawOperand(operand_index, operand_type); |
83 return static_cast<int>(operand); | 83 return static_cast<int>(operand); |
84 } | 84 } |
85 | 85 |
86 | 86 |
87 Register BytecodeArrayIterator::GetRegisterOperand(int operand_index) const { | 87 Register BytecodeArrayIterator::GetRegisterOperand(int operand_index) const { |
88 OperandType operand_type = | 88 OperandType operand_type = |
89 Bytecodes::GetOperandType(current_bytecode(), operand_index); | 89 Bytecodes::GetOperandType(current_bytecode(), operand_index); |
90 DCHECK(operand_type == OperandType::kReg8 || | 90 DCHECK(operand_type == OperandType::kReg8 || |
91 operand_type == OperandType::kRegPair8 || | 91 operand_type == OperandType::kRegPair8 || |
| 92 operand_type == OperandType::kRegTriple8 || |
92 operand_type == OperandType::kMaybeReg8 || | 93 operand_type == OperandType::kMaybeReg8 || |
93 operand_type == OperandType::kReg16); | 94 operand_type == OperandType::kReg16); |
94 uint32_t operand = GetRawOperand(operand_index, operand_type); | 95 uint32_t operand = GetRawOperand(operand_index, operand_type); |
95 return Register::FromOperand(operand); | 96 return Register::FromOperand(operand); |
96 } | 97 } |
97 | 98 |
98 | 99 |
99 Handle<Object> BytecodeArrayIterator::GetConstantForIndexOperand( | 100 Handle<Object> BytecodeArrayIterator::GetConstantForIndexOperand( |
100 int operand_index) const { | 101 int operand_index) const { |
101 Handle<FixedArray> constants = handle(bytecode_array()->constant_pool()); | 102 Handle<FixedArray> constants = handle(bytecode_array()->constant_pool()); |
(...skipping 12 matching lines...) Expand all Loading... |
114 return current_offset() + smi->value(); | 115 return current_offset() + smi->value(); |
115 } else { | 116 } else { |
116 UNREACHABLE(); | 117 UNREACHABLE(); |
117 return kMinInt; | 118 return kMinInt; |
118 } | 119 } |
119 } | 120 } |
120 | 121 |
121 } // namespace interpreter | 122 } // namespace interpreter |
122 } // namespace internal | 123 } // namespace internal |
123 } // namespace v8 | 124 } // namespace v8 |
OLD | NEW |