Commit 8bff1a25 authored by neis's avatar neis Committed by Commit bot

Make prettyprinting of variable proxies clearer.

If the variable is unallocated, say so.

This CL also fixes the return value of FormatSlotNode.

R=mvstanton@chromium.org
TBR=rossberg@chromium.org
BUG=

Review URL: https://codereview.chromium.org/1806883003

Cr-Commit-Position: refs/heads/master@{#34846}
parent b9b55bdc
......@@ -471,7 +471,7 @@ static int FormatSlotNode(Vector<char>* buf, Expression* node,
const char* node_name, FeedbackVectorSlot slot) {
int pos = SNPrintF(*buf, "%s", node_name);
if (!slot.IsInvalid()) {
pos = SNPrintF(*buf + pos, " Slot(%d)", slot.ToInt());
pos += SNPrintF(*buf + pos, " Slot(%d)", slot.ToInt());
}
return pos;
}
......@@ -1563,6 +1563,7 @@ void AstPrinter::VisitVariableProxy(VariableProxy* node) {
Variable* var = node->var();
switch (var->location()) {
case VariableLocation::UNALLOCATED:
SNPrintF(buf + pos, " unallocated");
break;
case VariableLocation::PARAMETER:
SNPrintF(buf + pos, " parameter[%d]", var->index());
......
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