pike.git / src / pike_types.cmod

version» Context lines:

pike.git/src/pike_types.cmod:4569:    */    enum pt_cmp_flags avoidable = 0;    enum pt_cmp_flags bvoidable = 0;       /* Check the argument. */       /* NB: The MANY argument is always voidable. */    if (ai->type == T_MANY) avoidable |= PT_FLAG_CMP_VOIDABLE;    if (bi->type == T_MANY) bvoidable |= PT_FLAG_CMP_VOIDABLE;    +  /* FIXME: Only use implicit nullable for legacy types. */    tmp = low_type_binop(op, ai->car, bi->car, remap, -  avoidable, -  bvoidable, +  avoidable | PT_FLAG_CMP_NULLABLE, +  bvoidable | PT_FLAG_CMP_NULLABLE,    remap_flags);       if (remap_flags & PT_FLAG_REMAP_TRACE) {    fprintf(stderr, "got_empty: %d, got_full: %d\n"    "tmp: ",    got_empty, got_full);    simple_describe_type(tmp);    fprintf(stderr, "\n");    }   
pike.git/src/pike_types.cmod:5128:    }    return pop_unfinished_type();    }       case T_ARRAY:    case T_MAPPING:    case T_STRING:    tmp = low_type_binop(op, a->car, b->car, remap,    0, 0, remap_flags);    if (!tmp && (op == PT_BINOP_AND)) return NULL; +  if (a->type == T_STRING) {    tmp2 = low_type_binop(op, a->cdr, b->cdr, remap,    0, 0, remap_flags); -  +  } else { +  /* Mappings may always result in UNDEFINED on indexing. +  * Arrays are typically initialized to all zeroes. +  */ +  tmp2 = low_type_binop(op, a->cdr, b->cdr, remap, +  PT_FLAG_CMP_NULLABLE, +  PT_FLAG_CMP_NULLABLE, +  remap_flags); +  }    if (!tmp2) {    if (op == PT_BINOP_AND) {    free_type(tmp);    return NULL;    } else if (!tmp) {    return NULL;    }    }    type_stack_mark();    if (op == PT_BINOP_MINUS) {