Bug 1130811 - Convert the last ParseNode recycling arity-check to deal *only* with PNK_NAME to give the right impression about what should be done. Fixing PNK_NAME to deal with multiple arities looks to be moderately tricky for various reasons, so punt on it for now until those other reasons are cleaned up. r=shu

--HG--
extra : rebase_source : ee5d8e2e76dc8b1162cd7ba7ddf8b8321ec8d33a
This commit is contained in:
Jeff Walden 2015-02-10 17:18:43 -08:00
Родитель 8ea41b8784
Коммит a2277a6223
1 изменённых файлов: 5 добавлений и 26 удалений

Просмотреть файл

@ -534,34 +534,13 @@ PushNodeChildren(ParseNode *pn, NodeStack *stack)
MOZ_CRASH("invalid node kind");
}
// Fallthrough for not-yet-handled kinds.
switch (pn->getArity()) {
case PN_CODE:
return PushCodeNodeChildren(pn, stack);
MOZ_ASSERT(pn->isKind(PNK_NAME), "missed a kind above");
case PN_NAME:
return PushNameNodeChildren(pn, stack);
MOZ_ASSERT(pn->isArity(PN_NAME) || pn->isArity(PN_NULLARY));
case PN_LIST:
return PushListNodeChildren(pn, stack);
case PN_TERNARY:
return PushTernaryNodeNullableChildren(pn, stack);
case PN_BINARY:
case PN_BINARY_OBJ:
return PushBinaryNodeNullableChildren(pn, stack);
case PN_UNARY:
return PushUnaryNodeNullableChild(pn, stack);
case PN_NULLARY:
return CanRecycleNullaryNode(pn, stack);
default:
MOZ_CRASH("huh?");
return PushResult::CleanUpLater;
}
return pn->isArity(PN_NAME)
? PushNameNodeChildren(pn, stack)
: CanRecycleNullaryNode(pn, stack);
}
/*