diff options
Diffstat (limited to 'js/src/jit-test/tests/ion/base-reg-fp.js')
-rw-r--r-- | js/src/jit-test/tests/ion/base-reg-fp.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/ion/base-reg-fp.js b/js/src/jit-test/tests/ion/base-reg-fp.js new file mode 100644 index 0000000000..f6a8bb09f1 --- /dev/null +++ b/js/src/jit-test/tests/ion/base-reg-fp.js @@ -0,0 +1,13 @@ +setJitCompilerOption("base-reg-for-locals", 1); // FP +function g(x) { + with (this) {} // Don't inline. + return x; +} +function f(x) { + var sum = 0; + for (var i = 0; i < x; i++) { + sum += g(i); + } + return sum; +} +assertEq(f(2000), 1999000); |