This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

libjava changes for new GC


This patch updates libjava to work with the latest GC version, 6.0
alpha 7. I'm going to check this in to the trunk shortly, when I
finish the boehm-gc import.

regards

  [ bryce ]

2001-05-21  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>

	* configure.in: Update boehm-gc include dir for new GC version.
	* configure: Rebuilt.
	* exception.cc: Only include <gc.h>. Remove TRUE/FALSE hacks and
	extern "C" wrapper.
	* boehm.cc: Update includes for new GC version. MAKE_PROC is now
	GC_MAKE_PROC. mark_proc is now GC_mark_proc.
	* posix-threads.cc: Only include <gc.h>. Don't need to wrap with
	extern "C".

Index: libltdl/configure.in
===================================================================
RCS file: /cvs/gcc/gcc/libjava/libltdl/configure.in,v
retrieving revision 1.3
diff -u -r1.3 configure.in
--- configure.in	2000/09/10 08:04:40	1.3
+++ configure.in	2001/05/21 08:11:20
@@ -43,7 +43,7 @@
 
 GCINCS=
 if test "$GC" = "boehm"; then
-   GCINCS='-I$(top_srcdir)/../../boehm-gc -I$(top_builddir)/../../boehm-gc'
+   GCINCS='-I$(top_srcdir)/../../boehm-gc/include'
    GCINCS="$GCINCS `cat ../../boehm-gc/boehm-cflags`"
    AC_DEFINE(HAVE_BOEHM_GC)
 fi
Index: configure.in
===================================================================
RCS file: /cvs/gcc/gcc/libjava/configure.in,v
retrieving revision 1.82
diff -u -r1.82 configure.in
--- configure.in	2001/05/12 06:25:03	1.82
+++ configure.in	2001/05/21 08:11:21
@@ -248,7 +248,7 @@
     # We include the path to the boehm-gc build directory.
     # See Makefile.am to understand why.
     GCLIBS="$GCDEPS -L\$(here)/../boehm-gc/$libsubdir"
-    GCINCS='-I$(top_srcdir)/../boehm-gc -I$(top_builddir)/../boehm-gc'
+    GCINCS='-I$(top_srcdir)/../boehm-gc/include'
     GCSPEC='-lgcjgc'
     JC1GCSPEC='-fuse-boehm-gc'
     GCTESTSPEC="-L`pwd`/../boehm-gc/.libs -rpath `pwd`/../boehm-gc/.libs"
Index: exception.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/exception.cc,v
retrieving revision 1.14
diff -u -r1.14 exception.cc
--- exception.cc	2001/05/12 06:17:31	1.14
+++ exception.cc	2001/05/21 08:11:21
@@ -20,18 +20,7 @@
 
 #include "unwind.h"
 
-
-// More nastiness: the GC wants to define TRUE and FALSE.  We don't
-// need the Java definitions (themselves a hack), so we undefine them.
-#undef TRUE
-#undef FALSE
-
-extern "C"
-{
-#include <gc_priv.h>
-#include <gc_mark.h>
-#include <include/gc_gcj.h>
-};
+#include <gc.h>
 
 
 struct alignment_test_struct
