Index: test/mjsunit/regress/regress-264203.js |
diff --git a/test/mjsunit/regress/regress-2813.js b/test/mjsunit/regress/regress-264203.js |
similarity index 90% |
copy from test/mjsunit/regress/regress-2813.js |
copy to test/mjsunit/regress/regress-264203.js |
index 97ae43b316a2177596927cf5465fa2214cc11c61..fa0075662575d85241b6af82c5945cca32938991 100644 |
--- a/test/mjsunit/regress/regress-2813.js |
+++ b/test/mjsunit/regress/regress-264203.js |
@@ -28,17 +28,17 @@ |
// Flags: --allow-natives-syntax |
function foo(x) { |
- var a = x + 1; |
- var b = x + 2; |
- if (x != 0) { |
- if (x > 0 & x < 100) { |
- return a; |
- } |
+ var a = [1, 2, 3, 4, 5, 6, 7, 8]; |
+ a[x + 5]; |
+ var result; |
+ for (var i = 0; i < 3; i++) { |
+ result = a[0 - x]; |
} |
- return 0; |
+ return result; |
} |
-assertEquals(0, foo(0)); |
-assertEquals(0, foo(0)); |
+foo(0); |
+foo(0); |
%OptimizeFunctionOnNextCall(foo); |
-assertEquals(3, foo(2)); |
+var r = foo(-2); |
+assertEquals(3, r); |