pike.git / src / pike_types.cmod

version» Context lines:

pike.git/src/pike_types.cmod:5297:    /*    * NB: At this point a and b are basic types.    */       /* Check implicit casting. */    switch(TWOT(a->type & PIKE_T_MASK, b->type & PIKE_T_MASK)) {    case TWOT(T_PROGRAM, T_TYPE):    case TWOT(T_PROGRAM, T_PROGRAM):    case TWOT(T_PROGRAM, T_FUNCTION):    case TWOT(T_PROGRAM, T_MANY): +  case TWOT(T_PROGRAM, PIKE_T_TRANSITIVE):    aret = a->car;    a = low_object_lfun_type(aret, LFUN_CREATE);    if (!a) {    a = void_function_type_string;    }    goto loop;       case TWOT(T_FUNCTION, T_PROGRAM):    case TWOT(T_MANY, T_PROGRAM): -  +  case TWOT(PIKE_T_TRANSITIVE, T_PROGRAM):    bret = b->car;    b = low_object_lfun_type(bret, LFUN_CREATE);    if (!b) {    b = void_function_type_string;    }    goto loop;       case TWOT(T_OBJECT, T_FUNCTION):    case TWOT(T_OBJECT, T_MANY):    case TWOT(T_OBJECT, T_PROGRAM):
pike.git/src/pike_types.cmod:5347:    if (tmp) {    push_finished_type(tmp);    free_type(tmp);    push_reverse_type(PIKE_T_TRANSITIVE);    }    }    return pop_unfinished_type();    }    /* FALLTHRU */    case TWOT(PIKE_T_TRANSITIVE, T_FUNCTION): -  case TWOT(PIKE_T_TRANSITIVE, T_PROGRAM): +     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_MANY, PIKE_T_TRANSITIVE):    if (op == PT_BINOP_AND) {    type_stack_mark();    tmp = low_type_binop(op, a, b->car, remap, aflags, bflags, remap_flags);    push_finished_type(tmp);
pike.git/src/pike_types.cmod:5371:    if (tmp) {    push_finished_type(tmp);    free_type(tmp);    push_reverse_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);