[wasm][fuzzer] Clean up printing of locals types

Remove the hack introduced in https://crrev.com/c/2412176, use the
existing {ValueTypeToConstantName} function instead.

R=ahaas@chromium.org

Bug: chromium:1127717
Change-Id: I4ac50346825d7b00ea8dadccd7798a273ae84499
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2421568
Reviewed-by: Andreas Haas <ahaas@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70028}
This commit is contained in:
Clemens Backes 2020-09-21 12:42:09 +02:00 committed by Commit Bot
parent e6d10e5283
commit 1122ff67e9

View File

@ -273,10 +273,8 @@ void GenerateTestCase(Isolate* isolate, ModuleWireBytes wire_bytes,
while (pos + count < locals && decls.type_list[pos + count] == type) {
++count;
}
// TODO(wasm): Fix this for heap types.
std::string name = type.name();
name[0] = std::toupper(name[0]);
os << ".addLocals(kWasm" << name << ", " << count << ")";
os << ".addLocals(" << ValueTypeToConstantName(type) << ", " << count
<< ")";
}
os << "\n";
}