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 <cstdint> | 8 #include <cstdint> |
9 #include <iosfwd> | 9 #include <iosfwd> |
10 #include <string> | 10 #include <string> |
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
221 V(CreateWithContext, AccumulatorUse::kReadWrite, OperandType::kReg, \ | 221 V(CreateWithContext, AccumulatorUse::kReadWrite, OperandType::kReg, \ |
222 OperandType::kIdx) \ | 222 OperandType::kIdx) \ |
223 \ | 223 \ |
224 /* Arguments allocation */ \ | 224 /* Arguments allocation */ \ |
225 V(CreateMappedArguments, AccumulatorUse::kWrite) \ | 225 V(CreateMappedArguments, AccumulatorUse::kWrite) \ |
226 V(CreateUnmappedArguments, AccumulatorUse::kWrite) \ | 226 V(CreateUnmappedArguments, AccumulatorUse::kWrite) \ |
227 V(CreateRestParameter, AccumulatorUse::kWrite) \ | 227 V(CreateRestParameter, AccumulatorUse::kWrite) \ |
228 \ | 228 \ |
229 /* Control Flow -- carefully ordered for efficient checks */ \ | 229 /* Control Flow -- carefully ordered for efficient checks */ \ |
230 /* - [Unconditional jumps] */ \ | 230 /* - [Unconditional jumps] */ \ |
231 V(JumpLoop, AccumulatorUse::kNone, OperandType::kImm, OperandType::kImm) \ | 231 V(JumpLoop, AccumulatorUse::kNone, OperandType::kUImm, OperandType::kImm) \ |
232 /* - [Forward jumps] */ \ | 232 /* - [Forward jumps] */ \ |
233 V(Jump, AccumulatorUse::kNone, OperandType::kImm) \ | 233 V(Jump, AccumulatorUse::kNone, OperandType::kUImm) \ |
234 /* - [Start constant jumps] */ \ | 234 /* - [Start constant jumps] */ \ |
235 V(JumpConstant, AccumulatorUse::kNone, OperandType::kIdx) \ | 235 V(JumpConstant, AccumulatorUse::kNone, OperandType::kIdx) \ |
236 /* - [Conditional jumps] */ \ | 236 /* - [Conditional jumps] */ \ |
237 /* - [Conditional constant jumps] */ \ | 237 /* - [Conditional constant jumps] */ \ |
238 V(JumpIfNullConstant, AccumulatorUse::kRead, OperandType::kIdx) \ | 238 V(JumpIfNullConstant, AccumulatorUse::kRead, OperandType::kIdx) \ |
239 V(JumpIfUndefinedConstant, AccumulatorUse::kRead, OperandType::kIdx) \ | 239 V(JumpIfUndefinedConstant, AccumulatorUse::kRead, OperandType::kIdx) \ |
240 V(JumpIfTrueConstant, AccumulatorUse::kRead, OperandType::kIdx) \ | 240 V(JumpIfTrueConstant, AccumulatorUse::kRead, OperandType::kIdx) \ |
241 V(JumpIfFalseConstant, AccumulatorUse::kRead, OperandType::kIdx) \ | 241 V(JumpIfFalseConstant, AccumulatorUse::kRead, OperandType::kIdx) \ |
242 V(JumpIfJSReceiverConstant, AccumulatorUse::kRead, OperandType::kIdx) \ | 242 V(JumpIfJSReceiverConstant, AccumulatorUse::kRead, OperandType::kIdx) \ |
243 V(JumpIfNotHoleConstant, AccumulatorUse::kRead, OperandType::kIdx) \ | 243 V(JumpIfNotHoleConstant, AccumulatorUse::kRead, OperandType::kIdx) \ |
244 /* - [Start ToBoolean jumps] */ \ | 244 /* - [Start ToBoolean jumps] */ \ |
245 V(JumpIfToBooleanTrueConstant, AccumulatorUse::kRead, OperandType::kIdx) \ | 245 V(JumpIfToBooleanTrueConstant, AccumulatorUse::kRead, OperandType::kIdx) \ |
246 V(JumpIfToBooleanFalseConstant, AccumulatorUse::kRead, OperandType::kIdx) \ | 246 V(JumpIfToBooleanFalseConstant, AccumulatorUse::kRead, OperandType::kIdx) \ |
247 /* - [End constant jumps] */ \ | 247 /* - [End constant jumps] */ \ |
248 /* - [Conditional immediate jumps] */ \ | 248 /* - [Conditional immediate jumps] */ \ |
249 V(JumpIfToBooleanTrue, AccumulatorUse::kRead, OperandType::kImm) \ | 249 V(JumpIfToBooleanTrue, AccumulatorUse::kRead, OperandType::kUImm) \ |
250 V(JumpIfToBooleanFalse, AccumulatorUse::kRead, OperandType::kImm) \ | 250 V(JumpIfToBooleanFalse, AccumulatorUse::kRead, OperandType::kUImm) \ |
251 /* - [End ToBoolean jumps] */ \ | 251 /* - [End ToBoolean jumps] */ \ |
252 V(JumpIfTrue, AccumulatorUse::kRead, OperandType::kImm) \ | 252 V(JumpIfTrue, AccumulatorUse::kRead, OperandType::kUImm) \ |
253 V(JumpIfFalse, AccumulatorUse::kRead, OperandType::kImm) \ | 253 V(JumpIfFalse, AccumulatorUse::kRead, OperandType::kUImm) \ |
254 V(JumpIfNull, AccumulatorUse::kRead, OperandType::kImm) \ | 254 V(JumpIfNull, AccumulatorUse::kRead, OperandType::kUImm) \ |
255 V(JumpIfUndefined, AccumulatorUse::kRead, OperandType::kImm) \ | 255 V(JumpIfUndefined, AccumulatorUse::kRead, OperandType::kUImm) \ |
256 V(JumpIfJSReceiver, AccumulatorUse::kRead, OperandType::kImm) \ | 256 V(JumpIfJSReceiver, AccumulatorUse::kRead, OperandType::kUImm) \ |
257 V(JumpIfNotHole, AccumulatorUse::kRead, OperandType::kImm) \ | 257 V(JumpIfNotHole, AccumulatorUse::kRead, OperandType::kUImm) \ |
258 \ | 258 \ |
259 /* Complex flow control For..in */ \ | 259 /* Complex flow control For..in */ \ |
260 V(ForInPrepare, AccumulatorUse::kNone, OperandType::kReg, \ | 260 V(ForInPrepare, AccumulatorUse::kNone, OperandType::kReg, \ |
261 OperandType::kRegOutTriple) \ | 261 OperandType::kRegOutTriple) \ |
262 V(ForInContinue, AccumulatorUse::kWrite, OperandType::kReg, \ | 262 V(ForInContinue, AccumulatorUse::kWrite, OperandType::kReg, \ |
263 OperandType::kReg) \ | 263 OperandType::kReg) \ |
264 V(ForInNext, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kReg, \ | 264 V(ForInNext, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kReg, \ |
265 OperandType::kRegPair, OperandType::kIdx) \ | 265 OperandType::kRegPair, OperandType::kIdx) \ |
266 V(ForInStep, AccumulatorUse::kWrite, OperandType::kReg) \ | 266 V(ForInStep, AccumulatorUse::kWrite, OperandType::kReg) \ |
267 \ | 267 \ |
(...skipping 550 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 }; | 818 }; |
819 | 819 |
820 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os, | 820 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os, |
821 const Bytecode& bytecode); | 821 const Bytecode& bytecode); |
822 | 822 |
823 } // namespace interpreter | 823 } // namespace interpreter |
824 } // namespace internal | 824 } // namespace internal |
825 } // namespace v8 | 825 } // namespace v8 |
826 | 826 |
827 #endif // V8_INTERPRETER_BYTECODES_H_ | 827 #endif // V8_INTERPRETER_BYTECODES_H_ |
OLD | NEW |