From 0eb351647049312a2e24d5cb62d57980d7b93a3a Mon Sep 17 00:00:00 2001 From: "brendan%mozilla.org" Date: Wed, 11 Feb 2004 07:51:50 +0000 Subject: [PATCH] Fix two nits in last checkin. --- js/src/jsemit.c | 16 +++++++--------- js/src/jsparse.c | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/js/src/jsemit.c b/js/src/jsemit.c index 95fd2eceeef4..9f026cd9aee4 100644 --- a/js/src/jsemit.c +++ b/js/src/jsemit.c @@ -2368,15 +2368,13 @@ EmitSwitch(JSContext *cx, JSCodeGenerator *cg, JSParseNode *pn, pc += 2 * JUMP_OFFSET_LEN; /* Fill in the jump table, if there is one. */ - if (tableLength) { - for (i = 0; i < (jsint)tableLength; i++) { - pn3 = table[i]; - off = pn3 ? pn3->pn_offset - top : 0; - ok = js_SetJumpOffset(cx, cg, pc, off); - if (!ok) - goto out; - pc += JUMP_OFFSET_LEN; - } + for (i = 0; i < (jsint)tableLength; i++) { + pn3 = table[i]; + off = pn3 ? pn3->pn_offset - top : 0; + ok = js_SetJumpOffset(cx, cg, pc, off); + if (!ok) + goto out; + pc += JUMP_OFFSET_LEN; } } else if (switchOp == JSOP_LOOKUPSWITCH) { /* Skip over the already-initialized number of cases. */ diff --git a/js/src/jsparse.c b/js/src/jsparse.c index 39d5c29840b7..75032147cbb8 100644 --- a/js/src/jsparse.c +++ b/js/src/jsparse.c @@ -651,7 +651,7 @@ js_CompileFunctionBody(JSContext *cx, JSTokenStream *ts, JSFunction *fun) /* Prevent GC activation while compiling. */ 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; funobj = fun->object; JS_ASSERT(!fp || (fp->fun != fun && fp->varobj != funobj &&