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