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

Unified Diff: src/compiler/typer.cc

Issue 2381523002: [Turbofan] Introduce OtherNumberConstant. (Closed)
Patch Set: REBASE. 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/types.h » ('j') | src/compiler/types.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/typer.cc
diff --git a/src/compiler/typer.cc b/src/compiler/typer.cc
index e33b7764567881f149e760262b26a9a58f2b1f87..b0e1cef67d34ad1dd4425e2a6b8b237664c441fa 100644
--- a/src/compiler/typer.cc
+++ b/src/compiler/typer.cc
@@ -595,7 +595,7 @@ Type* Typer::Visitor::TypeNumberConstant(Node* node) {
if (Type::IsInteger(number)) {
return Type::Range(number, number, zone());
mvstanton 2016/09/28 14:47:44 Type::IsInteger... remove that! Factory covers it!
mvstanton 2016/10/04 11:55:55 Done.
}
- return Type::Constant(f->NewNumber(number), zone());
+ return Type::NewConstant(f->NewNumber(number), zone());
}
@@ -1024,6 +1024,8 @@ Type* Typer::Visitor::JSTypeOfTyper(Type* type, Typer* t) {
} else if (type->IsConstant()) {
return Type::Constant(
Object::TypeOf(t->isolate(), type->AsConstant()->Value()), t->zone());
+ } else if (type->IsNumberConstant()) {
+ return Type::Constant(f->number_string(), t->zone());
}
return Type::InternalizedString();
}
@@ -1717,7 +1719,7 @@ Type* Typer::Visitor::TypeConstant(Handle<Object> value) {
if (Type::IsInteger(*value)) {
return Type::Range(value->Number(), value->Number(), zone());
}
- return Type::Constant(value, zone());
+ return Type::NewConstant(value, zone());
}
} // namespace compiler
« no previous file with comments | « no previous file | src/compiler/types.h » ('j') | src/compiler/types.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698