Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2049)

Unified Diff: test/mjsunit/regress/compare-map-elim1.js

Issue 185653004: Experimental parser: merge to r19637 (Closed) Base URL: https://v8.googlecode.com/svn/branches/experimental/parser
Patch Set: Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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%
rename from test/mjsunit/compiler/compare_map_elim.js
rename 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);

Powered by Google App Engine
This is Rietveld 408576698