Index: test/mjsunit/regress/consolidated-holey-load.js |
diff --git a/test/mjsunit/constant-compare-nil-value.js b/test/mjsunit/regress/consolidated-holey-load.js |
similarity index 83% |
copy from test/mjsunit/constant-compare-nil-value.js |
copy to test/mjsunit/regress/consolidated-holey-load.js |
index 9f5b2adb063abc0c7920d8dee30edb7ee6eb1ff9..ef8f1ef14007440f370b724a2acaa6a974179302 100644 |
--- a/test/mjsunit/constant-compare-nil-value.js |
+++ b/test/mjsunit/regress/consolidated-holey-load.js |
@@ -27,16 +27,14 @@ |
// Flags: --allow-natives-syntax |
-function inlined() { |
- return 1; |
+function foo(array) { |
+ return array[0]; |
} |
-function foo() { |
- if ((inlined() + 0.5) == null) return "null"; |
- return "non-null"; |
-} |
- |
-assertEquals("non-null", foo()); |
-assertEquals("non-null", foo()); |
+var a = [1, 2, , 4]; // Holey Smi elements. |
+var b = ["abcd", 0]; // Fast elements. |
+foo(b); // Observe fast elements first, or the IC will transition without |
+foo(a); // going polymorphic. |
%OptimizeFunctionOnNextCall(foo); |
-assertEquals("non-null", foo()); |
+var c = [, 0]; |
+assertEquals(undefined, foo(c)); // Elided hole check will leak the hole. |