summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/name-inactive-inferflags.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/basic/name-inactive-inferflags.js')
-rw-r--r--js/src/jit-test/tests/basic/name-inactive-inferflags.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/basic/name-inactive-inferflags.js b/js/src/jit-test/tests/basic/name-inactive-inferflags.js
new file mode 100644
index 0000000000..0bbd3fb2cf
--- /dev/null
+++ b/js/src/jit-test/tests/basic/name-inactive-inferflags.js
@@ -0,0 +1,18 @@
+function addAccumulations(f) {
+ var a = f();
+ var b = f();
+ return a() + b();
+}
+
+function loopingAccumulator() {
+ var x = 0;
+ return function () {
+ for (var i = 0; i < 10; ++i) {
+ ++x;
+ }
+ return x;
+ }
+}
+
+var x = addAccumulations(loopingAccumulator);
+assertEq(x, 20);