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 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 V(TestLessThan, OperandType::kReg8) \ | 145 V(TestLessThan, OperandType::kReg8) \ |
146 V(TestGreaterThan, OperandType::kReg8) \ | 146 V(TestGreaterThan, OperandType::kReg8) \ |
147 V(TestLessThanOrEqual, OperandType::kReg8) \ | 147 V(TestLessThanOrEqual, OperandType::kReg8) \ |
148 V(TestGreaterThanOrEqual, OperandType::kReg8) \ | 148 V(TestGreaterThanOrEqual, OperandType::kReg8) \ |
149 V(TestInstanceOf, OperandType::kReg8) \ | 149 V(TestInstanceOf, OperandType::kReg8) \ |
150 V(TestIn, OperandType::kReg8) \ | 150 V(TestIn, OperandType::kReg8) \ |
151 \ | 151 \ |
152 /* Cast operators */ \ | 152 /* Cast operators */ \ |
153 V(ToName, OperandType::kNone) \ | 153 V(ToName, OperandType::kNone) \ |
154 V(ToNumber, OperandType::kNone) \ | 154 V(ToNumber, OperandType::kNone) \ |
155 V(ToObject, OperandType::kNone) \ | |
156 \ | 155 \ |
157 /* Literals */ \ | 156 /* Literals */ \ |
158 V(CreateRegExpLiteral, OperandType::kIdx8, OperandType::kIdx8, \ | 157 V(CreateRegExpLiteral, OperandType::kIdx8, OperandType::kIdx8, \ |
159 OperandType::kImm8) \ | 158 OperandType::kImm8) \ |
160 V(CreateArrayLiteral, OperandType::kIdx8, OperandType::kIdx8, \ | 159 V(CreateArrayLiteral, OperandType::kIdx8, OperandType::kIdx8, \ |
161 OperandType::kImm8) \ | 160 OperandType::kImm8) \ |
162 V(CreateObjectLiteral, OperandType::kIdx8, OperandType::kIdx8, \ | 161 V(CreateObjectLiteral, OperandType::kIdx8, OperandType::kIdx8, \ |
163 OperandType::kImm8) \ | 162 OperandType::kImm8) \ |
164 V(CreateRegExpLiteralWide, OperandType::kIdx16, OperandType::kIdx16, \ | 163 V(CreateRegExpLiteralWide, OperandType::kIdx16, OperandType::kIdx16, \ |
165 OperandType::kImm8) \ | 164 OperandType::kImm8) \ |
(...skipping 20 matching lines...) Expand all Loading... |
186 V(JumpIfToBooleanTrue, OperandType::kImm8) \ | 185 V(JumpIfToBooleanTrue, OperandType::kImm8) \ |
187 V(JumpIfToBooleanTrueConstant, OperandType::kIdx8) \ | 186 V(JumpIfToBooleanTrueConstant, OperandType::kIdx8) \ |
188 V(JumpIfToBooleanFalse, OperandType::kImm8) \ | 187 V(JumpIfToBooleanFalse, OperandType::kImm8) \ |
189 V(JumpIfToBooleanFalseConstant, OperandType::kIdx8) \ | 188 V(JumpIfToBooleanFalseConstant, OperandType::kIdx8) \ |
190 V(JumpIfNull, OperandType::kImm8) \ | 189 V(JumpIfNull, OperandType::kImm8) \ |
191 V(JumpIfNullConstant, OperandType::kIdx8) \ | 190 V(JumpIfNullConstant, OperandType::kIdx8) \ |
192 V(JumpIfUndefined, OperandType::kImm8) \ | 191 V(JumpIfUndefined, OperandType::kImm8) \ |
193 V(JumpIfUndefinedConstant, OperandType::kIdx8) \ | 192 V(JumpIfUndefinedConstant, OperandType::kIdx8) \ |
194 \ | 193 \ |
195 /* Complex flow control For..in */ \ | 194 /* Complex flow control For..in */ \ |
196 V(ForInPrepare, OperandType::kReg8) \ | 195 V(ForInPrepare, OperandType::kReg8, OperandType::kReg8, OperandType::kReg8, \ |
197 V(ForInNext, OperandType::kReg8, OperandType::kReg8) \ | 196 OperandType::kReg8) \ |
198 V(ForInDone, OperandType::kReg8) \ | 197 V(ForInNext, OperandType::kReg8, OperandType::kReg8, OperandType::kReg8, \ |
| 198 OperandType::kReg8) \ |
| 199 V(ForInDone, OperandType::kReg8, OperandType::kReg8) \ |
| 200 V(ForInStep, OperandType::kReg8) \ |
199 \ | 201 \ |
200 /* Non-local flow control */ \ | 202 /* Non-local flow control */ \ |
201 V(Throw, OperandType::kNone) \ | 203 V(Throw, OperandType::kNone) \ |
202 V(Return, OperandType::kNone) | 204 V(Return, OperandType::kNone) |
203 | 205 |
204 | 206 |
205 // Enumeration of the size classes of operand types used by bytecodes. | 207 // Enumeration of the size classes of operand types used by bytecodes. |
206 enum class OperandSize : uint8_t { | 208 enum class OperandSize : uint8_t { |
207 kNone = 0, | 209 kNone = 0, |
208 kByte = 1, | 210 kByte = 1, |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 | 379 |
378 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode); | 380 std::ostream& operator<<(std::ostream& os, const Bytecode& bytecode); |
379 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type); | 381 std::ostream& operator<<(std::ostream& os, const OperandType& operand_type); |
380 std::ostream& operator<<(std::ostream& os, const OperandSize& operand_type); | 382 std::ostream& operator<<(std::ostream& os, const OperandSize& operand_type); |
381 | 383 |
382 } // namespace interpreter | 384 } // namespace interpreter |
383 } // namespace internal | 385 } // namespace internal |
384 } // namespace v8 | 386 } // namespace v8 |
385 | 387 |
386 #endif // V8_INTERPRETER_BYTECODES_H_ | 388 #endif // V8_INTERPRETER_BYTECODES_H_ |
OLD | NEW |