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

Unified Diff: src/ic/ic-state.cc

Issue 1487973002: [turbofan] Add binary operation hints for javascript operators. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years 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
Index: src/ic/ic-state.cc
diff --git a/src/ic/ic-state.cc b/src/ic/ic-state.cc
index 298eaa2707d7a9ec6a00f43b7039941573d3adf3..911f538e3cee63fd853b05fdf4fa2454e76b832d 100644
--- a/src/ic/ic-state.cc
+++ b/src/ic/ic-state.cc
@@ -191,17 +191,17 @@ void BinaryOpICState::GenerateAheadOfTime(
}
-Type* BinaryOpICState::GetResultType(Zone* zone) const {
+Type* BinaryOpICState::GetResultType() const {
Kind result_kind = result_kind_;
if (HasSideEffects()) {
result_kind = NONE;
} else if (result_kind == GENERIC && op_ == Token::ADD) {
- return Type::Union(Type::Number(zone), Type::String(zone), zone);
+ return Type::NumberOrString();
} else if (result_kind == NUMBER && op_ == Token::SHR) {
- return Type::Unsigned32(zone);
+ return Type::Unsigned32();
}
DCHECK_NE(GENERIC, result_kind);
- return KindToType(result_kind, zone);
+ return KindToType(result_kind);
}
@@ -320,20 +320,20 @@ const char* BinaryOpICState::KindToString(Kind kind) {
// static
-Type* BinaryOpICState::KindToType(Kind kind, Zone* zone) {
+Type* BinaryOpICState::KindToType(Kind kind) {
switch (kind) {
case NONE:
- return Type::None(zone);
+ return Type::None();
case SMI:
- return Type::SignedSmall(zone);
+ return Type::SignedSmall();
case INT32:
- return Type::Signed32(zone);
+ return Type::Signed32();
case NUMBER:
- return Type::Number(zone);
+ return Type::Number();
case STRING:
- return Type::String(zone);
+ return Type::String();
case GENERIC:
- return Type::Any(zone);
+ return Type::Any();
}
UNREACHABLE();
return NULL;
« src/compiler/js-typed-lowering.cc ('K') | « src/ic/ic-state.h ('k') | src/type-info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698