Index: test/mjsunit/regress/regress-map-invalidation-2.js |
diff --git a/test/mjsunit/regress/regress-264203.js b/test/mjsunit/regress/regress-map-invalidation-2.js |
similarity index 85% |
copy from test/mjsunit/regress/regress-264203.js |
copy to test/mjsunit/regress/regress-map-invalidation-2.js |
index fa0075662575d85241b6af82c5945cca32938991..6605ba78582d9facf7a90ba3f5b30e084bd988ee 100644 |
--- a/test/mjsunit/regress/regress-264203.js |
+++ b/test/mjsunit/regress/regress-map-invalidation-2.js |
@@ -27,18 +27,23 @@ |
// 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]; |
+var c = { x: 2, y: 1 }; |
+ |
+function g() { |
+ var outer = { foo: 1 }; |
+ function f() { |
+ var n = outer.foo; |
+ for (var i = 0; i < 100000; i++) { |
+ n += c.x + outer.foo; |
+ } |
+ var o2 = [{ x: 1.5, y: 1 }]; |
+ return o2; |
} |
- return result; |
+ return f; |
} |
-foo(0); |
-foo(0); |
-%OptimizeFunctionOnNextCall(foo); |
-var r = foo(-2); |
-assertEquals(3, r); |
+var fun = g(); |
+fun(); |
+assertOptimized(fun); |
+fun(); |
+ |