summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2012-03-25 10:32:05 +0400
committerIvan Maidanski <ivmai@mail.ru>2012-03-25 11:39:15 +0400
commit6ea06d38372bb2958aadab0e5847821b4d573815 (patch)
treedf239ba0fe1fa61883b3681e502934f76fbd645b
parentb21ee7b9fec6cc6288930e751c6a068d537b3d1b (diff)
downloadbdwgc-6ea06d38372bb2958aadab0e5847821b4d573815.tar.gz
Fix visibility of some GC internal symbols used by GCJ
(Includes reverting part of commits 68b9f27, 91d5df5, b2345fb) * 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.
-rw-r--r--allchblk.c15
-rw-r--r--blacklst.c2
-rw-r--r--include/private/gc_priv.h11
-rw-r--r--reclaim.c8
4 files changed, 25 insertions, 11 deletions
diff --git a/allchblk.c b/allchblk.c
index bb08e79c..4a13de4a 100644
--- a/allchblk.c
+++ b/allchblk.c
@@ -48,14 +48,21 @@
# 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. */
-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 the number of free bytes on lists */
/* n .. N_HBLK_FLS is greater or equal to GC_max_large_allocd_bytes */
diff --git a/blacklst.c b/blacklst.c
index 626a95fd..0213176f 100644
--- a/blacklst.c
+++ b/blacklst.c
@@ -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;
diff --git a/include/private/gc_priv.h b/include/private/gc_priv.h
index 7749f0ac..bff14622 100644
--- a/include/private/gc_priv.h
+++ b/include/private/gc_priv.h
@@ -1359,6 +1359,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. */
@@ -1643,12 +1648,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);
diff --git a/reclaim.c b/reclaim.c
index 074bd439..fd238364 100644
--- a/reclaim.c
+++ b/reclaim.c
@@ -467,8 +467,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;
@@ -498,8 +499,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;