Bug 471531 - js1_7/decompilation/regress-379925.js | js1_8_1/decompilation/regress-371802.js FAIL (r=jorendorff).

This commit is contained in:
Brendan Eich 2008-12-31 12:32:35 -08:00
parent 247323e02f
commit 669bad4082

View File

@ -2800,13 +2800,24 @@ Decompile(SprintStack *ss, jsbytecode *pc, intN nb, JSOp nextop)
sn = js_GetSrcNote(jp->script, pc);
#if JS_HAS_DESTRUCTURING
if (sn && SN_TYPE(sn) == SRC_GROUPASSIGN && len > JSOP_GETLOCAL_LENGTH) {
pc = DecompileGroupAssignment(ss, pc, endpc, sn, &todo);
if (!pc)
return NULL;
LOCAL_ASSERT(*pc == JSOP_POPN);
len = oplen = JSOP_POPN_LENGTH;
goto end_groupassignment;
if (sn && SN_TYPE(sn) == SRC_GROUPASSIGN) {
/*
* Distinguish a js_DecompileValueGenerator call that
* targets op alone, from decompilation of a full group
* assignment sequence, triggered by SRC_GROUPASSIGN
* annotating the first JSOP_GETLOCAL in the sequence.
*/
if (endpc - pc > JSOP_GETLOCAL_LENGTH || pc > startpc) {
pc = DecompileGroupAssignment(ss, pc, endpc, sn, &todo);
if (!pc)
return NULL;
LOCAL_ASSERT(*pc == JSOP_POPN);
len = oplen = JSOP_POPN_LENGTH;
goto end_groupassignment;
}
/* Null sn to prevent bogus VarPrefix'ing below. */
sn = NULL;
}
#endif