Index: test/mjsunit/regress/regress-264203.js |
diff --git a/test/mjsunit/regress/regress-171641.js b/test/mjsunit/regress/regress-264203.js |
similarity index 89% |
copy from test/mjsunit/regress/regress-171641.js |
copy to test/mjsunit/regress/regress-264203.js |
index 8db6781821325f8f6253eb2df4abb2b362b001c0..fa0075662575d85241b6af82c5945cca32938991 100644 |
--- a/test/mjsunit/regress/regress-171641.js |
+++ b/test/mjsunit/regress/regress-264203.js |
@@ -27,14 +27,18 @@ |
// Flags: --allow-natives-syntax |
-function foo(k, p) { |
- for (var i = 0; i < 1; i++) { |
- p = Math.min(p, i); |
+function foo(x) { |
+ 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]; |
} |
- m = Math.floor((k | 0) / p); |
+ return result; |
} |
-foo(0, 1); |
-foo(0, 1); |
+foo(0); |
+foo(0); |
%OptimizeFunctionOnNextCall(foo); |
-foo(0, 1); |
+var r = foo(-2); |
+assertEquals(3, r); |