| 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/bytecodes.h" | 5 #include "src/interpreter/bytecodes.h" |
| 6 | 6 |
| 7 #include "src/frames.h" | 7 #include "src/frames.h" |
| 8 #include "src/interpreter/bytecode-traits.h" | 8 #include "src/interpreter/bytecode-traits.h" |
| 9 | 9 |
| 10 namespace v8 { | 10 namespace v8 { |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 224 case interpreter::OperandType::kIdx8: | 224 case interpreter::OperandType::kIdx8: |
| 225 os << "[" << static_cast<unsigned int>(*operand_start) << "]"; | 225 os << "[" << static_cast<unsigned int>(*operand_start) << "]"; |
| 226 break; | 226 break; |
| 227 case interpreter::OperandType::kIdx16: { | 227 case interpreter::OperandType::kIdx16: { |
| 228 os << "[" << Bytecodes::ShortOperandFromBytes(operand_start) << "]"; | 228 os << "[" << Bytecodes::ShortOperandFromBytes(operand_start) << "]"; |
| 229 break; | 229 break; |
| 230 } | 230 } |
| 231 case interpreter::OperandType::kImm8: | 231 case interpreter::OperandType::kImm8: |
| 232 os << "#" << static_cast<int>(static_cast<int8_t>(*operand_start)); | 232 os << "#" << static_cast<int>(static_cast<int8_t>(*operand_start)); |
| 233 break; | 233 break; |
| 234 case interpreter::OperandType::kReg8: { | 234 case interpreter::OperandType::kReg8: |
| 235 case interpreter::OperandType::kMaybeReg8: { |
| 235 Register reg = Register::FromOperand(*operand_start); | 236 Register reg = Register::FromOperand(*operand_start); |
| 236 if (reg.is_function_context()) { | 237 if (reg.is_function_context()) { |
| 237 os << "<context>"; | 238 os << "<context>"; |
| 238 } else if (reg.is_function_closure()) { | 239 } else if (reg.is_function_closure()) { |
| 239 os << "<closure>"; | 240 os << "<closure>"; |
| 240 } else if (reg.is_parameter()) { | 241 } else if (reg.is_parameter()) { |
| 241 int parameter_index = reg.ToParameterIndex(parameter_count); | 242 int parameter_index = reg.ToParameterIndex(parameter_count); |
| 242 if (parameter_index == 0) { | 243 if (parameter_index == 0) { |
| 243 os << "<this>"; | 244 os << "<this>"; |
| 244 } else { | 245 } else { |
| (...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 351 } | 352 } |
| 352 if (reg5.is_valid() && reg4.index() + 1 != reg5.index()) { | 353 if (reg5.is_valid() && reg4.index() + 1 != reg5.index()) { |
| 353 return false; | 354 return false; |
| 354 } | 355 } |
| 355 return true; | 356 return true; |
| 356 } | 357 } |
| 357 | 358 |
| 358 } // namespace interpreter | 359 } // namespace interpreter |
| 359 } // namespace internal | 360 } // namespace internal |
| 360 } // namespace v8 | 361 } // namespace v8 |
| OLD | NEW |