Index: test/mjsunit/constant-compare-nil-value.js |
diff --git a/test/mjsunit/regress/regress-2499.js b/test/mjsunit/constant-compare-nil-value.js |
similarity index 88% |
copy from test/mjsunit/regress/regress-2499.js |
copy to test/mjsunit/constant-compare-nil-value.js |
index 52aad874db6fcdc89f5ee1ae4db45304e64b0e77..9f5b2adb063abc0c7920d8dee30edb7ee6eb1ff9 100644 |
--- a/test/mjsunit/regress/regress-2499.js |
+++ b/test/mjsunit/constant-compare-nil-value.js |
@@ -27,14 +27,16 @@ |
// Flags: --allow-natives-syntax |
-function foo(word, nBits) { |
- return (word[1] >>> nBits) | (word[0] << (32 - nBits)); |
+function inlined() { |
+ return 1; |
} |
-word = [0x1001, 0]; |
+function foo() { |
+ if ((inlined() + 0.5) == null) return "null"; |
+ return "non-null"; |
+} |
-var expected = foo(word, 1); |
-foo(word, 1); |
+assertEquals("non-null", foo()); |
+assertEquals("non-null", foo()); |
%OptimizeFunctionOnNextCall(foo); |
-var optimized = foo(word, 1); |
-assertEquals(expected, optimized) |
+assertEquals("non-null", foo()); |