summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/jaeger/recompile/callic.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/jaeger/recompile/callic.js')
-rw-r--r--js/src/jit-test/tests/jaeger/recompile/callic.js27
1 files changed, 27 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/jaeger/recompile/callic.js b/js/src/jit-test/tests/jaeger/recompile/callic.js
new file mode 100644
index 0000000000..6647c9acf6
--- /dev/null
+++ b/js/src/jit-test/tests/jaeger/recompile/callic.js
@@ -0,0 +1,27 @@
+
+/* Recompilation while being processed by a call IC. */
+
+var g;
+function foo() {
+ for (g = 0; g < 5; g++) {
+ bar();
+ }
+ function bar() {
+ with ({}) {
+ eval("g = undefined;");
+ }
+ }
+}
+foo();
+
+assertEq(g, NaN);
+
+/* Recompilation while being processed by a native call IC. */
+
+function native() {
+ var x;
+ x = x;
+ x = Math.ceil(NaN);
+ assertEq(x, NaN);
+}
+native();