Index: test/mjsunit/regress/compare-map-elim1.js |
diff --git a/test/mjsunit/compiler/compare-map-elim.js b/test/mjsunit/regress/compare-map-elim1.js |
similarity index 79% |
copy from test/mjsunit/compiler/compare-map-elim.js |
copy to test/mjsunit/regress/compare-map-elim1.js |
index 288d4811a6811691366841f7693495f6c785da9e..c7ea05def80873f380d40497f6ba48839c70001e 100644 |
--- a/test/mjsunit/compiler/compare-map-elim.js |
+++ b/test/mjsunit/regress/compare-map-elim1.js |
@@ -27,25 +27,31 @@ |
// Flags: --allow-natives-syntax --check-elimination |
-a = { |
- f: function() { this.y = 3; } |
-}; |
-b = { |
- f: function() { this.y = 4; } |
-}; |
-function x(z) { |
- return z.f(); |
+function foo(o) { |
+ return o.foo1; |
} |
-x(a); |
-x(b); |
-x(a); |
-x(b); |
-x(a); |
-x(b); |
+function getter() { |
+ return this.x + this.z + foo2(this); |
+} |
+ |
+function foo2(o) { |
+ return o.a; |
+} |
-%OptimizeFunctionOnNextCall(x) |
+var o1 = {z:0, x:1}; |
+var o2 = {z:0, a:1.5, x:1}; |
+var o3 = {z:0, a:1.5}; |
+Object.defineProperty(o1, "foo1", {get:getter}); |
+Object.defineProperty(o2, "foo1", {get:getter}); |
-x(a); |
-x(b); |
+foo(o1); |
+foo(o1); |
+foo(o2); |
+%ClearFunctionTypeFeedback(foo2); |
+foo2(o2); |
+foo2(o2); |
+foo2(o3); |
+%OptimizeFunctionOnNextCall(foo); |
+foo(o1); |