This commit is contained in:
brendan%mozilla.org 2004-02-11 07:51:50 +00:00
Родитель 556d811109
Коммит 0eb3516470
2 изменённых файлов: 8 добавлений и 10 удалений

Просмотреть файл

@ -2368,15 +2368,13 @@ EmitSwitch(JSContext *cx, JSCodeGenerator *cg, JSParseNode *pn,
pc += 2 * JUMP_OFFSET_LEN; pc += 2 * JUMP_OFFSET_LEN;
/* Fill in the jump table, if there is one. */ /* Fill in the jump table, if there is one. */
if (tableLength) { for (i = 0; i < (jsint)tableLength; i++) {
for (i = 0; i < (jsint)tableLength; i++) { pn3 = table[i];
pn3 = table[i]; off = pn3 ? pn3->pn_offset - top : 0;
off = pn3 ? pn3->pn_offset - top : 0; ok = js_SetJumpOffset(cx, cg, pc, off);
ok = js_SetJumpOffset(cx, cg, pc, off); if (!ok)
if (!ok) goto out;
goto out; pc += JUMP_OFFSET_LEN;
pc += JUMP_OFFSET_LEN;
}
} }
} else if (switchOp == JSOP_LOOKUPSWITCH) { } else if (switchOp == JSOP_LOOKUPSWITCH) {
/* Skip over the already-initialized number of cases. */ /* Skip over the already-initialized number of cases. */

Просмотреть файл

@ -651,7 +651,7 @@ js_CompileFunctionBody(JSContext *cx, JSTokenStream *ts, JSFunction *fun)
/* Prevent GC activation while compiling. */ /* Prevent GC activation while compiling. */
JS_KEEP_ATOMS(cx->runtime); JS_KEEP_ATOMS(cx->runtime);
/* Push a JSStackFrame for use by FunctionBody and js_EmitFunctionBody. */ /* Push a JSStackFrame for use by FunctionBody. */
fp = cx->fp; fp = cx->fp;
funobj = fun->object; funobj = fun->object;
JS_ASSERT(!fp || (fp->fun != fun && fp->varobj != funobj && JS_ASSERT(!fp || (fp->fun != fun && fp->varobj != funobj &&