pike.git / src / pike_types.cmod

version» Context lines:

pike.git/src/pike_types.cmod:4927:    case PIKE_T_NAME:    tmp = low_type_binop(op, a->cdr, b, remap, aflags, bflags, remap_flags);    if (!tmp) return NULL;    if (tmp != a->cdr) return tmp;    type_stack_mark();    push_finished_type(tmp);    push_type_name((struct pike_string *)(a->car));    free_type(tmp);    return pop_unfinished_type();    case PIKE_T_ATTRIBUTE: +  if (b && (b->type == PIKE_T_ATTRIBUTE) && (b->car == a->car)) { +  /* Types a and b have the same attribute. +  * +  * Do NOT call pop_type_attribute() (or push_type_attribute()) +  * in this case. +  */ +  tmp = low_type_binop(op, a->cdr, b->cdr, remap, +  aflags, bflags, remap_flags); +  if (!tmp) { +  return NULL; +  } +  } else {    tmp = low_type_binop(op, a->cdr, b, remap, aflags, bflags, remap_flags); -  +     if (!tmp) {    if (c && (op == PT_BINOP_MINUS)) {    ref_push_string((struct pike_string *)a->car);    ref_push_type_value(a->cdr);    ref_push_type_value(b);    safe_apply_current2(PC_POP_TYPE_ATTRIBUTE_FUN_NUM, 3,    "pop_type_attribute");    if ((TYPEOF(Pike_sp[-1]) == T_INT) &&    (SUBTYPEOF(Pike_sp[-1]) == NUMBER_NUMBER) &&    (!Pike_sp[-1].u.integer)) {    /* Forced mismatch. */    pop_stack();    return remap_markers(a, remap, remap_flags);    }    pop_stack();    }    return NULL;    } -  +  }       type_stack_mark();    push_finished_type(tmp); - #if 0 +  if (op == PT_BINOP_AND) {    push_type_attribute((struct pike_string *)(a->car)); - #endif +  }    free_type(tmp); -  +     return pop_unfinished_type();    case T_SCOPE:    tmp = low_type_binop(op, a->cdr, b, remap,    aflags | PT_FLAG_CMP_INSEPARABLE, bflags,    remap_flags);    if (!tmp) return NULL;    type_stack_mark();    push_finished_type(tmp);    push_scope_type(CAR_TO_INT(a));    free_type(tmp);
pike.git/src/pike_types.cmod:4998:    pop_stack();    return remap_markers(a, remap, remap_flags);    }    pop_stack();    }    return NULL;    }       type_stack_mark();    push_finished_type(tmp); - #if 0 +  if (op == PT_BINOP_AND) {    push_type_attribute((struct pike_string *)(b->car)); - #endif +  }    free_type(tmp); -  +     return pop_unfinished_type();    case T_SCOPE:    tmp = low_type_binop(op, a, b->cdr, remap,    aflags, bflags | PT_FLAG_CMP_INSEPARABLE,    remap_flags);    if (!tmp) return NULL;    type_stack_mark();    push_finished_type(tmp);    push_scope_type(CAR_TO_INT(b));    free_type(tmp);