summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/jaeger/recompile/property.js
diff options
context:
space:
mode:
Diffstat (limited to 'js/src/jit-test/tests/jaeger/recompile/property.js')
-rw-r--r--js/src/jit-test/tests/jaeger/recompile/property.js26
1 files changed, 26 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/jaeger/recompile/property.js b/js/src/jit-test/tests/jaeger/recompile/property.js
new file mode 100644
index 0000000000..37223563af
--- /dev/null
+++ b/js/src/jit-test/tests/jaeger/recompile/property.js
@@ -0,0 +1,26 @@
+
+/* Handle recompilation on undefined properties and array holes. */
+
+var v = {};
+if (typeof v == 'string')
+ v.x = 0;
+function prop(v)
+{
+ var z = v.x + 1;
+ assertEq(z, NaN);
+}
+prop(v);
+
+v = [];
+v[0] = 0;
+v[1] = 1;
+v[3] = 3;
+v[4] = 4;
+function elem(x)
+{
+ var x = "";
+ for (var i = 0; i < 5; i++)
+ x += v[i];
+ assertEq(x, "01undefined34");
+}
+elem(v);