pike.git / src / pike_types.c

version» Context lines:

pike.git/src/pike_types.c:2614:    case T_FUNCTION:       case T_STRING:    case T_TYPE:    case T_INT:    case T_FLOAT:    return t->type;    }   }    + int get_int_type_range(struct pike_type *t, INT_TYPE *range) + { +  int ret = 0; +  loop: +  switch(t->type) { +  case T_INT: +  { +  INT_TYPE min = CAR_TO_INT(t); +  INT_TYPE max = CDR_TO_INT(t); +  if (range[0] > min) range[0] = min; +  if (range[1] < max) range[1] = max; +  return 1; +  } +  break; +  case T_ZERO: +  case T_VOID: +  if (range[0] > 0) range[0] = 0; +  if (range[1] < 0) range[1] = 0; +  return 1; +  case T_SCOPE: +  case T_ASSIGN: +  case PIKE_T_NAME: +  case PIKE_T_ATTRIBUTE: +  t = t->cdr; +  goto loop; +  case T_OR: +  case T_AND: +  ret = get_int_type_range(t->car, range); +  t = t->cdr; +  goto loop; +  default: +  break; +  } +  return ret; + } +    static void low_or_pike_types(struct pike_type *t1,    struct pike_type *t2,    int zero_implied);      /* Push either t1, t2 or the OR of t1 and t2.    * Returns -1 if t1 was pushed.    * 0 if the OR was pushed. (Successful join)    * 1 if t2 was pushed.    *    * zero_implied: One of: