[move slub.c and jhc_jgc.* to rts directory
John Meacham <john@repetae.net>**20120212040246
 Ignore-this: a40354544b8908732c733bf8a38e7e68
] move ./rts/jhc_jgc.c ./rts/rts/gc_jgc.c
move ./rts/slub.c ./rts/rts/slub.c
hunk ./Makefile.am 114
-           rts/sys/wsize.h rts/sys/bitarray.h ChangeLog src/data/shortchange.txt 
+           rts/sys/wsize.h rts/sys/bitarray.h ChangeLog src/data/shortchange.txt rts/rts/slub.c \
+	   rts/rts/gc_jgc.c
hunk ./Makefile.am 117
-RTSFILES = rts/jhc_rts_header.h rts/jhc_jgc.h \
+RTSFILES = rts/jhc_rts_header.h \
hunk ./Makefile.am 119
-	   rts/slub.c rts/jhc_jgc.c rts/lib/lib_cbits.c
+	   rts/lib/lib_cbits.c
hunk ./Makefile.am 283
-
hunk ./rts/jhc_jgc.h 1
-#if _JHC_GC == _JHC_GC_JGC
-
-#ifdef JHC_JGC_STACK
-struct frame;
-typedef struct frame *gc_t;
-#else
-typedef void* *gc_t;
-static gc_t gc_stack_base;
-#endif
-
-static gc_t saved_gc;
-
-#define GC_BASE sizeof(void *)
-
-#define TO_BLOCKS(x) ((x) <= GC_BASE ? 1 : (((x) - 1)/GC_BASE) + 1)
-
-struct s_cache;
-static void gc_perform_gc(gc_t gc);
-static void *gc_alloc(gc_t gc,struct s_cache **sc, unsigned count, unsigned nptrs);
-
-#endif
rmfile ./rts/jhc_jgc.h
hunk ./rts/jhc_rts2.c 290
+#include "rts/slub.c"
+#include "rts/gc_jgc.c"
+
hunk ./rts/jhc_rts_header.h 139
+
+#define JHC_HEADER
+#include "rts/gc_jgc.c"
+#include "rts/slub.c"
+#undef JHC_HEADER
+
hunk ./rts/rts/gc_jgc.c 2
+#ifdef JHC_HEADER
+
+#ifdef JHC_JGC_STACK
+struct frame;
+typedef struct frame *gc_t;
+#else
+typedef void* *gc_t;
+static gc_t gc_stack_base;
+static unsigned number_gcs;             // number of garbage collections
+static unsigned number_allocs;          // number of allocations since last garbage collection
+#endif
+
+static gc_t saved_gc;
+
+#define GC_BASE sizeof(void *)
+#define TO_BLOCKS(x) ((x) <= GC_BASE ? 1 : (((x) - 1)/GC_BASE) + 1)
+
+static void gc_perform_gc(gc_t gc);
+
+#else
hunk ./rts/rts/gc_jgc.c 25
+//static gc_t saved_gc;
hunk ./rts/rts/gc_jgc.c 236
-A_UNUSED static void *
-(gc_alloc)(gc_t gc,struct s_cache **sc, unsigned count, unsigned nptrs)
-{
-        profile_push(&gc_alloc_time);
-        if (JHC_STATUS)
-                number_allocs++;
-        assert(nptrs <= count);
-        entry_t *e = s_alloc(gc, find_cache(sc, arena, count, nptrs));
-        VALGRIND_MAKE_MEM_UNDEFINED(e,sizeof(uintptr_t)*count);
-        debugf("allocated: %p %i %i\n",(void *)e, count, nptrs);
-        profile_pop(&gc_alloc_time);
-        return (void *)e;
-}
-
hunk ./rts/rts/gc_jgc.c 269
+
+#endif
hunk ./rts/rts/slub.c 3
-#include "sys/bitarray.h"
-#include "sys/queue.h"
+#ifdef JHC_HEADER
+
+struct s_arena;
+struct s_cache;
+static void *s_alloc(gc_t gc, struct s_cache *sc);
+static struct s_cache *find_cache(struct s_cache **rsc, struct s_arena *arena,
+                                  unsigned short size, unsigned short num_ptrs);
+static bool s_set_used_bit(void *val);
+static void clear_used_bits(struct s_arena *arena);
hunk ./rts/rts/slub.c 13
+#define S_BLOCK(val) ((struct s_block *)((uintptr_t)(val) & ~ (BLOCK_SIZE - 1)))
hunk ./rts/rts/slub.c 17
-#define S_BLOCK(val) ((struct s_block *)((uintptr_t)(val) & ~ (BLOCK_SIZE - 1)))
+#else
+
+#include "sys/bitarray.h"
+#include "sys/queue.h"
hunk ./rts/rts/slub.c 366
+#endif
hunk ./src/Grin/Main.hs 97
+           ("rts/slub.c",slub_c),
hunk ./src/Grin/Main.hs 100
-           ("rts/wsize.h",wsize_h),
+           ("sys/wsize.h",wsize_h),
+           ("rts/gc_jgc.c",gc_jgc_c),