mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
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
This commit is contained in:
parent
c742a056a8
commit
70e2fe622b
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
Loading…
Reference in New Issue
Block a user