Index: boehm.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/boehm.cc,v
retrieving revision 1.23
diff -u -r1.23 boehm.cc
--- boehm.cc	2001/01/08 23:28:55	1.23
+++ boehm.cc	2001/05/21 08:11:21
@@ -26,9 +26,9 @@
 
 extern "C"
 {
-#include <gc_priv.h>
-#include <gc_mark.h>
-#include <include/gc_gcj.h>
+#include <private/gc_priv.h>
+#include <private/gc_pmark.h>
+#include <gc_gcj.h>
 
   // These aren't declared in any Boehm GC header.
   void GC_finalize_all (void);
@@ -324,7 +324,7 @@
 // We assume that the gcj mark proc has index 0.  This is a dubious assumption,
 // since another one could be registered first.  But the compiler also
 // knows this, so in that case everything else will break, too.
-#define GCJ_DEFAULT_DESCR MAKE_PROC(GCJ_RESERVED_MARK_PROC_INDEX,0)
+#define GCJ_DEFAULT_DESCR GC_MAKE_PROC(GC_GCJ_RESERVED_MARK_PROC_INDEX,0)
 void *
 _Jv_BuildGCDescr(jclass klass)
 {
@@ -496,12 +496,12 @@
   memset (array_free_list, 0, (MAXOBJSZ + 1) * sizeof (ptr_t));
 
   proc = GC_n_mark_procs++;
-  GC_mark_procs[proc] = (mark_proc) _Jv_MarkArray;
+  GC_mark_procs[proc] = (GC_mark_proc) _Jv_MarkArray;
 
   array_kind_x = GC_n_kinds++;
   GC_obj_kinds[array_kind_x].ok_freelist = array_free_list;
   GC_obj_kinds[array_kind_x].ok_reclaim_list = 0;
-  GC_obj_kinds[array_kind_x].ok_descriptor = MAKE_PROC (proc, 0);
+  GC_obj_kinds[array_kind_x].ok_descriptor = GC_MAKE_PROC (proc, 0);
   GC_obj_kinds[array_kind_x].ok_relocate_descr = FALSE;
   GC_obj_kinds[array_kind_x].ok_init = TRUE;
 
@@ -538,12 +538,12 @@
   memset (obj_free_list, 0, (MAXOBJSZ + 1) * sizeof (ptr_t));
 
   proc = GC_n_mark_procs++;
-  GC_mark_procs[proc] = (mark_proc) _Jv_MarkObj;
+  GC_mark_procs[proc] = (GC_mark_proc) _Jv_MarkObj;
 
   obj_kind_x = GC_n_kinds++;
   GC_obj_kinds[obj_kind_x].ok_freelist = obj_free_list;
   GC_obj_kinds[obj_kind_x].ok_reclaim_list = 0;
-  GC_obj_kinds[obj_kind_x].ok_descriptor = MAKE_PROC (proc, 0);
+  GC_obj_kinds[obj_kind_x].ok_descriptor = GC_MAKE_PROC (proc, 0);
   GC_obj_kinds[obj_kind_x].ok_relocate_descr = FALSE;
   GC_obj_kinds[obj_kind_x].ok_init = TRUE;
 
@@ -555,12 +555,12 @@
   memset (array_free_list, 0, (MAXOBJSZ + 1) * sizeof (ptr_t));
 
   proc = GC_n_mark_procs++;
-  GC_mark_procs[proc] = (mark_proc) _Jv_MarkArray;
+  GC_mark_procs[proc] = (GC_mark_proc) _Jv_MarkArray;
 
   array_kind_x = GC_n_kinds++;
   GC_obj_kinds[array_kind_x].ok_freelist = array_free_list;
   GC_obj_kinds[array_kind_x].ok_reclaim_list = 0;
-  GC_obj_kinds[array_kind_x].ok_descriptor = MAKE_PROC (proc, 0);
+  GC_obj_kinds[array_kind_x].ok_descriptor = GC_MAKE_PROC (proc, 0);
   GC_obj_kinds[array_kind_x].ok_relocate_descr = FALSE;
   GC_obj_kinds[array_kind_x].ok_init = TRUE;
 
Index: posix-threads.cc
===================================================================
RCS file: /cvs/gcc/gcc/libjava/posix-threads.cc,v
retrieving revision 1.24
diff -u -r1.24 posix-threads.cc
--- posix-threads.cc	2001/04/28 00:04:55	1.24
+++ posix-threads.cc	2001/05/21 08:11:21
@@ -16,11 +16,7 @@
 // If we're using the Boehm GC, then we need to override some of the
 // thread primitives.  This is fairly gross.
 #ifdef HAVE_BOEHM_GC
-extern "C"
-{
-#include <gcconfig.h>
 #include <gc.h>
-};
 #endif /* HAVE_BOEHM_GC */
 
 #include <stdlib.h>
@@ -378,7 +374,6 @@
   pthread_attr_setschedparam (&attr, &param);
   pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED);
 
-  // FIXME: handle marking the info object for GC.
   info = (struct starter *) _Jv_AllocBytes (sizeof (struct starter));
   info->method = meth;
   info->data = data;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]