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

Unified Diff: src/compiler/type-hints.cc

Issue 2035383003: [turbofan] Type feedback for numeric comparisons. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebase, pure ops Created 4 years, 6 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/type-hints.h ('k') | 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-hints.cc
diff --git a/src/compiler/type-hints.cc b/src/compiler/type-hints.cc
index 19ebd2f24cd7f4eeeadc717eaa491a0f8dafc12e..e6088328b9856c1373cd521dd021ae00a93c2a10 100644
--- a/src/compiler/type-hints.cc
+++ b/src/compiler/type-hints.cc
@@ -27,11 +27,39 @@ std::ostream& operator<<(std::ostream& os, BinaryOperationHints::Hint hint) {
return os;
}
-
std::ostream& operator<<(std::ostream& os, BinaryOperationHints hints) {
return os << hints.left() << "*" << hints.right() << "->" << hints.result();
}
+std::ostream& operator<<(std::ostream& os, CompareOperationHints::Hint hint) {
+ switch (hint) {
+ case CompareOperationHints::kNone:
+ return os << "None";
+ case CompareOperationHints::kBoolean:
+ return os << "Boolean";
+ case CompareOperationHints::kSignedSmall:
+ return os << "SignedSmall";
+ case CompareOperationHints::kNumber:
+ return os << "Number";
+ case CompareOperationHints::kString:
+ return os << "String";
+ case CompareOperationHints::kInternalizedString:
+ return os << "InternalizedString";
+ case CompareOperationHints::kUniqueName:
+ return os << "UniqueName";
+ case CompareOperationHints::kReceiver:
+ return os << "Receiver";
+ case CompareOperationHints::kAny:
+ return os << "Any";
+ }
+ UNREACHABLE();
+ return os;
+}
+
+std::ostream& operator<<(std::ostream& os, CompareOperationHints hints) {
+ return os << hints.left() << "*" << hints.right() << " (" << hints.combined()
+ << ")";
+}
std::ostream& operator<<(std::ostream& os, ToBooleanHint hint) {
switch (hint) {
@@ -62,7 +90,6 @@ std::ostream& operator<<(std::ostream& os, ToBooleanHint hint) {
return os;
}
-
std::ostream& operator<<(std::ostream& os, ToBooleanHints hints) {
if (hints == ToBooleanHint::kAny) return os << "Any";
if (hints == ToBooleanHint::kNone) return os << "None";
« no previous file with comments | « src/compiler/type-hints.h ('k') | src/compiler/typer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698