rv = HasFinalReturn(pn->pn_kid2); if (pn->pn_kid3) rv &= HasFinalReturn(pn->pn_kid3); return rv;
if (!pn->pn_kid3) return ENDS_IN_OTHER; return HasFinalReturn(pn->pn_kid2) & HasFinalReturn(pn->pn_kid3);
HasFinalReturn(JSParseNode *pn){    uintN rv, rv2, hasDefault;    JSParseNode *pn2, *pn3;    switch (pn->pn_type) {      case TOK_LC:        if (!pn->pn_head)            return ENDS_IN_OTHER;        return HasFinalReturn(PN_LAST(pn));      case TOK_IF:        rv = HasFinalReturn(pn->pn_kid2);        if (pn->pn_kid3)            rv &= HasFinalReturn(pn->pn_kid3);        return rv;#if JS_HAS_SWITCH_STATEMENT      case TOK_SWITCH:        rv = ENDS_IN_RETURN;        hasDefault = ENDS_IN_OTHER;        for (pn2 = pn->pn_kid2->pn_head; rv && pn2; pn2 = pn2->pn_next) {            if (pn2->pn_type == TOK_DEFAULT)                hasDefault = ENDS_IN_RETURN;            pn3 = pn2->pn_right;            JS_ASSERT(pn3->pn_type == TOK_LC);            if (pn3->pn_head) {                rv2 = HasFinalReturn(PN_LAST(pn3));                if (rv2 == ENDS_IN_OTHER && pn2->pn_next)                    /* Falling through to next case or default. */;                else                    rv &= rv2;            }        }        /* If a final switch has no default case, we judge it harshly. */        rv &= hasDefault;        return rv;#endif /* JS_HAS_SWITCH_STATEMENT */      case TOK_BREAK:        return ENDS_IN_BREAK;      case TOK_WITH:        return HasFinalReturn(pn->pn_right);      case TOK_RETURN:        return ENDS_IN_RETURN;      case TOK_COLON:        return HasFinalReturn(pn->pn_expr);#if JS_HAS_EXCEPTIONS      case TOK_THROW:        return ENDS_IN_RETURN;      case TOK_TRY:        /* If we have a finally block that returns, we are done. */        if (pn->pn_kid3) {            rv = HasFinalReturn(pn->pn_kid3);            if (rv == ENDS_IN_RETURN)                return rv;        }        /* Else check the try block and any and all catch statements. */        rv = HasFinalReturn(pn->pn_kid1);        if (pn->pn_kid2)            rv &= HasFinalReturn(pn->pn_kid2);        return rv;      case TOK_CATCH:        /* Check this block's code and iterate over further catch blocks. */        rv = HasFinalReturn(pn->pn_kid3);        for (pn2 = pn->pn_kid2; pn2; pn2 = pn2->pn_kid2)            rv &= HasFinalReturn(pn2->pn_kid3);        return rv;#endif      default:        return ENDS_IN_OTHER;    }}