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

Unified Diff: test/mjsunit/compiler/instanceof.js

Issue 2827013002: [turbofan] Constant-fold certain JSOrdinaryHasInstance nodes. (Closed)
Patch Set: Created 3 years, 8 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/compiler/js-typed-lowering.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/compiler/instanceof.js
diff --git a/test/mjsunit/compiler/instanceof.js b/test/mjsunit/compiler/instanceof.js
index cb88e7c284f1465d5a2e120a8c23637b96c87a46..f6a364e60741ef09840578ce557e28e15a038501 100644
--- a/test/mjsunit/compiler/instanceof.js
+++ b/test/mjsunit/compiler/instanceof.js
@@ -131,3 +131,15 @@ F.__proto__ = null;
assertFalse(foo(new A()));
assertTrue(foo(new F()));
})();
+
+(function() {
+ function foo() {
+ var a = new A();
+ return a instanceof A;
+ }
+
+ assertTrue(foo());
+ assertTrue(foo());
+ %OptimizeFunctionOnNextCall(foo);
+ assertTrue(foo());
+})();
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698