CheckFinalReturn(JSParseNode *pn)
CheckFinalReturn(JSContext *cx, JSTokenStream *ts, JSParseNode *pn)
CheckFinalReturn(JSParseNode *pn){    JSBool ok, hasDefault;    JSParseNode *pn2, *pn3;    switch (pn->pn_type) {      case TOK_LC:        if (!pn->pn_head)            return JS_FALSE;        return CheckFinalReturn(PN_LAST(pn));      case TOK_IF:        ok = CheckFinalReturn(pn->pn_kid2);        ok &= pn->pn_kid3 && CheckFinalReturn(pn->pn_kid3);        return ok;#if JS_HAS_SWITCH_STATEMENT      case TOK_SWITCH:        ok = JS_TRUE;        hasDefault = JS_FALSE;        for (pn2 = pn->pn_kid2->pn_head; ok && pn2; pn2 = pn2->pn_next) {            if (pn2->pn_type == TOK_DEFAULT)                hasDefault = JS_TRUE;            pn3 = pn2->pn_right;            JS_ASSERT(pn3->pn_type == TOK_LC);            if (pn3->pn_head)                ok &= CheckFinalReturn(PN_LAST(pn3));        }        /* If a final switch has no default case, we judge it harshly. */        ok &= hasDefault;        return ok;#endif /* JS_HAS_SWITCH_STATEMENT */      case TOK_WITH:        return CheckFinalReturn(pn->pn_right);      case TOK_RETURN:        return JS_TRUE;#if JS_HAS_EXCEPTIONS      case TOK_THROW:        return JS_TRUE;      case TOK_TRY:        /* If we have a finally block that returns, we are done. */        if (pn->pn_kid3 && CheckFinalReturn(pn->pn_kid3))            return JS_TRUE;        /* Else check the try block and any and all catch statements. */        ok = CheckFinalReturn(pn->pn_kid1);        if (pn->pn_kid2)            ok &= CheckFinalReturn(pn->pn_kid2);        return ok;      case TOK_CATCH:        /* Check this block's code and iterate over further catch blocks. */        ok = CheckFinalReturn(pn->pn_kid3);        for (pn2 = pn->pn_kid2; pn2; pn2 = pn2->pn_kid2)            ok &= CheckFinalReturn(pn2->pn_kid3);        return ok;#endif      default:        return JS_FALSE;    }}