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. |
(...skipping 11 matching lines...) Expand all Loading... |
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(Reg8, OperandSize::kByte) \ | 28 V(Reg8, OperandSize::kByte) \ |
29 V(MaybeReg8, OperandSize::kByte) \ | 29 V(MaybeReg8, OperandSize::kByte) \ |
30 \ | 30 \ |
31 /* Short operands. */ \ | 31 /* Short operands. */ \ |
| 32 V(Count16, OperandSize::kShort) \ |
32 V(Idx16, OperandSize::kShort) | 33 V(Idx16, OperandSize::kShort) |
33 | 34 |
34 // The list of bytecodes which are interpreted by the interpreter. | 35 // The list of bytecodes which are interpreted by the interpreter. |
35 #define BYTECODE_LIST(V) \ | 36 #define BYTECODE_LIST(V) \ |
36 \ | 37 \ |
37 /* Loading the accumulator */ \ | 38 /* Loading the accumulator */ \ |
38 V(LdaZero, OperandType::kNone) \ | 39 V(LdaZero, OperandType::kNone) \ |
39 V(LdaSmi8, OperandType::kImm8) \ | 40 V(LdaSmi8, OperandType::kImm8) \ |
40 V(LdaUndefined, OperandType::kNone) \ | 41 V(LdaUndefined, OperandType::kNone) \ |
41 V(LdaNull, OperandType::kNone) \ | 42 V(LdaNull, OperandType::kNone) \ |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
114 \ | 115 \ |
115 /* Unary Operators */ \ | 116 /* Unary Operators */ \ |
116 V(Inc, OperandType::kNone) \ | 117 V(Inc, OperandType::kNone) \ |
117 V(Dec, OperandType::kNone) \ | 118 V(Dec, OperandType::kNone) \ |
118 V(LogicalNot, OperandType::kNone) \ | 119 V(LogicalNot, OperandType::kNone) \ |
119 V(TypeOf, OperandType::kNone) \ | 120 V(TypeOf, OperandType::kNone) \ |
120 V(DeletePropertyStrict, OperandType::kReg8) \ | 121 V(DeletePropertyStrict, OperandType::kReg8) \ |
121 V(DeletePropertySloppy, OperandType::kReg8) \ | 122 V(DeletePropertySloppy, OperandType::kReg8) \ |
122 \ | 123 \ |
123 /* Call operations */ \ | 124 /* Call operations */ \ |
124 V(Call, OperandType::kReg8, OperandType::kReg8, OperandType::kCount8) \ | 125 V(Call, OperandType::kReg8, OperandType::kReg8, OperandType::kCount8, \ |
| 126 OperandType::kIdx8) \ |
| 127 V(CallWide, OperandType::kReg8, OperandType::kReg8, OperandType::kCount16, \ |
| 128 OperandType::kIdx16) \ |
125 V(CallRuntime, OperandType::kIdx16, OperandType::kMaybeReg8, \ | 129 V(CallRuntime, OperandType::kIdx16, OperandType::kMaybeReg8, \ |
126 OperandType::kCount8) \ | 130 OperandType::kCount8) \ |
127 V(CallJSRuntime, OperandType::kIdx16, OperandType::kReg8, \ | 131 V(CallJSRuntime, OperandType::kIdx16, OperandType::kReg8, \ |
128 OperandType::kCount8) \ | 132 OperandType::kCount8) \ |
129 \ | 133 \ |
130 /* New operator */ \ | 134 /* New operator */ \ |
131 V(New, OperandType::kReg8, OperandType::kMaybeReg8, OperandType::kCount8) \ | 135 V(New, OperandType::kReg8, OperandType::kMaybeReg8, OperandType::kCount8) \ |
132 \ | 136 \ |
133 /* Test Operators */ \ | 137 /* Test Operators */ \ |
134 V(TestEqual, OperandType::kReg8) \ | 138 V(TestEqual, OperandType::kReg8) \ |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
338 | 342 |
339 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode); | 343 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode); |
340 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type); | 344 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type); |
341 std::ostream& operator<<(std::ostream& os, const OperandSize& operand_type); | 345 std::ostream& operator<<(std::ostream& os, const OperandSize& operand_type); |
342 | 346 |
343 } // namespace interpreter | 347 } // namespace interpreter |
344 } // namespace internal | 348 } // namespace internal |
345 } // namespace v8 | 349 } // namespace v8 |
346 | 350 |
347 #endif // V8_INTERPRETER_BYTECODES_H_ | 351 #endif // V8_INTERPRETER_BYTECODES_H_ |
OLD | NEW |