Commit 203c18b9 authored by Clemens Backes's avatar Clemens Backes Committed by V8 LUCI CQ

[wasm] Make typer errors fatal

With PGO, I am hitting typer errors. Instead of just saying
"UNREACHABLE", do print an error message instead, which would previously
have required passing --trace-wasm-typer.

R=manoskouk@chromium.org

Bug: v8:13209
Change-Id: I75498782712b6adfeb1236f6882c49d015f9ef78
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3870920Reviewed-by: 's avatarManos Koukoutos <manoskouk@chromium.org>
Commit-Queue: Clemens Backes <clemensb@chromium.org>
Cr-Commit-Position: refs/heads/main@{#82968}
parent e6998519
......@@ -228,13 +228,12 @@ Reduction WasmTyper::Reduce(Node* node) {
type_def.struct_type, static_cast<uint32_t>(m.ResolvedValue()),
mcgraph_->machine()->Is32());
if (field_type.is_bottom()) {
TRACE(
FATAL(
"Error - Bottom struct field. function: %d, node %d:%s, "
"input0: %d, type: %s, offset %d\n",
function_index_, node->id(), node->op()->mnemonic(),
node->InputAt(0)->id(), object_type.type.name().c_str(),
static_cast<int>(m.ResolvedValue()));
UNREACHABLE();
}
computed_type = {field_type, object_type.module};
break;
......@@ -268,13 +267,12 @@ Reduction WasmTyper::Reduce(Node* node) {
current_type.module, computed_type.module) ||
wasm::IsSubtypeOf(computed_type.type, current_type.type,
computed_type.module, current_type.module))) {
TRACE(
FATAL(
"Error - Incompatible types. function: %d, node: %d:%s, input0:%d, "
"current %s, computed %s\n",
function_index_, node->id(), node->op()->mnemonic(),
node->InputAt(0)->id(), current_type.type.name().c_str(),
computed_type.type.name().c_str());
UNREACHABLE();
}
if (wasm::EquivalentTypes(current_type.type, computed_type.type,
......
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