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

Unified Diff: src/wasm/ast-decoder.cc

Issue 2502373002: [wasm] Add the 0x prefix to all constants in PrintAstForDebugging (Closed)
Patch Set: Created 4 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/ast-decoder.cc
diff --git a/src/wasm/ast-decoder.cc b/src/wasm/ast-decoder.cc
index ff6af34a02089e0831878d92374236ab42ac069a..2359b7f2f7cda0ba63c95e7034f04a728c49904f 100644
--- a/src/wasm/ast-decoder.cc
+++ b/src/wasm/ast-decoder.cc
@@ -1933,7 +1933,7 @@ bool PrintAst(AccountingAllocator* allocator, const FunctionBody& body,
for (auto p : decls.local_types) {
LocalType type = p.first;
uint32_t count = p.second;
- os << " " << count << " " << WasmOpcodes::TypeName(type);
+ os << " 0x" << AsHex(count, 2) << " " << WasmOpcodes::TypeName(type);
titzer 2016/11/16 14:58:28 I think this one should stay decimal, since it's a
ahaas 2016/11/16 15:44:47 Done
}
os << std::endl;
++line_nr;
@@ -1967,7 +1967,7 @@ bool PrintAst(AccountingAllocator* allocator, const FunctionBody& body,
os << "k" << WasmOpcodes::OpcodeName(opcode) << ",";
for (size_t j = 1; j < length; ++j) {
- os << " " << AsHex(i.pc()[j], 2) << ",";
+ os << " 0x" << AsHex(i.pc()[j], 2) << ",";
}
switch (opcode) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698