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

Unified Diff: src/ostreams.cc

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/ostreams.h ('k') | src/wasm/ast-decoder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ostreams.cc
diff --git a/src/ostreams.cc b/src/ostreams.cc
index 120db257cd19e27fe91068c4dab99dfba709e9f7..45f41bb012089fd52a8beb14d4e6e4ad37cabb9f 100644
--- a/src/ostreams.cc
+++ b/src/ostreams.cc
@@ -97,5 +97,11 @@ std::ostream& operator<<(std::ostream& os, const AsUC32& c) {
return PrintUC32(os, c.value, IsPrint);
}
+std::ostream& operator<<(std::ostream& os, const AsHex& hex) {
+ char buf[20];
+ snprintf(buf, sizeof(buf), "%.*" PRIx64, hex.min_width, hex.value);
+ return os << buf;
+}
+
} // namespace internal
} // namespace v8
« no previous file with comments | « src/ostreams.h ('k') | src/wasm/ast-decoder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698