Index: test/mjsunit/regress/regress-map-invalidation-2.js |
diff --git a/test/mjsunit/regress/regress-map-invalidation-2.js b/test/mjsunit/regress/regress-map-invalidation-2.js |
index 789c8bf937779a557b2df54507299d1944b452b3..1f896a495fa7c78582b44e2c8f0ff50f74c7a374 100644 |
--- a/test/mjsunit/regress/regress-map-invalidation-2.js |
+++ b/test/mjsunit/regress/regress-map-invalidation-2.js |
@@ -31,13 +31,13 @@ var c = { x: 2, y: 1 }; |
function g() { |
var outer = { foo: 1 }; |
- function f() { |
+ function f(b, c) { |
var n = outer.foo; |
- for (var i = 0; i < 100000; i++) { |
+ for (var i = 0; i < 10; i++) { |
n += c.x + outer.foo; |
} |
- var o2 = [{ x: 1.5, y: 1 }]; |
- return o2; |
+ if (b) return [{ x: 1.5, y: 1 }]; |
+ else return c; |
} |
// Clear type feedback from previous stress runs. |
%ClearFunctionTypeFeedback(f); |
@@ -45,7 +45,10 @@ function g() { |
} |
var fun = g(); |
-fun(); |
+fun(false, c); |
+fun(false, c); |
+fun(false, c); |
+%OptimizeFunctionOnNextCall(fun); |
+fun(false, c); |
+fun(true, c); |
assertOptimized(fun); |
-fun(); |
- |