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

Unified Diff: test/mjsunit/regress/regress-crbug-657478.js

Issue 2440333002: [turbofan] Fix typed lowering of JSToLength. (Closed)
Patch Set: Created 4 years, 2 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/js-typed-lowering.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-crbug-657478.js
diff --git a/test/mjsunit/compiler/regress-5158.js b/test/mjsunit/regress/regress-crbug-657478.js
similarity index 62%
copy from test/mjsunit/compiler/regress-5158.js
copy to test/mjsunit/regress/regress-crbug-657478.js
index ead5f4ed9d36bde7ddf9036f8f18bc11bc386ed3..0827a7a1c731843190a748f7f4fe21ca56a2b714 100644
--- a/test/mjsunit/compiler/regress-5158.js
+++ b/test/mjsunit/regress/regress-crbug-657478.js
@@ -4,13 +4,10 @@
// Flags: --allow-natives-syntax
-function foo(x) {
- x = +x;
- return (x > 0) ? x : 0 - x;
-}
+function foo(o) { return %_ToLength(o.length); }
-foo(1);
-foo(-1);
-foo(0);
+foo(new Array(4));
+foo(new Array(Math.pow(2, 32) - 1));
+foo({length: 10});
%OptimizeFunctionOnNextCall(foo);
-assertEquals(2147483648, foo(-2147483648));
+foo({length: 10});
« no previous file with comments | « src/compiler/js-typed-lowering.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698