зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1130811 - Inline PushUnaryNodeNullableChild into its sole user. r=shu
--HG-- extra : rebase_source : 178d270af2367d1cc9032b18900bc8602b0a82d6
This commit is contained in:
Родитель
754e001415
Коммит
3f7b0b904f
|
@ -189,17 +189,6 @@ PushUnaryNodeChild(ParseNode *node, NodeStack *stack)
|
||||||
return PushResult::Recyclable;
|
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
|
static PushResult
|
||||||
PushBinaryNodeChildren(ParseNode *node, NodeStack *stack)
|
PushBinaryNodeChildren(ParseNode *node, NodeStack *stack)
|
||||||
{
|
{
|
||||||
|
@ -267,8 +256,12 @@ PushNodeChildren(ParseNode *pn, NodeStack *stack)
|
||||||
return PushUnaryNodeChild(pn, stack);
|
return PushUnaryNodeChild(pn, stack);
|
||||||
|
|
||||||
// Nodes with a single nullable child.
|
// Nodes with a single nullable child.
|
||||||
case PNK_SEMI:
|
case PNK_SEMI: {
|
||||||
return PushUnaryNodeNullableChild(pn, stack);
|
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.
|
// Binary nodes with two non-null children.
|
||||||
|
|
||||||
|
|
Загрузка…
Ссылка в новой задаче