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 { ...@@ -332,28 +332,39 @@ class Typer::Visitor : public Reducer {
} }
if (V8_UNLIKELY(!previous.Is(current))) { if (V8_UNLIKELY(!previous.Is(current))) {
AllowHandleDereference allow;
std::ostringstream ostream; std::ostringstream ostream;
node->Print(ostream); node->Print(ostream);
previous.PrintTo(ostream);
ostream << " -> "; if (V8_UNLIKELY(node->opcode() == IrOpcode::kNumberAdd)) {
current.PrintTo(ostream); ostream << "Previous UpdateType run (inputs first):";
ostream << "\n" for (int i = 0; i < 3; ++i) {
<< "inputs:\n"; ostream << " ";
for (int i = 0; i < 2; ++i) { if (remembered_types_[{node, i}].IsInvalid()) {
Node* input = NodeProperties::GetValueInput(node, i); ostream << "untyped";
if (remembered_types_[{node, i}].IsInvalid()) { } else {
ostream << "untyped"; remembered_types_[{node, i}].PrintTo(ostream);
} else { }
remembered_types_[{node, i}].PrintTo(ostream);
} }
ostream << " -> ";
if (NodeProperties::IsTyped(input)) { ostream << "\nCurrent (output) type: ";
NodeProperties::GetType(input).PrintTo(ostream); previous.PrintTo(ostream);
} else {
ostream << "untyped"; 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"; ostream << "\n";
} }
FATAL("UpdateType error for node %s", ostream.str().c_str()); FATAL("UpdateType error for node %s", ostream.str().c_str());
} }
...@@ -380,6 +391,7 @@ class Typer::Visitor : public Reducer { ...@@ -380,6 +391,7 @@ class Typer::Visitor : public Reducer {
remembered_types_[{node, i}] = NodeProperties::GetType(input); remembered_types_[{node, i}] = NodeProperties::GetType(input);
} }
} }
remembered_types_[{node, 2}] = current;
} }
// No previous type, simply update the type. // 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