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

Unified Diff: src/ostreams.h

Issue 882973002: [turbofan] Improve JSON output (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix ASAN Created 5 years, 11 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
Index: src/ostreams.h
diff --git a/src/ostreams.h b/src/ostreams.h
index 840f341551632a4d21e5e747be1a524f0f1cc752..6f8600e7b1c522b6d3aab16be4bc63e74fe42cb5 100644
--- a/src/ostreams.h
+++ b/src/ostreams.h
@@ -55,12 +55,20 @@ struct AsReversiblyEscapedUC16 {
uint16_t value;
};
+struct AsEscapedUC16ForJSON {
+ explicit AsEscapedUC16ForJSON(uint16_t v) : value(v) {}
+ uint16_t value;
+};
+
// Writes the given character to the output escaping everything outside of
// printable/space ASCII range. Additionally escapes '\' making escaping
// reversible.
std::ostream& operator<<(std::ostream& os, const AsReversiblyEscapedUC16& c);
+// Same as AsReversiblyEscapedUC16 with additional escaping of \n, \r, " and '.
+std::ostream& operator<<(std::ostream& os, const AsEscapedUC16ForJSON& c);
+
// Writes the given character to the output escaping everything outside
// of printable ASCII range.
std::ostream& operator<<(std::ostream& os, const AsUC16& c);
« src/compiler/pipeline.cc ('K') | « src/objects-inl.h ('k') | src/ostreams.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698