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

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

Issue 172173003: Bugfix in check elimination with a regression test. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
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
« no previous file with comments | « src/hydrogen-check-elimination.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « src/hydrogen-check-elimination.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698