зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1130811 - Remove the bizarre left-equals-right special case when recycling binary nodes. r=efaust
--HG-- extra : rebase_source : 22331cc15d5dfaf81fa2418ccea98d3f50d44719
This commit is contained in:
Родитель
a2277a6223
Коммит
e13d63c459
|
@ -211,24 +211,6 @@ PushBinaryNodeChildren(ParseNode *node, NodeStack *stack)
|
|||
return PushResult::Recyclable;
|
||||
}
|
||||
|
||||
static PushResult
|
||||
PushBinaryNodeNullableChildren(ParseNode *node, NodeStack *stack)
|
||||
{
|
||||
MOZ_ASSERT(node->isArity(PN_BINARY) || node->isArity(PN_BINARY_OBJ));
|
||||
|
||||
if (node->pn_left != node->pn_right) {
|
||||
// XXX Is it ever the case that left == right any more? I think this
|
||||
// used to be PNK_SHORTHAND, but its two children are now different
|
||||
// nodes that are structurally equivalent, so PNK_SHORTHAND doesn't
|
||||
// require this.
|
||||
stack->pushUnlessNull(node->pn_left);
|
||||
}
|
||||
|
||||
stack->pushUnlessNull(node->pn_right);
|
||||
|
||||
return PushResult::Recyclable;
|
||||
}
|
||||
|
||||
static PushResult
|
||||
CanRecycleNullaryNode(ParseNode *node, NodeStack *stack)
|
||||
{
|
||||
|
@ -370,16 +352,18 @@ PushNodeChildren(ParseNode *pn, NodeStack *stack)
|
|||
// A return node's left half is what you'd expect: the return expression,
|
||||
// if any. The right half is non-null only for returns inside generator
|
||||
// functions, with the structure described in the assertions.
|
||||
case PNK_RETURN:
|
||||
case PNK_RETURN: {
|
||||
MOZ_ASSERT(pn->isArity(PN_BINARY));
|
||||
#ifdef DEBUG
|
||||
if (pn->pn_left)
|
||||
stack->push(pn->pn_left);
|
||||
if (pn->pn_right) {
|
||||
MOZ_ASSERT(pn->pn_right->isKind(PNK_NAME));
|
||||
MOZ_ASSERT(pn->pn_right->pn_atom->equals(".genrval"));
|
||||
MOZ_ASSERT(pn->pn_right->isAssigned());
|
||||
stack->push(pn->pn_right);
|
||||
}
|
||||
#endif
|
||||
return PushBinaryNodeNullableChildren(pn, stack);
|
||||
return PushResult::Recyclable;
|
||||
}
|
||||
|
||||
// Import and export-from nodes have a list of specifiers on the left
|
||||
// and a module string on the right.
|
||||
|
|
Загрузка…
Ссылка в новой задаче