diff --git a/js/src/frontend/ParseNode.cpp b/js/src/frontend/ParseNode.cpp index 07767f02776c..771f5e5f10d0 100644 --- a/js/src/frontend/ParseNode.cpp +++ b/js/src/frontend/ParseNode.cpp @@ -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.