summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/jaeger/getter-hook-2.js
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--js/src/jit-test/tests/jaeger/getter-hook-2.js19
1 files changed, 19 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/jaeger/getter-hook-2.js b/js/src/jit-test/tests/jaeger/getter-hook-2.js
new file mode 100644
index 0000000000..4361ce1262
--- /dev/null
+++ b/js/src/jit-test/tests/jaeger/getter-hook-2.js
@@ -0,0 +1,19 @@
+// PIC on CALLPROP invoking getter hook.
+
+function foo(arr) {
+ for (var i = 0; i < 100; i++)
+ arr[i].caller(false);
+}
+arr = Object.create(Object.prototype);
+first = Object.create({});
+first.caller = bar;
+second = Object.create({});
+second.caller = bar;
+for (var i = 0; i < 100; )
+ arr[i++] = foo;
+foo.caller;
+function bar(x) {
+ if (x)
+ foo(arr);
+}
+bar(true);