pn->pn_type = TOK_LC; ok = js_FoldConstants(cx, pn, &cg->treeContext) && js_AllocTryNotes(cx, cg) && js_EmitTree(cx, cg, pn);
ok = JS_TRUE;
js_CompileTokenStream(JSContext *cx, JSObject *chain, JSTokenStream *ts,                      JSCodeGenerator *cg){    JSStackFrame *fp, frame;    JSParseNode *pn;    JSBool ok;#ifdef METER_PARSENODES    void *sbrk(ptrdiff_t), *before = sbrk(0);#endif    /*     * Push a compiler frame if we have no frames, or if the top frame is a     * lightweight function activation, or if its scope chain doesn't match     * the one passed to us.     */    fp = cx->fp;    if (!fp || !fp->varobj || fp->scopeChain != chain) {        memset(&frame, 0, sizeof frame);        frame.varobj = frame.scopeChain = chain;        if (cx->options & JSOPTION_VAROBJFIX) {            while ((chain = JS_GetParent(cx, chain)) != NULL)                frame.varobj = chain;        }        frame.down = fp;        cx->fp = &frame;    }    /*     * Prevent GC activation (possible if out of memory when atomizing,     * or from pre-ECMAv2 switch case expr eval in the unlikely case of a     * branch-callback -- unlikely because it means the switch case must     * have called a function).     */    JS_DISABLE_GC(cx->runtime);    pn = Statements(cx, ts, &cg->treeContext);    if (!pn) {        ok = JS_FALSE;    } else if (!js_MatchToken(cx, ts, TOK_EOF)) {        js_ReportCompileErrorNumber(cx, ts, NULL, JSREPORT_ERROR,                                    JSMSG_SYNTAX_ERROR);        ok = JS_FALSE;    } else {#ifdef METER_PARSENODES        printf("Parser growth: %d (%u nodes, %u max, %u unrecycled)\n",               (char *)sbrk(0) - (char *)before,               parsenodes,               maxparsenodes,               parsenodes - recyclednodes);        before = sbrk(0);#endif        pn->pn_type = TOK_LC;        ok = js_FoldConstants(cx, pn, &cg->treeContext) &&             js_AllocTryNotes(cx, cg) &&             js_EmitTree(cx, cg, pn);    }#ifdef METER_PARSENODES    printf("Code-gen growth: %d (%u bytecodes, %u srcnotes)\n",           (char *)sbrk(0) - (char *)before, CG_OFFSET(cg), cg->noteCount);#endif#ifdef JS_ARENAMETER    JS_DumpArenaStats(stdout);#endif    JS_ENABLE_GC(cx->runtime);    cx->fp = fp;    return ok;}