Commit 5806570f authored by Jakob Kummerow's avatar Jakob Kummerow Committed by V8 LUCI CQ

[tools][wasm] wami: Implement --strip action

Strips the Name section off a module.

Change-Id: Ie28b80e610e4a858689f6a8aa01c0855c4c905a3
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3787876
Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
Reviewed-by: 's avatarAndreas Haas <ahaas@chromium.org>
Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82029}
parent 01f02a80
......@@ -115,7 +115,7 @@ class MultiLineStringBuilder : public StringBuilder {
// Note: implemented in wasm-disassembler.cc (which is also the only user).
void ToDisassemblyCollector(v8::debug::DisassemblyCollector* collector);
void DumpToStdout() {
void WriteTo(std::ostream& out) {
if (length() != 0) NextLine(0);
// In the name of speed, batch up lines that happen to be stored
......@@ -129,12 +129,12 @@ class MultiLineStringBuilder : public StringBuilder {
if (last_start + len == l.data) {
len += l.len;
} else {
std::cout.write(last_start, len);
out.write(last_start, len);
last_start = l.data;
len = l.len;
}
}
std::cout.write(last_start, len);
out.write(last_start, len);
}
private:
......
This diff is collapsed.
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