| 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_BYTECODES_H_ | 5 #ifndef V8_INTERPRETER_BYTECODES_H_ |
| 6 #define V8_INTERPRETER_BYTECODES_H_ | 6 #define V8_INTERPRETER_BYTECODES_H_ |
| 7 | 7 |
| 8 #include <iosfwd> | 8 #include <iosfwd> |
| 9 | 9 |
| 10 // Clients of this interface shouldn't depend on lots of interpreter internals. | 10 // Clients of this interface shouldn't depend on lots of interpreter internals. |
| 11 // Do not include anything from src/interpreter here! | 11 // Do not include anything from src/interpreter here! |
| 12 #include "src/utils.h" | 12 #include "src/utils.h" |
| 13 | 13 |
| 14 namespace v8 { | 14 namespace v8 { |
| 15 namespace internal { | 15 namespace internal { |
| 16 namespace interpreter { | 16 namespace interpreter { |
| 17 | 17 |
| 18 // The list of operand types used by bytecodes. | 18 // The list of operand types used by bytecodes. |
| 19 #define OPERAND_TYPE_LIST(V) \ | 19 #define OPERAND_TYPE_LIST(V) \ |
| 20 \ | 20 \ |
| 21 /* None operand. */ \ | 21 /* None operand. */ \ |
| 22 V(None, OperandSize::kNone) \ | 22 V(None, OperandSize::kNone) \ |
| 23 \ | 23 \ |
| 24 /* Byte operands. */ \ | 24 /* Byte operands. */ \ |
| 25 V(Count8, OperandSize::kByte) \ | 25 V(Count8, OperandSize::kByte) \ |
| 26 V(Imm8, OperandSize::kByte) \ | 26 V(Imm8, OperandSize::kByte) \ |
| 27 V(Idx8, OperandSize::kByte) \ | 27 V(Idx8, OperandSize::kByte) \ |
| 28 V(MaybeReg8, OperandSize::kByte) \ | 28 V(MaybeReg8, OperandSize::kByte) \ |
| 29 V(Reg8, OperandSize::kByte) \ | 29 V(Reg8, OperandSize::kByte) \ |
| 30 V(RegPair8, OperandSize::kByte) \ |
| 30 \ | 31 \ |
| 31 /* Short operands. */ \ | 32 /* Short operands. */ \ |
| 32 V(Count16, OperandSize::kShort) \ | 33 V(Count16, OperandSize::kShort) \ |
| 33 V(Idx16, OperandSize::kShort) \ | 34 V(Idx16, OperandSize::kShort) \ |
| 34 V(Reg16, OperandSize::kShort) | 35 V(Reg16, OperandSize::kShort) |
| 35 | 36 |
| 36 // The list of bytecodes which are interpreted by the interpreter. | 37 // The list of bytecodes which are interpreted by the interpreter. |
| 37 #define BYTECODE_LIST(V) \ | 38 #define BYTECODE_LIST(V) \ |
| 38 \ | 39 \ |
| 39 /* Loading the accumulator */ \ | 40 /* Loading the accumulator */ \ |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 138 V(DeletePropertySloppy, OperandType::kReg8) \ | 139 V(DeletePropertySloppy, OperandType::kReg8) \ |
| 139 V(DeleteLookupSlot, OperandType::kNone) \ | 140 V(DeleteLookupSlot, OperandType::kNone) \ |
| 140 \ | 141 \ |
| 141 /* Call operations */ \ | 142 /* Call operations */ \ |
| 142 V(Call, OperandType::kReg8, OperandType::kReg8, OperandType::kCount8, \ | 143 V(Call, OperandType::kReg8, OperandType::kReg8, OperandType::kCount8, \ |
| 143 OperandType::kIdx8) \ | 144 OperandType::kIdx8) \ |
| 144 V(CallWide, OperandType::kReg8, OperandType::kReg8, OperandType::kCount16, \ | 145 V(CallWide, OperandType::kReg8, OperandType::kReg8, OperandType::kCount16, \ |
| 145 OperandType::kIdx16) \ | 146 OperandType::kIdx16) \ |
| 146 V(CallRuntime, OperandType::kIdx16, OperandType::kMaybeReg8, \ | 147 V(CallRuntime, OperandType::kIdx16, OperandType::kMaybeReg8, \ |
| 147 OperandType::kCount8) \ | 148 OperandType::kCount8) \ |
| 149 V(CallRuntimeForPair, OperandType::kIdx16, OperandType::kMaybeReg8, \ |
| 150 OperandType::kCount8, OperandType::kRegPair8) \ |
| 148 V(CallJSRuntime, OperandType::kIdx16, OperandType::kReg8, \ | 151 V(CallJSRuntime, OperandType::kIdx16, OperandType::kReg8, \ |
| 149 OperandType::kCount8) \ | 152 OperandType::kCount8) \ |
| 150 \ | 153 \ |
| 151 /* New operator */ \ | 154 /* New operator */ \ |
| 152 V(New, OperandType::kReg8, OperandType::kMaybeReg8, OperandType::kCount8) \ | 155 V(New, OperandType::kReg8, OperandType::kMaybeReg8, OperandType::kCount8) \ |
| 153 \ | 156 \ |
| 154 /* Test Operators */ \ | 157 /* Test Operators */ \ |
| 155 V(TestEqual, OperandType::kReg8) \ | 158 V(TestEqual, OperandType::kReg8) \ |
| 156 V(TestNotEqual, OperandType::kReg8) \ | 159 V(TestNotEqual, OperandType::kReg8) \ |
| 157 V(TestEqualStrict, OperandType::kReg8) \ | 160 V(TestEqualStrict, OperandType::kReg8) \ |
| (...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 405 | 408 |
| 406 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode); | 409 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode); |
| 407 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type); | 410 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type); |
| 408 std::ostream& operator<<(std::ostream& os, const OperandSize& operand_type); | 411 std::ostream& operator<<(std::ostream& os, const OperandSize& operand_type); |
| 409 | 412 |
| 410 } // namespace interpreter | 413 } // namespace interpreter |
| 411 } // namespace internal | 414 } // namespace internal |
| 412 } // namespace v8 | 415 } // namespace v8 |
| 413 | 416 |
| 414 #endif // V8_INTERPRETER_BYTECODES_H_ | 417 #endif // V8_INTERPRETER_BYTECODES_H_ |
| OLD | NEW |