[PATCH] Cleanup some remains from the obstack days.
Steven Bosscher
s.bosscher@student.tudelft.nl
Sun Apr 6 15:36:00 GMT 2003
Op zo 06-04-2003, om 16:56 schreef Steven Bosscher:
> This seemed like a nice cleanup. Deletes ~120 lines.
I should of course attach the correct patch...
> Index: bitmap.c
> ===================================================================
> RCS file: /cvs/gcc/gcc/gcc/bitmap.c,v
> retrieving revision 1.40
> diff -c -3 -p -r1.40 bitmap.c
> *** bitmap.c 25 Jan 2003 18:21:22 -0000 1.40
> --- bitmap.c 6 Apr 2003 14:36:44 -0000
> *************** bitmap_element_allocate (head)
> *** 125,153 ****
> if (!bitmap_obstack_init)
> {
> bitmap_obstack_init = TRUE;
> !
> ! /* Let particular systems override the size of a chunk. */
> ! #ifndef OBSTACK_CHUNK_SIZE
> ! #define OBSTACK_CHUNK_SIZE 0
> ! #endif
> ! /* Let them override the alloc and free routines too. */
> ! #ifndef OBSTACK_CHUNK_ALLOC
> ! #define OBSTACK_CHUNK_ALLOC xmalloc
> ! #endif
> ! #ifndef OBSTACK_CHUNK_FREE
> ! #define OBSTACK_CHUNK_FREE free
> ! #endif
> !
> #if !defined(__GNUC__) || (__GNUC__ < 2)
> #define __alignof__(type) 0
> #endif
> !
> ! obstack_specify_allocation (&bitmap_obstack, OBSTACK_CHUNK_SIZE,
> __alignof__ (bitmap_element),
> ! (void *(*) PARAMS ((long))) OBSTACK_CHUNK_ALLOC,
> ! (void (*) PARAMS ((void *))) OBSTACK_CHUNK_FREE);
> }
> !
> element = (bitmap_element *) obstack_alloc (&bitmap_obstack,
> sizeof (bitmap_element));
> }
> --- 125,141 ----
> if (!bitmap_obstack_init)
> {
> bitmap_obstack_init = TRUE;
> !
> #if !defined(__GNUC__) || (__GNUC__ < 2)
> #define __alignof__(type) 0
> #endif
> !
> ! obstack_specify_allocation (&bitmap_obstack, 0,
^
read "OBSTACK_CHUNK_SIZE" instead of "0" there.
> __alignof__ (bitmap_element),
> ! obstack_chunk_alloc,
> ! obstack_chunk_free);
> }
> !
> element = (bitmap_element *) obstack_alloc (&bitmap_obstack,
> sizeof (bitmap_element));
> }
More information about the Gcc-patches
mailing list