Index: test/mjsunit/regress/regress-crbug-329709.js |
diff --git a/test/mjsunit/regress/regress-264203.js b/test/mjsunit/regress/regress-crbug-329709.js |
similarity index 85% |
copy from test/mjsunit/regress/regress-264203.js |
copy to test/mjsunit/regress/regress-crbug-329709.js |
index fa0075662575d85241b6af82c5945cca32938991..c5316f391ce34dee57873417dc84d94e254868d4 100644 |
--- a/test/mjsunit/regress/regress-264203.js |
+++ b/test/mjsunit/regress/regress-crbug-329709.js |
@@ -27,18 +27,15 @@ |
// Flags: --allow-natives-syntax |
-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]; |
+function boom(x) { |
+ switch(x) { |
+ case 1: return "one"; |
+ case 1500000000: return "non-smi int32"; |
+ default: return "default"; |
} |
- return result; |
} |
-foo(0); |
-foo(0); |
-%OptimizeFunctionOnNextCall(foo); |
-var r = foo(-2); |
-assertEquals(3, r); |
+assertEquals("one", boom(1)); |
+assertEquals("one", boom(1)); |
+%OptimizeFunctionOnNextCall(boom) |
+assertEquals("non-smi int32", boom(1500000000)); |