Index: test/mjsunit/external-array.js |
diff --git a/test/mjsunit/external-array.js b/test/mjsunit/external-array.js |
index 3847d595fcc4d3a98bdf745eead0d393877d95de..32b2c0cddb979e822fcf9be76fab276525bce30a 100644 |
--- a/test/mjsunit/external-array.js |
+++ b/test/mjsunit/external-array.js |
@@ -193,4 +193,22 @@ for (var t = 0; t < types.length; t++) { |
a.length = 2; |
assertEquals(2, a.length); |
} |
+ |
+ function array_load_set_smi_check(a) { |
+ return a[0] = a[0] = 1; |
+ } |
+ |
+ array_load_set_smi_check(a); |
+ array_load_set_smi_check(0); |
+ |
+ function array_load_set_smi_check2(a) { |
+ return a[0] = a[0] = 1; |
+ } |
+ |
+ array_load_set_smi_check2(a); |
+ %OptimizeFunctionOnNextCall(array_load_set_smi_check2); |
+ array_load_set_smi_check2(a); |
+ array_load_set_smi_check2(0); |
+ %DeoptimizeFunction(array_load_set_smi_check2); |
+ gc(); // Makes V8 forget about type information for array_load_set_smi_check. |
} |