Commit b39d0634 authored by Stephan Herhut's avatar Stephan Herhut Committed by Commit Bot

[cleanup] Fix printing of wasm locals overview

The raw wasm printer was not printing the last entry of the
locals declarations. Now it does.

Bug: v8:8562
Change-Id: Ib51c674b747f95079c544131f18462d203f0933f
Reviewed-on: https://chromium-review.googlesource.com/c/1409364Reviewed-by: 's avatarClemens Hammacher <clemensh@chromium.org>
Commit-Queue: Stephan Herhut <herhut@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58805}
parent 8a6830df
......@@ -116,7 +116,7 @@ bool PrintRawWasmCode(AccountingAllocator* allocator, const FunctionBody& body,
BodyLocalDecls decls(&zone);
BytecodeIterator i(body.start, body.end, &decls);
if (body.start != i.pc() && print_locals == kPrintLocals) {
os << "// locals: ";
os << "// locals:";
if (!decls.type_list.empty()) {
ValueType type = decls.type_list[0];
uint32_t count = 0;
......@@ -129,6 +129,7 @@ bool PrintRawWasmCode(AccountingAllocator* allocator, const FunctionBody& body,
count = 1;
}
}
os << " " << count << " " << ValueTypes::TypeName(type);
}
os << std::endl;
if (line_numbers) line_numbers->push_back(kNoByteCode);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment