if (!pn || js_Emit1(cx, &funcg, JSOP_STOP) < 0) {
if (!pn) {
js_CompileFunctionBody(JSContext *cx, JSTokenStream *ts, JSFunction *fun){    JSArenaPool codePool, notePool;    JSCodeGenerator funcg;    JSStackFrame *fp, frame;    JSObject *funobj;    JSParseNode *pn;    JSBool ok;    JS_InitArenaPool(&codePool, "code", 1024, sizeof(jsbytecode));    JS_InitArenaPool(&notePool, "note", 1024, sizeof(jssrcnote));    if (!js_InitCodeGenerator(cx, &funcg, &codePool, &notePool,                              ts->filename, ts->lineno,                              ts->principals)) {        return JS_FALSE;    }    /* Prevent GC activation while compiling. */    JS_KEEP_ATOMS(cx->runtime);    /* Push a JSStackFrame for use by FunctionBody. */    fp = cx->fp;    funobj = fun->object;    JS_ASSERT(!fp || (fp->fun != fun && fp->varobj != funobj &&                      fp->scopeChain != funobj));    memset(&frame, 0, sizeof frame);    frame.fun = fun;    frame.varobj = frame.scopeChain = funobj;    frame.down = fp;    frame.flags = JS_HAS_COMPILE_N_GO_OPTION(cx)                  ? JSFRAME_COMPILING | JSFRAME_COMPILE_N_GO                  : JSFRAME_COMPILING;    cx->fp = &frame;    /*     * Farble the body so that it looks like a block statement to js_EmitTree,     * which is called beneath FunctionBody (see Statements, further below in     * this file).     *     * NB: with threaded interpretation, we must emit a stop opcode at the end     * of every scripted function and top-level script.     */    CURRENT_TOKEN(ts).type = TOK_LC;    pn = FunctionBody(cx, ts, fun, &funcg.treeContext);    if (!pn || js_Emit1(cx, &funcg, JSOP_STOP) < 0) {        ok = JS_FALSE;    } else {        /*         * No need to emit code here -- Statements (via FunctionBody) already         * has.  See similar comment in js_CompileTokenStream, and bug 108257.         */        fun->u.script = js_NewScriptFromCG(cx, &funcg, fun);        if (!fun->u.script) {            ok = JS_FALSE;        } else {            fun->interpreted = JS_TRUE;            if (funcg.treeContext.flags & TCF_FUN_HEAVYWEIGHT)                fun->flags |= JSFUN_HEAVYWEIGHT;            ok = JS_TRUE;        }    }    /* Restore saved state and release code generation arenas. */    cx->fp = fp;    JS_UNKEEP_ATOMS(cx->runtime);    js_FinishCodeGenerator(cx, &funcg);    JS_FinishArenaPool(&codePool);    JS_FinishArenaPool(&notePool);    return ok;}