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

Unified Diff: src/interpreter/bytecodes.h

Issue 2655733003: Thread maybe-assigned through the bytecodes. (Closed)
Patch Set: Comment Created 3 years, 10 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecodes.h
diff --git a/src/interpreter/bytecodes.h b/src/interpreter/bytecodes.h
index ebdb5ab07fe552cb9f0de4d3f326c535846cdfd8..ae8ee269a300d0db1239add9e5fa4cf93b079b7c 100644
--- a/src/interpreter/bytecodes.h
+++ b/src/interpreter/bytecodes.h
@@ -22,288 +22,291 @@ namespace interpreter {
// The list of bytecodes which are interpreted by the interpreter.
// Format is V(<bytecode>, <accumulator_use>, <operands>).
-#define BYTECODE_LIST(V) \
- /* Extended width operands */ \
- V(Wide, AccumulatorUse::kNone) \
- V(ExtraWide, AccumulatorUse::kNone) \
- \
- /* Loading the accumulator */ \
- V(LdaZero, AccumulatorUse::kWrite) \
- V(LdaSmi, AccumulatorUse::kWrite, OperandType::kImm) \
- V(LdaUndefined, AccumulatorUse::kWrite) \
- V(LdaNull, AccumulatorUse::kWrite) \
- V(LdaTheHole, AccumulatorUse::kWrite) \
- V(LdaTrue, AccumulatorUse::kWrite) \
- V(LdaFalse, AccumulatorUse::kWrite) \
- V(LdaConstant, AccumulatorUse::kWrite, OperandType::kIdx) \
- \
- /* Globals */ \
- V(LdaGlobal, AccumulatorUse::kWrite, OperandType::kIdx, OperandType::kIdx) \
- V(LdaGlobalInsideTypeof, AccumulatorUse::kWrite, OperandType::kIdx, \
- OperandType::kIdx) \
- V(StaGlobalSloppy, AccumulatorUse::kRead, OperandType::kIdx, \
- OperandType::kIdx) \
- V(StaGlobalStrict, AccumulatorUse::kRead, OperandType::kIdx, \
- OperandType::kIdx) \
- \
- /* Context operations */ \
- V(PushContext, AccumulatorUse::kRead, OperandType::kRegOut) \
- V(PopContext, AccumulatorUse::kNone, OperandType::kReg) \
- V(LdaContextSlot, AccumulatorUse::kWrite, OperandType::kReg, \
- OperandType::kIdx, OperandType::kUImm) \
- V(LdaCurrentContextSlot, AccumulatorUse::kWrite, OperandType::kIdx) \
- V(StaContextSlot, AccumulatorUse::kRead, OperandType::kReg, \
- OperandType::kIdx, OperandType::kUImm) \
- V(StaCurrentContextSlot, AccumulatorUse::kRead, OperandType::kIdx) \
- \
- /* Load-Store lookup slots */ \
- V(LdaLookupSlot, AccumulatorUse::kWrite, OperandType::kIdx) \
- V(LdaLookupContextSlot, AccumulatorUse::kWrite, OperandType::kIdx, \
- OperandType::kIdx, OperandType::kUImm) \
- V(LdaLookupGlobalSlot, AccumulatorUse::kWrite, OperandType::kIdx, \
- OperandType::kIdx, OperandType::kUImm) \
- V(LdaLookupSlotInsideTypeof, AccumulatorUse::kWrite, OperandType::kIdx) \
- V(LdaLookupContextSlotInsideTypeof, AccumulatorUse::kWrite, \
- OperandType::kIdx, OperandType::kIdx, OperandType::kUImm) \
- V(LdaLookupGlobalSlotInsideTypeof, AccumulatorUse::kWrite, \
- OperandType::kIdx, OperandType::kIdx, OperandType::kUImm) \
- V(StaLookupSlotSloppy, AccumulatorUse::kReadWrite, OperandType::kIdx) \
- V(StaLookupSlotStrict, AccumulatorUse::kReadWrite, OperandType::kIdx) \
- \
- /* Register-accumulator transfers */ \
- V(Ldar, AccumulatorUse::kWrite, OperandType::kReg) \
- V(Star, AccumulatorUse::kRead, OperandType::kRegOut) \
- \
- /* Register-register transfers */ \
- V(Mov, AccumulatorUse::kNone, OperandType::kReg, OperandType::kRegOut) \
- \
- /* Property loads (LoadIC) operations */ \
- V(LdaNamedProperty, AccumulatorUse::kWrite, OperandType::kReg, \
- OperandType::kIdx, OperandType::kIdx) \
- V(LdaKeyedProperty, AccumulatorUse::kReadWrite, OperandType::kReg, \
- OperandType::kIdx) \
- \
- /* Operations on module variables */ \
- V(LdaModuleVariable, AccumulatorUse::kWrite, OperandType::kImm, \
- OperandType::kUImm) \
- V(StaModuleVariable, AccumulatorUse::kRead, OperandType::kImm, \
- OperandType::kUImm) \
- \
- /* Propery stores (StoreIC) operations */ \
- V(StaNamedPropertySloppy, AccumulatorUse::kRead, OperandType::kReg, \
- OperandType::kIdx, OperandType::kIdx) \
- V(StaNamedPropertyStrict, AccumulatorUse::kRead, OperandType::kReg, \
- OperandType::kIdx, OperandType::kIdx) \
- V(StaKeyedPropertySloppy, AccumulatorUse::kRead, OperandType::kReg, \
- OperandType::kReg, OperandType::kIdx) \
- V(StaKeyedPropertyStrict, AccumulatorUse::kRead, OperandType::kReg, \
- OperandType::kReg, OperandType::kIdx) \
- V(StaDataPropertyInLiteral, AccumulatorUse::kRead, OperandType::kReg, \
- OperandType::kReg, OperandType::kFlag8, OperandType::kIdx) \
- \
- /* Binary Operators */ \
- V(Add, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \
- V(Sub, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \
- V(Mul, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \
- V(Div, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \
- V(Mod, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \
- V(BitwiseOr, AccumulatorUse::kReadWrite, OperandType::kReg, \
- OperandType::kIdx) \
- V(BitwiseXor, AccumulatorUse::kReadWrite, OperandType::kReg, \
- OperandType::kIdx) \
- V(BitwiseAnd, AccumulatorUse::kReadWrite, OperandType::kReg, \
- OperandType::kIdx) \
- V(ShiftLeft, AccumulatorUse::kReadWrite, OperandType::kReg, \
- OperandType::kIdx) \
- V(ShiftRight, AccumulatorUse::kReadWrite, OperandType::kReg, \
- OperandType::kIdx) \
- V(ShiftRightLogical, AccumulatorUse::kReadWrite, OperandType::kReg, \
- OperandType::kIdx) \
- \
- /* Binary operators with immediate operands */ \
- V(AddSmi, AccumulatorUse::kWrite, OperandType::kImm, OperandType::kReg, \
- OperandType::kIdx) \
- V(SubSmi, AccumulatorUse::kWrite, OperandType::kImm, OperandType::kReg, \
- OperandType::kIdx) \
- V(BitwiseOrSmi, AccumulatorUse::kWrite, OperandType::kImm, \
- OperandType::kReg, OperandType::kIdx) \
- V(BitwiseAndSmi, AccumulatorUse::kWrite, OperandType::kImm, \
- OperandType::kReg, OperandType::kIdx) \
- V(ShiftLeftSmi, AccumulatorUse::kWrite, OperandType::kImm, \
- OperandType::kReg, OperandType::kIdx) \
- V(ShiftRightSmi, AccumulatorUse::kWrite, OperandType::kImm, \
- OperandType::kReg, OperandType::kIdx) \
- \
- /* Unary Operators */ \
- V(Inc, AccumulatorUse::kReadWrite, OperandType::kIdx) \
- V(Dec, AccumulatorUse::kReadWrite, OperandType::kIdx) \
- V(ToBooleanLogicalNot, AccumulatorUse::kReadWrite) \
- V(LogicalNot, AccumulatorUse::kReadWrite) \
- V(TypeOf, AccumulatorUse::kReadWrite) \
- V(DeletePropertyStrict, AccumulatorUse::kReadWrite, OperandType::kReg) \
- V(DeletePropertySloppy, AccumulatorUse::kReadWrite, OperandType::kReg) \
- \
- /* GetSuperConstructor operator */ \
- V(GetSuperConstructor, AccumulatorUse::kRead, OperandType::kRegOut) \
- \
- /* Call operations */ \
- V(Call, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kRegList, \
- OperandType::kRegCount, OperandType::kIdx) \
- V(CallProperty, AccumulatorUse::kWrite, OperandType::kReg, \
- OperandType::kRegList, OperandType::kRegCount, OperandType::kIdx) \
- V(CallWithSpread, AccumulatorUse::kWrite, OperandType::kReg, \
- OperandType::kRegList, OperandType::kRegCount) \
- V(TailCall, AccumulatorUse::kWrite, OperandType::kReg, \
- OperandType::kRegList, OperandType::kRegCount, OperandType::kIdx) \
- V(CallRuntime, AccumulatorUse::kWrite, OperandType::kRuntimeId, \
- OperandType::kRegList, OperandType::kRegCount) \
- V(CallRuntimeForPair, AccumulatorUse::kNone, OperandType::kRuntimeId, \
- OperandType::kRegList, OperandType::kRegCount, OperandType::kRegOutPair) \
- V(CallJSRuntime, AccumulatorUse::kWrite, OperandType::kIdx, \
- OperandType::kRegList, OperandType::kRegCount) \
- \
- /* Intrinsics */ \
- V(InvokeIntrinsic, AccumulatorUse::kWrite, OperandType::kIntrinsicId, \
- OperandType::kRegList, OperandType::kRegCount) \
- \
- /* Construct operators */ \
- V(Construct, AccumulatorUse::kReadWrite, OperandType::kReg, \
- OperandType::kRegList, OperandType::kRegCount, OperandType::kIdx) \
- V(ConstructWithSpread, AccumulatorUse::kReadWrite, OperandType::kReg, \
- OperandType::kRegList, OperandType::kRegCount) \
- \
- /* Test Operators */ \
- V(TestEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \
- OperandType::kIdx) \
- V(TestNotEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \
- OperandType::kIdx) \
- V(TestEqualStrict, AccumulatorUse::kReadWrite, OperandType::kReg, \
- OperandType::kIdx) \
- V(TestLessThan, AccumulatorUse::kReadWrite, OperandType::kReg, \
- OperandType::kIdx) \
- V(TestGreaterThan, AccumulatorUse::kReadWrite, OperandType::kReg, \
- OperandType::kIdx) \
- V(TestLessThanOrEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \
- OperandType::kIdx) \
- V(TestGreaterThanOrEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \
- OperandType::kIdx) \
- V(TestInstanceOf, AccumulatorUse::kReadWrite, OperandType::kReg) \
- V(TestIn, AccumulatorUse::kReadWrite, OperandType::kReg) \
- \
- /* TestEqual with Null or Undefined */ \
- V(TestUndetectable, AccumulatorUse::kWrite, OperandType::kReg) \
- V(TestNull, AccumulatorUse::kWrite, OperandType::kReg) \
- V(TestUndefined, AccumulatorUse::kWrite, OperandType::kReg) \
- \
- /* Cast operators */ \
- V(ToName, AccumulatorUse::kRead, OperandType::kRegOut) \
- V(ToNumber, AccumulatorUse::kRead, OperandType::kRegOut) \
- V(ToObject, AccumulatorUse::kRead, OperandType::kRegOut) \
- \
- /* Literals */ \
- V(CreateRegExpLiteral, AccumulatorUse::kWrite, OperandType::kIdx, \
- OperandType::kIdx, OperandType::kFlag8) \
- V(CreateArrayLiteral, AccumulatorUse::kWrite, OperandType::kIdx, \
- OperandType::kIdx, OperandType::kFlag8) \
- V(CreateObjectLiteral, AccumulatorUse::kNone, OperandType::kIdx, \
- OperandType::kIdx, OperandType::kFlag8, OperandType::kRegOut) \
- \
- /* Closure allocation */ \
- V(CreateClosure, AccumulatorUse::kWrite, OperandType::kIdx, \
- OperandType::kIdx, OperandType::kFlag8) \
- \
- /* Context allocation */ \
- V(CreateBlockContext, AccumulatorUse::kReadWrite, OperandType::kIdx) \
- V(CreateCatchContext, AccumulatorUse::kReadWrite, OperandType::kReg, \
- OperandType::kIdx, OperandType::kIdx) \
- V(CreateFunctionContext, AccumulatorUse::kWrite, OperandType::kUImm) \
- V(CreateEvalContext, AccumulatorUse::kWrite, OperandType::kUImm) \
- V(CreateWithContext, AccumulatorUse::kReadWrite, OperandType::kReg, \
- OperandType::kIdx) \
- \
- /* Arguments allocation */ \
- V(CreateMappedArguments, AccumulatorUse::kWrite) \
- V(CreateUnmappedArguments, AccumulatorUse::kWrite) \
- V(CreateRestParameter, AccumulatorUse::kWrite) \
- \
- /* Control Flow -- carefully ordered for efficient checks */ \
- /* - [Unconditional jumps] */ \
- V(JumpLoop, AccumulatorUse::kNone, OperandType::kUImm, OperandType::kImm) \
- /* - [Forward jumps] */ \
- V(Jump, AccumulatorUse::kNone, OperandType::kUImm) \
- /* - [Start constant jumps] */ \
- V(JumpConstant, AccumulatorUse::kNone, OperandType::kIdx) \
- /* - [Conditional jumps] */ \
- /* - [Conditional constant jumps] */ \
- V(JumpIfNullConstant, AccumulatorUse::kRead, OperandType::kIdx) \
- V(JumpIfUndefinedConstant, AccumulatorUse::kRead, OperandType::kIdx) \
- V(JumpIfTrueConstant, AccumulatorUse::kRead, OperandType::kIdx) \
- V(JumpIfFalseConstant, AccumulatorUse::kRead, OperandType::kIdx) \
- V(JumpIfJSReceiverConstant, AccumulatorUse::kRead, OperandType::kIdx) \
- V(JumpIfNotHoleConstant, AccumulatorUse::kRead, OperandType::kIdx) \
- /* - [Start ToBoolean jumps] */ \
- V(JumpIfToBooleanTrueConstant, AccumulatorUse::kRead, OperandType::kIdx) \
- V(JumpIfToBooleanFalseConstant, AccumulatorUse::kRead, OperandType::kIdx) \
- /* - [End constant jumps] */ \
- /* - [Conditional immediate jumps] */ \
- V(JumpIfToBooleanTrue, AccumulatorUse::kRead, OperandType::kUImm) \
- V(JumpIfToBooleanFalse, AccumulatorUse::kRead, OperandType::kUImm) \
- /* - [End ToBoolean jumps] */ \
- V(JumpIfTrue, AccumulatorUse::kRead, OperandType::kUImm) \
- V(JumpIfFalse, AccumulatorUse::kRead, OperandType::kUImm) \
- V(JumpIfNull, AccumulatorUse::kRead, OperandType::kUImm) \
- V(JumpIfUndefined, AccumulatorUse::kRead, OperandType::kUImm) \
- V(JumpIfJSReceiver, AccumulatorUse::kRead, OperandType::kUImm) \
- V(JumpIfNotHole, AccumulatorUse::kRead, OperandType::kUImm) \
- \
- /* Complex flow control For..in */ \
- V(ForInPrepare, AccumulatorUse::kNone, OperandType::kReg, \
- OperandType::kRegOutTriple) \
- V(ForInContinue, AccumulatorUse::kWrite, OperandType::kReg, \
- OperandType::kReg) \
- V(ForInNext, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kReg, \
- OperandType::kRegPair, OperandType::kIdx) \
- V(ForInStep, AccumulatorUse::kWrite, OperandType::kReg) \
- \
- /* Perform a stack guard check */ \
- V(StackCheck, AccumulatorUse::kNone) \
- \
- /* Update the pending message */ \
- V(SetPendingMessage, AccumulatorUse::kReadWrite) \
- \
- /* Non-local flow control */ \
- V(Throw, AccumulatorUse::kRead) \
- V(ReThrow, AccumulatorUse::kRead) \
- V(Return, AccumulatorUse::kRead) \
- \
- /* Generators */ \
- V(SuspendGenerator, AccumulatorUse::kRead, OperandType::kReg) \
- V(ResumeGenerator, AccumulatorUse::kWrite, OperandType::kReg) \
- \
- /* Debugger */ \
- V(Debugger, AccumulatorUse::kNone) \
- \
- /* Debug Breakpoints - one for each possible size of unscaled bytecodes */ \
- /* and one for each operand widening prefix bytecode */ \
- V(DebugBreak0, AccumulatorUse::kRead) \
- V(DebugBreak1, AccumulatorUse::kRead, OperandType::kReg) \
- V(DebugBreak2, AccumulatorUse::kRead, OperandType::kReg, OperandType::kReg) \
- V(DebugBreak3, AccumulatorUse::kRead, OperandType::kReg, OperandType::kReg, \
- OperandType::kReg) \
- V(DebugBreak4, AccumulatorUse::kRead, OperandType::kReg, OperandType::kReg, \
- OperandType::kReg, OperandType::kReg) \
- V(DebugBreak5, AccumulatorUse::kRead, OperandType::kRuntimeId, \
- OperandType::kReg, OperandType::kReg) \
- V(DebugBreak6, AccumulatorUse::kRead, OperandType::kRuntimeId, \
- OperandType::kReg, OperandType::kReg, OperandType::kReg) \
- V(DebugBreakWide, AccumulatorUse::kRead) \
- V(DebugBreakExtraWide, AccumulatorUse::kRead) \
- \
- /* Illegal bytecode (terminates execution) */ \
- V(Illegal, AccumulatorUse::kNone) \
- \
- /* No operation (used to maintain source positions for peephole */ \
- /* eliminated bytecodes). */ \
+#define BYTECODE_LIST(V) \
+ /* Extended width operands */ \
+ V(Wide, AccumulatorUse::kNone) \
+ V(ExtraWide, AccumulatorUse::kNone) \
+ \
+ /* Loading the accumulator */ \
+ V(LdaZero, AccumulatorUse::kWrite) \
+ V(LdaSmi, AccumulatorUse::kWrite, OperandType::kImm) \
+ V(LdaUndefined, AccumulatorUse::kWrite) \
+ V(LdaNull, AccumulatorUse::kWrite) \
+ V(LdaTheHole, AccumulatorUse::kWrite) \
+ V(LdaTrue, AccumulatorUse::kWrite) \
+ V(LdaFalse, AccumulatorUse::kWrite) \
+ V(LdaConstant, AccumulatorUse::kWrite, OperandType::kIdx) \
+ \
+ /* Globals */ \
+ V(LdaGlobal, AccumulatorUse::kWrite, OperandType::kIdx, OperandType::kIdx) \
+ V(LdaGlobalInsideTypeof, AccumulatorUse::kWrite, OperandType::kIdx, \
+ OperandType::kIdx) \
+ V(StaGlobalSloppy, AccumulatorUse::kRead, OperandType::kIdx, \
+ OperandType::kIdx) \
+ V(StaGlobalStrict, AccumulatorUse::kRead, OperandType::kIdx, \
+ OperandType::kIdx) \
+ \
+ /* Context operations */ \
+ V(PushContext, AccumulatorUse::kRead, OperandType::kRegOut) \
+ V(PopContext, AccumulatorUse::kNone, OperandType::kReg) \
+ V(LdaContextSlot, AccumulatorUse::kWrite, OperandType::kReg, \
+ OperandType::kIdx, OperandType::kUImm) \
+ V(LdaImmutableContextSlot, AccumulatorUse::kWrite, OperandType::kReg, \
+ OperandType::kIdx, OperandType::kUImm) \
+ V(LdaCurrentContextSlot, AccumulatorUse::kWrite, OperandType::kIdx) \
+ V(LdaImmutableCurrentContextSlot, AccumulatorUse::kWrite, OperandType::kIdx) \
+ V(StaContextSlot, AccumulatorUse::kRead, OperandType::kReg, \
+ OperandType::kIdx, OperandType::kUImm) \
+ V(StaCurrentContextSlot, AccumulatorUse::kRead, OperandType::kIdx) \
+ \
+ /* Load-Store lookup slots */ \
+ V(LdaLookupSlot, AccumulatorUse::kWrite, OperandType::kIdx) \
+ V(LdaLookupContextSlot, AccumulatorUse::kWrite, OperandType::kIdx, \
+ OperandType::kIdx, OperandType::kUImm) \
+ V(LdaLookupGlobalSlot, AccumulatorUse::kWrite, OperandType::kIdx, \
+ OperandType::kIdx, OperandType::kUImm) \
+ V(LdaLookupSlotInsideTypeof, AccumulatorUse::kWrite, OperandType::kIdx) \
+ V(LdaLookupContextSlotInsideTypeof, AccumulatorUse::kWrite, \
+ OperandType::kIdx, OperandType::kIdx, OperandType::kUImm) \
+ V(LdaLookupGlobalSlotInsideTypeof, AccumulatorUse::kWrite, \
+ OperandType::kIdx, OperandType::kIdx, OperandType::kUImm) \
+ V(StaLookupSlotSloppy, AccumulatorUse::kReadWrite, OperandType::kIdx) \
+ V(StaLookupSlotStrict, AccumulatorUse::kReadWrite, OperandType::kIdx) \
+ \
+ /* Register-accumulator transfers */ \
+ V(Ldar, AccumulatorUse::kWrite, OperandType::kReg) \
+ V(Star, AccumulatorUse::kRead, OperandType::kRegOut) \
+ \
+ /* Register-register transfers */ \
+ V(Mov, AccumulatorUse::kNone, OperandType::kReg, OperandType::kRegOut) \
+ \
+ /* Property loads (LoadIC) operations */ \
+ V(LdaNamedProperty, AccumulatorUse::kWrite, OperandType::kReg, \
+ OperandType::kIdx, OperandType::kIdx) \
+ V(LdaKeyedProperty, AccumulatorUse::kReadWrite, OperandType::kReg, \
+ OperandType::kIdx) \
+ \
+ /* Operations on module variables */ \
+ V(LdaModuleVariable, AccumulatorUse::kWrite, OperandType::kImm, \
+ OperandType::kUImm) \
+ V(StaModuleVariable, AccumulatorUse::kRead, OperandType::kImm, \
+ OperandType::kUImm) \
+ \
+ /* Propery stores (StoreIC) operations */ \
+ V(StaNamedPropertySloppy, AccumulatorUse::kRead, OperandType::kReg, \
+ OperandType::kIdx, OperandType::kIdx) \
+ V(StaNamedPropertyStrict, AccumulatorUse::kRead, OperandType::kReg, \
+ OperandType::kIdx, OperandType::kIdx) \
+ V(StaKeyedPropertySloppy, AccumulatorUse::kRead, OperandType::kReg, \
+ OperandType::kReg, OperandType::kIdx) \
+ V(StaKeyedPropertyStrict, AccumulatorUse::kRead, OperandType::kReg, \
+ OperandType::kReg, OperandType::kIdx) \
+ V(StaDataPropertyInLiteral, AccumulatorUse::kRead, OperandType::kReg, \
+ OperandType::kReg, OperandType::kFlag8, OperandType::kIdx) \
+ \
+ /* Binary Operators */ \
+ V(Add, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \
+ V(Sub, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \
+ V(Mul, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \
+ V(Div, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \
+ V(Mod, AccumulatorUse::kReadWrite, OperandType::kReg, OperandType::kIdx) \
+ V(BitwiseOr, AccumulatorUse::kReadWrite, OperandType::kReg, \
+ OperandType::kIdx) \
+ V(BitwiseXor, AccumulatorUse::kReadWrite, OperandType::kReg, \
+ OperandType::kIdx) \
+ V(BitwiseAnd, AccumulatorUse::kReadWrite, OperandType::kReg, \
+ OperandType::kIdx) \
+ V(ShiftLeft, AccumulatorUse::kReadWrite, OperandType::kReg, \
+ OperandType::kIdx) \
+ V(ShiftRight, AccumulatorUse::kReadWrite, OperandType::kReg, \
+ OperandType::kIdx) \
+ V(ShiftRightLogical, AccumulatorUse::kReadWrite, OperandType::kReg, \
+ OperandType::kIdx) \
+ \
+ /* Binary operators with immediate operands */ \
+ V(AddSmi, AccumulatorUse::kWrite, OperandType::kImm, OperandType::kReg, \
+ OperandType::kIdx) \
+ V(SubSmi, AccumulatorUse::kWrite, OperandType::kImm, OperandType::kReg, \
+ OperandType::kIdx) \
+ V(BitwiseOrSmi, AccumulatorUse::kWrite, OperandType::kImm, \
+ OperandType::kReg, OperandType::kIdx) \
+ V(BitwiseAndSmi, AccumulatorUse::kWrite, OperandType::kImm, \
+ OperandType::kReg, OperandType::kIdx) \
+ V(ShiftLeftSmi, AccumulatorUse::kWrite, OperandType::kImm, \
+ OperandType::kReg, OperandType::kIdx) \
+ V(ShiftRightSmi, AccumulatorUse::kWrite, OperandType::kImm, \
+ OperandType::kReg, OperandType::kIdx) \
+ \
+ /* Unary Operators */ \
+ V(Inc, AccumulatorUse::kReadWrite, OperandType::kIdx) \
+ V(Dec, AccumulatorUse::kReadWrite, OperandType::kIdx) \
+ V(ToBooleanLogicalNot, AccumulatorUse::kReadWrite) \
+ V(LogicalNot, AccumulatorUse::kReadWrite) \
+ V(TypeOf, AccumulatorUse::kReadWrite) \
+ V(DeletePropertyStrict, AccumulatorUse::kReadWrite, OperandType::kReg) \
+ V(DeletePropertySloppy, AccumulatorUse::kReadWrite, OperandType::kReg) \
+ \
+ /* GetSuperConstructor operator */ \
+ V(GetSuperConstructor, AccumulatorUse::kRead, OperandType::kRegOut) \
+ \
+ /* Call operations */ \
+ V(Call, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kRegList, \
+ OperandType::kRegCount, OperandType::kIdx) \
+ V(CallProperty, AccumulatorUse::kWrite, OperandType::kReg, \
+ OperandType::kRegList, OperandType::kRegCount, OperandType::kIdx) \
+ V(CallWithSpread, AccumulatorUse::kWrite, OperandType::kReg, \
+ OperandType::kRegList, OperandType::kRegCount) \
+ V(TailCall, AccumulatorUse::kWrite, OperandType::kReg, \
+ OperandType::kRegList, OperandType::kRegCount, OperandType::kIdx) \
+ V(CallRuntime, AccumulatorUse::kWrite, OperandType::kRuntimeId, \
+ OperandType::kRegList, OperandType::kRegCount) \
+ V(CallRuntimeForPair, AccumulatorUse::kNone, OperandType::kRuntimeId, \
+ OperandType::kRegList, OperandType::kRegCount, OperandType::kRegOutPair) \
+ V(CallJSRuntime, AccumulatorUse::kWrite, OperandType::kIdx, \
+ OperandType::kRegList, OperandType::kRegCount) \
+ \
+ /* Intrinsics */ \
+ V(InvokeIntrinsic, AccumulatorUse::kWrite, OperandType::kIntrinsicId, \
+ OperandType::kRegList, OperandType::kRegCount) \
+ \
+ /* Construct operators */ \
+ V(Construct, AccumulatorUse::kReadWrite, OperandType::kReg, \
+ OperandType::kRegList, OperandType::kRegCount, OperandType::kIdx) \
+ V(ConstructWithSpread, AccumulatorUse::kReadWrite, OperandType::kReg, \
+ OperandType::kRegList, OperandType::kRegCount) \
+ \
+ /* Test Operators */ \
+ V(TestEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \
+ OperandType::kIdx) \
+ V(TestNotEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \
+ OperandType::kIdx) \
+ V(TestEqualStrict, AccumulatorUse::kReadWrite, OperandType::kReg, \
+ OperandType::kIdx) \
+ V(TestLessThan, AccumulatorUse::kReadWrite, OperandType::kReg, \
+ OperandType::kIdx) \
+ V(TestGreaterThan, AccumulatorUse::kReadWrite, OperandType::kReg, \
+ OperandType::kIdx) \
+ V(TestLessThanOrEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \
+ OperandType::kIdx) \
+ V(TestGreaterThanOrEqual, AccumulatorUse::kReadWrite, OperandType::kReg, \
+ OperandType::kIdx) \
+ V(TestInstanceOf, AccumulatorUse::kReadWrite, OperandType::kReg) \
+ V(TestIn, AccumulatorUse::kReadWrite, OperandType::kReg) \
+ \
+ /* TestEqual with Null or Undefined */ \
+ V(TestUndetectable, AccumulatorUse::kWrite, OperandType::kReg) \
+ V(TestNull, AccumulatorUse::kWrite, OperandType::kReg) \
+ V(TestUndefined, AccumulatorUse::kWrite, OperandType::kReg) \
+ \
+ /* Cast operators */ \
+ V(ToName, AccumulatorUse::kRead, OperandType::kRegOut) \
+ V(ToNumber, AccumulatorUse::kRead, OperandType::kRegOut) \
+ V(ToObject, AccumulatorUse::kRead, OperandType::kRegOut) \
+ \
+ /* Literals */ \
+ V(CreateRegExpLiteral, AccumulatorUse::kWrite, OperandType::kIdx, \
+ OperandType::kIdx, OperandType::kFlag8) \
+ V(CreateArrayLiteral, AccumulatorUse::kWrite, OperandType::kIdx, \
+ OperandType::kIdx, OperandType::kFlag8) \
+ V(CreateObjectLiteral, AccumulatorUse::kNone, OperandType::kIdx, \
+ OperandType::kIdx, OperandType::kFlag8, OperandType::kRegOut) \
+ \
+ /* Closure allocation */ \
+ V(CreateClosure, AccumulatorUse::kWrite, OperandType::kIdx, \
+ OperandType::kIdx, OperandType::kFlag8) \
+ \
+ /* Context allocation */ \
+ V(CreateBlockContext, AccumulatorUse::kReadWrite, OperandType::kIdx) \
+ V(CreateCatchContext, AccumulatorUse::kReadWrite, OperandType::kReg, \
+ OperandType::kIdx, OperandType::kIdx) \
+ V(CreateFunctionContext, AccumulatorUse::kWrite, OperandType::kUImm) \
+ V(CreateEvalContext, AccumulatorUse::kWrite, OperandType::kUImm) \
+ V(CreateWithContext, AccumulatorUse::kReadWrite, OperandType::kReg, \
+ OperandType::kIdx) \
+ \
+ /* Arguments allocation */ \
+ V(CreateMappedArguments, AccumulatorUse::kWrite) \
+ V(CreateUnmappedArguments, AccumulatorUse::kWrite) \
+ V(CreateRestParameter, AccumulatorUse::kWrite) \
+ \
+ /* Control Flow -- carefully ordered for efficient checks */ \
+ /* - [Unconditional jumps] */ \
+ V(JumpLoop, AccumulatorUse::kNone, OperandType::kUImm, OperandType::kImm) \
+ /* - [Forward jumps] */ \
+ V(Jump, AccumulatorUse::kNone, OperandType::kUImm) \
+ /* - [Start constant jumps] */ \
+ V(JumpConstant, AccumulatorUse::kNone, OperandType::kIdx) \
+ /* - [Conditional jumps] */ \
+ /* - [Conditional constant jumps] */ \
+ V(JumpIfNullConstant, AccumulatorUse::kRead, OperandType::kIdx) \
+ V(JumpIfUndefinedConstant, AccumulatorUse::kRead, OperandType::kIdx) \
+ V(JumpIfTrueConstant, AccumulatorUse::kRead, OperandType::kIdx) \
+ V(JumpIfFalseConstant, AccumulatorUse::kRead, OperandType::kIdx) \
+ V(JumpIfJSReceiverConstant, AccumulatorUse::kRead, OperandType::kIdx) \
+ V(JumpIfNotHoleConstant, AccumulatorUse::kRead, OperandType::kIdx) \
+ /* - [Start ToBoolean jumps] */ \
+ V(JumpIfToBooleanTrueConstant, AccumulatorUse::kRead, OperandType::kIdx) \
+ V(JumpIfToBooleanFalseConstant, AccumulatorUse::kRead, OperandType::kIdx) \
+ /* - [End constant jumps] */ \
+ /* - [Conditional immediate jumps] */ \
+ V(JumpIfToBooleanTrue, AccumulatorUse::kRead, OperandType::kUImm) \
+ V(JumpIfToBooleanFalse, AccumulatorUse::kRead, OperandType::kUImm) \
+ /* - [End ToBoolean jumps] */ \
+ V(JumpIfTrue, AccumulatorUse::kRead, OperandType::kUImm) \
+ V(JumpIfFalse, AccumulatorUse::kRead, OperandType::kUImm) \
+ V(JumpIfNull, AccumulatorUse::kRead, OperandType::kUImm) \
+ V(JumpIfUndefined, AccumulatorUse::kRead, OperandType::kUImm) \
+ V(JumpIfJSReceiver, AccumulatorUse::kRead, OperandType::kUImm) \
+ V(JumpIfNotHole, AccumulatorUse::kRead, OperandType::kUImm) \
+ \
+ /* Complex flow control For..in */ \
+ V(ForInPrepare, AccumulatorUse::kNone, OperandType::kReg, \
+ OperandType::kRegOutTriple) \
+ V(ForInContinue, AccumulatorUse::kWrite, OperandType::kReg, \
+ OperandType::kReg) \
+ V(ForInNext, AccumulatorUse::kWrite, OperandType::kReg, OperandType::kReg, \
+ OperandType::kRegPair, OperandType::kIdx) \
+ V(ForInStep, AccumulatorUse::kWrite, OperandType::kReg) \
+ \
+ /* Perform a stack guard check */ \
+ V(StackCheck, AccumulatorUse::kNone) \
+ \
+ /* Update the pending message */ \
+ V(SetPendingMessage, AccumulatorUse::kReadWrite) \
+ \
+ /* Non-local flow control */ \
+ V(Throw, AccumulatorUse::kRead) \
+ V(ReThrow, AccumulatorUse::kRead) \
+ V(Return, AccumulatorUse::kRead) \
+ \
+ /* Generators */ \
+ V(SuspendGenerator, AccumulatorUse::kRead, OperandType::kReg) \
+ V(ResumeGenerator, AccumulatorUse::kWrite, OperandType::kReg) \
+ \
+ /* Debugger */ \
+ V(Debugger, AccumulatorUse::kNone) \
+ \
+ /* Debug Breakpoints - one for each possible size of unscaled bytecodes */ \
+ /* and one for each operand widening prefix bytecode */ \
+ V(DebugBreak0, AccumulatorUse::kRead) \
+ V(DebugBreak1, AccumulatorUse::kRead, OperandType::kReg) \
+ V(DebugBreak2, AccumulatorUse::kRead, OperandType::kReg, OperandType::kReg) \
+ V(DebugBreak3, AccumulatorUse::kRead, OperandType::kReg, OperandType::kReg, \
+ OperandType::kReg) \
+ V(DebugBreak4, AccumulatorUse::kRead, OperandType::kReg, OperandType::kReg, \
+ OperandType::kReg, OperandType::kReg) \
+ V(DebugBreak5, AccumulatorUse::kRead, OperandType::kRuntimeId, \
+ OperandType::kReg, OperandType::kReg) \
+ V(DebugBreak6, AccumulatorUse::kRead, OperandType::kRuntimeId, \
+ OperandType::kReg, OperandType::kReg, OperandType::kReg) \
+ V(DebugBreakWide, AccumulatorUse::kRead) \
+ V(DebugBreakExtraWide, AccumulatorUse::kRead) \
+ \
+ /* Illegal bytecode (terminates execution) */ \
+ V(Illegal, AccumulatorUse::kNone) \
+ \
+ /* No operation (used to maintain source positions for peephole */ \
+ /* eliminated bytecodes). */ \
V(Nop, AccumulatorUse::kNone)
// List of debug break bytecodes.
@@ -510,7 +513,9 @@ class V8_EXPORT_PRIVATE Bytecodes final {
bytecode == Bytecode::kLdaTheHole ||
bytecode == Bytecode::kLdaConstant ||
bytecode == Bytecode::kLdaContextSlot ||
- bytecode == Bytecode::kLdaCurrentContextSlot;
+ bytecode == Bytecode::kLdaCurrentContextSlot ||
+ bytecode == Bytecode::kLdaImmutableContextSlot ||
+ bytecode == Bytecode::kLdaImmutableCurrentContextSlot;
}
// Return true if |bytecode| is a register load without effects,
« no previous file with comments | « src/interpreter/bytecode-generator.cc ('k') | src/interpreter/interpreter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698