Debian Codegraph @

js/src/jit-test/tests/warp/scalar-replace-array-iterator-next.js

raw
1 //|jit-test| --ion-pruning=on; --no-threads
2
3 // Verify that we can inline ArrayIteratorNext,
4 // and scalar-replace the result object.
5
6 if (getJitCompilerOptions()["ion.warmup.trigger"] <= 150)
7 setJitCompilerOption("ion.warmup.trigger", 150);
8
9 gczeal(0);
10
11 function foo(arr) {
12 var iterator = arr[Symbol.iterator]();
13 while (true) {
14 var result = iterator.next();
15 trialInline();
16 assertRecoveredOnBailout(result, true);
17 if (result.done) {
18 break;
19 }
20 }
21 }
22
23 with ({}) {}
24 foo(Array(1000));