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

Unified Diff: test/mjsunit/regress/regress-opt-typeof-null.js

Issue 1912553002: Fix 'typeof null' canonicalization in crankshaft (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 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/crankshaft/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/regress/regress-opt-typeof-null.js
diff --git a/test/mjsunit/compiler/regress-dead-throw-inlining.js b/test/mjsunit/regress/regress-opt-typeof-null.js
similarity index 76%
copy from test/mjsunit/compiler/regress-dead-throw-inlining.js
copy to test/mjsunit/regress/regress-opt-typeof-null.js
index 097a20bc41d34760931928c45e4117888295f20a..e4721a18c5e0fb95a3b7cb323f229de9f605b64a 100644
--- a/test/mjsunit/compiler/regress-dead-throw-inlining.js
+++ b/test/mjsunit/regress/regress-opt-typeof-null.js
@@ -4,10 +4,9 @@
// Flags: --allow-natives-syntax
-function g() { if (false) throw 0; }
-function f() { g(); }
+function f() {
+ return typeof null === "object";
+};
-f();
-f();
%OptimizeFunctionOnNextCall(f);
-f();
+assertTrue(f());
« no previous file with comments | « src/crankshaft/hydrogen-instructions.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698