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

Unified Diff: test/mjsunit/regress/post-increment-close-context.js

Issue 23897003: Properly close the CountOperation value/effect context after leaving the store effect context. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Ensure we get the right value back Created 7 years, 3 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.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/post-increment-close-context.js
diff --git a/test/mjsunit/compare-nil.js b/test/mjsunit/regress/post-increment-close-context.js
similarity index 84%
copy from test/mjsunit/compare-nil.js
copy to test/mjsunit/regress/post-increment-close-context.js
index 0895a31fb80cbe697b678eaa1005926d7d65829f..08ade10f1d80df022324eb77b7991ed130569d76 100644
--- a/test/mjsunit/compare-nil.js
+++ b/test/mjsunit/regress/post-increment-close-context.js
@@ -27,10 +27,16 @@
// Flags: --allow-natives-syntax
-function test(v) {
- return (v == null);
+var foo = {bar: -2};
+function crash() {
+ return !(foo.bar++);
}
-assertFalse(test(true));
-assertFalse(test(true));
-assertTrue(test(null));
-assertTrue(test(null));
+assertFalse(crash());
+assertEquals(-1, foo.bar);
+%OptimizeFunctionOnNextCall(crash);
+assertFalse(crash());
+assertEquals(0, foo.bar);
+assertTrue(crash());
+assertEquals(1, foo.bar);
+assertFalse(crash());
+assertEquals(2, foo.bar);
« no previous file with comments | « src/hydrogen.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698