OLD | NEW |
1 # | 1 # |
2 # Autogenerated by generate-bytecode-expectations. | 2 # Autogenerated by generate-bytecode-expectations. |
3 # | 3 # |
4 | 4 |
5 --- | 5 --- |
6 pool type: mixed | 6 pool type: mixed |
7 execute: yes | 7 execute: yes |
8 wrap: yes | 8 wrap: yes |
9 | 9 |
10 --- | 10 --- |
11 snippet: " | 11 snippet: " |
12 class Person { | 12 class Person { |
13 constructor(name) { this.name = name; } | 13 constructor(name) { this.name = name; } |
14 speak() { console.log(this.name + ' is speaking.'); } | 14 speak() { console.log(this.name + ' is speaking.'); } |
15 } | 15 } |
16 " | 16 " |
17 frame size: 9 | 17 frame size: 11 |
18 parameter count: 1 | 18 parameter count: 1 |
19 bytecode array length: 72 | 19 bytecode array length: 77 |
20 bytecodes: [ | 20 bytecodes: [ |
21 B(LdaTheHole), | 21 B(LdaTheHole), |
22 B(Star), R(1), | 22 B(Star), R(2), |
23 /* 30 E> */ B(StackCheck), | 23 /* 30 E> */ B(StackCheck), |
24 B(LdaTheHole), | 24 B(LdaTheHole), |
25 B(Star), R(0), | 25 B(Star), R(0), |
26 B(LdaTheHole), | 26 /* 148 S> */ B(LdaTheHole), |
27 B(Star), R(2), | 27 B(Star), R(4), |
28 B(CreateClosure), U8(0), U8(2), | 28 B(CreateClosure), U8(0), U8(2), |
29 B(Star), R(3), | |
30 B(LdaSmi), U8(34), | |
31 B(Star), R(4), | |
32 B(Wide), B(LdaSmi), U16(148), | |
33 B(Star), R(5), | 29 B(Star), R(5), |
34 B(CallRuntime), U16(Runtime::kDefineClass), R(2), U8(4), | 30 B(CreateArrayLiteral), U8(1), U8(0), U8(3), |
35 B(Star), R(2), | |
36 B(LdrNamedProperty), R(2), U8(1), U8(1), R(3), | |
37 B(LdaConstant), U8(2), | |
38 B(Star), R(5), | |
39 B(CreateClosure), U8(3), U8(2), | |
40 B(Star), R(6), | 31 B(Star), R(6), |
41 B(LdaSmi), U8(2), | 32 B(CreateArrayLiteral), U8(2), U8(1), U8(3), |
42 B(Star), R(7), | 33 B(Star), R(9), |
43 B(LdaZero), | 34 B(LdaZero), |
44 B(Star), R(8), | 35 B(Star), R(8), |
45 B(Mov), R(3), R(4), | 36 B(CreateClosure), U8(3), U8(2), |
46 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(4)
, U8(5), | 37 B(StaKeyedPropertySloppy), R(9), R(8), U8(1), |
47 B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1), | 38 B(Ldar), R(9), |
| 39 B(Star), R(7), |
| 40 B(CreateArrayLiteral), U8(4), U8(2), U8(3), |
| 41 B(Star), R(8), |
| 42 B(LdaSmi), U8(34), |
| 43 B(Star), R(9), |
| 44 B(Wide), B(LdaSmi), U16(148), |
| 45 B(Star), R(10), |
| 46 B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(7), |
| 47 B(Star), R(3), |
| 48 B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1), |
48 B(Star), R(0), | 49 B(Star), R(0), |
49 B(Star), R(1), | 50 B(Star), R(1), |
| 51 B(Star), R(2), |
50 B(LdaUndefined), | 52 B(LdaUndefined), |
51 /* 149 S> */ B(Return), | 53 /* 149 S> */ B(Return), |
52 ] | 54 ] |
53 constant pool: [ | 55 constant pool: [ |
54 InstanceType::SHARED_FUNCTION_INFO_TYPE, | 56 InstanceType::SHARED_FUNCTION_INFO_TYPE, |
55 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, | 57 InstanceType::FIXED_ARRAY_TYPE, |
56 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, | 58 InstanceType::FIXED_ARRAY_TYPE, |
57 InstanceType::SHARED_FUNCTION_INFO_TYPE, | 59 InstanceType::SHARED_FUNCTION_INFO_TYPE, |
| 60 InstanceType::FIXED_ARRAY_TYPE, |
58 ] | 61 ] |
59 handlers: [ | 62 handlers: [ |
60 ] | 63 ] |
61 | 64 |
62 --- | 65 --- |
63 snippet: " | 66 snippet: " |
64 class person { | 67 class person { |
65 constructor(name) { this.name = name; } | 68 constructor(name) { this.name = name; } |
66 speak() { console.log(this.name + ' is speaking.'); } | 69 speak() { console.log(this.name + ' is speaking.'); } |
67 } | 70 } |
68 " | 71 " |
69 frame size: 9 | 72 frame size: 11 |
70 parameter count: 1 | 73 parameter count: 1 |
71 bytecode array length: 72 | 74 bytecode array length: 77 |
72 bytecodes: [ | 75 bytecodes: [ |
73 B(LdaTheHole), | 76 B(LdaTheHole), |
74 B(Star), R(1), | 77 B(Star), R(2), |
75 /* 30 E> */ B(StackCheck), | 78 /* 30 E> */ B(StackCheck), |
76 B(LdaTheHole), | 79 B(LdaTheHole), |
77 B(Star), R(0), | 80 B(Star), R(0), |
78 B(LdaTheHole), | 81 /* 148 S> */ B(LdaTheHole), |
79 B(Star), R(2), | 82 B(Star), R(4), |
80 B(CreateClosure), U8(0), U8(2), | 83 B(CreateClosure), U8(0), U8(2), |
81 B(Star), R(3), | |
82 B(LdaSmi), U8(34), | |
83 B(Star), R(4), | |
84 B(Wide), B(LdaSmi), U16(148), | |
85 B(Star), R(5), | 84 B(Star), R(5), |
86 B(CallRuntime), U16(Runtime::kDefineClass), R(2), U8(4), | 85 B(CreateArrayLiteral), U8(1), U8(0), U8(3), |
87 B(Star), R(2), | |
88 B(LdrNamedProperty), R(2), U8(1), U8(1), R(3), | |
89 B(LdaConstant), U8(2), | |
90 B(Star), R(5), | |
91 B(CreateClosure), U8(3), U8(2), | |
92 B(Star), R(6), | 86 B(Star), R(6), |
93 B(LdaSmi), U8(2), | 87 B(CreateArrayLiteral), U8(2), U8(1), U8(3), |
94 B(Star), R(7), | 88 B(Star), R(9), |
95 B(LdaZero), | 89 B(LdaZero), |
96 B(Star), R(8), | 90 B(Star), R(8), |
97 B(Mov), R(3), R(4), | 91 B(CreateClosure), U8(3), U8(2), |
98 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(4)
, U8(5), | 92 B(StaKeyedPropertySloppy), R(9), R(8), U8(1), |
99 B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1), | 93 B(Ldar), R(9), |
| 94 B(Star), R(7), |
| 95 B(CreateArrayLiteral), U8(4), U8(2), U8(3), |
| 96 B(Star), R(8), |
| 97 B(LdaSmi), U8(34), |
| 98 B(Star), R(9), |
| 99 B(Wide), B(LdaSmi), U16(148), |
| 100 B(Star), R(10), |
| 101 B(CallRuntime), U16(Runtime::kDefineClass), R(4), U8(7), |
| 102 B(Star), R(3), |
| 103 B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1), |
100 B(Star), R(0), | 104 B(Star), R(0), |
101 B(Star), R(1), | 105 B(Star), R(1), |
| 106 B(Star), R(2), |
102 B(LdaUndefined), | 107 B(LdaUndefined), |
103 /* 149 S> */ B(Return), | 108 /* 149 S> */ B(Return), |
104 ] | 109 ] |
105 constant pool: [ | 110 constant pool: [ |
106 InstanceType::SHARED_FUNCTION_INFO_TYPE, | 111 InstanceType::SHARED_FUNCTION_INFO_TYPE, |
107 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, | 112 InstanceType::FIXED_ARRAY_TYPE, |
108 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, | 113 InstanceType::FIXED_ARRAY_TYPE, |
109 InstanceType::SHARED_FUNCTION_INFO_TYPE, | 114 InstanceType::SHARED_FUNCTION_INFO_TYPE, |
| 115 InstanceType::FIXED_ARRAY_TYPE, |
110 ] | 116 ] |
111 handlers: [ | 117 handlers: [ |
112 ] | 118 ] |
113 | 119 |
114 --- | 120 --- |
115 snippet: " | 121 snippet: " |
116 var n0 = 'a'; | 122 var n0 = 'a'; |
117 var n1 = 'b'; | 123 var n1 = 'b'; |
118 class N { | 124 class N { |
119 [n0]() { return n0; } | 125 [n0]() { return n0; } |
120 static [n1]() { return n1; } | 126 static [n1]() { return n1; } |
121 } | 127 } |
122 " | 128 " |
123 frame size: 10 | 129 frame size: 12 |
124 parameter count: 1 | 130 parameter count: 1 |
125 bytecode array length: 126 | 131 bytecode array length: 142 |
126 bytecodes: [ | 132 bytecodes: [ |
127 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U
8(1), | 133 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U
8(1), |
128 B(PushContext), R(2), | 134 B(PushContext), R(3), |
129 B(LdaTheHole), | 135 B(LdaTheHole), |
130 B(Star), R(1), | 136 B(Star), R(2), |
131 /* 30 E> */ B(StackCheck), | 137 /* 30 E> */ B(StackCheck), |
132 /* 43 S> */ B(LdaConstant), U8(0), | 138 /* 43 S> */ B(LdaConstant), U8(0), |
133 /* 43 E> */ B(StaContextSlot), R(context), U8(4), | 139 /* 43 E> */ B(StaContextSlot), R(context), U8(4), |
134 /* 57 S> */ B(LdaConstant), U8(1), | 140 /* 57 S> */ B(LdaConstant), U8(1), |
135 /* 57 E> */ B(StaContextSlot), R(context), U8(5), | 141 /* 57 E> */ B(StaContextSlot), R(context), U8(5), |
136 B(LdaTheHole), | 142 B(LdaTheHole), |
137 B(Star), R(0), | 143 B(Star), R(0), |
138 B(LdaTheHole), | 144 /* 128 S> */ B(LdaTheHole), |
139 B(Star), R(3), | 145 B(Star), R(5), |
140 B(CreateClosure), U8(2), U8(2), | 146 B(CreateClosure), U8(2), U8(2), |
141 B(Star), R(4), | |
142 B(LdaSmi), U8(62), | |
143 B(Star), R(5), | |
144 B(Wide), B(LdaSmi), U16(128), | |
145 B(Star), R(6), | 147 B(Star), R(6), |
146 B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4), | 148 B(CreateArrayLiteral), U8(3), U8(0), U8(3), |
147 B(Star), R(3), | 149 B(Star), R(9), |
148 B(LdrNamedProperty), R(3), U8(3), U8(1), R(4), | 150 B(LdaZero), |
149 /* 75 E> */ B(LdaContextSlot), R(context), U8(4), | 151 B(Star), R(8), |
150 B(ToName), | 152 /* 75 E> */ B(LdrContextSlot), R(context), U8(4), R(10), |
151 B(Star), R(6), | 153 B(CallRuntime), U16(Runtime::kToName), R(10), U8(1), |
152 B(CreateClosure), U8(4), U8(2), | 154 B(StaKeyedPropertySloppy), R(9), R(8), U8(1), |
| 155 B(LdaSmi), U8(1), |
| 156 B(Star), R(8), |
| 157 /* 106 E> */ B(LdrContextSlot), R(context), U8(5), R(10), |
| 158 B(CallRuntime), U16(Runtime::kToName), R(10), U8(1), |
| 159 B(StaKeyedPropertySloppy), R(9), R(8), U8(1), |
| 160 B(Ldar), R(9), |
153 B(Star), R(7), | 161 B(Star), R(7), |
154 B(LdaSmi), U8(2), | 162 B(CreateArrayLiteral), U8(4), U8(1), U8(3), |
155 B(Star), R(8), | 163 B(Star), R(10), |
| 164 B(LdaZero), |
| 165 B(Star), R(9), |
| 166 B(CreateClosure), U8(5), U8(2), |
| 167 B(StaKeyedPropertySloppy), R(10), R(9), U8(3), |
156 B(LdaSmi), U8(1), | 168 B(LdaSmi), U8(1), |
157 B(Star), R(9), | 169 B(Star), R(9), |
158 B(Mov), R(4), R(5), | 170 B(CreateClosure), U8(6), U8(2), |
159 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5)
, U8(5), | 171 B(StaKeyedPropertySloppy), R(10), R(9), U8(3), |
160 /* 106 E> */ B(LdaContextSlot), R(context), U8(5), | 172 B(Ldar), R(10), |
161 B(ToName), | 173 B(Star), R(8), |
162 B(Star), R(6), | 174 B(CreateArrayLiteral), U8(7), U8(2), U8(3), |
163 B(LdaConstant), U8(3), | |
164 B(TestEqualStrict), R(6), | |
165 B(Mov), R(3), R(5), | |
166 B(JumpIfToBooleanFalse), U8(7), | |
167 B(CallRuntime), U16(Runtime::kThrowStaticPrototypeError), R(0),
U8(0), | |
168 B(CreateClosure), U8(5), U8(2), | |
169 B(Star), R(7), | |
170 B(LdaSmi), U8(1), | |
171 B(Star), R(9), | 175 B(Star), R(9), |
172 B(CallRuntime), U16(Runtime::kDefineDataPropertyInLiteral), R(5)
, U8(5), | 176 B(LdaSmi), U8(62), |
173 B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1), | 177 B(Star), R(10), |
| 178 B(Wide), B(LdaSmi), U16(128), |
| 179 B(Star), R(11), |
| 180 B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(7), |
| 181 B(Star), R(4), |
| 182 B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1), |
174 B(Star), R(0), | 183 B(Star), R(0), |
175 B(Star), R(1), | 184 B(Star), R(1), |
| 185 B(Star), R(2), |
176 B(LdaUndefined), | 186 B(LdaUndefined), |
177 /* 129 S> */ B(Return), | 187 /* 129 S> */ B(Return), |
178 ] | 188 ] |
179 constant pool: [ | 189 constant pool: [ |
180 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, | 190 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
181 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, | 191 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
182 InstanceType::SHARED_FUNCTION_INFO_TYPE, | 192 InstanceType::SHARED_FUNCTION_INFO_TYPE, |
183 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, | 193 InstanceType::FIXED_ARRAY_TYPE, |
| 194 InstanceType::FIXED_ARRAY_TYPE, |
184 InstanceType::SHARED_FUNCTION_INFO_TYPE, | 195 InstanceType::SHARED_FUNCTION_INFO_TYPE, |
185 InstanceType::SHARED_FUNCTION_INFO_TYPE, | 196 InstanceType::SHARED_FUNCTION_INFO_TYPE, |
| 197 InstanceType::FIXED_ARRAY_TYPE, |
186 ] | 198 ] |
187 handlers: [ | 199 handlers: [ |
188 ] | 200 ] |
189 | 201 |
190 --- | 202 --- |
191 snippet: " | 203 snippet: " |
192 var count = 0; | 204 var count = 0; |
193 class C { constructor() { count++; }} | 205 class C { constructor() { count++; }} |
194 return new C(); | 206 return new C(); |
195 " | 207 " |
196 frame size: 7 | 208 frame size: 12 |
197 parameter count: 1 | 209 parameter count: 1 |
198 bytecode array length: 73 | 210 bytecode array length: 88 |
199 bytecodes: [ | 211 bytecodes: [ |
200 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U
8(1), | 212 B(CallRuntime), U16(Runtime::kNewFunctionContext), R(closure), U
8(1), |
201 B(PushContext), R(2), | 213 B(PushContext), R(3), |
202 B(LdaTheHole), | 214 B(LdaTheHole), |
203 B(Star), R(1), | 215 B(Star), R(2), |
204 /* 30 E> */ B(StackCheck), | 216 /* 30 E> */ B(StackCheck), |
205 /* 46 S> */ B(LdaZero), | 217 /* 46 S> */ B(LdaZero), |
206 /* 46 E> */ B(StaContextSlot), R(context), U8(4), | 218 /* 46 E> */ B(StaContextSlot), R(context), U8(4), |
207 B(LdaTheHole), | 219 B(LdaTheHole), |
208 B(Star), R(0), | 220 B(Star), R(0), |
209 B(LdaTheHole), | 221 /* 86 S> */ B(LdaTheHole), |
210 B(Star), R(3), | 222 B(Star), R(5), |
211 B(CreateClosure), U8(0), U8(2), | 223 B(CreateClosure), U8(0), U8(2), |
| 224 B(Star), R(6), |
| 225 B(CreateArrayLiteral), U8(1), U8(0), U8(3), |
| 226 B(Star), R(7), |
| 227 B(CreateArrayLiteral), U8(2), U8(1), U8(3), |
| 228 B(Star), R(8), |
| 229 B(CreateArrayLiteral), U8(3), U8(2), U8(3), |
| 230 B(Star), R(9), |
| 231 B(LdaSmi), U8(49), |
| 232 B(Star), R(10), |
| 233 B(LdaSmi), U8(86), |
| 234 B(Star), R(11), |
| 235 B(CallRuntime), U16(Runtime::kDefineClass), R(5), U8(7), |
212 B(Star), R(4), | 236 B(Star), R(4), |
213 B(LdaSmi), U8(49), | 237 B(CallRuntime), U16(Runtime::kToFastProperties), R(4), U8(1), |
214 B(Star), R(5), | |
215 B(LdaSmi), U8(86), | |
216 B(Star), R(6), | |
217 B(CallRuntime), U16(Runtime::kDefineClass), R(3), U8(4), | |
218 B(Star), R(3), | |
219 B(LdrNamedProperty), R(3), U8(1), U8(1), R(4), | |
220 B(CallRuntime), U16(Runtime::kToFastProperties), R(3), U8(1), | |
221 B(Star), R(0), | 238 B(Star), R(0), |
222 B(Star), R(1), | 239 B(Star), R(1), |
| 240 B(Star), R(2), |
223 /* 87 S> */ B(JumpIfNotHole), U8(11), | 241 /* 87 S> */ B(JumpIfNotHole), U8(11), |
224 B(LdaConstant), U8(2), | 242 B(LdaConstant), U8(4), |
| 243 B(Star), R(5), |
| 244 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(5), U8(1), |
225 B(Star), R(4), | 245 B(Star), R(4), |
226 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1), | 246 /* 94 E> */ B(New), R(4), R(0), U8(0), |
227 B(Star), R(3), | |
228 /* 94 E> */ B(New), R(3), R(0), U8(0), | |
229 /* 103 S> */ B(Return), | 247 /* 103 S> */ B(Return), |
230 ] | 248 ] |
231 constant pool: [ | 249 constant pool: [ |
232 InstanceType::SHARED_FUNCTION_INFO_TYPE, | 250 InstanceType::SHARED_FUNCTION_INFO_TYPE, |
233 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, | 251 InstanceType::FIXED_ARRAY_TYPE, |
| 252 InstanceType::FIXED_ARRAY_TYPE, |
| 253 InstanceType::FIXED_ARRAY_TYPE, |
234 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, | 254 InstanceType::ONE_BYTE_INTERNALIZED_STRING_TYPE, |
235 ] | 255 ] |
236 handlers: [ | 256 handlers: [ |
237 ] | 257 ] |
238 | 258 |
OLD | NEW |