Index: test/mjsunit/compiler/regress-5074.js |
diff --git a/test/mjsunit/regress/regress-3650-3.js b/test/mjsunit/compiler/regress-5074.js |
similarity index 56% |
copy from test/mjsunit/regress/regress-3650-3.js |
copy to test/mjsunit/compiler/regress-5074.js |
index 013e4df2834e20435982300303eb6260eb41b2be..903b54ad980042d134428d1c9be329499530cdef 100644 |
--- a/test/mjsunit/regress/regress-3650-3.js |
+++ b/test/mjsunit/compiler/regress-5074.js |
@@ -4,14 +4,15 @@ |
// Flags: --allow-natives-syntax |
-function foo(a) { |
- for (var d in a) { |
- delete a[1]; |
- } |
+var s = [,0.1]; |
+ |
+function foo(a, b) { |
+ var x = s[a]; |
+ s[1] = 0.1; |
+ return x + b; |
} |
-foo([1,2,3]); |
-foo([2,3,4]); |
+assertEquals(2.1, foo(1, 2)); |
+assertEquals(2.1, foo(1, 2)); |
%OptimizeFunctionOnNextCall(foo); |
-foo([1,2,3]); |
-assertOptimized(foo); |
+assertEquals("undefined2", foo(0, "2")); |