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 V(None) \ | 20 V(None) \ |
21 V(Imm8) \ | 21 V(Imm8) \ |
| 22 V(Idx) \ |
22 V(Reg) | 23 V(Reg) |
23 | 24 |
24 // The list of bytecodes which are interpreted by the interpreter. | 25 // The list of bytecodes which are interpreted by the interpreter. |
25 #define BYTECODE_LIST(V) \ | 26 #define BYTECODE_LIST(V) \ |
26 \ | 27 \ |
27 /* Loading the accumulator */ \ | 28 /* Loading the accumulator */ \ |
28 V(LdaZero, OperandType::kNone) \ | 29 V(LdaZero, OperandType::kNone) \ |
29 V(LdaSmi8, OperandType::kImm8) \ | 30 V(LdaSmi8, OperandType::kImm8) \ |
| 31 V(LdaConstant, OperandType::kIdx) \ |
30 V(LdaUndefined, OperandType::kNone) \ | 32 V(LdaUndefined, OperandType::kNone) \ |
31 V(LdaNull, OperandType::kNone) \ | 33 V(LdaNull, OperandType::kNone) \ |
32 V(LdaTheHole, OperandType::kNone) \ | 34 V(LdaTheHole, OperandType::kNone) \ |
33 V(LdaTrue, OperandType::kNone) \ | 35 V(LdaTrue, OperandType::kNone) \ |
34 V(LdaFalse, OperandType::kNone) \ | 36 V(LdaFalse, OperandType::kNone) \ |
35 \ | 37 \ |
36 /* Register-accumulator transfers */ \ | 38 /* Register-accumulator transfers */ \ |
37 V(Ldar, OperandType::kReg) \ | 39 V(Ldar, OperandType::kReg) \ |
38 V(Star, OperandType::kReg) \ | 40 V(Star, OperandType::kReg) \ |
39 \ | 41 \ |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
111 }; | 113 }; |
112 | 114 |
113 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode); | 115 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode); |
114 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type); | 116 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type); |
115 | 117 |
116 } // namespace interpreter | 118 } // namespace interpreter |
117 } // namespace internal | 119 } // namespace internal |
118 } // namespace v8 | 120 } // namespace v8 |
119 | 121 |
120 #endif // V8_INTERPRETER_BYTECODES_H_ | 122 #endif // V8_INTERPRETER_BYTECODES_H_ |
OLD | NEW |