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

Unified Diff: test/mjsunit/regress/regress-crbug-631318-9.js

Issue 2182003002: [turbofan] Fix overly aggressive dead code elimination. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Add comments Created 4 years, 5 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-631318-8.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-631318-9.js
diff --git a/test/mjsunit/compiler/regress-5158.js b/test/mjsunit/regress/regress-crbug-631318-9.js
similarity index 57%
copy from test/mjsunit/compiler/regress-5158.js
copy to test/mjsunit/regress/regress-crbug-631318-9.js
index ead5f4ed9d36bde7ddf9036f8f18bc11bc386ed3..ad472e0722ca1a94149db28def298488e78b6fca 100644
--- a/test/mjsunit/compiler/regress-5158.js
+++ b/test/mjsunit/regress/regress-crbug-631318-9.js
@@ -4,13 +4,11 @@
// Flags: --allow-natives-syntax
-function foo(x) {
- x = +x;
- return (x > 0) ? x : 0 - x;
-}
-
+function foo(x) { return x - x; }
foo(1);
-foo(-1);
-foo(0);
-%OptimizeFunctionOnNextCall(foo);
-assertEquals(2147483648, foo(-2147483648));
+foo(2);
+
+function bar(x) { foo(x); }
+%OptimizeFunctionOnNextCall(bar);
+
+assertThrows(() => bar(Symbol.toPrimitive));
« no previous file with comments | « test/mjsunit/regress/regress-crbug-631318-8.js ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698