зеркало из https://github.com/mozilla/gecko-dev.git
Bug 701239 - add back arg/local-handling in DecompileDestructuringLHS (r=waldo)
--HG-- extra : rebase_source : b296a3a47e4b687f773f9f5cf8bada7812ba2b81
This commit is contained in:
Родитель
7c50bc8925
Коммит
93ad21c3ca
|
@ -0,0 +1 @@
|
||||||
|
(function f(w) { for([w] in 1) {} }).toString();
|
|
@ -1679,9 +1679,13 @@ DecompileDestructuringLHS(SprintStack *ss, jsbytecode *pc, jsbytecode *endpc,
|
||||||
case JSOP_SETLOCAL:
|
case JSOP_SETLOCAL:
|
||||||
LOCAL_ASSERT(pc[oplen] == JSOP_POP || pc[oplen] == JSOP_POPN);
|
LOCAL_ASSERT(pc[oplen] == JSOP_POP || pc[oplen] == JSOP_POPN);
|
||||||
/* FALL THROUGH */
|
/* FALL THROUGH */
|
||||||
|
|
||||||
case JSOP_SETLOCALPOP:
|
case JSOP_SETLOCALPOP:
|
||||||
if (IsVarSlot(jp, pc, &i)) {
|
if (op == JSOP_SETARG) {
|
||||||
|
atom = GetArgOrVarAtom(jp, GET_SLOTNO(pc));
|
||||||
|
LOCAL_ASSERT(atom);
|
||||||
|
if (!QuoteString(&ss->sprinter, atom, 0))
|
||||||
|
return NULL;
|
||||||
|
} else if (IsVarSlot(jp, pc, &i)) {
|
||||||
atom = GetArgOrVarAtom(jp, i);
|
atom = GetArgOrVarAtom(jp, i);
|
||||||
LOCAL_ASSERT(atom);
|
LOCAL_ASSERT(atom);
|
||||||
if (!QuoteString(&ss->sprinter, atom, 0))
|
if (!QuoteString(&ss->sprinter, atom, 0))
|
||||||
|
@ -1691,6 +1695,15 @@ DecompileDestructuringLHS(SprintStack *ss, jsbytecode *pc, jsbytecode *endpc,
|
||||||
if (!lval || SprintCString(&ss->sprinter, lval) < 0)
|
if (!lval || SprintCString(&ss->sprinter, lval) < 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
if (op != JSOP_SETLOCALPOP) {
|
||||||
|
pc += oplen;
|
||||||
|
if (pc == endpc)
|
||||||
|
return pc;
|
||||||
|
LOAD_OP_DATA(pc);
|
||||||
|
if (op == JSOP_POPN)
|
||||||
|
return pc;
|
||||||
|
LOCAL_ASSERT(op == JSOP_POP);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default: {
|
default: {
|
||||||
|
|
Загрузка…
Ссылка в новой задаче