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

Unified Diff: src/hydrogen-types.cc

Issue 363323003: More OStreamsUse OStreams more often. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Rebased and polished. Created 6 years, 5 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/hydrogen-types.h ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen-types.cc
diff --git a/src/hydrogen-types.cc b/src/hydrogen-types.cc
index 2da8a594ee71cb8c78ceaf15a72b3aaf8549e25f..114aeeaa9cf693bcb098ddc7db65166f630c4393 100644
--- a/src/hydrogen-types.cc
+++ b/src/hydrogen-types.cc
@@ -52,16 +52,18 @@ HType HType::FromValue(Handle<Object> value) {
}
-const char* HType::ToString() const {
+OStream& operator<<(OStream& os, const HType& t) {
// Note: The c1visualizer syntax for locals allows only a sequence of the
// following characters: A-Za-z0-9_-|:
- switch (kind_) {
- #define DEFINE_CASE(Name, mask) case k##Name: return #Name;
+ switch (t.kind_) {
+#define DEFINE_CASE(Name, mask) \
+ case HType::k##Name: \
+ return os << #Name;
HTYPE_LIST(DEFINE_CASE)
- #undef DEFINE_CASE
+#undef DEFINE_CASE
}
UNREACHABLE();
- return NULL;
+ return os;
}
} } // namespace v8::internal
« no previous file with comments | « src/hydrogen-types.h ('k') | src/ia32/lithium-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698