Commit edd5017d authored by Andreas Haas's avatar Andreas Haas Committed by Commit Bot

[wasm] Cleanup output generated by --wasm-fuzzer-gen-test

The output generated by --wasm-fuzzer-gen-test did not pass the
presubmit check:

* There was a trailing whitespace after "body";
* There was a trailing newline at the end;

Additionally the signature of addElementSegment changed at some point
and now also takes a table-index parameter.

R=thibaudm@chromium.org

Bug: v8:10155
Change-Id: I77481b0ac810a0e3ff06df24afa3ae22beaebb77
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2172744Reviewed-by: 's avatarThibaud Michaud <thibaudm@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#67476}
parent 71f9c117
......@@ -154,7 +154,7 @@ bool PrintRawWasmCode(AccountingAllocator* allocator, const FunctionBody& body,
++line_nr;
}
os << "// body: " << std::endl;
os << "// body:" << std::endl;
if (line_numbers) line_numbers->push_back(kNoByteCode);
++line_nr;
unsigned control_depth = 0;
......
......@@ -198,6 +198,7 @@ void GenerateTestCase(Isolate* isolate, ModuleWireBytes wire_bytes,
}
for (const WasmElemSegment& elem_segment : module->elem_segments) {
os << "builder.addElementSegment(";
os << elem_segment.table_index << ", ";
switch (elem_segment.offset.kind) {
case WasmInitExpr::kGlobalIndex:
os << elem_segment.offset.val.global_index << ", true";
......@@ -258,7 +259,6 @@ void GenerateTestCase(Isolate* isolate, ModuleWireBytes wire_bytes,
os << "assertThrows(function() { builder.instantiate(); }, "
"WebAssembly.CompileError);\n";
}
os << "\n";
}
void WasmExecutionFuzzer::FuzzWasmModule(Vector<const uint8_t> data,
......
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