pike.git / src / pike_types.c

version» Context lines:

pike.git/src/pike_types.c:1:   /*   || This file is part of Pike. For copyright information see COPYRIGHT.   || Pike is distributed under GPL, LGPL and MPL. See the file COPYING   || for more information. - || $Id: pike_types.c,v 1.304 2007/05/01 11:41:12 grubba Exp $ + || $Id: pike_types.c,v 1.305 2007/05/02 17:43:32 grubba Exp $   */      #include "global.h"   #include <ctype.h>   #include "svalue.h"   #include "pike_types.h"   #include "stralloc.h"   #include "stuff.h"   #include "array.h"   #include "program.h"
pike.git/src/pike_types.c:217:    * RING type type    * TUPLE type type    * MAPPING index type value type    * OR type (not OR) type    * AND type type    * ARRAY type -    * MULTISET type -    * NOT type -    * '0'-'9' - -    * FLOAT - - -  * STRING bitwidth (int) - Width added in 7.7 +  * STRING ZERO, INT or OR - Range added in 7.7    * TYPE type -    * PROGRAM type -    * MIXED - -    * VOID - -    * ZERO - -    * UNKNOWN - -    * INT min (int) max (int)    * OBJECT implements/is object id(int)    *    * Note that the cdr of a FUNCTION is a valid FUNCTION for the rest of
pike.git/src/pike_types.c:294:    /* Free car & cdr */    free_type(car);    t = (struct pike_type *)debug_malloc_pass(cdr);    goto loop;       case T_ARRAY:    case T_MULTISET:    case T_NOT:    case T_TYPE:    case T_PROGRAM: +  case T_STRING:    /* Free car */    t = (struct pike_type *)debug_malloc_pass(car);    goto loop;       case T_SCOPE:    case T_ASSIGN:    /* Free cdr */    t = (struct pike_type *)debug_malloc_pass(cdr);    goto loop;   
pike.git/src/pike_types.c:322: Inside #if defined(PIKE_DEBUG)
   case '1':    case '2':    case '3':    case '4':    case '5':    case '6':    case '7':    case '8':    case '9':    case T_FLOAT: -  case T_STRING: +     case T_MIXED:    case T_VOID:    case T_ZERO:    case PIKE_T_UNKNOWN:    case T_INT:    case T_OBJECT:    break;       default:    Pike_fatal("free_type(): Unhandled type-node: %d\n", type);
pike.git/src/pike_types.c:454:    /* Free car & cdr */    free_type((struct pike_type *)debug_malloc_pass(car));    free_type((struct pike_type *)debug_malloc_pass(cdr));    break;       case T_ARRAY:    case T_MULTISET:    case T_NOT:    case T_TYPE:    case T_PROGRAM: +  case T_STRING:    /* Free car */    free_type((struct pike_type *)debug_malloc_pass(car));    break;       case T_SCOPE:    case T_ASSIGN:    /* Free cdr */    free_type((struct pike_type *)debug_malloc_pass(cdr));    break;   
pike.git/src/pike_types.c:482: Inside #if defined(PIKE_DEBUG)
   case '1':    case '2':    case '3':    case '4':    case '5':    case '6':    case '7':    case '8':    case '9':    case T_FLOAT: -  case T_STRING: +     case T_MIXED:    case T_VOID:    case T_ZERO:    case PIKE_T_UNKNOWN:    case T_INT:    case T_OBJECT:    break;       default:    Pike_fatal("mk_type(): Unhandled type-node: %d\n", type);
pike.git/src/pike_types.c:551: Inside #if defined(DEBUG_MALLOC)
   case PIKE_T_RING:    debug_malloc_pass(car);    debug_malloc_pass(cdr);    break;       case T_ARRAY:    case T_MULTISET:    case T_NOT:    case T_TYPE:    case T_PROGRAM: +  case T_STRING:    debug_malloc_pass(car);    break;       case T_ASSIGN:    t->flags |= PT_FLAG_ASSIGN_0 << PTR_TO_INT(car);    /* FALL_THROUGH */    case T_SCOPE:    debug_malloc_pass(cdr);    break;   
