Fix #if-related bug that broken compilation of pre-1.7 versions (bug 412894, r=timeless).

This commit is contained in:
brendan@mozilla.org 2008-01-26 23:58:06 -08:00
parent e956b2e7d4
commit 932fb674a1

View File

@ -4537,13 +4537,13 @@ js_EmitTree(JSContext *cx, JSCodeGenerator *cg, JSParseNode *pn)
}
} else {
op = JSOP_POP;
if (!pn2->pn_kid1) {
pn3 = pn2->pn_kid1;
if (!pn3) {
/* No initializer: emit an annotated nop for the decompiler. */
op = JSOP_NOP;
} else {
cg->treeContext.flags |= TCF_IN_FOR_INIT;
#if JS_HAS_DESTRUCTURING
pn3 = pn2->pn_kid1;
if (pn3->pn_type == TOK_ASSIGN &&
!MaybeEmitGroupAssignment(cx, cg, op, pn3, &op)) {
return JS_FALSE;