diff options
Diffstat (limited to 'js/src/jit-test/tests/basic/bug1759029-2.js')
-rw-r--r-- | js/src/jit-test/tests/basic/bug1759029-2.js | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/bug1759029-2.js b/js/src/jit-test/tests/basic/bug1759029-2.js new file mode 100644 index 0000000000..9e5b725c3c --- /dev/null +++ b/js/src/jit-test/tests/basic/bug1759029-2.js @@ -0,0 +1,27 @@ +// |jit-test| --fast-warmup; --no-threads + +var arr = []; +arr[0] = 1; +arr[NaN] = 0; + +function foo(a) { + "use strict"; + for (let i = 0; i < 7; i++) { + 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); |