pike.git/src/pike_types.c:578: Inside #if defined(DEBUG_MALLOC)
   case '1':    case '2':    case '3':    case '4':    case '5':    case '6':    case '7':    case '8':    case '9':    case T_FLOAT: -  case T_STRING: +     case T_MIXED:    case T_VOID:    case T_ZERO:    case PIKE_T_UNKNOWN:    case T_INT:    case T_OBJECT:    break;       default:    Pike_fatal("mk_type(): Unhandled type-node: %d\n", type);
pike.git/src/pike_types.c:677:    min, max);   #endif /* PIKE_DEBUG */       *(++Pike_compiler->type_stackp) = mk_type(T_INT,    (void *)(ptrdiff_t)min,    (void *)(ptrdiff_t)max, 0);       TYPE_STACK_DEBUG("push_int_type");   }    - void debug_push_string_type(INT32 bitwidth) - { -  if ((bitwidth < 0) || (bitwidth > 32)) { -  my_yyerror("Invalid string width: %ld (expected 0..32).", -  (long)bitwidth); -  bitwidth = 32; -  } -  -  *(++Pike_compiler->type_stackp) = mk_type(T_STRING, -  (void *)(ptrdiff_t)bitwidth, -  NULL, 0); -  -  TYPE_STACK_DEBUG("push_string_type"); - } -  +    void debug_push_object_type(int flag, INT32 id)   {    *(++Pike_compiler->type_stackp) = mk_type(T_OBJECT,    (void *)(ptrdiff_t)flag,    (void *)(ptrdiff_t)id, 0);       TYPE_STACK_DEBUG("push_object_type");   }      void debug_push_object_type_backwards(int flag, INT32 id)
pike.git/src/pike_types.c:875:    *(Pike_compiler->type_stackp+1),    *Pike_compiler->type_stackp,    PT_COPY_BOTH);    break;       case T_ARRAY:    case T_MULTISET:    case T_NOT:    case T_TYPE:    case T_PROGRAM: +  case T_STRING:    /* Make a new type of the top type, and put it in car. */    *Pike_compiler->type_stackp = mk_type(type,    *Pike_compiler->type_stackp, NULL,    PT_COPY_CAR);    break;       case T_SCOPE:    case T_ASSIGN:    case T_INT:    case T_OBJECT:    case PIKE_T_ATTRIBUTE:    case PIKE_T_NAME:    default:    /* Should not occur. */    Pike_fatal("Unsupported argument to push_type(): %d\n", type);    break;    -  case T_STRING: -  Pike_fatal("String types should not be created with push_type().\n"); -  break; -  +     case T_FLOAT:    case T_MIXED:    case T_VOID:    case T_ZERO:    case PIKE_T_UNKNOWN:    /* Leaf type. */    *(++Pike_compiler->type_stackp) = mk_type(type, NULL, NULL, 0);    break;       case '0':
pike.git/src/pike_types.c:962:    case PIKE_T_RING:    /* Both car & cdr. */    push_finished_type(top->cdr);    push_finished_type(top->car);    break;    case T_ARRAY:    case T_MULTISET:    case T_NOT:    case T_TYPE:    case T_PROGRAM: +  case T_STRING:    /* car */    push_finished_type(top->car);    break;    case T_SCOPE:    case T_ASSIGN:    /* cdr */    push_finished_type(top->cdr);    break;    case T_INT:    case T_OBJECT:    case T_FLOAT: -  case T_STRING: +     case T_MIXED:    case T_VOID:    case T_ZERO:    case PIKE_T_UNKNOWN:    case '0':    case '1':    case '2':    case '3':    case '4':    case '5':
pike.git/src/pike_types.c:1263:    push_type(T_OR);    }    if (field & BIT_PROGRAM) {    push_object_type(0, 0);    push_type(T_PROGRAM);    push_type(T_OR);    }    }    if (field & BIT_BASIC) {    if (field & BIT_STRING) { -  push_string_type(32); +  push_int_type(MIN_INT32, MAX_INT32); +  push_type(T_STRING);    push_type(T_OR);    }    if (field & BIT_TYPE) {    push_type(T_MIXED);    push_type(T_TYPE);    push_type(T_OR);    }    if (field & BIT_INT) {    push_int_type(MIN_INT32, MAX_INT32);    push_type(T_OR);
pike.git/src/pike_types.c:1502:    break;    }    goto bad_type;          case 's':    if(!strcmp(buf,"string")) {    while(ISSPACE(**s)) ++*s;    if(**s == '(')    { -  INT32 bitwidth; +  INT32 min,max;    ++*s;    while(ISSPACE(**s)) ++*s; -  bitwidth=STRTOL((const char *)*s,(char **)s,0); +  if (**s != '.') { +  min=STRTOL((const char *)*s,(char **)s,0);    while(ISSPACE(**s)) ++*s; -  +  } else { +  min = MIN_INT32; +  } +  if(s[0][0]=='.' && s[0][1]=='.') +  s[0]+=2; +  else { +  yyerror("Missing .. in integer type."); +  } +  +  while(ISSPACE(**s)) ++*s; +  if (**s != ')') { +  max=STRTOL((const char *)*s,(char **)s,0); +  while(ISSPACE(**s)) ++*s; +  } else { +  max = MAX_INT32; +  }    if(**s != ')') yyerror("Missing ')' in string width.");    else    ++*s; -  push_string_type(bitwidth); +  push_int_type(min, max);    } else { -  push_string_type(32); +  push_finished_type(int_type_string);    } -  +  push_type(T_STRING);    break;    }    goto bad_type;       case 'v':    if(!strcmp(buf,"void")) { push_type(T_VOID); break; }    goto bad_type;       case 't':    if (!strcmp(buf,"tuple"))
pike.git/src/pike_types.c:1856:    INT32 min = CAR_TO_INT(s);    INT32 max = CDR_TO_INT(s);    fprintf(stderr, "int");    if(min!=MIN_INT32 || max!=MAX_INT32)    fprintf(stderr, "(%ld..%ld)",(long)min,(long)max);    break;    }    case T_FLOAT: fprintf(stderr, "float"); break;    case T_STRING:    { -  INT32 bitwidth = CAR_TO_INT(s); -  if (bitwidth != 32) { -  fprintf(stderr, "string(%d)", bitwidth); -  } else { +  INT32 min; +  INT32 max; +  s = s->car;    fprintf(stderr, "string"); -  +  if (s->type == T_ZERO) { +  fprintf(stderr, "(zero)"); +  } else if (s != int_type_string) { +  fprintf(stderr, "("); +  while (s->type == T_OR) { + #ifdef PIKE_DEBUG +  if (s->car->type != T_INT) { +  Pike_fatal("Invalid node type (%d:%s) in string type.\n", +  s->car->type, get_name_of_type(s->car->type));    } -  + #endif /* PIKE_DEBUG */ +  min = CAR_TO_INT(s->car); +  max = CDR_TO_INT(s->car); +  if (min != MIN_INT32) { +  fprintf(stderr, "%d", min); +  } +  fprintf(stderr, ".."); +  if (max != MAX_INT32) { +  fprintf(stderr, "%d", max); +  } +  fprintf(stderr, " | "); +  s = s->cdr; +  } + #ifdef PIKE_DEBUG +  if (s->type != T_INT) { +  Pike_fatal("Invalid node type (%d:%s) in string type.\n", +  s->type, get_name_of_type(s->type)); +  } + #endif /* PIKE_DEBUG */ +  min = CAR_TO_INT(s); +  max = CDR_TO_INT(s); +  if (min != MIN_INT32) { +  fprintf(stderr, "%d", min); +  } +  fprintf(stderr, ".."); +  if (max != MAX_INT32) { +  fprintf(stderr, "%d", max); +  } +  fprintf(stderr, ")"); +  }    break;    }    case T_TYPE:    fprintf(stderr, "type(");    simple_describe_type(s->car);    fprintf(stderr, ")");    break;    case T_PROGRAM:    fprintf(stderr, "program(");    simple_describe_type(s->car);
pike.git/src/pike_types.c:2055:    CDR_TO_INT(t));    my_strcat(buffer);    }    }else{    my_strcat("object");    }    break;       case T_STRING:    { -  INT32 bitwidth=CAR_TO_INT(t); +  INT32 min; +  INT32 max; +  t = t->car;    my_strcat("string"); -  if (bitwidth != 32) { -  sprintf(buffer,"(%ld)",(long)bitwidth); +  if (t->type == T_ZERO) { +  my_strcat("(zero)"); +  } else if (t != int_type_string) { +  my_strcat("("); +  while (t->type == T_OR) { + #ifdef PIKE_DEBUG +  if (t->car->type != T_INT) { +  Pike_fatal("Invalid node type (%d:%s) in string type.\n", +  t->car->type, get_name_of_type(t->car->type)); +  } + #endif /* PIKE_DEBUG */ +  min = CAR_TO_INT(t->car); +  max = CDR_TO_INT(t->car); +  if (min != MIN_INT32) { +  sprintf(buffer, "%d", min);    my_strcat(buffer);    } -  +  my_strcat(".."); +  if (max != MAX_INT32) { +  sprintf(buffer, "%d", max); +  my_strcat(buffer); +  } +  my_strcat(" | "); +  t = t->cdr; +  } + #ifdef PIKE_DEBUG +  if (t->type != T_INT) { +  Pike_fatal("Invalid node type (%d:%s) in string type.\n", +  t->type, get_name_of_type(t->type)); +  } + #endif /* PIKE_DEBUG */ +  min = CAR_TO_INT(t); +  max = CDR_TO_INT(t); +  if (min != MIN_INT32) { +  sprintf(buffer, "%d", min); +  my_strcat(buffer); +  } +  my_strcat(".."); +  if (max != MAX_INT32) { +  sprintf(buffer, "%d", max); +  my_strcat(buffer); +  } +  my_strcat(")"); +  }    break;    }    case T_TYPE:    my_strcat("type(");    my_describe_type(t->car);    my_strcat(")");    break;       case PIKE_T_NAME:    if (!((struct pike_string *)t->car)->size_shift) {
pike.git/src/pike_types.c:2274: Inside #if defined (PIKE_DEBUG) || defined (DO_PIKE_CLEANUP)
   case PIKE_T_ATTRIBUTE:    case PIKE_T_NAME:    debug_gc_check (t->car, " as car in a type");    debug_gc_check (t->cdr, " as cdr in a type");    break;    case T_ARRAY:    case T_MULTISET:    case T_NOT:    case T_TYPE:    case T_PROGRAM: +  case T_STRING:    debug_gc_check (t->car, " as car in a type");    break;    case T_SCOPE:    case T_ASSIGN:    debug_gc_check (t->cdr, " as cdr in a type");    break;   #ifdef PIKE_DEBUG    case '0':    case '1':    case '2':    case '3':    case '4':    case '5':    case '6':    case '7':    case '8':    case '9':    case T_FLOAT: -  case T_STRING: +     case T_MIXED:    case T_VOID:    case T_ZERO:    case PIKE_T_UNKNOWN:    case T_INT:    case T_OBJECT:    break;    default:    Pike_fatal("debug_gc_check_all_types: "    "Unhandled type-node: %d\n", t->type);
pike.git/src/pike_types.c:2511:    if (CAR_TO_INT(t1) < CAR_TO_INT(t2)) {    t = t1;    ret = -1;    } else {    t = t2;    ret = 1;    }    break;    case T_STRING:    { -  INT32 w1 = CAR_TO_INT(t1); -  INT32 w2 = CAR_TO_INT(t2); -  if (w1 >= w2) { -  t = t1; -  } else { -  t = t2; +  switch(lower_or_pike_types(t1->car, t2->car, 1, 0)) { +  case 0: break; +  case 1: +  push_finished_type(t1->car); +  push_type(T_OR); +  break; +  case -1: +  push_finished_type(t2->car); +  push_type(T_OR); +  break;    } -  +  push_type(T_STRING); +  return 0;    }    break;    case T_OBJECT:    if (!CDR_TO_INT(t1)) {    t = t1;    } else if (!CDR_TO_INT(t2)) {    t = t2;    } else if (CDR_TO_INT(t1) < CDR_TO_INT(t2)) {    t = t1;    ret = -1;
pike.git/src/pike_types.c:2620:    /* Overlap */    min1 = MINIMUM(min1, min2);    max1 = MAXIMUM(max1, max2);       push_int_type(min1, max1);    }    }    break;    case T_STRING:    { -  INT32 w1 = CAR_TO_INT(t); -  INT32 w2 = CAR_TO_INT(top); -  if (w1 >= w2) { +     Pike_compiler->type_stackp--; -  +  switch(lower_or_pike_types(t->car, top->car, 1, 0)) { +  case 0: break; +  case 1: +  push_finished_type(t->car); +  push_type(T_OR); +  break; +  case -1: +  push_finished_type(top->car); +  push_type(T_OR); +  break; +  } +  push_type(T_STRING);    free_type(top); -  push_finished_type(t); +     } -  } +     break;    case T_OBJECT:    if (CDR_TO_INT(top)) {    push_finished_type(t);    }    break;    case T_ARRAY:    case T_MULTISET:    Pike_compiler->type_stackp--;    low_or_pike_types(t->car, top->car, zero_implied);
pike.git/src/pike_types.c:2841:    upper_bound = MINIMUM(i1,i2);       i1 = CAR_TO_INT(t1);    i2 = CAR_TO_INT(t2);    lower_bound = MAXIMUM(i1,i2);       if (upper_bound >= lower_bound) {    push_int_type(lower_bound, upper_bound);    push_type(T_OR);    } +  } else if (t1->type == T_STRING) { +  push_type(T_ZERO); +  even_lower_and_pike_types(t1->car, t2->car); +  push_type(T_STRING); +  push_type(T_OR);    } else {    push_finished_type(t1);    push_type(T_OR);    }    }   }      static int lower_and_pike_types(struct pike_type *t1, struct pike_type *t2)   {    int is_complex = 0;
pike.git/src/pike_types.c:2871:    case T_FLOAT:    case T_INT:    even_lower_and_pike_types(t1, t2);    break;    default:    return 1;    }    return is_complex;   }    + /* FIXME: T_STRING! */   static int low_and_push_complex_pike_type(struct pike_type *type)   {    int is_complex = 0;    while(type->type == T_OR)    {    int new_complex;    new_complex = low_and_push_complex_pike_type(type->car);    if (new_complex) {    if (is_complex) {    push_type(T_OR);
pike.git/src/pike_types.c:2905:    default:    push_finished_type(type);    if (is_complex) {    push_type(T_OR);    }    return 1;    }    return is_complex;   }    + /* FIXME: T_STRING! */   static void low_and_pike_types(struct pike_type *t1,    struct pike_type *t2)   {    if(!t1 || t1->type == T_VOID ||    !t2 || t2->type == T_VOID)    {    push_type(T_VOID);    }    else if(t1->type == T_ZERO ||    t2->type == T_ZERO)
pike.git/src/pike_types.c:2965:    low_and_pike_types(t1->cdr, t2);    push_scope_type(CAR_TO_INT(t1));    }    }    else if (t2->type == T_SCOPE)    {    low_and_pike_types(t1, t2->cdr);    push_scope_type(CAR_TO_INT(t2));    }    else if ((t1->type == T_STRING) && (t2->type == T_STRING)) { -  INT32 w1, w2; -  w1 = CAR_TO_INT(t1); -  w2 = CAR_TO_INT(t2); -  if (w1 < w2) { -  push_finished_type(t1); -  } else { -  push_finished_type(t2); +  low_and_pike_types(t1->car, t2->car); +  push_type(T_STRING);    } -  } +     else if((t1->type == T_FLOAT) && (t2->type == T_FLOAT))    {    push_finished_type(t1);    }    else if(low_pike_types_le(t1, t2, 0, 0))    {    push_finished_type(t1);    }    else if(low_pike_types_le(t2, t1, 0, 0))    {
pike.git/src/pike_types.c:3566:       if(amin > bmax || bmin > amax) return 0;    break;    }          case T_PROGRAM:    case T_TYPE:    case T_MULTISET:    case T_ARRAY: +  case T_STRING:    if(!low_match_types(a->car, b->car,    flags & ~(A_EXACT|B_EXACT))) return 0;       case T_FLOAT: -  case T_STRING: +     case T_ZERO:    case T_VOID:    case T_MIXED:    break;       default:    Pike_fatal("Error in type string.\n");    }    return ret;   }
pike.git/src/pike_types.c:4178:       if(amin < bmin || amax > bmax) return 0;    break;    }          case T_TYPE:    case T_PROGRAM:    case T_MULTISET:    case T_ARRAY: +  case T_STRING:    a = a->car;    b = b->car;    array_cnt = 0;    goto recurse;    -  case T_STRING: -  { -  INT32 awidth = CAR_TO_INT(a); -  INT32 bwidth = CAR_TO_INT(b); -  return awidth <= bwidth; -  } -  +     case T_FLOAT:    case T_ZERO:    case T_VOID:    case T_MIXED:    break;       default:    Pike_fatal("Error in type string.\n");    }    return 1;
pike.git/src/pike_types.c:4480:    free_type(b);    return pop_unfinished_type();    }       case T_AND:    /* FIXME: Shouldn't both branches be looked at? */    return low_index_type(t->cdr, index_type, n);       case T_STRING: /* always int */    { -  int width = CAR_TO_INT(t); -  if (width != 32) { -  /* Narrow string */ -  type_stack_mark(); -  push_int_type(0, (1<<width)-1); -  return pop_unfinished_type(); +  if (t->car->type == T_ZERO) { +  yywarning("Indexing the empty string.");    } -  +  add_ref(t->car); +  return t->car;    } -  /* FALL_THROUGH */ +     case T_MULTISET: /* always int */    add_ref(int_type_string);    return int_type_string;       case T_MAPPING:    add_ref(t = t->cdr);    return t;       case T_ARRAY:    {
pike.git/src/pike_types.c:4910:    return low_check_indexing(type->car, index_type, n) != 1;       case PIKE_T_NAME:    case PIKE_T_ATTRIBUTE:    return low_check_indexing(type->cdr, index_type, n);       case T_ARRAY:    if(low_match_types(string_type_string, index_type, 0) &&    low_check_indexing(type->car, index_type, n))    return 1; -  +  /* FALL_THROUGH */    case T_STRING:    return !!low_match_types(int_type_string, index_type, 0);       case T_OBJECT:    {    struct program *p = id_to_program(CDR_TO_INT(type));    if(p)    {    if(n->token == F_ARROW)    {
pike.git/src/pike_types.c:5422:    } else {    push_finished_type(zero_type_string);    }    push_type(soft_type->type);    res = pop_unfinished_type();    break;    case T_FLOAT:    copy_pike_type(res, soft_type);    break;    case T_STRING: -  if ((CAR_TO_INT(soft_type) <= CAR_TO_INT(orig_type)) == -  !(flags & SOFT_WEAKER)) { -  copy_pike_type(res, soft_type); -  } else { -  copy_pike_type(res, orig_type); -  } +  res = soft_cast(soft_type->car, orig_type->car, flags); +  if (!res) return NULL; +  type_stack_mark(); +  push_finished_type(res); +  free_type(res); +  push_type(T_STRING); +  res = pop_unfinished_type();    break;    case T_INT:    {    INT32 min, max;    if (flags & SOFT_WEAKER) {    if ((min = CAR_TO_INT(soft_type)) > CAR_TO_INT(orig_type)) {    min = CAR_TO_INT(orig_type);    }    if ((max = CDR_TO_INT(soft_type)) < CDR_TO_INT(orig_type)) {    max = CDR_TO_INT(orig_type);
pike.git/src/pike_types.c:6762:    case T_TYPE:    type_stack_mark();    push_finished_type(s->u.type);    push_type(T_TYPE);    return pop_unfinished_type();       case T_STRING:    type_stack_mark();    if (s->u.string->len) {    /* FIXME: Could be extended to detect 7-bit strings, etc. */ -  push_string_type(8<<s->u.string->size_shift); +  if (s->u.string->size_shift == 2) { +  push_int_type(MIN_INT32, MAX_INT32);    } else { -  push_string_type(0); +  push_int_type(0, (1<<(8 << s->u.string->size_shift)) - 1);    } -  +  } else { +  push_type(T_ZERO); +  } +  push_type(T_STRING);    return pop_unfinished_type();       default:    type_stack_mark();    push_type(s->type);    return pop_unfinished_type();    }   }      
pike.git/src/pike_types.c:7010:    case T_VOID:    case T_ZERO:    case PIKE_T_UNKNOWN:    /* Leaf type */    *cont = type_string+1;    push_type(type);    break;       case T_STRING:    *cont = type_string + 1; -  push_string_type(32); +  push_finished_type(int_type_string); +  push_type(T_STRING);    break;       case PIKE_T_NSTRING: -  *cont = type_string + 2; /* 1 + 1 */ -  /* FIXME: Add check for valid bitwidth (0..32). */ -  push_string_type(type_string[1]); +  low_make_pike_type(type_string + 1, cont); +  /* FIXME: Add check for valid subtype. */ +  push_type(T_STRING);    break;       case T_INT:    {    INT32 min = extract_type_int((char *)type_string+1);    INT32 max = extract_type_int((char *)type_string+5);       *cont = type_string + 9; /* 2*sizeof(INT32) + 1 */    push_int_type(min, max);    break;
pike.git/src/pike_types.c:7260:       my_putchar((i >> 24) & 0xff);    my_putchar((i >> 16) & 0xff);    my_putchar((i >> 8) & 0xff);    my_putchar(i & 0xff);    }    break;       case T_STRING:    { -  INT32 width = (INT32)CAR_TO_INT(t); -  if (width == 32) { +  if (t->car == int_type_string) {    my_putchar(T_STRING);    } else {    my_putchar(PIKE_T_NSTRING); -  my_putchar(width & 0xff); +  low_type_to_string(t->car);    }    }    break;       case T_INT:    {    INT32 i;    my_putchar(T_INT);    i = (INT32)CAR_TO_INT(t);    my_putchar((i >> 24) & 0xff);
pike.git/src/pike_types.c:7414:      void init_types(void)   {    /* Initialize hashtable here. */    pike_type_hash = (struct pike_type **)xalloc(sizeof(struct pike_type *) *    PIKE_TYPE_HASH_SIZE);    MEMSET(pike_type_hash, 0, sizeof(struct pike_type *) * PIKE_TYPE_HASH_SIZE);    pike_type_hash_size = PIKE_TYPE_HASH_SIZE;    init_pike_type_blocks();    +  int_type_string = CONSTTYPE(tInt); /* MUST come before string! */    string0_type_string = CONSTTYPE(tStr0);    string_type_string = CONSTTYPE(tStr32); -  int_type_string = CONSTTYPE(tInt); +     object_type_string = CONSTTYPE(tObj);    program_type_string = CONSTTYPE(tPrg(tObj));    float_type_string = CONSTTYPE(tFloat);    mixed_type_string = CONSTTYPE(tMix);    array_type_string = CONSTTYPE(tArray);    multiset_type_string = CONSTTYPE(tMultiset);    mapping_type_string = CONSTTYPE(tMapping);    function_type_string = CONSTTYPE(tFunction);    type_type_string = CONSTTYPE(tType(tMix));    void_type_string = CONSTTYPE(tVoid);