Bug 704369: Factor break emit. (r=Waldo)

This commit is contained in:
Chris Leary 2011-11-22 10:41:11 -08:00
parent cd4abac0d4
commit 62d4576973

View File

@ -6021,7 +6021,7 @@ EmitBreak(JSContext *cx, BytecodeEmitter *bce, ParseNode *pn)
jsatomid labelIndex;
if (atom) {
if (!bce->makeAtomIndex(atom, &labelIndex))
return JS_FALSE;
return false;
while (stmt->type != STMT_LABEL || stmt->label != atom)
stmt = stmt->down;
@ -6033,9 +6033,7 @@ EmitBreak(JSContext *cx, BytecodeEmitter *bce, ParseNode *pn)
noteType = (stmt->type == STMT_SWITCH) ? SRC_SWITCHBREAK : SRC_BREAK;
}
if (EmitGoto(cx, bce, stmt, &stmt->breaks, labelIndex, noteType) < 0)
return JS_FALSE;
return true;
return EmitGoto(cx, bce, stmt, &stmt->breaks, labelIndex, noteType) >= 0;
}
JSBool