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

Unified Diff: test/mjsunit/compiler/regress-4207.js

Issue 1198993009: [turbofan] NaN is never truish. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: REBASE. Test for &&. Created 5 years, 6 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/ast-graph-builder.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/regress-4207.js
diff --git a/test/mjsunit/regress/regress-crbug-500435.js b/test/mjsunit/compiler/regress-4207.js
similarity index 53%
copy from test/mjsunit/regress/regress-crbug-500435.js
copy to test/mjsunit/compiler/regress-4207.js
index acc17ac5ecce8eaa9d2c384e984c3464b80797f4..c4ab5a78372b822cfb6eefa8385162e9862637ce 100644
--- a/test/mjsunit/regress/regress-crbug-500435.js
+++ b/test/mjsunit/compiler/regress-4207.js
@@ -4,19 +4,12 @@
// Flags: --allow-natives-syntax
-function bar(a) {
- delete a[1];
-}
+function bar() { return 0/0 && 1; }
+assertEquals(NaN, bar());
+%OptimizeFunctionOnNextCall(bar);
+assertEquals(NaN, bar());
-function foo(a) {
- var d;
- for (d in a) {
- assertFalse(d === undefined);
- bar(a);
- }
-}
-
-foo([1,2]);
-foo([2,3]);
+function foo() { return 0/0 || 1; }
+assertEquals(1, foo());
%OptimizeFunctionOnNextCall(foo);
-foo([1,2]);
+assertEquals(1, foo());
« no previous file with comments | « src/compiler/ast-graph-builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698