pike.git / src / pike_types.cmod

version» Context lines:

pike.git/src/pike_types.cmod:4952:       case TWOT(T_ZERO, T_VOID):    if (op & PT_BINOP_AND) {    /* Return zero. */    add_ref(a);    return a;    }    return NULL;       case TWOT(T_ZERO, T_INT): +  if (!(bflags & PT_FLAG_CMP_NULLABLE)) {    a = int0_type_string; -  +  }    break;       case TWOT(T_INT, T_ZERO): -  +  if (!(aflags & PT_FLAG_CMP_NULLABLE)) {    b = int0_type_string; -  +  }    break;       /* T_TYPE and T_PROGRAM are essentially the same thing. */    case TWOT(T_TYPE, T_TYPE):    case TWOT(T_TYPE, T_PROGRAM):    case TWOT(T_PROGRAM, T_TYPE):    case TWOT(T_PROGRAM, T_PROGRAM):    tmp = low_type_binop(op, a->car, b->car, remap,    0, 0, remap_flags);    if (!tmp) return NULL;
pike.git/src/pike_types.cmod:5060:       if (a->type != b->type) {    if ((a->type == T_VOID) && (bflags & PT_FLAG_CMP_VOIDABLE)) {    b = a;    goto recur;    }    if ((b->type == T_VOID) && (aflags & PT_FLAG_CMP_VOIDABLE)) {    a = b;    goto recur;    } +  +  if (b->type == T_MIXED) { +  /* NB: a being void has been handled above. */ +  if (op == PT_BINOP_MINUS) return NULL; +  return remap_markers(a, NULL, remap, remap_flags); +  } +  if (a->type == T_MIXED) { +  type_stack_mark(); +  push_remap_markers(b, NULL, remap, +  remap_flags ^ PT_FLAG_REMAP_SWAP_MARKERS); +  if (op == PT_BINOP_MINUS) { +  push_type(T_NOT); +  } +  return pop_unfinished_type(); +  } +     if ((a->type == T_ZERO) && (bflags & PT_FLAG_CMP_NULLABLE)) {    b = a;    goto recur;    }    if ((b->type == T_ZERO) && (aflags & PT_FLAG_CMP_NULLABLE)) {    a = b;    goto recur;    }    if ((a->type == T_INT) && (bflags & PT_FLAG_CMP_NULLABLE)) {    b = zero_type_string;    goto recur;    }    if ((b->type == T_INT) && (aflags & PT_FLAG_CMP_NULLABLE)) {    a = zero_type_string;    goto recur;    }    -  if (b->type == T_MIXED) { -  /* NB: a being void has been handled above. */ -  if (op == PT_BINOP_MINUS) return NULL; -  return remap_markers(a, NULL, remap, remap_flags); -  } -  if (a->type == T_MIXED) { -  type_stack_mark(); -  push_remap_markers(b, NULL, remap, -  remap_flags ^ PT_FLAG_REMAP_SWAP_MARKERS); -  if (op == PT_BINOP_MINUS) { -  push_type(T_NOT); -  } -  return pop_unfinished_type(); -  } -  +     if (((a->type & PIKE_T_MASK) == PIKE_T_OPERATOR) ||    ((b->type & PIKE_T_MASK) == PIKE_T_OPERATOR)) {    type_stack_mark();    push_remap_markers(b, NULL, remap,    remap_flags ^ PT_FLAG_REMAP_SWAP_MARKERS);    push_remap_markers(a, NULL, remap, remap_flags);    push_binop(op);    return pop_unfinished_type();    }    /* NB: We know that a and b do not intersect, so the operations