diff options
Diffstat (limited to 'js/src/jit-test/tests/basic/bug1759029-1.js')
-rw-r--r-- | js/src/jit-test/tests/basic/bug1759029-1.js | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/bug1759029-1.js b/js/src/jit-test/tests/basic/bug1759029-1.js new file mode 100644 index 0000000000..2f379cab5c --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1759029-1.js @@ -0,0 +1,26 @@ +// |jit-test| --fast-warmup; --no-threads + +var arr = []; +arr[0] = 1; +arr[NaN] = 0; + +function foo() { + for (let i = 0; i < 7; i++) { + const a = i % i; + counter += a >>> a; + + try { + throw 3; + } catch { + counter += arr[a]; + } + } + for (let i = 0; i < 100; i++) { } +} + +let counter = 0; +for (var i = 0; i < 10; i++) { + foo(); +} + +assertEq(counter, 60); |