Index: src/code-stubs.cc |
diff --git a/src/code-stubs.cc b/src/code-stubs.cc |
index 774623e492924a9d10d4eab822885fd9fdc04597..a1437ece39bf287cc370142336cbcd4c87f35040 100644 |
--- a/src/code-stubs.cc |
+++ b/src/code-stubs.cc |
@@ -315,18 +315,29 @@ void BinaryOpICWithAllocationSiteStub::GenerateAheadOfTime( |
} |
-void StringAddStub::PrintBaseName(std::ostream& os) const { // NOLINT |
- os << "StringAddStub"; |
- if ((flags() & STRING_ADD_CHECK_BOTH) == STRING_ADD_CHECK_BOTH) { |
- os << "_CheckBoth"; |
- } else if ((flags() & STRING_ADD_CHECK_LEFT) == STRING_ADD_CHECK_LEFT) { |
- os << "_CheckLeft"; |
- } else if ((flags() & STRING_ADD_CHECK_RIGHT) == STRING_ADD_CHECK_RIGHT) { |
- os << "_CheckRight"; |
- } |
- if (pretenure_flag() == TENURED) { |
- os << "_Tenured"; |
+std::ostream& operator<<(std::ostream& os, const StringAddFlags& flags) { |
+ switch (flags) { |
+ case STRING_ADD_CHECK_NONE: |
+ return os << "CheckNone"; |
+ case STRING_ADD_CHECK_LEFT: |
+ return os << "CheckLeft"; |
+ case STRING_ADD_CHECK_RIGHT: |
+ return os << "CheckRight"; |
+ case STRING_ADD_CHECK_BOTH: |
+ return os << "CheckBoth"; |
} |
+ UNREACHABLE(); |
+ return os; |
+} |
+ |
+ |
+void StringAddStub::PrintBaseName(std::ostream& os) const { // NOLINT |
+ os << "StringAddStub_" << flags() << "_" << pretenure_flag(); |
+} |
+ |
+ |
+void StringAddTFStub::PrintBaseName(std::ostream& os) const { // NOLINT |
+ os << "StringAddTFStub_" << flags() << "_" << pretenure_flag(); |
} |