Skip to content

Instantly share code, notes, and snippets.

@NikolayMakhonin
Created February 17, 2020 07:59
Show Gist options
  • Save NikolayMakhonin/288633e89b0b61335db0ff0a3fc30eb5 to your computer and use it in GitHub Desktop.
Save NikolayMakhonin/288633e89b0b61335db0ff0a3fc30eb5 to your computer and use it in GitHub Desktop.
bytecode.h order Byte Code Category Accumulator Use Operand 1 Operand 2 Operand 3 Operand 4 Operand 5
1 Wide Extended width operands None
2 ExtraWide Extended width operands None
3 DebugBreakWide Debug Breakpoints ReadWrite
4 DebugBreakExtraWide Debug Breakpoints ReadWrite
5 DebugBreak0 Debug Breakpoints ReadWrite
6 DebugBreak1 Debug Breakpoints ReadWrite Reg
7 DebugBreak2 Debug Breakpoints ReadWrite Reg Reg
8 DebugBreak3 Debug Breakpoints ReadWrite Reg Reg Reg
9 DebugBreak4 Debug Breakpoints ReadWrite Reg Reg Reg Reg
10 DebugBreak5 Debug Breakpoints ReadWrite RuntimeId Reg Reg
11 DebugBreak6 Debug Breakpoints ReadWrite RuntimeId Reg Reg Reg
12 LdaZero Loading the accumulator Write
13 LdaSmi Loading the accumulator Write Imm
14 LdaUndefined Loading the accumulator Write
15 LdaNull Loading the accumulator Write
16 LdaTheHole Loading the accumulator Write
17 LdaTrue Loading the accumulator Write
18 LdaFalse Loading the accumulator Write
19 LdaConstant Loading the accumulator Write Idx
20 LdaGlobal Globals Write Idx Idx
21 LdaGlobalInsideTypeof Globals Write Idx Idx
22 StaGlobal Globals Read Idx Idx
23 PushContext Context operations Read RegOut
24 PopContext Context operations None Reg
25 LdaContextSlot Context operations Write Reg Idx UImm
26 LdaImmutableContextSlot Context operations Write Reg Idx UImm
27 LdaCurrentContextSlot Context operations Write Idx
28 LdaImmutableCurrentContextSlot Context operations Write Idx
29 StaContextSlot Context operations Read Reg Idx UImm
30 StaCurrentContextSlot Context operations Read Idx
31 LdaLookupSlot Load-Store lookup slots Write Idx
32 LdaLookupContextSlot Load-Store lookup slots Write Idx Idx UImm
33 LdaLookupGlobalSlot Load-Store lookup slots Write Idx Idx UImm
34 LdaLookupSlotInsideTypeof Load-Store lookup slots Write Idx
35 LdaLookupContextSlotInsideTypeof Load-Store lookup slots Write Idx Idx UImm
36 LdaLookupGlobalSlotInsideTypeof Load-Store lookup slots Write Idx Idx UImm
37 StaLookupSlot Load-Store lookup slots ReadWrite Idx Flag8
38 Ldar Register-accumulator transfers Write Reg
39 Star Register-accumulator transfers Read RegOut
40 Mov Register-register transfers None Reg RegOut
41 LdaNamedProperty Property loads (LoadIC) operations Write Reg Idx Idx
42 LdaNamedPropertyNoFeedback Property loads (LoadIC) operations Write Reg Idx
43 LdaKeyedProperty Property loads (LoadIC) operations ReadWrite Reg Idx
44 LdaModuleVariable Operations on module variables Write Imm UImm
45 StaModuleVariable Operations on module variables Read Imm UImm
46 StaNamedProperty Propery stores (StoreIC) operations ReadWrite Reg Idx Idx
47 StaNamedPropertyNoFeedback Propery stores (StoreIC) operations ReadWrite Reg Idx Flag8
48 StaNamedOwnProperty Propery stores (StoreIC) operations ReadWrite Reg Idx Idx
49 StaKeyedProperty Propery stores (StoreIC) operations ReadWrite Reg Reg Idx
50 StaInArrayLiteral Propery stores (StoreIC) operations ReadWrite Reg Reg Idx
51 StaDataPropertyInLiteral Propery stores (StoreIC) operations Read Reg Reg Flag8 Idx
52 CollectTypeProfile Propery stores (StoreIC) operations Read Imm
53 Add Binary Operators ReadWrite Reg Idx
54 Sub Binary Operators ReadWrite Reg Idx
55 Mul Binary Operators ReadWrite Reg Idx
56 Div Binary Operators ReadWrite Reg Idx
57 Mod Binary Operators ReadWrite Reg Idx
58 Exp Binary Operators ReadWrite Reg Idx
59 BitwiseOr Binary Operators ReadWrite Reg Idx
60 BitwiseXor Binary Operators ReadWrite Reg Idx
61 BitwiseAnd Binary Operators ReadWrite Reg Idx
62 ShiftLeft Binary Operators ReadWrite Reg Idx
63 ShiftRight Binary Operators ReadWrite Reg Idx
64 ShiftRightLogical Binary Operators ReadWrite Reg Idx
65 AddSmi Binary operators with immediate operands ReadWrite Imm Idx
66 SubSmi Binary operators with immediate operands ReadWrite Imm Idx
67 MulSmi Binary operators with immediate operands ReadWrite Imm Idx
68 DivSmi Binary operators with immediate operands ReadWrite Imm Idx
69 ModSmi Binary operators with immediate operands ReadWrite Imm Idx
70 ExpSmi Binary operators with immediate operands ReadWrite Imm Idx
71 BitwiseOrSmi Binary operators with immediate operands ReadWrite Imm Idx
72 BitwiseXorSmi Binary operators with immediate operands ReadWrite Imm Idx
73 BitwiseAndSmi Binary operators with immediate operands ReadWrite Imm Idx
74 ShiftLeftSmi Binary operators with immediate operands ReadWrite Imm Idx
75 ShiftRightSmi Binary operators with immediate operands ReadWrite Imm Idx
76 ShiftRightLogicalSmi Binary operators with immediate operands ReadWrite Imm Idx
77 Inc Unary Operators ReadWrite Idx
78 Dec Unary Operators ReadWrite Idx
79 Negate Unary Operators ReadWrite Idx
80 BitwiseNot Unary Operators ReadWrite Idx
81 ToBooleanLogicalNot Unary Operators ReadWrite
82 LogicalNot Unary Operators ReadWrite
83 TypeOf Unary Operators ReadWrite
84 DeletePropertyStrict Unary Operators ReadWrite Reg
85 DeletePropertySloppy Unary Operators ReadWrite Reg
86 GetSuperConstructor GetSuperConstructor operator Read RegOut
87 CallAnyReceiver Call operations Write Reg RegList RegCount Idx
88 CallProperty Call operations Write Reg RegList RegCount Idx
89 CallProperty0 Call operations Write Reg Reg Idx
90 CallProperty1 Call operations Write Reg Reg Reg Idx
91 CallProperty2 Call operations Write Reg Reg Reg Reg Idx
92 CallUndefinedReceiver Call operations Write Reg RegList RegCount Idx
93 CallUndefinedReceiver0 Call operations Write Reg Idx
94 CallUndefinedReceiver1 Call operations Write Reg Reg Idx
95 CallUndefinedReceiver2 Call operations Write Reg Reg Reg Idx
96 CallNoFeedback Call operations Write Reg RegList RegCount
97 CallWithSpread Call operations Write Reg RegList RegCount Idx
98 CallRuntime Call operations Write RuntimeId RegList RegCount
99 CallRuntimeForPair Call operations None RuntimeId RegList RegCount RegOutPair
100 CallJSRuntime Call operations Write NativeContextIndex RegList RegCount
101 InvokeIntrinsic Intrinsics Write IntrinsicId RegList RegCount
102 Construct Construct operators ReadWrite Reg RegList RegCount Idx
103 ConstructWithSpread Construct operators ReadWrite Reg RegList RegCount Idx
104 TestEqual Test Operators ReadWrite Reg Idx
105 TestEqualStrict Test Operators ReadWrite Reg Idx
106 TestLessThan Test Operators ReadWrite Reg Idx
107 TestGreaterThan Test Operators ReadWrite Reg Idx
108 TestLessThanOrEqual Test Operators ReadWrite Reg Idx
109 TestGreaterThanOrEqual Test Operators ReadWrite Reg Idx
110 TestReferenceEqual Test Operators ReadWrite Reg
111 TestInstanceOf Test Operators ReadWrite Reg Idx
112 TestIn Test Operators ReadWrite Reg Idx
113 TestUndetectable Test Operators ReadWrite
114 TestNull Test Operators ReadWrite
115 TestUndefined Test Operators ReadWrite
116 TestTypeOf Test Operators ReadWrite Flag8
117 ToName Cast operators Read RegOut
118 ToNumber Cast operators ReadWrite Idx
119 ToNumeric Cast operators ReadWrite Idx
120 ToObject Cast operators Read RegOut
121 ToString Cast operators ReadWrite
122 CreateRegExpLiteral Literals Write Idx Idx Flag8
123 CreateArrayLiteral Literals Write Idx Idx Flag8
124 CreateArrayFromIterable Literals ReadWrite
125 CreateEmptyArrayLiteral Literals Write Idx
126 CreateObjectLiteral Literals Write Idx Idx Flag8
127 CreateEmptyObjectLiteral Literals Write
128 CloneObject Literals Write Reg Flag8 Idx
129 GetTemplateObject Tagged templates Write Idx Idx
130 CreateClosure Closure allocation Write Idx Idx Flag8
131 CreateBlockContext Context allocation Write Idx
132 CreateCatchContext Context allocation Write Reg Idx
133 CreateFunctionContext Context allocation Write Idx UImm
134 CreateEvalContext Context allocation Write Idx UImm
135 CreateWithContext Context allocation Write Reg Idx
136 CreateMappedArguments Arguments allocation Write
137 CreateUnmappedArguments Arguments allocation Write
138 CreateRestParameter Arguments allocation Write
139 JumpLoop Unconditional jumps None UImm Imm
140 Jump Forward jumps None UImm
141 JumpConstant Constant jumps None Idx
142 JumpIfNullConstant Conditional constant jumps Read Idx
143 JumpIfNotNullConstant Conditional constant jumps Read Idx
144 JumpIfUndefinedConstant Conditional constant jumps Read Idx
145 JumpIfNotUndefinedConstant Conditional constant jumps Read Idx
146 JumpIfUndefinedOrNullConstant Conditional constant jumps Read Idx
147 JumpIfTrueConstant Conditional constant jumps Read Idx
148 JumpIfFalseConstant Conditional constant jumps Read Idx
149 JumpIfJSReceiverConstant Conditional constant jumps Read Idx
150 JumpIfToBooleanTrueConstant Conditional constant jumps Read Idx
151 JumpIfToBooleanFalseConstant Conditional constant jumps Read Idx
152 JumpIfToBooleanTrue Conditional immediate jumps Read UImm
153 JumpIfToBooleanFalse Conditional immediate jumps Read UImm
154 JumpIfTrue Conditional immediate jumps Read UImm
155 JumpIfFalse Conditional immediate jumps Read UImm
156 JumpIfNull Conditional immediate jumps Read UImm
157 JumpIfNotNull Conditional immediate jumps Read UImm
158 JumpIfUndefined Conditional immediate jumps Read UImm
159 JumpIfNotUndefined Conditional immediate jumps Read UImm
160 JumpIfUndefinedOrNull Conditional immediate jumps Read UImm
161 JumpIfJSReceiver Conditional immediate jumps Read UImm
162 SwitchOnSmiNoFeedback Smi-table lookup for switch statements Read Idx UImm Imm
163 ForInEnumerate Complex flow control For..in Write Reg
164 ForInPrepare Complex flow control For..in Read RegOutTriple Idx
165 ForInContinue Complex flow control For..in Write Reg Reg
166 ForInNext Complex flow control For..in Write Reg Reg RegPair Idx
167 ForInStep Complex flow control For..in Write Reg
168 StackCheck Perform a stack guard check None
169 SetPendingMessage Update the pending message ReadWrite
170 Throw Non-local flow control Read
171 ReThrow Non-local flow control Read
172 Return Non-local flow control Read
173 ThrowReferenceErrorIfHole Non-local flow control Read Idx
174 ThrowSuperNotCalledIfHole Non-local flow control Read
175 ThrowSuperAlreadyCalledIfNotHole Non-local flow control Read
176 SwitchOnGeneratorState Generators None Reg Idx UImm
177 SuspendGenerator Generators Read Reg RegList RegCount UImm
178 ResumeGenerator Generators Write Reg RegOutList RegCount
179 GetIterator Iterator protocol operations Write Reg Idx Idx
180 Debugger Debugger None
181 IncBlockCounter Block Coverage None Idx
182 Abort Execution Abort (internal error) None Idx
183 Illegal Illegal bytecode None
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment