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

Unified Diff: src/compiler/type-cache.h

Issue 2306583002: [turbofan] Fix typing rule for Math.sign. (Closed)
Patch Set: Created 4 years, 3 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 | « no previous file | src/compiler/typer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/type-cache.h
diff --git a/src/compiler/type-cache.h b/src/compiler/type-cache.h
index 78b2692cf9146023f2403d523ff3129a2fe82ee0..58347cfb3d66044a3618bd6d48fc36a0d14056d8 100644
--- a/src/compiler/type-cache.h
+++ b/src/compiler/type-cache.h
@@ -46,7 +46,9 @@ class TypeCache final {
Type* const kTenOrUndefined =
Type::Union(kSingletonTen, Type::Undefined(), zone());
Type* const kMinusOneOrZero = CreateRange(-1.0, 0.0);
- Type* const kMinusOneToOne = CreateRange(-1.0, 1.0);
+ Type* const kMinusOneToOneOrMinusZeroOrNaN = Type::Union(
+ Type::Union(CreateRange(-1.0, 1.0), Type::MinusZero(), zone()),
+ Type::NaN(), zone());
Type* const kZeroOrOne = CreateRange(0.0, 1.0);
Type* const kZeroOrOneOrNaN = Type::Union(kZeroOrOne, Type::NaN(), zone());
Type* const kZeroToThirtyOne = CreateRange(0.0, 31.0);
« no previous file with comments | « no previous file | src/compiler/typer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698