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

Unified Diff: test/mjsunit/compiler/regress-truncate-number-or-undefined-to-float64.js

Issue 2027593002: [turbofan] Distinguish between change- and truncate-tagged-to-float64. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 4 years, 7 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/cctest/compiler/test-representation-change.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-truncate-number-or-undefined-to-float64.js
diff --git a/test/mjsunit/regress/regress-crbug-513471.js b/test/mjsunit/compiler/regress-truncate-number-or-undefined-to-float64.js
similarity index 62%
copy from test/mjsunit/regress/regress-crbug-513471.js
copy to test/mjsunit/compiler/regress-truncate-number-or-undefined-to-float64.js
index 48c793e512315284ddf218f8847d9c357280fe95..1dc3042ea7fb83eb2e464873815ca1f38ed26ee2 100644
--- a/test/mjsunit/regress/regress-crbug-513471.js
+++ b/test/mjsunit/compiler/regress-truncate-number-or-undefined-to-float64.js
@@ -4,7 +4,16 @@
// Flags: --allow-natives-syntax
-var g = (function*(){});
-var f = g();
+function g(a, b) {
+ a = +a;
+ if (b) {
+ a = undefined;
+ }
+ print(a);
+ return +a;
+}
+
+g(0);
+g(0);
%OptimizeFunctionOnNextCall(g);
-f.next();
+assertTrue(Number.isNaN(g(0, true)));
« no previous file with comments | « test/cctest/compiler/test-representation-change.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698