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

Unified Diff: test/mjsunit/regress/regress-crbug-243868.js

Issue 16155003: Fix IfBuilder::Deopt to clear the current block. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 7 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/regress-crbug-243868.js
diff --git a/test/mjsunit/regress/regress-crbug-242870.js b/test/mjsunit/regress/regress-crbug-243868.js
similarity index 79%
copy from test/mjsunit/regress/regress-crbug-242870.js
copy to test/mjsunit/regress/regress-crbug-243868.js
index 7183375ca811cedc81c870d34e694e98cf727f9b..106d9cc78bce7795cd450fa0d07794f9f004a3af 100644
--- a/test/mjsunit/regress/regress-crbug-242870.js
+++ b/test/mjsunit/regress/regress-crbug-243868.js
@@ -29,15 +29,18 @@
var non_const_true = true;
-function f() {
- return (non_const_true || true && g());
+function f(o) {
+ return (non_const_true && (o.val == null || false));
}
-function g() {
- for (;;) {}
-}
+// Create an object with a constant function in another realm.
+var realm = Realm.create();
+var realmObject = Realm.eval(realm, "function g() {}; var o = { val:g }; o;")
+
+// Make the CompareNil IC in the function monomorphic.
+assertFalse(f(realmObject));
+assertFalse(f(realmObject));
-assertTrue(f());
-assertTrue(f());
+// Optimize the function containing the CompareNil IC.
%OptimizeFunctionOnNextCall(f);
-assertTrue(f());
+assertFalse(f(realmObject));
« 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