зеркало из https://github.com/mozilla/pjs.git
Deoptimize group assignment to avoid writing extra code for the hard case where the rhs has fewer elements than the lhs (but the rhs might have proto-elements; 355023, r=mrbkap).
This commit is contained in:
Родитель
3b5a89f3f8
Коммит
defea01fc8
|
@ -3524,7 +3524,8 @@ MaybeEmitGroupAssignment(JSContext *cx, JSCodeGenerator *cg, JSOp declOp,
|
|||
JS_ASSERT(*pop == JSOP_POP || *pop == JSOP_POPV);
|
||||
lhs = pn->pn_left;
|
||||
rhs = pn->pn_right;
|
||||
if (lhs->pn_type == TOK_RB && rhs->pn_type == TOK_RB) {
|
||||
if (lhs->pn_type == TOK_RB && rhs->pn_type == TOK_RB &&
|
||||
lhs->pn_count <= rhs->pn_count) {
|
||||
if (!EmitGroupAssignment(cx, cg, declOp, lhs, rhs))
|
||||
return JS_FALSE;
|
||||
*pop = JSOP_NOP;
|
||||
|
|
Загрузка…
Ссылка в новой задаче