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

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

Issue 2412853002: [crankshaft] Range analysis should not rely on overflowed ranges. (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/crankshaft/hydrogen-instructions.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-645438.js
diff --git a/test/mjsunit/regress/regress-opt-typeof-null.js b/test/mjsunit/regress/regress-crbug-645438.js
similarity index 53%
copy from test/mjsunit/regress/regress-opt-typeof-null.js
copy to test/mjsunit/regress/regress-crbug-645438.js
index e4721a18c5e0fb95a3b7cb323f229de9f605b64a..ff171524a03ee65914dd62ae76f68efe213a1183 100644
--- a/test/mjsunit/regress/regress-opt-typeof-null.js
+++ b/test/mjsunit/regress/regress-crbug-645438.js
@@ -4,9 +4,13 @@
// Flags: --allow-natives-syntax
-function f() {
- return typeof null === "object";
+function n(x,y){
+ y = (y-(0x80000000|0)|0);
+ return (x/y)|0;
};
-
-%OptimizeFunctionOnNextCall(f);
-assertTrue(f());
+var x = -0x80000000;
+var y = 0x7fffffff;
+n(x,y);
+n(x,y);
+%OptimizeFunctionOnNextCall(n);
+assertEquals(x, n(x,y));
« no previous file with comments | « src/crankshaft/hydrogen-instructions.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698