2009-10-19 Ivan Maidanski <ivmai@mail.ru>
authorivmai <ivmai>
Mon, 19 Oct 2009 11:32:44 +0000 (11:32 +0000)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 26 Jul 2011 17:06:50 +0000 (21:06 +0400)
* alloc.c (GC_notify_full_gc): Use GC_INLINE for a tiny static
function.
* backgraph.c (pop_in_progress, GC_apply_to_each_object): Ditto.
* mark_rts.c (add_roots_to_index): Ditto.

ChangeLog
alloc.c
backgraph.c
mark_rts.c

index 169c777..82f9501 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
 2009-10-19  Ivan Maidanski <ivmai@mail.ru>
 
+       * alloc.c (GC_notify_full_gc): Use GC_INLINE for a tiny static
+       function.
+       * backgraph.c (pop_in_progress, GC_apply_to_each_object): Ditto.
+       * mark_rts.c (add_roots_to_index): Ditto.
+
+2009-10-19  Ivan Maidanski <ivmai@mail.ru>
+
        * extra/gc.c: New file.
        * Makefile.am (EXTRA_DIST): Add "extra/gc.c".
        * configure: Regenerate.
diff --git a/alloc.c b/alloc.c
index 4542f24..5a95308 100644 (file)
--- a/alloc.c
+++ b/alloc.c
@@ -295,7 +295,7 @@ GC_bool GC_should_collect(void)
                         /* Not called if 0.  Called with the allocation */
                         /* lock held.  Not used by GC itself.           */
 
-STATIC void GC_notify_full_gc(void)
+GC_INLINE void GC_notify_full_gc(void)
 {
     if (GC_start_call_back != 0) {
         (*GC_start_call_back)();
index c3cea43..902db90 100644 (file)
@@ -159,7 +159,7 @@ static GC_bool is_in_progress(ptr_t p)
   return FALSE;
 }
 
-static void pop_in_progress(ptr_t p)
+GC_INLINE void pop_in_progress(ptr_t p)
 {
   --n_in_progress;
   GC_ASSERT(in_progress_space[n_in_progress] == p);
@@ -280,7 +280,7 @@ static void per_object_helper(struct hblk *h, word fn)
   } while (i + (int)sz <= BYTES_TO_WORDS(HBLKSIZE));
 }
 
-void GC_apply_to_each_object(per_object_func f)
+GC_INLINE void GC_apply_to_each_object(per_object_func f)
 {
   GC_apply_to_all_blocks(per_object_helper, (word)f);
 }
index 8a55e37..a2d15f7 100644 (file)
@@ -122,7 +122,7 @@ struct roots * GC_roots_present(ptr_t b)
 }
 
 /* Add the given root structure to the index. */
-static void add_roots_to_index(struct roots *p)
+GC_INLINE void add_roots_to_index(struct roots *p)
 {
     int h = rt_hash(p -> r_start);