| 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 <iomanip> | 7 #include <iomanip> |
| 8 | 8 |
| 9 #include "src/frames.h" | 9 #include "src/frames.h" |
| 10 #include "src/interpreter/bytecode-traits.h" | 10 #include "src/interpreter/bytecode-traits.h" |
| (...skipping 706 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 717 } | 717 } |
| 718 | 718 |
| 719 bool Register::is_bytecode_offset() const { | 719 bool Register::is_bytecode_offset() const { |
| 720 return index() == kBytecodeOffsetRegisterIndex; | 720 return index() == kBytecodeOffsetRegisterIndex; |
| 721 } | 721 } |
| 722 | 722 |
| 723 OperandSize Register::SizeOfOperand() const { | 723 OperandSize Register::SizeOfOperand() const { |
| 724 int32_t operand = ToOperand(); | 724 int32_t operand = ToOperand(); |
| 725 if (operand >= kMinInt8 && operand <= kMaxInt8) { | 725 if (operand >= kMinInt8 && operand <= kMaxInt8) { |
| 726 return OperandSize::kByte; | 726 return OperandSize::kByte; |
| 727 } else if (index_ >= kMinInt16 && index_ <= kMaxInt16) { | 727 } else if (operand >= kMinInt16 && operand <= kMaxInt16) { |
| 728 return OperandSize::kShort; | 728 return OperandSize::kShort; |
| 729 } else { | 729 } else { |
| 730 return OperandSize::kQuad; | 730 return OperandSize::kQuad; |
| 731 } | 731 } |
| 732 } | 732 } |
| 733 | 733 |
| 734 bool Register::AreContiguous(Register reg1, Register reg2, Register reg3, | 734 bool Register::AreContiguous(Register reg1, Register reg2, Register reg3, |
| 735 Register reg4, Register reg5) { | 735 Register reg4, Register reg5) { |
| 736 if (reg1.index() + 1 != reg2.index()) { | 736 if (reg1.index() + 1 != reg2.index()) { |
| 737 return false; | 737 return false; |
| (...skipping 29 matching lines...) Expand all Loading... |
| 767 } else { | 767 } else { |
| 768 std::ostringstream s; | 768 std::ostringstream s; |
| 769 s << "r" << index(); | 769 s << "r" << index(); |
| 770 return s.str(); | 770 return s.str(); |
| 771 } | 771 } |
| 772 } | 772 } |
| 773 | 773 |
| 774 } // namespace interpreter | 774 } // namespace interpreter |
| 775 } // namespace internal | 775 } // namespace internal |
| 776 } // namespace v8 | 776 } // namespace v8 |
| OLD | NEW |