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.205 2003/01/26 11:09:01 mirar Exp $ + || $Id: pike_types.c,v 1.206 2003/01/26 12:47:42 mirar Exp $   */      #include "global.h" - RCSID("$Id: pike_types.c,v 1.205 2003/01/26 11:09:01 mirar Exp $"); + RCSID("$Id: pike_types.c,v 1.206 2003/01/26 12:47:42 mirar Exp $");   #include <ctype.h>   #include "svalue.h"   #include "pike_types.h"   #include "stralloc.h"   #include "stuff.h"   #include "array.h"   #include "program.h"   #include "constants.h"   #include "object.h"   #include "multiset.h"
pike.git/src/pike_types.c:511:    TYPE_STACK_DEBUG("type_stack_pop_to_mark");   }      struct pike_type *debug_peek_type_stack(void)   {    return *(Pike_compiler->type_stackp);   }      void debug_push_int_type(INT_TYPE min, INT_TYPE max)   { + #if SIZEOF_INT_TYPE > 4 + /* a bit kludgy: should maybe really allow 64 bit INT_TYPE */ + /* see also extract_type_int */ +  if (min<MIN_INT32) min=MIN_INT32; +  else if (min>MAX_INT32) min=MAX_INT32; +  if (max<MIN_INT32) max=MIN_INT32; +  else if (max>MAX_INT32) max=MAX_INT32; +  + #if 0 +  if (min!=(INT32)min || +  max!=(INT32)max) +  Pike_fatal("push_int_type(): int outside INT32 range (sorry)" +  " (%"PRINTPIKEINT"d..%"PRINTPIKEINT"d)\n", +  min,max); + #endif + #endif +     *(++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_object_type(int flag, INT32 id)   {    *(++Pike_compiler->type_stackp) = mk_type(T_OBJECT,
pike.git/src/pike_types.c:4530:    if(!type_string[bytes+5] && !type_string[bytes+4] &&    !type_string[bytes+3] && !type_string[bytes+2])    break;    break;    case 6:    for(bytes=0; ; bytes+=4)    if(!type_string[bytes+2] && !type_string[bytes+3] &&    !type_string[bytes+4] && !type_string[bytes+5])    break;    break; +  default: /* will not happen? */ +  bytes=0; +  Pike_fatal("unexpected case in make_pike_type (%d)\n", +  type_string[1]);    }    str = begin_wide_shared_string(bytes>>size_shift, size_shift);    MEMCPY(str->str, type_string+2, bytes);    if (size_shift &&   #if (PIKE_BYTEORDER == 1234)    /* Little endian */    !(type_string[1] & 0x04)   #else /* PIKE_BYTEORDER != 1234 */    /* Big endian */    (type_string[1] & 0x04)