pike.git / src / pike_types.c

version» Context lines:

pike.git/src/pike_types.c:4860:    return mixed_type_string;       case T_MIXED:    if (pragmas & ID_STRICT_TYPES) {    yywarning("Indexing mixed.");    }    add_ref(mixed_type_string);    return mixed_type_string;       case T_INT: - #ifdef AUTO_BIGNUM +     /* Don't force Gmp.mpz to be loaded here since this function    * is called long before the master object is compiled...    * /Hubbe    */    p=get_auto_bignum_program_or_zero();    goto comefrom_int_index; - #endif +     case T_ZERO:    case T_TYPE:    case PIKE_T_RING:    case T_VOID:    case T_FLOAT:    return 0;       case T_OR:    {    struct pike_type *a,*b;
pike.git/src/pike_types.c:5383:       case T_MULTISET:    case T_MAPPING:    /* FIXME: Why -1 and not 0?    *    * - There were complaints when people got compilation errors    * for indexing operations that would always fail.    */    return low_match_types(type->car, index_type, 0) ? 1 : -1;    - #ifdef AUTO_BIGNUM +     case T_INT: - #endif +     case T_PROGRAM:    return !!low_match_types(string_type_string, index_type, 0);       case T_MIXED:    return 1;       default:    return 0;    }   }
pike.git/src/pike_types.c:6141:    if( current < min )    break;    }    if( max != MAX_INT32 )    {    if( current > max )    break;    }    res = 1;    } - #ifdef AUTO_BIGNUM +     /* FIXME: Objects that emulate integers? */    else if( TYPEOF(*sval) == PIKE_T_OBJECT )    {    if( is_bignum_object(sval->u.object) )    {    INT32 min = CAR_TO_INT( type );    INT32 max = CDR_TO_INT( type );    if( min != MIN_INT32 && max != MAX_INT32 )    {    struct svalue tmp;
pike.git/src/pike_types.c:6169: Inside #if defined(AUTO_BIGNUM)
   if( max != MAX_INT32 )    {    tmp.u.integer = max;    if( is_gt( sval, &tmp ) )    break;    }    }    res = 1;    }    } - #endif +     break;    default:    res = (type->type == TYPEOF(*sval));    break;    }    do_return:    if (flags & CALL_INVERTED_TYPES) return !res;    return res;   }   
pike.git/src/pike_types.c:7820:    push_type(T_ZERO);    push_type(T_ZERO);    }    push_type(T_MAPPING);    return pop_unfinished_type();       case T_OBJECT:    type_stack_mark();    if(s->u.object->prog)    { - #ifdef AUTO_BIGNUM +     if(is_bignum_object(s->u.object))    {    push_int_type(MIN_INT32, MAX_INT32);    }    else - #endif +     {    push_object_type(1, s->u.object->prog->id);    }    }else{    /* Destructed object */    push_type(T_ZERO);    }    return pop_unfinished_type();       case T_INT: