Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(66)

Side by Side Diff: src/interpreter/bytecodes.h

Issue 2557593004: [ignition] desugar GetIterator() via bytecode rather than via AST (Closed)
Patch Set: get tests passing Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 /* - [Forward jumps] */ \ 219 /* - [Forward jumps] */ \
220 V(Jump, AccumulatorUse::kNone, OperandType::kImm) \ 220 V(Jump, AccumulatorUse::kNone, OperandType::kImm) \
221 /* - [Start constant jumps] */ \ 221 /* - [Start constant jumps] */ \
222 V(JumpConstant, AccumulatorUse::kNone, OperandType::kIdx) \ 222 V(JumpConstant, AccumulatorUse::kNone, OperandType::kIdx) \
223 /* - [Conditional jumps] */ \ 223 /* - [Conditional jumps] */ \
224 /* - [Conditional constant jumps] */ \ 224 /* - [Conditional constant jumps] */ \
225 V(JumpIfNullConstant, AccumulatorUse::kRead, OperandType::kIdx) \ 225 V(JumpIfNullConstant, AccumulatorUse::kRead, OperandType::kIdx) \
226 V(JumpIfUndefinedConstant, AccumulatorUse::kRead, OperandType::kIdx) \ 226 V(JumpIfUndefinedConstant, AccumulatorUse::kRead, OperandType::kIdx) \
227 V(JumpIfTrueConstant, AccumulatorUse::kRead, OperandType::kIdx) \ 227 V(JumpIfTrueConstant, AccumulatorUse::kRead, OperandType::kIdx) \
228 V(JumpIfFalseConstant, AccumulatorUse::kRead, OperandType::kIdx) \ 228 V(JumpIfFalseConstant, AccumulatorUse::kRead, OperandType::kIdx) \
229 V(JumpIfJSReceiverConstant, AccumulatorUse::kRead, OperandType::kIdx) \
229 V(JumpIfNotHoleConstant, AccumulatorUse::kRead, OperandType::kIdx) \ 230 V(JumpIfNotHoleConstant, AccumulatorUse::kRead, OperandType::kIdx) \
230 /* - [Start ToBoolean jumps] */ \ 231 /* - [Start ToBoolean jumps] */ \
231 V(JumpIfToBooleanTrueConstant, AccumulatorUse::kRead, OperandType::kIdx) \ 232 V(JumpIfToBooleanTrueConstant, AccumulatorUse::kRead, OperandType::kIdx) \
232 V(JumpIfToBooleanFalseConstant, AccumulatorUse::kRead, OperandType::kIdx) \ 233 V(JumpIfToBooleanFalseConstant, AccumulatorUse::kRead, OperandType::kIdx) \
233 /* - [End constant jumps] */ \ 234 /* - [End constant jumps] */ \
234 /* - [Conditional immediate jumps] */ \ 235 /* - [Conditional immediate jumps] */ \
235 V(JumpIfToBooleanTrue, AccumulatorUse::kRead, OperandType::kImm) \ 236 V(JumpIfToBooleanTrue, AccumulatorUse::kRead, OperandType::kImm) \
236 V(JumpIfToBooleanFalse, AccumulatorUse::kRead, OperandType::kImm) \ 237 V(JumpIfToBooleanFalse, AccumulatorUse::kRead, OperandType::kImm) \
237 /* - [End ToBoolean jumps] */ \ 238 /* - [End ToBoolean jumps] */ \
238 V(JumpIfTrue, AccumulatorUse::kRead, OperandType::kImm) \ 239 V(JumpIfTrue, AccumulatorUse::kRead, OperandType::kImm) \
239 V(JumpIfFalse, AccumulatorUse::kRead, OperandType::kImm) \ 240 V(JumpIfFalse, AccumulatorUse::kRead, OperandType::kImm) \
240 V(JumpIfNull, AccumulatorUse::kRead, OperandType::kImm) \ 241 V(JumpIfNull, AccumulatorUse::kRead, OperandType::kImm) \
241 V(JumpIfUndefined, AccumulatorUse::kRead, OperandType::kImm) \ 242 V(JumpIfUndefined, AccumulatorUse::kRead, OperandType::kImm) \
243 V(JumpIfJSReceiver, AccumulatorUse::kRead, OperandType::kImm) \
242 V(JumpIfNotHole, AccumulatorUse::kRead, OperandType::kImm) \ 244 V(JumpIfNotHole, AccumulatorUse::kRead, OperandType::kImm) \
243 \ 245 \
244 /* Complex flow control For..in */ \ 246 /* Complex flow control For..in */ \
245 V(ForInPrepare, AccumulatorUse::kNone, OperandType::kReg, \ 247 V(ForInPrepare, AccumulatorUse::kNone, OperandType::kReg, \
246 OperandType::kRegOutTriple) \ 248 OperandType::kRegOutTriple) \
247 V(ForInContinue, AccumulatorUse::kWrite, OperandType::kReg, \ 249 V(ForInContinue, AccumulatorUse::kWrite, OperandType::kReg, \
248 OperandType::kReg) \ 250 OperandType::kReg) \
249 V(ForInNext, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kReg, \ 251 V(ForInNext, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kReg, \
250 OperandType::kRegPair, OperandType::kIdx) \ 252 OperandType::kRegPair, OperandType::kIdx) \
251 V(ForInStep, AccumulatorUse::kWrite, OperandType::kReg) \ 253 V(ForInStep, AccumulatorUse::kWrite, OperandType::kReg) \
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
324 #define JUMP_TOBOOLEAN_CONDITIONAL_CONSTANT_BYTECODE_LIST(V) \ 326 #define JUMP_TOBOOLEAN_CONDITIONAL_CONSTANT_BYTECODE_LIST(V) \
325 V(JumpIfToBooleanTrueConstant) \ 327 V(JumpIfToBooleanTrueConstant) \
326 V(JumpIfToBooleanFalseConstant) 328 V(JumpIfToBooleanFalseConstant)
327 329
328 #define JUMP_CONDITIONAL_IMMEDIATE_BYTECODE_LIST(V) \ 330 #define JUMP_CONDITIONAL_IMMEDIATE_BYTECODE_LIST(V) \
329 JUMP_TOBOOLEAN_CONDITIONAL_IMMEDIATE_BYTECODE_LIST(V) \ 331 JUMP_TOBOOLEAN_CONDITIONAL_IMMEDIATE_BYTECODE_LIST(V) \
330 V(JumpIfTrue) \ 332 V(JumpIfTrue) \
331 V(JumpIfFalse) \ 333 V(JumpIfFalse) \
332 V(JumpIfNull) \ 334 V(JumpIfNull) \
333 V(JumpIfUndefined) \ 335 V(JumpIfUndefined) \
336 V(JumpIfJSReceiver) \
334 V(JumpIfNotHole) 337 V(JumpIfNotHole)
335 338
336 #define JUMP_CONDITIONAL_CONSTANT_BYTECODE_LIST(V) \ 339 #define JUMP_CONDITIONAL_CONSTANT_BYTECODE_LIST(V) \
337 JUMP_TOBOOLEAN_CONDITIONAL_CONSTANT_BYTECODE_LIST(V) \ 340 JUMP_TOBOOLEAN_CONDITIONAL_CONSTANT_BYTECODE_LIST(V) \
338 V(JumpIfNullConstant) \ 341 V(JumpIfNullConstant) \
339 V(JumpIfUndefinedConstant) \ 342 V(JumpIfUndefinedConstant) \
340 V(JumpIfTrueConstant) \ 343 V(JumpIfTrueConstant) \
341 V(JumpIfFalseConstant) \ 344 V(JumpIfFalseConstant) \
345 V(JumpIfJSReceiverConstant) \
342 V(JumpIfNotHoleConstant) 346 V(JumpIfNotHoleConstant)
343 347
344 #define JUMP_CONSTANT_BYTECODE_LIST(V) \ 348 #define JUMP_CONSTANT_BYTECODE_LIST(V) \
345 JUMP_UNCONDITIONAL_CONSTANT_BYTECODE_LIST(V) \ 349 JUMP_UNCONDITIONAL_CONSTANT_BYTECODE_LIST(V) \
346 JUMP_CONDITIONAL_CONSTANT_BYTECODE_LIST(V) 350 JUMP_CONDITIONAL_CONSTANT_BYTECODE_LIST(V)
347 351
348 #define JUMP_IMMEDIATE_BYTECODE_LIST(V) \ 352 #define JUMP_IMMEDIATE_BYTECODE_LIST(V) \
349 JUMP_UNCONDITIONAL_IMMEDIATE_BYTECODE_LIST(V) \ 353 JUMP_UNCONDITIONAL_IMMEDIATE_BYTECODE_LIST(V) \
350 JUMP_CONDITIONAL_IMMEDIATE_BYTECODE_LIST(V) 354 JUMP_CONDITIONAL_IMMEDIATE_BYTECODE_LIST(V)
351 355
(...skipping 460 matching lines...) Expand 10 before | Expand all | Expand 10 after
812 #undef CONSTEXPR 816 #undef CONSTEXPR
813 817
814 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os, 818 V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os,
815 const Bytecode& bytecode); 819 const Bytecode& bytecode);
816 820
817 } // namespace interpreter 821 } // namespace interpreter
818 } // namespace internal 822 } // namespace internal
819 } // namespace v8 823 } // namespace v8
820 824
821 #endif // V8_INTERPRETER_BYTECODES_H_ 825 #endif // V8_INTERPRETER_BYTECODES_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698