Ignore:
Timestamp:
Apr 27, 2004, 8:39:34 PM (21 years ago)
Author:
bird
Message:

GCC v3.3.3 sources.

Location:
branches/GNU/src/gcc
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/GNU/src/gcc

    • Property svn:ignore
      •  

        old new  
        2626configure.vr
        2727configure.vrs
         28dir.info
        2829Makefile
        29 dir.info
        3030lost+found
        3131update.out
  • branches/GNU/src/gcc/libobjc/gc.c

    • Property cvs2svn:cvs-rev changed from 1.1 to 1.1.1.2
    r1390 r1391  
    11/* Basic data types for Objective C.
    2    Copyright (C) 1998 Free Software Foundation, Inc.
     2   Copyright (C) 1998, 2002 Free Software Foundation, Inc.
    33   Contributed by Ovidiu Predescu.
    44
     
    5959
    6060#define ROUND(V, A) \
    61   ({ typeof(V) __v=(V); typeof(A) __a=(A); \
    62      __a*((__v+__a-1)/__a); })
     61  ({ typeof (V) __v = (V); typeof (A) __a = (A); \
     62     __a * ((__v+__a - 1)/__a); })
    6363
    6464#define SET_BIT_FOR_OFFSET(mask, offset) \
    65   GC_set_bit(mask, offset / sizeof (void*))
     65  GC_set_bit (mask, offset / sizeof (void *))
    6666
    6767/* Some prototypes */
     
    7575__objc_gc_setup_array (GC_bitmap mask, const char *type, int offset)
    7676{
    77   int i, len = atoi(type + 1);
    78 
    79   while (isdigit(*++type))
     77  int i, len = atoi (type + 1);
     78
     79  while (isdigit (*++type))
    8080    /* do nothing */;           /* skip the size of the array */
    8181
     
    139139      case _C_CHARPTR:
    140140      case _C_ATOM:
    141         if (!gc_invisible)
    142           SET_BIT_FOR_OFFSET(mask, position);
     141        if (! gc_invisible)
     142          SET_BIT_FOR_OFFSET (mask, position);
    143143        break;
    144144
     
    179179  align = objc_alignof_type (type);
    180180
    181   offset = ROUND(offset, align);
    182   for (i = 0; i < size; i += sizeof (void*))
    183     {
    184       SET_BIT_FOR_OFFSET(mask, offset);
    185       offset += sizeof (void*);
     181  offset = ROUND (offset, align);
     182  for (i = 0; i < size; i += sizeof (void *))
     183    {
     184      SET_BIT_FOR_OFFSET (mask, offset);
     185      offset += sizeof (void *);
    186186    }
    187187}
     
    224224      case _C_PTR:
    225225      case _C_CHARPTR:
    226         if (!gc_invisible)
    227           SET_BIT_FOR_OFFSET(mask, offset);
     226        if (! gc_invisible)
     227          SET_BIT_FOR_OFFSET (mask, offset);
    228228        break;
    229229
     
    255255{
    256256  int i, ivar_count;
    257   struct objc_ivar_list* ivars;
    258 
    259   if (!class)
     257  struct objc_ivar_list *ivars;
     258
     259  if (! class)
    260260    {
    261261      strcat (*type, "{");
     
    268268
    269269  ivars = class->ivars;
    270   if (!ivars)
     270  if (! ivars)
    271271    return;
    272272
     
    283283          /* Increase the size of the encoding string so that it
    284284             contains this ivar's type. */
    285           *size = ROUND(*current + len + 1, 10);
     285          *size = ROUND (*current + len + 1, 10);
    286286          *type = objc_realloc (*type, *size);
    287287        }
     
    303303  char *class_structure_type;
    304304
    305   if (!CLS_ISCLASS(class))
     305  if (! CLS_ISCLASS (class))
    306306    return;
    307307
     
    312312  /* The number of bits in the mask is the size of an instance in bytes divided
    313313     by the size of a pointer. */
    314   bits_no = (ROUND(class_get_instance_size (class), sizeof(void*))
    315              / sizeof (void*));
    316   size = ROUND(bits_no, BITS_PER_WORD) / BITS_PER_WORD;
     314  bits_no = (ROUND (class_get_instance_size (class), sizeof (void *))
     315             / sizeof (void *));
     316  size = ROUND (bits_no, BITS_PER_WORD) / BITS_PER_WORD;
    317317  mask = objc_atomic_malloc (size * sizeof (int));
    318318  memset (mask, 0, size * sizeof (int));
     
    343343#endif
    344344
    345   class->gc_object_type = (void*)GC_make_descriptor (mask, bits_no);
     345  class->gc_object_type = (void *) GC_make_descriptor (mask, bits_no);
    346346}
    347347
     
    371371   pointers.  */
    372372void
    373 class_ivar_set_gcinvisible (Class class, const char* ivarname,
     373class_ivar_set_gcinvisible (Class class, const char *ivarname,
    374374                            BOOL gc_invisible)
    375375{
    376376  int i, ivar_count;
    377   struct objc_ivar_list* ivars;
    378 
    379   if (!class || !ivarname)
     377  struct objc_ivar_list *ivars;
     378
     379  if (! class || ! ivarname)
    380380    return;
    381381
    382382  ivars = class->ivars;
    383   if (!ivars)
     383  if (! ivars)
    384384    return;
    385385
     
    391391      const char *type;
    392392
    393       if (!ivar->ivar_name || strcmp (ivar->ivar_name, ivarname))
     393      if (! ivar->ivar_name || strcmp (ivar->ivar_name, ivarname))
    394394        continue;
    395395
     
    408408          char *new_type;
    409409
    410           if (gc_invisible || !__objc_ivar_pointer (type))
     410          if (gc_invisible || ! __objc_ivar_pointer (type))
    411411            return;     /* The type of the variable already matches the
    412412                           requested gc_invisible type */
     
    423423          char *new_type;
    424424
    425           if (!gc_invisible || !__objc_ivar_pointer (type))
     425          if (! gc_invisible || ! __objc_ivar_pointer (type))
    426426            return;     /* The type of the variable already matches the
    427427                           requested gc_invisible type */
     
    447447
    448448void
    449 __objc_generate_gc_type_description (Class class)
    450 {
    451 }
    452 
    453 void class_ivar_set_gcinvisible (Class class,
    454                                  const char* ivarname,
    455                                  BOOL gc_invisible)
     449__objc_generate_gc_type_description (Class class __attribute__ ((__unused__)))
     450{
     451}
     452
     453void class_ivar_set_gcinvisible (Class class __attribute__ ((__unused__)),
     454                                 const char *ivarname __attribute__ ((__unused__)),
     455                                 BOOL gc_invisible __attribute__ ((__unused__)))
    456456{
    457457}
Note: See TracChangeset for help on using the changeset viewer.