pike.git / src / pike_types.cmod

version» Context lines:

pike.git/src/pike_types.cmod:5317:    remap_flags ^ PT_FLAG_REMAP_SWAP_MARKERS);    push_type(T_NOT);    return pop_unfinished_type();    default:    add_ref(a);    return a;    }    }    }    -  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)) { +  /* NB: TWOT(T_INT, T_ZERO) and TWOT(T_ZERO, T_INT) have +  * been handled above. +  */ +  if (((a->type == T_ZERO) || (a->type == T_INT)) && +  (bflags & PT_FLAG_CMP_NULLABLE)) { +  /* FIXME: Only valid for AND and MINUS. */    b = zero_type_string; -  +  bflags &= ~PT_FLAG_CMP_NULLABLE;    goto recur;    } -  if ((b->type == T_INT) && (aflags & PT_FLAG_CMP_NULLABLE)) { +  if (((b->type == T_ZERO) || (b->type == T_INT)) && +  (aflags & PT_FLAG_CMP_NULLABLE)) { +  /* FIXME: Only valid for AND and MINUS. */ +  if (op == PT_BINOP_AND) {    a = zero_type_string; -  +  } +  aflags &= ~PT_FLAG_CMP_NULLABLE;    goto recur;    }       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);