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

Unified Diff: test/mjsunit/regress/regress-crbug-590989-2.js

Issue 1757013002: [crankshaft] Fix invalid ToNumber optimization. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 10 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 | « test/mjsunit/regress/regress-crbug-590989-1.js ('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-590989-2.js
diff --git a/test/mjsunit/compiler/regress-dead-throw-inlining.js b/test/mjsunit/regress/regress-crbug-590989-2.js
similarity index 56%
copy from test/mjsunit/compiler/regress-dead-throw-inlining.js
copy to test/mjsunit/regress/regress-crbug-590989-2.js
index 097a20bc41d34760931928c45e4117888295f20a..cae1d9db5bde93207a6c9bc4a5718e5ea052f656 100644
--- a/test/mjsunit/compiler/regress-dead-throw-inlining.js
+++ b/test/mjsunit/regress/regress-crbug-590989-2.js
@@ -4,10 +4,9 @@
// Flags: --allow-natives-syntax
-function g() { if (false) throw 0; }
-function f() { g(); }
+function f(x) { return x === +x; }
-f();
-f();
+assertEquals(false, f(undefined));
+assertEquals(false, f(undefined));
%OptimizeFunctionOnNextCall(f);
-f();
+assertEquals(false, f(undefined)); // Interestingly this fails right away.
« no previous file with comments | « test/mjsunit/regress/regress-crbug-590989-1.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698