pike.git / src / pike_types.cmod

version» Context lines:

pike.git/src/pike_types.cmod:4612:    push_finished_type(tmp);    push_scope_type(CAR_TO_INT(b));    free_type(tmp);    return pop_unfinished_type();    }       /* Check consolidated types. */    switch(a?a->type:PIKE_T_UNKNOWN) {    case T_OR:    /* (a1 | a2) op b <==> (a1 op b) | (a2 op b) */ +  { +  struct mapping *orig_markers = NULL; +  if (remap) { +  /* Do not propagate marker changes between the branches +  * of the T_OR node. +  * +  * FIXME: It is theoretically possible to propagate marker +  * changes up if they are compatible in both branches. +  */ +  orig_markers = remap->markers; +  remap->markers = copy_mapping(orig_markers); +  }    tmp = low_type_binop(op, a->car, b, remap, aflags, bflags, remap_flags); -  +  if (remap) { +  do_free_mapping(remap->markers); +  remap->markers = copy_mapping(orig_markers); +  }    tmp2 = low_type_binop(op, a->cdr, b, remap, aflags, bflags, remap_flags); -  +  if (remap) { +  do_free_mapping(remap->markers); +  remap->markers = orig_markers; +  } +  }    if ((op & PT_BINOP_NOT_A) || (aflags & PT_FLAG_CMP_INSEPARABLE)) {    if (!tmp2) {    free_type(tmp);    return NULL;    }    if (!tmp) {    free_type(tmp2);    return NULL;    }    } else {
pike.git/src/pike_types.cmod:4683:    /* Rotate the opcode 2 bits.    *    * This converts A to ~A and vice versa.    */    op = ((op << 2) | (op >> 2)) & PT_BINOP_ALL;    return low_type_binop(op, a->car, b,    remap, aflags, bflags, remap_flags);    }    switch(b?b->type:PIKE_T_UNKNOWN) {    case T_OR: +  /* FIXME: Handle marker propagation. */    if ((op == PT_BINOP_MINUS) || (op == PT_BINOP_OR)) {    /* Special case to avoid excessively complicated expressions    * in the result.    *    * A - (B | C) == (A - B) - C    * rather than    * A - (B | C) == (A - B) & (A - C)    *    * A | (B | C) == (A | B) | C    * rather than