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

Unified Diff: src/ostreams.h

Issue 2050213002: [wasm] Implement AST printing into an ostream (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@refactor-function-names-table
Patch Set: address ahaas' comments 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/wasm-compiler.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 1c2f38a1539e6ed42736a5f8b6ae82200f27c367..977b5c6f4a48cbeda0e0163b678917779afeeac2 100644
--- a/src/ostreams.h
+++ b/src/ostreams.h
@@ -66,6 +66,12 @@ struct AsEscapedUC16ForJSON {
uint16_t value;
};
+struct AsHex {
+ explicit AsHex(uint64_t v, uint8_t min_width = 0)
+ : value(v), min_width(min_width) {}
+ uint64_t value;
+ uint8_t min_width;
+};
// Writes the given character to the output escaping everything outside of
// printable/space ASCII range. Additionally escapes '\' making escaping
@@ -83,6 +89,9 @@ std::ostream& operator<<(std::ostream& os, const AsUC16& c);
// of printable ASCII range.
std::ostream& operator<<(std::ostream& os, const AsUC32& c);
+// Writes the given number to the output in hexadecimal notation.
+std::ostream& operator<<(std::ostream& os, const AsHex& v);
+
} // namespace internal
} // namespace v8
« no previous file with comments | « src/compiler/wasm-compiler.cc ('k') | src/ostreams.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698