Index: test/mjsunit/elide-double-hole-check-2.js |
diff --git a/test/mjsunit/regress/regress-crbug-173974.js b/test/mjsunit/elide-double-hole-check-2.js |
similarity index 86% |
copy from test/mjsunit/regress/regress-crbug-173974.js |
copy to test/mjsunit/elide-double-hole-check-2.js |
index 905bd6058a0ad0fe2ebe10e4c7dafbe9945cbe3b..978abc3bb0d2861a7afad59c719a16e6738fad92 100644 |
--- a/test/mjsunit/regress/regress-crbug-173974.js |
+++ b/test/mjsunit/elide-double-hole-check-2.js |
@@ -27,10 +27,15 @@ |
// Flags: --allow-natives-syntax |
-function f() { |
- var count = ""; |
- count[0] --; |
+function f(a, i) { |
+ return a[i] + 0.5; |
} |
-f(); |
+var arr = [0.0,,]; |
+assertEquals(0.5, f(arr, 0)); |
+assertEquals(0.5, f(arr, 0)); |
%OptimizeFunctionOnNextCall(f); |
-f(); |
+assertEquals(0.5, f(arr, 0)); |
+assertEquals(NaN, f(arr, 1)); |
+arr.__proto__ = [1.5,1.5,1.5]; |
+assertEquals(2, f(arr, 1)); |
+assertEquals(0.5, f(arr, 0)); |