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

Unified Diff: test/mjsunit/omit-constant-mapcheck.js

Issue 19888006: Also eliminate map checks with transitions. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Add test Created 7 years, 5 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-instructions.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/omit-constant-mapcheck.js
diff --git a/test/mjsunit/omit-constant-mapcheck.js b/test/mjsunit/omit-constant-mapcheck.js
index 6894275db714875bedd6790036d4ada02812425e..ae6308f215e40ae22b9e9328c5f4e4ec3d0f3843 100644
--- a/test/mjsunit/omit-constant-mapcheck.js
+++ b/test/mjsunit/omit-constant-mapcheck.js
@@ -53,3 +53,18 @@ assertEquals(2, load2());
g2.b = 10;
g2.a = 5;
assertEquals(5, load2());
+
+var g3 = { a:2, b:9, c:1 }
+
+function store(v) {
+ g3.a = v;
+ return g3.a;
+}
+
+assertEquals(5, store(5));
+assertEquals(8, store(8));
+%OptimizeFunctionOnNextCall(store);
+assertEquals(10, store(10));
+delete g3.c;
+store(7);
+assertEquals({a:7, b:9}, g3);
« no previous file with comments | « src/hydrogen-instructions.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698