diff options
Diffstat (limited to 'js/src/jit-test/tests/ion/double-array-loop-phi.js')
-rw-r--r-- | js/src/jit-test/tests/ion/double-array-loop-phi.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/ion/double-array-loop-phi.js b/js/src/jit-test/tests/ion/double-array-loop-phi.js new file mode 100644 index 0000000000..b12a9b5f37 --- /dev/null +++ b/js/src/jit-test/tests/ion/double-array-loop-phi.js @@ -0,0 +1,11 @@ +function f() { + for (var i = 0; i < 600; i++) { + var arr = [1.1, ([...[]], 2.2), i]; + for (var j = 0; j < 2; j++) { + var idx = j === 1 ? 2 : 0; + var exp = j === 1 ? i + 1 : 2.1; + assertEq(arr[idx] + 1, exp); + } + } +} +f(); |