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

Side by Side Diff: test/cctest/interpreter/bytecode_expectations/Modules.golden

Issue 2393453003: [interpreter] Add some bytecode tests for modules. (Closed)
Patch Set: Created 4 years, 2 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 unified diff | Download patch
OLDNEW
(Empty)
1 #
2 # Autogenerated by generate-bytecode-expectations.
3 #
4
5 ---
6 wrap: no
7 module: yes
8 top level: yes
9
10 ---
11 snippet: "
12 import \"bar\";
13 "
14 frame size: 8
15 parameter count: 2
16 bytecode array length: 133
17 bytecodes: [
18 B(Ldar), R(new_target),
19 B(JumpIfUndefined), U8(21),
20 B(ResumeGenerator), R(new_target),
21 B(Star), R(1),
22 B(LdaZero),
23 B(TestEqualStrict), R(1), U8(0),
24 B(JumpIfTrue), U8(71),
25 B(LdaSmi), U8(76),
26 B(Star), R(2),
27 B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
28 B(LdaSmi), U8(-2),
29 B(Star), R(1),
30 B(LdaConstant), U8(0),
31 B(Star), R(4),
32 B(Mov), R(arg0), R(2),
33 B(Mov), R(closure), R(3),
34 B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
35 B(PushContext), R(0),
36 B(Ldar), R(this),
37 B(StaContextSlot), R(context), U8(4), U8(0),
38 /* 0 E> */ B(StackCheck),
39 /* 0 E> */ B(LdrContextSlot), R(context), U8(4), U8(0), R(3),
40 B(Ldar), R(3),
41 B(Mov), R(closure), R(2),
42 B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(2), U8 (2),
43 B(StaContextSlot), R(context), U8(5), U8(0),
44 B(Star), R(2),
45 B(LdrContextSlot), R(context), U8(5), U8(0), R(3),
46 B(LdaZero),
47 B(SuspendGenerator), R(3),
48 B(Ldar), R(2),
49 /* 13 S> */ B(Return),
50 B(LdaSmi), U8(-2),
51 B(Star), R(1),
52 B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(3 ), U8(1),
53 B(Star), R(4),
54 B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(3), U8 (1),
55 B(Star), R(5),
56 B(LdaZero),
57 B(TestEqualStrict), R(5), U8(0),
58 B(JumpIfTrue), U8(26),
59 B(LdaSmi), U8(2),
60 B(TestEqualStrict), R(5), U8(0),
61 B(JumpIfTrue), U8(16),
62 B(Jump), U8(2),
63 B(LdaTrue),
64 B(Star), R(7),
65 B(Mov), R(4), R(6),
66 B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(6), U8 (2),
67 /* 13 S> */ B(Return),
68 B(Ldar), R(4),
69 /* 0 E> */ B(Throw),
70 B(LdaUndefined),
71 /* 13 S> */ B(Return),
72 ]
73 constant pool: [
74 FIXED_ARRAY_TYPE,
75 ]
76 handlers: [
77 ]
78
79 ---
80 snippet: "
81 import {foo} from \"bar\";
82 "
83 frame size: 8
84 parameter count: 2
85 bytecode array length: 133
86 bytecodes: [
87 B(Ldar), R(new_target),
88 B(JumpIfUndefined), U8(21),
89 B(ResumeGenerator), R(new_target),
90 B(Star), R(1),
91 B(LdaZero),
92 B(TestEqualStrict), R(1), U8(0),
93 B(JumpIfTrue), U8(71),
94 B(LdaSmi), U8(76),
95 B(Star), R(2),
96 B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
97 B(LdaSmi), U8(-2),
98 B(Star), R(1),
99 B(LdaConstant), U8(0),
100 B(Star), R(4),
101 B(Mov), R(arg0), R(2),
102 B(Mov), R(closure), R(3),
103 B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
104 B(PushContext), R(0),
105 B(Ldar), R(this),
106 B(StaContextSlot), R(context), U8(4), U8(0),
107 /* 0 E> */ B(StackCheck),
108 /* 0 E> */ B(LdrContextSlot), R(context), U8(4), U8(0), R(3),
109 B(Ldar), R(3),
110 B(Mov), R(closure), R(2),
111 B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(2), U8 (2),
112 B(StaContextSlot), R(context), U8(5), U8(0),
113 B(Star), R(2),
114 B(LdrContextSlot), R(context), U8(5), U8(0), R(3),
115 B(LdaZero),
116 B(SuspendGenerator), R(3),
117 B(Ldar), R(2),
118 /* 24 S> */ B(Return),
119 B(LdaSmi), U8(-2),
120 B(Star), R(1),
121 B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(3 ), U8(1),
122 B(Star), R(4),
123 B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(3), U8 (1),
124 B(Star), R(5),
125 B(LdaZero),
126 B(TestEqualStrict), R(5), U8(0),
127 B(JumpIfTrue), U8(26),
128 B(LdaSmi), U8(2),
129 B(TestEqualStrict), R(5), U8(0),
130 B(JumpIfTrue), U8(16),
131 B(Jump), U8(2),
132 B(LdaTrue),
133 B(Star), R(7),
134 B(Mov), R(4), R(6),
135 B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(6), U8 (2),
136 /* 24 S> */ B(Return),
137 B(Ldar), R(4),
138 /* 0 E> */ B(Throw),
139 B(LdaUndefined),
140 /* 24 S> */ B(Return),
141 ]
142 constant pool: [
143 FIXED_ARRAY_TYPE,
144 ]
145 handlers: [
146 ]
147
148 ---
149 snippet: "
150 import {foo as goo} from \"bar\";
151 goo(42);
152 { let x; { goo(42) } };
153 "
154 frame size: 9
155 parameter count: 2
156 bytecode array length: 223
157 bytecodes: [
158 B(Ldar), R(new_target),
159 B(JumpIfUndefined), U8(21),
160 B(ResumeGenerator), R(new_target),
161 B(Star), R(2),
162 B(LdaZero),
163 B(TestEqualStrict), R(2), U8(0),
164 B(JumpIfTrue), U8(71),
165 B(LdaSmi), U8(76),
166 B(Star), R(3),
167 B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
168 B(LdaSmi), U8(-2),
169 B(Star), R(2),
170 B(LdaConstant), U8(0),
171 B(Star), R(5),
172 B(Mov), R(arg0), R(3),
173 B(Mov), R(closure), R(4),
174 B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
175 B(PushContext), R(0),
176 B(Ldar), R(this),
177 B(StaContextSlot), R(context), U8(4), U8(0),
178 /* 0 E> */ B(StackCheck),
179 /* 0 E> */ B(LdrContextSlot), R(context), U8(4), U8(0), R(4),
180 B(Ldar), R(4),
181 B(Mov), R(closure), R(3),
182 B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8 (2),
183 B(StaContextSlot), R(context), U8(5), U8(0),
184 B(Star), R(3),
185 B(LdrContextSlot), R(context), U8(5), U8(0), R(4),
186 B(LdaZero),
187 B(SuspendGenerator), R(4),
188 B(Ldar), R(3),
189 /* 64 S> */ B(Return),
190 B(LdaSmi), U8(-2),
191 B(Star), R(2),
192 B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4 ), U8(1),
193 B(Star), R(5),
194 B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8 (1),
195 B(Star), R(6),
196 B(LdaZero),
197 B(TestEqualStrict), R(6), U8(0),
198 B(JumpIfTrue), U8(26),
199 B(LdaSmi), U8(2),
200 B(TestEqualStrict), R(6), U8(0),
201 B(JumpIfTrue), U8(16),
202 B(Jump), U8(2),
203 B(LdaTrue),
204 B(Star), R(8),
205 B(Mov), R(5), R(7),
206 B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(7), U8 (2),
207 /* 64 S> */ B(Return),
208 B(Ldar), R(5),
209 /* 0 E> */ B(Throw),
210 /* 32 S> */ B(LdrUndefined), R(4),
211 B(LdaConstant), U8(1),
212 B(Star), R(6),
213 B(LdaZero),
214 B(Star), R(7),
215 /* 32 E> */ B(CallRuntime), U16(Runtime::kLoadModuleImport), R(6), U8(2),
216 B(JumpIfNotHole), U8(11),
217 B(LdaConstant), U8(2),
218 B(Star), R(8),
219 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(8), U8(1),
220 B(Star), R(3),
221 B(LdaSmi), U8(42),
222 B(Star), R(5),
223 /* 32 E> */ B(Call), R(3), R(4), U8(2), U8(2),
224 B(Ldar), R(closure),
225 B(CreateBlockContext), U8(3),
226 B(PushContext), R(1),
227 B(LdaTheHole),
228 B(StaContextSlot), R(context), U8(4), U8(0),
229 /* 47 S> */ B(LdaUndefined),
230 /* 47 E> */ B(StaContextSlot), R(context), U8(4), U8(0),
231 /* 52 S> */ B(LdrUndefined), R(4),
232 B(LdaConstant), U8(1),
233 B(Star), R(6),
234 B(LdaZero),
235 B(Star), R(7),
236 /* 52 E> */ B(CallRuntime), U16(Runtime::kLoadModuleImport), R(6), U8(2),
237 B(JumpIfNotHole), U8(11),
238 B(LdaConstant), U8(2),
239 B(Star), R(8),
240 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(8), U8(1),
241 B(Star), R(3),
242 B(LdaSmi), U8(42),
243 B(Star), R(5),
244 /* 52 E> */ B(Call), R(3), R(4), U8(2), U8(4),
245 B(PopContext), R(1),
246 B(LdaUndefined),
247 /* 64 S> */ B(Return),
248 ]
249 constant pool: [
250 FIXED_ARRAY_TYPE,
251 ONE_BYTE_INTERNALIZED_STRING_TYPE ["foo"],
252 ONE_BYTE_INTERNALIZED_STRING_TYPE ["goo"],
253 FIXED_ARRAY_TYPE,
254 ]
255 handlers: [
256 ]
257
258 ---
259 snippet: "
260 export var foo = 42;
261 foo++;
262 { let x; { foo++ } };
263 "
264 frame size: 9
265 parameter count: 2
266 bytecode array length: 208
267 bytecodes: [
268 B(Ldar), R(new_target),
269 B(JumpIfUndefined), U8(21),
270 B(ResumeGenerator), R(new_target),
271 B(Star), R(2),
272 B(LdaZero),
273 B(TestEqualStrict), R(2), U8(0),
274 B(JumpIfTrue), U8(71),
275 B(LdaSmi), U8(76),
276 B(Star), R(3),
277 B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
278 B(LdaSmi), U8(-2),
279 B(Star), R(2),
280 B(LdaConstant), U8(0),
281 B(Star), R(5),
282 B(Mov), R(arg0), R(3),
283 B(Mov), R(closure), R(4),
284 B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
285 B(PushContext), R(0),
286 B(Ldar), R(this),
287 B(StaContextSlot), R(context), U8(4), U8(0),
288 /* 0 E> */ B(StackCheck),
289 /* 0 E> */ B(LdrContextSlot), R(context), U8(4), U8(0), R(4),
290 B(Ldar), R(4),
291 B(Mov), R(closure), R(3),
292 B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8 (2),
293 B(StaContextSlot), R(context), U8(5), U8(0),
294 B(Star), R(3),
295 B(LdrContextSlot), R(context), U8(5), U8(0), R(4),
296 B(LdaZero),
297 B(SuspendGenerator), R(4),
298 B(Ldar), R(3),
299 /* 49 S> */ B(Return),
300 B(LdaSmi), U8(-2),
301 B(Star), R(2),
302 B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4 ), U8(1),
303 B(Star), R(5),
304 B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8 (1),
305 B(Star), R(6),
306 B(LdaZero),
307 B(TestEqualStrict), R(6), U8(0),
308 B(JumpIfTrue), U8(26),
309 B(LdaSmi), U8(2),
310 B(TestEqualStrict), R(6), U8(0),
311 B(JumpIfTrue), U8(16),
312 B(Jump), U8(2),
313 B(LdaTrue),
314 B(Star), R(8),
315 B(Mov), R(5), R(7),
316 B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(7), U8 (2),
317 /* 49 S> */ B(Return),
318 B(Ldar), R(5),
319 /* 0 E> */ B(Throw),
320 /* 17 S> */ B(LdaSmi), U8(42),
321 B(Star), R(4),
322 B(LdaConstant), U8(1),
323 B(Star), R(3),
324 /* 17 E> */ B(CallRuntime), U16(Runtime::kStoreModuleExport), R(3), U8(2),
325 /* 21 S> */ B(LdaConstant), U8(1),
326 B(Star), R(3),
327 B(CallRuntime), U16(Runtime::kLoadModuleExport), R(3), U8(1),
328 B(Inc), U8(2),
329 B(Star), R(4),
330 B(LdaConstant), U8(1),
331 B(Star), R(3),
332 /* 24 E> */ B(CallRuntime), U16(Runtime::kStoreModuleExport), R(3), U8(2),
333 B(Ldar), R(closure),
334 B(CreateBlockContext), U8(2),
335 B(PushContext), R(1),
336 B(LdaTheHole),
337 B(StaContextSlot), R(context), U8(4), U8(0),
338 /* 34 S> */ B(LdaUndefined),
339 /* 34 E> */ B(StaContextSlot), R(context), U8(4), U8(0),
340 /* 39 S> */ B(LdaConstant), U8(1),
341 B(Star), R(3),
342 B(CallRuntime), U16(Runtime::kLoadModuleExport), R(3), U8(1),
343 B(Inc), U8(3),
344 B(Star), R(4),
345 B(LdaConstant), U8(1),
346 B(Star), R(3),
347 /* 42 E> */ B(CallRuntime), U16(Runtime::kStoreModuleExport), R(3), U8(2),
348 B(PopContext), R(1),
349 B(LdaUndefined),
350 /* 49 S> */ B(Return),
351 ]
352 constant pool: [
353 FIXED_ARRAY_TYPE,
354 ONE_BYTE_INTERNALIZED_STRING_TYPE ["foo"],
355 FIXED_ARRAY_TYPE,
356 ]
357 handlers: [
358 ]
359
360 ---
361 snippet: "
362 export let foo = 42;
363 foo++;
364 { let x; { foo++ } };
365 "
366 frame size: 9
367 parameter count: 2
368 bytecode array length: 242
369 bytecodes: [
370 B(Ldar), R(new_target),
371 B(JumpIfUndefined), U8(21),
372 B(ResumeGenerator), R(new_target),
373 B(Star), R(2),
374 B(LdaZero),
375 B(TestEqualStrict), R(2), U8(0),
376 B(JumpIfTrue), U8(83),
377 B(LdaSmi), U8(76),
378 B(Star), R(3),
379 B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
380 B(LdaSmi), U8(-2),
381 B(Star), R(2),
382 B(LdaConstant), U8(0),
383 B(Star), R(5),
384 B(Mov), R(arg0), R(3),
385 B(Mov), R(closure), R(4),
386 B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
387 B(PushContext), R(0),
388 B(Ldar), R(this),
389 B(StaContextSlot), R(context), U8(4), U8(0),
390 B(LdaTheHole),
391 B(Star), R(4),
392 B(LdaConstant), U8(1),
393 B(Star), R(3),
394 B(CallRuntime), U16(Runtime::kStoreModuleExport), R(3), U8(2),
395 /* 0 E> */ B(StackCheck),
396 /* 0 E> */ B(LdrContextSlot), R(context), U8(4), U8(0), R(4),
397 B(Ldar), R(4),
398 B(Mov), R(closure), R(3),
399 B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8 (2),
400 B(StaContextSlot), R(context), U8(5), U8(0),
401 B(Star), R(3),
402 B(LdrContextSlot), R(context), U8(5), U8(0), R(4),
403 B(LdaZero),
404 B(SuspendGenerator), R(4),
405 B(Ldar), R(3),
406 /* 49 S> */ B(Return),
407 B(LdaSmi), U8(-2),
408 B(Star), R(2),
409 B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4 ), U8(1),
410 B(Star), R(5),
411 B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8 (1),
412 B(Star), R(6),
413 B(LdaZero),
414 B(TestEqualStrict), R(6), U8(0),
415 B(JumpIfTrue), U8(26),
416 B(LdaSmi), U8(2),
417 B(TestEqualStrict), R(6), U8(0),
418 B(JumpIfTrue), U8(16),
419 B(Jump), U8(2),
420 B(LdaTrue),
421 B(Star), R(8),
422 B(Mov), R(5), R(7),
423 B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(7), U8 (2),
424 /* 49 S> */ B(Return),
425 B(Ldar), R(5),
426 /* 0 E> */ B(Throw),
427 /* 17 S> */ B(LdaSmi), U8(42),
428 B(Star), R(4),
429 B(LdaConstant), U8(1),
430 B(Star), R(3),
431 /* 17 E> */ B(CallRuntime), U16(Runtime::kStoreModuleExport), R(3), U8(2),
432 /* 21 S> */ B(LdaConstant), U8(1),
433 B(Star), R(3),
434 B(CallRuntime), U16(Runtime::kLoadModuleExport), R(3), U8(1),
435 B(JumpIfNotHole), U8(11),
436 B(LdaConstant), U8(1),
437 B(Star), R(4),
438 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
439 B(Inc), U8(2),
440 B(Star), R(4),
441 B(LdaConstant), U8(1),
442 B(Star), R(3),
443 /* 24 E> */ B(CallRuntime), U16(Runtime::kStoreModuleExport), R(3), U8(2),
444 B(Ldar), R(closure),
445 B(CreateBlockContext), U8(2),
446 B(PushContext), R(1),
447 B(LdaTheHole),
448 B(StaContextSlot), R(context), U8(4), U8(0),
449 /* 34 S> */ B(LdaUndefined),
450 /* 34 E> */ B(StaContextSlot), R(context), U8(4), U8(0),
451 /* 39 S> */ B(LdaConstant), U8(1),
452 B(Star), R(3),
453 B(CallRuntime), U16(Runtime::kLoadModuleExport), R(3), U8(1),
454 B(JumpIfNotHole), U8(11),
455 B(LdaConstant), U8(1),
456 B(Star), R(4),
457 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
458 B(Inc), U8(3),
459 B(Star), R(4),
460 B(LdaConstant), U8(1),
461 B(Star), R(3),
462 /* 42 E> */ B(CallRuntime), U16(Runtime::kStoreModuleExport), R(3), U8(2),
463 B(PopContext), R(1),
464 B(LdaUndefined),
465 /* 49 S> */ B(Return),
466 ]
467 constant pool: [
468 FIXED_ARRAY_TYPE,
469 ONE_BYTE_INTERNALIZED_STRING_TYPE ["foo"],
470 FIXED_ARRAY_TYPE,
471 ]
472 handlers: [
473 ]
474
475 ---
476 snippet: "
477 export const foo = 42;
478 foo++;
479 { let x; { foo++ } };
480 "
481 frame size: 9
482 parameter count: 2
483 bytecode array length: 230
484 bytecodes: [
485 B(Ldar), R(new_target),
486 B(JumpIfUndefined), U8(21),
487 B(ResumeGenerator), R(new_target),
488 B(Star), R(2),
489 B(LdaZero),
490 B(TestEqualStrict), R(2), U8(0),
491 B(JumpIfTrue), U8(83),
492 B(LdaSmi), U8(76),
493 B(Star), R(3),
494 B(CallRuntime), U16(Runtime::kAbort), R(3), U8(1),
495 B(LdaSmi), U8(-2),
496 B(Star), R(2),
497 B(LdaConstant), U8(0),
498 B(Star), R(5),
499 B(Mov), R(arg0), R(3),
500 B(Mov), R(closure), R(4),
501 B(CallRuntime), U16(Runtime::kPushModuleContext), R(3), U8(3),
502 B(PushContext), R(0),
503 B(Ldar), R(this),
504 B(StaContextSlot), R(context), U8(4), U8(0),
505 B(LdaTheHole),
506 B(Star), R(4),
507 B(LdaConstant), U8(1),
508 B(Star), R(3),
509 B(CallRuntime), U16(Runtime::kStoreModuleExport), R(3), U8(2),
510 /* 0 E> */ B(StackCheck),
511 /* 0 E> */ B(LdrContextSlot), R(context), U8(4), U8(0), R(4),
512 B(Ldar), R(4),
513 B(Mov), R(closure), R(3),
514 B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(3), U8 (2),
515 B(StaContextSlot), R(context), U8(5), U8(0),
516 B(Star), R(3),
517 B(LdrContextSlot), R(context), U8(5), U8(0), R(4),
518 B(LdaZero),
519 B(SuspendGenerator), R(4),
520 B(Ldar), R(3),
521 /* 51 S> */ B(Return),
522 B(LdaSmi), U8(-2),
523 B(Star), R(2),
524 B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(4 ), U8(1),
525 B(Star), R(5),
526 B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(4), U8 (1),
527 B(Star), R(6),
528 B(LdaZero),
529 B(TestEqualStrict), R(6), U8(0),
530 B(JumpIfTrue), U8(26),
531 B(LdaSmi), U8(2),
532 B(TestEqualStrict), R(6), U8(0),
533 B(JumpIfTrue), U8(16),
534 B(Jump), U8(2),
535 B(LdaTrue),
536 B(Star), R(8),
537 B(Mov), R(5), R(7),
538 B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(7), U8 (2),
539 /* 51 S> */ B(Return),
540 B(Ldar), R(5),
541 /* 0 E> */ B(Throw),
542 /* 19 S> */ B(LdaSmi), U8(42),
543 B(Star), R(4),
544 B(LdaConstant), U8(1),
545 B(Star), R(3),
546 /* 19 E> */ B(CallRuntime), U16(Runtime::kStoreModuleExport), R(3), U8(2),
547 /* 23 S> */ B(LdaConstant), U8(1),
548 B(Star), R(3),
549 B(CallRuntime), U16(Runtime::kLoadModuleExport), R(3), U8(1),
550 B(JumpIfNotHole), U8(11),
551 B(LdaConstant), U8(1),
552 B(Star), R(4),
553 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
554 B(Inc), U8(2),
555 /* 26 E> */ B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0 ),
556 B(Ldar), R(closure),
557 B(CreateBlockContext), U8(2),
558 B(PushContext), R(1),
559 B(LdaTheHole),
560 B(StaContextSlot), R(context), U8(4), U8(0),
561 /* 36 S> */ B(LdaUndefined),
562 /* 36 E> */ B(StaContextSlot), R(context), U8(4), U8(0),
563 /* 41 S> */ B(LdaConstant), U8(1),
564 B(Star), R(3),
565 B(CallRuntime), U16(Runtime::kLoadModuleExport), R(3), U8(1),
566 B(JumpIfNotHole), U8(11),
567 B(LdaConstant), U8(1),
568 B(Star), R(4),
569 B(CallRuntime), U16(Runtime::kThrowReferenceError), R(4), U8(1),
570 B(Inc), U8(3),
571 /* 44 E> */ B(CallRuntime), U16(Runtime::kThrowConstAssignError), R(0), U8(0 ),
572 B(PopContext), R(1),
573 B(LdaUndefined),
574 /* 51 S> */ B(Return),
575 ]
576 constant pool: [
577 FIXED_ARRAY_TYPE,
578 ONE_BYTE_INTERNALIZED_STRING_TYPE ["foo"],
579 FIXED_ARRAY_TYPE,
580 ]
581 handlers: [
582 ]
583
584 ---
585 snippet: "
586 export default (function () {});
587 "
588 frame size: 8
589 parameter count: 2
590 bytecode array length: 159
591 bytecodes: [
592 B(Ldar), R(new_target),
593 B(JumpIfUndefined), U8(21),
594 B(ResumeGenerator), R(new_target),
595 B(Star), R(1),
596 B(LdaZero),
597 B(TestEqualStrict), R(1), U8(0),
598 B(JumpIfTrue), U8(83),
599 B(LdaSmi), U8(76),
600 B(Star), R(2),
601 B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
602 B(LdaSmi), U8(-2),
603 B(Star), R(1),
604 B(LdaConstant), U8(0),
605 B(Star), R(4),
606 B(Mov), R(arg0), R(2),
607 B(Mov), R(closure), R(3),
608 B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
609 B(PushContext), R(0),
610 B(Ldar), R(this),
611 B(StaContextSlot), R(context), U8(4), U8(0),
612 B(LdaTheHole),
613 B(Star), R(3),
614 B(LdaConstant), U8(1),
615 B(Star), R(2),
616 B(CallRuntime), U16(Runtime::kStoreModuleExport), R(2), U8(2),
617 /* 0 E> */ B(StackCheck),
618 /* 0 E> */ B(LdrContextSlot), R(context), U8(4), U8(0), R(3),
619 B(Ldar), R(3),
620 B(Mov), R(closure), R(2),
621 B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(2), U8 (2),
622 B(StaContextSlot), R(context), U8(5), U8(0),
623 B(Star), R(2),
624 B(LdrContextSlot), R(context), U8(5), U8(0), R(3),
625 B(LdaZero),
626 B(SuspendGenerator), R(3),
627 B(Ldar), R(2),
628 /* 32 S> */ B(Return),
629 B(LdaSmi), U8(-2),
630 B(Star), R(1),
631 B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(3 ), U8(1),
632 B(Star), R(4),
633 B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(3), U8 (1),
634 B(Star), R(5),
635 B(LdaZero),
636 B(TestEqualStrict), R(5), U8(0),
637 B(JumpIfTrue), U8(26),
638 B(LdaSmi), U8(2),
639 B(TestEqualStrict), R(5), U8(0),
640 B(JumpIfTrue), U8(16),
641 B(Jump), U8(2),
642 B(LdaTrue),
643 B(Star), R(7),
644 B(Mov), R(4), R(6),
645 B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(6), U8 (2),
646 /* 32 S> */ B(Return),
647 B(Ldar), R(4),
648 /* 0 E> */ B(Throw),
649 B(CreateClosure), U8(2), U8(0),
650 B(Star), R(3),
651 B(LdaConstant), U8(1),
652 B(Star), R(2),
653 B(CallRuntime), U16(Runtime::kStoreModuleExport), R(2), U8(2),
654 B(LdaUndefined),
655 /* 32 S> */ B(Return),
656 ]
657 constant pool: [
658 FIXED_ARRAY_TYPE,
659 ONE_BYTE_INTERNALIZED_STRING_TYPE ["default"],
660 SHARED_FUNCTION_INFO_TYPE,
661 ]
662 handlers: [
663 ]
664
665 ---
666 snippet: "
667 export default (class {});
668 "
669 frame size: 8
670 parameter count: 2
671 bytecode array length: 196
672 bytecodes: [
673 B(Ldar), R(new_target),
674 B(JumpIfUndefined), U8(21),
675 B(ResumeGenerator), R(new_target),
676 B(Star), R(1),
677 B(LdaZero),
678 B(TestEqualStrict), R(1), U8(0),
679 B(JumpIfTrue), U8(83),
680 B(LdaSmi), U8(76),
681 B(Star), R(2),
682 B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
683 B(LdaSmi), U8(-2),
684 B(Star), R(1),
685 B(LdaConstant), U8(0),
686 B(Star), R(4),
687 B(Mov), R(arg0), R(2),
688 B(Mov), R(closure), R(3),
689 B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
690 B(PushContext), R(0),
691 B(Ldar), R(this),
692 B(StaContextSlot), R(context), U8(4), U8(0),
693 B(LdaTheHole),
694 B(Star), R(3),
695 B(LdaConstant), U8(1),
696 B(Star), R(2),
697 B(CallRuntime), U16(Runtime::kStoreModuleExport), R(2), U8(2),
698 /* 0 E> */ B(StackCheck),
699 /* 0 E> */ B(LdrContextSlot), R(context), U8(4), U8(0), R(3),
700 B(Ldar), R(3),
701 B(Mov), R(closure), R(2),
702 B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(2), U8 (2),
703 B(StaContextSlot), R(context), U8(5), U8(0),
704 B(Star), R(2),
705 B(LdrContextSlot), R(context), U8(5), U8(0), R(3),
706 B(LdaZero),
707 B(SuspendGenerator), R(3),
708 B(Ldar), R(2),
709 /* 26 S> */ B(Return),
710 B(LdaSmi), U8(-2),
711 B(Star), R(1),
712 B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(3 ), U8(1),
713 B(Star), R(4),
714 B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(3), U8 (1),
715 B(Star), R(5),
716 B(LdaZero),
717 B(TestEqualStrict), R(5), U8(0),
718 B(JumpIfTrue), U8(26),
719 B(LdaSmi), U8(2),
720 B(TestEqualStrict), R(5), U8(0),
721 B(JumpIfTrue), U8(16),
722 B(Jump), U8(2),
723 B(LdaTrue),
724 B(Star), R(7),
725 B(Mov), R(4), R(6),
726 B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(6), U8 (2),
727 /* 26 S> */ B(Return),
728 B(Ldar), R(4),
729 /* 0 E> */ B(Throw),
730 /* 16 S> */ B(LdaTheHole),
731 B(Star), R(2),
732 B(CreateClosure), U8(2), U8(0),
733 B(Star), R(3),
734 B(LdaSmi), U8(16),
735 B(Star), R(4),
736 B(LdaSmi), U8(24),
737 B(Star), R(5),
738 B(CallRuntime), U16(Runtime::kDefineClass), R(2), U8(4),
739 B(Star), R(2),
740 B(LdrNamedProperty), R(2), U8(3), U8(2), R(3),
741 B(CallRuntime), U16(Runtime::kToFastProperties), R(2), U8(1),
742 B(StaContextSlot), R(context), U8(6), U8(0),
743 /* 16 E> */ B(LdrContextSlot), R(context), U8(6), U8(0), R(3),
744 B(LdaConstant), U8(1),
745 B(Star), R(2),
746 B(CallRuntime), U16(Runtime::kStoreModuleExport), R(2), U8(2),
747 B(LdaUndefined),
748 /* 26 S> */ B(Return),
749 ]
750 constant pool: [
751 FIXED_ARRAY_TYPE,
752 ONE_BYTE_INTERNALIZED_STRING_TYPE ["default"],
753 SHARED_FUNCTION_INFO_TYPE,
754 ONE_BYTE_INTERNALIZED_STRING_TYPE ["prototype"],
755 ]
756 handlers: [
757 ]
758
759 ---
760 snippet: "
761 export {foo as goo} from \"bar\"
762 "
763 frame size: 8
764 parameter count: 2
765 bytecode array length: 133
766 bytecodes: [
767 B(Ldar), R(new_target),
768 B(JumpIfUndefined), U8(21),
769 B(ResumeGenerator), R(new_target),
770 B(Star), R(1),
771 B(LdaZero),
772 B(TestEqualStrict), R(1), U8(0),
773 B(JumpIfTrue), U8(71),
774 B(LdaSmi), U8(76),
775 B(Star), R(2),
776 B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
777 B(LdaSmi), U8(-2),
778 B(Star), R(1),
779 B(LdaConstant), U8(0),
780 B(Star), R(4),
781 B(Mov), R(arg0), R(2),
782 B(Mov), R(closure), R(3),
783 B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
784 B(PushContext), R(0),
785 B(Ldar), R(this),
786 B(StaContextSlot), R(context), U8(4), U8(0),
787 /* 0 E> */ B(StackCheck),
788 /* 0 E> */ B(LdrContextSlot), R(context), U8(4), U8(0), R(3),
789 B(Ldar), R(3),
790 B(Mov), R(closure), R(2),
791 B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(2), U8 (2),
792 B(StaContextSlot), R(context), U8(5), U8(0),
793 B(Star), R(2),
794 B(LdrContextSlot), R(context), U8(5), U8(0), R(3),
795 B(LdaZero),
796 B(SuspendGenerator), R(3),
797 B(Ldar), R(2),
798 /* 30 S> */ B(Return),
799 B(LdaSmi), U8(-2),
800 B(Star), R(1),
801 B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(3 ), U8(1),
802 B(Star), R(4),
803 B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(3), U8 (1),
804 B(Star), R(5),
805 B(LdaZero),
806 B(TestEqualStrict), R(5), U8(0),
807 B(JumpIfTrue), U8(26),
808 B(LdaSmi), U8(2),
809 B(TestEqualStrict), R(5), U8(0),
810 B(JumpIfTrue), U8(16),
811 B(Jump), U8(2),
812 B(LdaTrue),
813 B(Star), R(7),
814 B(Mov), R(4), R(6),
815 B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(6), U8 (2),
816 /* 30 S> */ B(Return),
817 B(Ldar), R(4),
818 /* 0 E> */ B(Throw),
819 B(LdaUndefined),
820 /* 30 S> */ B(Return),
821 ]
822 constant pool: [
823 FIXED_ARRAY_TYPE,
824 ]
825 handlers: [
826 ]
827
828 ---
829 snippet: "
830 export * from \"bar\"
831 "
832 frame size: 8
833 parameter count: 2
834 bytecode array length: 133
835 bytecodes: [
836 B(Ldar), R(new_target),
837 B(JumpIfUndefined), U8(21),
838 B(ResumeGenerator), R(new_target),
839 B(Star), R(1),
840 B(LdaZero),
841 B(TestEqualStrict), R(1), U8(0),
842 B(JumpIfTrue), U8(71),
843 B(LdaSmi), U8(76),
844 B(Star), R(2),
845 B(CallRuntime), U16(Runtime::kAbort), R(2), U8(1),
846 B(LdaSmi), U8(-2),
847 B(Star), R(1),
848 B(LdaConstant), U8(0),
849 B(Star), R(4),
850 B(Mov), R(arg0), R(2),
851 B(Mov), R(closure), R(3),
852 B(CallRuntime), U16(Runtime::kPushModuleContext), R(2), U8(3),
853 B(PushContext), R(0),
854 B(Ldar), R(this),
855 B(StaContextSlot), R(context), U8(4), U8(0),
856 /* 0 E> */ B(StackCheck),
857 /* 0 E> */ B(LdrContextSlot), R(context), U8(4), U8(0), R(3),
858 B(Ldar), R(3),
859 B(Mov), R(closure), R(2),
860 B(CallRuntime), U16(Runtime::kCreateJSGeneratorObject), R(2), U8 (2),
861 B(StaContextSlot), R(context), U8(5), U8(0),
862 B(Star), R(2),
863 B(LdrContextSlot), R(context), U8(5), U8(0), R(3),
864 B(LdaZero),
865 B(SuspendGenerator), R(3),
866 B(Ldar), R(2),
867 /* 19 S> */ B(Return),
868 B(LdaSmi), U8(-2),
869 B(Star), R(1),
870 B(CallRuntime), U16(Runtime::k_GeneratorGetInputOrDebugPos), R(3 ), U8(1),
871 B(Star), R(4),
872 B(CallRuntime), U16(Runtime::k_GeneratorGetResumeMode), R(3), U8 (1),
873 B(Star), R(5),
874 B(LdaZero),
875 B(TestEqualStrict), R(5), U8(0),
876 B(JumpIfTrue), U8(26),
877 B(LdaSmi), U8(2),
878 B(TestEqualStrict), R(5), U8(0),
879 B(JumpIfTrue), U8(16),
880 B(Jump), U8(2),
881 B(LdaTrue),
882 B(Star), R(7),
883 B(Mov), R(4), R(6),
884 B(CallRuntime), U16(Runtime::k_CreateIterResultObject), R(6), U8 (2),
885 /* 19 S> */ B(Return),
886 B(Ldar), R(4),
887 /* 0 E> */ B(Throw),
888 B(LdaUndefined),
889 /* 19 S> */ B(Return),
890 ]
891 constant pool: [
892 FIXED_ARRAY_TYPE,
893 ]
894 handlers: [
895 ]
896
OLDNEW
« no previous file with comments | « test/cctest/interpreter/bytecode-expectations-printer.cc ('k') | test/cctest/interpreter/generate-bytecode-expectations.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698