diff options
Diffstat (limited to 'js/src/jit-test/tests/closures/set-outer-trace-3.js')
-rw-r--r-- | js/src/jit-test/tests/closures/set-outer-trace-3.js | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/closures/set-outer-trace-3.js b/js/src/jit-test/tests/closures/set-outer-trace-3.js new file mode 100644 index 0000000000..458968fb38 --- /dev/null +++ b/js/src/jit-test/tests/closures/set-outer-trace-3.js @@ -0,0 +1,23 @@ +actual = ''; +expected = '10.5,19.5,128.5,337.5,646.5,1055.5,1564.5,2173.5,2882.5,3691.5,4600.5,'; + +function f() { + var x = 10.5; + + var g = function(p) { + for (var i = 0; i < 10; ++i) + x = p + i; + } + + for (var i = 0; i < 10; ++i) { + appendToActual(x); + g(100 * i + x); + } + + appendToActual(x); +} + +f(); + + +assertEq(actual, expected) |