]> granicus.if.org Git - gc/commitdiff
Fix visibility of some GC internal symbols used by GCJ
authorIvan Maidanski <ivmai@mail.ru>
Sun, 25 Mar 2012 06:32:05 +0000 (10:32 +0400)
committerIvan Maidanski <ivmai@mail.ru>
Sun, 25 Mar 2012 07:29:19 +0000 (11:29 +0400)
(Includes reverting part of commits 68b9f2791d5df5b2345fb)

* allchblk.c (GC_hblkfreelist, GC_free_bytes): Do not define array as
STATIC again but only if GC_GCJ_SUPPORT (for GNU GCJ client).
* blacklst.c (GC_is_black_listed): Do not define as GC_INNER again
(for GNU GCJ client).
* include/private/gc_priv.h (GC_is_black_listed): Likewise.
* include/private/gc_priv.h (GC_hblkfreelist): Restore removed
declaration (but only if GC_GCJ_SUPPORT).
* reclaim.c (GC_n_set_marks): Do not define as STATIC again (for GCJ);
update the comment.

allchblk.c
blacklst.c
include/private/gc_priv.h
reclaim.c

index a404fdaedd0a2f3657e2218f3f00db15a5b0ace1..fe10b03a281b1f6bf1085b6cd24ef28667f47670 100644 (file)
 # define N_HBLK_FLS (HUGE_THRESHOLD - UNIQUE_THRESHOLD)/FL_COMPRESSION \
                                  + UNIQUE_THRESHOLD
 
-STATIC struct hblk * GC_hblkfreelist[N_HBLK_FLS+1] = { 0 };
+#ifndef GC_GCJ_SUPPORT
+  STATIC
+#endif
+  struct hblk * GC_hblkfreelist[N_HBLK_FLS+1] = { 0 };
                                 /* List of completely empty heap blocks */
                                 /* Linked through hb_next field of      */
                                 /* header structure associated with     */
-                                /* block.                               */
+                                /* block.  Remains externally visible   */
+                                /* as used by GNU GCJ currently.        */
 
 #ifndef USE_MUNMAP
 
-  STATIC word GC_free_bytes[N_HBLK_FLS+1] = { 0 };
-        /* Number of free bytes on each list.   */
+#ifndef GC_GCJ_SUPPORT
+  STATIC
+#endif
+  word GC_free_bytes[N_HBLK_FLS+1] = { 0 };
+        /* Number of free bytes on each list.  Remains visible to GCJ.  */
 
   /* Return the largest n such that                                     */
   /* Is GC_large_allocd_bytes + the number of free bytes on lists       */
index 9fd00167f206fec15af2c9f51ef9eaf39d1fdfd3..0312918be78e309372e33fe48552f1fcfda58616 100644 (file)
@@ -225,7 +225,7 @@ GC_INNER void GC_unpromote_black_lists(void)
  * If (h,len) is not black listed, return 0.
  * Knows about the structure of the black list hash tables.
  */
-GC_INNER struct hblk * GC_is_black_listed(struct hblk *h, word len)
+struct hblk * GC_is_black_listed(struct hblk *h, word len)
 {
     word index = PHT_HASH((word)h);
     word i;
index ef2650cf145236895b0c492f3dc53e68d9944b81..b42910e4d546dcead61a012cb5262660b6f3fdd8 100644 (file)
@@ -1278,6 +1278,11 @@ GC_EXTERN word GC_black_list_spacing;
                         /* "stack-blacklisted", i.e. that are           */
                         /* problematic in the interior of an object.    */
 
+#ifdef GC_GCJ_SUPPORT
+  extern struct hblk * GC_hblkfreelist[];
+                                        /* Remains visible to GNU GCJ. */
+#endif
+
 #ifdef GC_DISABLE_INCREMENTAL
 # define GC_incremental FALSE
                         /* Hopefully allow optimizer to remove some code. */
@@ -1564,12 +1569,14 @@ void GC_register_data_segments(void);
             GC_add_to_black_list_stack((word)(bits))
 #endif /* PRINT_BLACK_LIST */
 
-GC_INNER struct hblk * GC_is_black_listed(struct hblk * h, word len);
+struct hblk * GC_is_black_listed(struct hblk * h, word len);
                         /* If there are likely to be false references   */
                         /* to a block starting at h of the indicated    */
                         /* length, then return the next plausible       */
                         /* starting location for h that might avoid     */
-                        /* these false references.                      */
+                        /* these false references.  Remains externally  */
+                        /* visible as used by GNU GCJ currently.        */
+
 GC_INNER void GC_promote_black_lists(void);
                         /* Declare an end to a black listing phase.     */
 GC_INNER void GC_unpromote_black_lists(void);
index 405087b80d35a2e876187c7839b666df57ff68b0..44b4909b222f459a90ecfa6545e2f6fcc7190e82 100644 (file)
--- a/reclaim.c
+++ b/reclaim.c
@@ -355,8 +355,9 @@ struct Print_stats
 
 #ifdef USE_MARK_BYTES
 
-/* Return the number of set mark bits in the given header       */
-STATIC int GC_n_set_marks(hdr *hhdr)
+/* Return the number of set mark bits in the given header.      */
+/* Remains externally visible as used by GNU GCJ currently.     */
+int GC_n_set_marks(hdr *hhdr)
 {
     int result = 0;
     int i;
@@ -386,8 +387,7 @@ static int set_bits(word n)
     return(result);
 }
 
-/* Return the number of set mark bits in the given header       */
-STATIC int GC_n_set_marks(hdr *hhdr)
+int GC_n_set_marks(hdr *hhdr)
 {
     int result = 0;
     int i;