diff options
Diffstat (limited to 'js/src/jit-test/tests/arguments/inline-arguments-escaped-length.js')
-rw-r--r-- | js/src/jit-test/tests/arguments/inline-arguments-escaped-length.js | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/arguments/inline-arguments-escaped-length.js b/js/src/jit-test/tests/arguments/inline-arguments-escaped-length.js new file mode 100644 index 0000000000..2c275dd3d6 --- /dev/null +++ b/js/src/jit-test/tests/arguments/inline-arguments-escaped-length.js @@ -0,0 +1,42 @@ +// |jit-test| --fast-warmup + +var arg = 0; + +function inner() { + return arguments; +} + +function outer0() { + trialInline(); + return inner().length; +} + +function outer1() { + trialInline(); + return inner(arg).length; +} + +function outer2() { + trialInline(); + return inner(arg, arg).length; +} + +function outer3() { + trialInline(); + return inner(arg, arg, arg).length; +} + +function outer4() { + trialInline(); + return inner(arg, arg, arg, arg).length; +} + +with ({}) {} + +for (var i = 0; i < 50; i++) { + assertEq(outer0(), 0); + assertEq(outer1(), 1); + assertEq(outer2(), 2); + assertEq(outer3(), 3); + assertEq(outer4(), 4); +} |