pike.git / src / pike_types.cmod

version» Context lines:

pike.git/src/pike_types.cmod:5271:    goto loop;       case TWOT(T_FUNCTION, T_OBJECT):    case TWOT(T_MANY, T_OBJECT):    case TWOT(T_PROGRAM, T_OBJECT):    case TWOT(PIKE_T_TRANSITIVE, T_OBJECT):    b = low_object_lfun_type(b, LFUN_CALL);    if (!b) return NULL;    goto loop;    -  case TWOT(PIKE_T_TRANSITIVE, T_FUNCTION): +     case TWOT(PIKE_T_TRANSITIVE, T_MANY): -  +  if (op == PT_BINOP_AND) { +  type_stack_mark(); +  tmp = low_type_binop(op, a->cdr, b, NULL, aflags, bflags, remap_flags); +  push_finished_type(tmp); +  free_type(tmp); +  tmp = low_type_binop(op, a->car, b, remap, aflags, bflags, remap_flags); +  push_finished_type(tmp); +  free_type(tmp); +  push_type(PIKE_T_TRANSITIVE); +  return pop_unfinished_type(); +  } +  /* FALLTHRU */ +  case TWOT(PIKE_T_TRANSITIVE, T_FUNCTION):    case TWOT(PIKE_T_TRANSITIVE, T_PROGRAM): -  case TWOT(PIKE_T_TRANSITIVE, PIKE_T_TRANSITIVE): +     tmp = expand_transitive(a, NULL, 0);    ret = low_type_binop(op, tmp, b, remap, aflags, bflags, remap_flags);    free_type(tmp);    return ret;    -  case TWOT(T_FUNCTION, PIKE_T_TRANSITIVE): +     case TWOT(T_MANY, PIKE_T_TRANSITIVE): -  +  if (op == PT_BINOP_AND) { +  type_stack_mark(); +  tmp = low_type_binop(op, a, b->cdr, NULL, aflags, bflags, remap_flags); +  push_finished_type(tmp); +  free_type(tmp); +  tmp = low_type_binop(op, a, b->car, remap, aflags, bflags, remap_flags); +  push_finished_type(tmp); +  free_type(tmp); +  push_type(PIKE_T_TRANSITIVE); +  return pop_unfinished_type(); +  } +  /* FALLTHRU */ +  case TWOT(T_FUNCTION, PIKE_T_TRANSITIVE):    case TWOT(T_PROGRAM, PIKE_T_TRANSITIVE):    tmp = expand_transitive(b, NULL, 0);    ret = low_type_binop(op, a, tmp, remap, aflags, bflags, remap_flags);    free_type(tmp);    return ret;    -  +  case TWOT(PIKE_T_TRANSITIVE, PIKE_T_TRANSITIVE): +  /* FIXME: Is there a better approach? */ +  tmp = expand_transitive(a, NULL, 0); +  ret = low_type_binop(op, tmp, b, remap, aflags, bflags, remap_flags); +  free_type(tmp); +  return ret; +     case TWOT(T_FUNCTION, PIKE_T_OPERATOR):    case TWOT(PIKE_T_OPERATOR, T_FUNCTION):    type_stack_mark();    push_finished_type(b);    push_finished_type(a);    push_binop(op);    return pop_unfinished_type();       case TWOT(T_FUNCTION, T_FUNCTION):    case TWOT(T_FUNCTION, T_MANY):