Commit b9e1f5ac authored by Georg Neis's avatar Georg Neis Committed by Commit Bot

[turbofan] Add even more debugging output for a mysterious error.

Bug: chromium:906567
Change-Id: I1c459bd5acd425f1433b6727214a8f5ed2fe0177
Reviewed-on: https://chromium-review.googlesource.com/c/1384313Reviewed-by: 's avatarTobias Tebbi <tebbi@chromium.org>
Commit-Queue: Georg Neis <neis@chromium.org>
Cr-Commit-Position: refs/heads/master@{#58388}
parent 0e22ec73
......@@ -332,28 +332,39 @@ class Typer::Visitor : public Reducer {
}
if (V8_UNLIKELY(!previous.Is(current))) {
AllowHandleDereference allow;
std::ostringstream ostream;
node->Print(ostream);
previous.PrintTo(ostream);
ostream << " -> ";
current.PrintTo(ostream);
ostream << "\n"
<< "inputs:\n";
for (int i = 0; i < 2; ++i) {
Node* input = NodeProperties::GetValueInput(node, i);
if (remembered_types_[{node, i}].IsInvalid()) {
ostream << "untyped";
} else {
remembered_types_[{node, i}].PrintTo(ostream);
if (V8_UNLIKELY(node->opcode() == IrOpcode::kNumberAdd)) {
ostream << "Previous UpdateType run (inputs first):";
for (int i = 0; i < 3; ++i) {
ostream << " ";
if (remembered_types_[{node, i}].IsInvalid()) {
ostream << "untyped";
} else {
remembered_types_[{node, i}].PrintTo(ostream);
}
}
ostream << " -> ";
if (NodeProperties::IsTyped(input)) {
NodeProperties::GetType(input).PrintTo(ostream);
} else {
ostream << "untyped";
ostream << "\nCurrent (output) type: ";
previous.PrintTo(ostream);
ostream << "\nThis UpdateType run (inputs first):";
for (int i = 0; i < 2; ++i) {
ostream << " ";
Node* input = NodeProperties::GetValueInput(node, i);
if (NodeProperties::IsTyped(input)) {
NodeProperties::GetType(input).PrintTo(ostream);
} else {
ostream << "untyped";
}
}
ostream << " ";
current.PrintTo(ostream);
ostream << "\n";
}
FATAL("UpdateType error for node %s", ostream.str().c_str());
}
......@@ -380,6 +391,7 @@ class Typer::Visitor : public Reducer {
remembered_types_[{node, i}] = NodeProperties::GetType(input);
}
}
remembered_types_[{node, 2}] = current;
}
// No previous type, simply update the 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