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

Unified Diff: src/wasm/wasm-text.cc

Issue 2610813009: [wasm] factor lower level utilties out of WasmFullDecoder (Closed)
Patch Set: harden decl decoding Created 3 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
« no previous file with comments | « src/wasm/wasm-objects.cc ('k') | test/unittests/wasm/function-body-decoder-unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/wasm/wasm-text.cc
diff --git a/src/wasm/wasm-text.cc b/src/wasm/wasm-text.cc
index 24d996254460dbc282c1811f64e44083a92fc886..bb07c35f584938889d9c66f2526574333dff8f80 100644
--- a/src/wasm/wasm-text.cc
+++ b/src/wasm/wasm-text.cc
@@ -173,11 +173,10 @@ void wasm::PrintWasmText(const WasmModule *module,
fun->code_start_offset, fun->code_end_offset);
BytecodeIterator i(func_bytes.begin(), func_bytes.end(), &decls);
DCHECK_LT(func_bytes.begin(), i.pc());
- if (!decls.local_types.empty()) {
+ if (!decls.type_list.empty()) {
os << "(local";
- for (auto p : decls.local_types) {
- for (unsigned i = 0; i < p.second; ++i)
- os << ' ' << WasmOpcodes::TypeName(p.first);
+ for (const ValueType &v : decls.type_list) {
+ os << ' ' << WasmOpcodes::TypeName(v);
}
os << ")\n";
++line_nr;
« no previous file with comments | « src/wasm/wasm-objects.cc ('k') | test/unittests/wasm/function-body-decoder-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698