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

Unified Diff: src/ostreams.h

Issue 458533002: Fix disassembly redirection from stdout into a file. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: switch to reversible escaping Created 6 years, 4 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/objects.cc ('k') | src/ostreams.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ostreams.h
diff --git a/src/ostreams.h b/src/ostreams.h
index f70b6de230d42c8dfd5814e1152008ab06169267..de6a8446a08a7bf301d6b8b5a0d564f5e729fa22 100644
--- a/src/ostreams.h
+++ b/src/ostreams.h
@@ -117,13 +117,26 @@ class OFStream: public OStream {
};
-// A wrapper to disambiguate uint16_t and uc16.
+// Wrappers to disambiguate uint16_t and uc16.
struct AsUC16 {
explicit AsUC16(uint16_t v) : value(v) {}
uint16_t value;
};
+struct AsReversiblyEscapedUC16 {
+ explicit AsReversiblyEscapedUC16(uint16_t v) : value(v) {}
+ uint16_t value;
+};
+
+
+// Writes the given character to the output escaping everything outside
+// of printable ASCII range. Additionally escapes '\' making escaping
+// reversible.
+OStream& operator<<(OStream& os, const AsReversiblyEscapedUC16& c);
+
+// Writes the given character to the output escaping everything outside
+// of printable ASCII range.
OStream& operator<<(OStream& os, const AsUC16& c);
} } // namespace v8::internal
« no previous file with comments | « src/objects.cc ('k') | src/ostreams.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698