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}
This commit is contained in:
parent
b9b55bdc9e
commit
8bff1a25c8
@ -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());
|
||||
|
Loading…
Reference in New Issue
Block a user