Bug 1130811 - Inline PushUnaryNodeNullableChild into its sole user. r=shu

--HG--
extra : rebase_source : 178d270af2367d1cc9032b18900bc8602b0a82d6
This commit is contained in:
Jeff Walden 2015-02-12 16:39:24 -08:00
Родитель 754e001415
Коммит 3f7b0b904f
1 изменённых файлов: 6 добавлений и 13 удалений

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

@ -189,17 +189,6 @@ PushUnaryNodeChild(ParseNode *node, NodeStack *stack)
return PushResult::Recyclable;
}
static PushResult
PushUnaryNodeNullableChild(ParseNode *node, NodeStack *stack)
{
MOZ_ASSERT(node->isArity(PN_UNARY));
if (node->pn_kid)
stack->push(node->pn_kid);
return PushResult::Recyclable;
}
static PushResult
PushBinaryNodeChildren(ParseNode *node, NodeStack *stack)
{
@ -267,8 +256,12 @@ PushNodeChildren(ParseNode *pn, NodeStack *stack)
return PushUnaryNodeChild(pn, stack);
// Nodes with a single nullable child.
case PNK_SEMI:
return PushUnaryNodeNullableChild(pn, stack);
case PNK_SEMI: {
MOZ_ASSERT(pn->isArity(PN_UNARY));
if (pn->pn_kid)
stack->push(pn->pn_kid);
return PushResult::Recyclable;
}
// Binary nodes with two non-null children.