pike.git / src / pike_types.cmod

version» Context lines:

pike.git/src/pike_types.cmod:3765:      /**    * This function differs from low_object_lfun_type() above in    * that it handles more cases, falls back to the default lfun    * type (with a warning), and adds a reference to the returned    * type.    */   static struct pike_type *find_lfun_type(struct pike_type *t, int lfun)   {    struct pike_type *ret = NULL; +  struct pike_type *tmp;    struct svalue *s;       if (!t) return NULL;       loop:    switch(t->type) {    case PIKE_T_NAME:    case PIKE_T_ATTRIBUTE:    t = t->cdr;    goto loop;
pike.git/src/pike_types.cmod:3812:    t = t->car;    goto loop;       case T_FUNCTION:    case T_MANY:    t = t->cdr;    goto loop;       case T_OR:    case T_AND: +  ret = find_lfun_type(t->car, lfun); +  tmp = find_lfun_type(t->cdr, lfun); +  if (!ret) { +  if (!tmp) return NULL; +  if (t->type == T_AND) { +  free_type(tmp); +  } else { +  ret = tmp; +  } +  } else if (tmp) {    type_stack_mark(); -  push_finished_type(ret = find_lfun_type(t->car, lfun)); +  push_finished_type(ret);    free_type(ret); -  push_finished_type(ret = find_lfun_type(t->cdr, lfun)); -  free_type(ret); +  push_finished_type(tmp); +  free_type(tmp);    push_type(t->type);    return pop_unfinished_type(); -  +  } +  return ret;       case T_MIXED:    case T_ZERO:    case T_VOID:    break;       default:    ref_push_string(lfun_strings[lfun]);    yytype_report(REPORT_WARNING, NULL, 0, NULL,    NULL, 0, t,