Boehm GC
authorstefan <none@none>
Tue, 4 Feb 2003 12:47:51 +0000 (12:47 +0000)
committerstefan <none@none>
Tue, 4 Feb 2003 12:47:51 +0000 (12:47 +0000)
Makefile.am
acconfig.h
configure.in
mm/Makefile.am
src/mm/Makefile.am
src/mm/memory.h
toolbox/memory.h

index 8d67756c804c49bbfc48e9386359fd912b7d3641..3a022ff5e7882ca3eb5b0e721f1d43442258c1dc 100644 (file)
@@ -1,6 +1,8 @@
 ## Process this file with automake to produce Makefile.in
 
-# $Id: Makefile.am 204 2003-01-23 22:50:44Z twisti $
+# $Id: Makefile.am 218 2003-02-04 12:47:51Z stefan $
+
+@SET_MAKE@
 
 MAINTAINERCLEANFILES = Makefile.in configure
 SUBDIRS = toolbox mm alpha i386 jit comp nat threads mips tst doc narray jvmtst
@@ -123,25 +125,6 @@ nativetypes.hh @SYSDEP_DIR@/offsets.h nativetable.hh: cacaoh
 @SYSDEP_DIR@/asmpart.o: $(top_srcdir)/@SYSDEP_DIR@/asmpart.S @SYSDEP_DIR@/offsets.h
        @CC@ $(INCLUDES) -c -g -o $@ $<
 
-compiler.o: $(top_srcdir)/builtin.h $(top_srcdir)/compiler.h \
-                   $(top_srcdir)/global.h $(top_srcdir)/loader.h \
-               $(top_srcdir)/tables.h $(top_srcdir)/native.h \
-            $(top_srcdir)/asmpart.h $(top_srcdir)/compiler.c $(top_srcdir)/comp/*.c \
-            $(top_srcdir)/@SYSDEP_DIR@/gen.c $(top_srcdir)/@SYSDEP_DIR@/disass.c
-#      @CC@ $(CFLAGS) -I. $(INCLUDES) -c $(top_srcdir)/compiler.c
-
-jit.o: jit.c \
-       jit/mcode.c \
-       jit/parse.c \
-       jit/reg.c \
-       jit/stack.c \
-       jit/jitdef.h \
-       narray/graph.c \
-       narray/loop.c \
-       narray/analyze.c \
-       narray/tracing.c \
-       narray/loop.h
-       
 checkjvm:
        $(MAKE) -C jvmtst $@
 
index 090fd9a815744cc2422765e4a9cff0b46dd73015..035aa0f0818a7f471aa8e91b96d0b10fa7128a06 100644 (file)
@@ -17,3 +17,5 @@
 #undef SYSDEP_DIR
 
 #undef OLD_COMPILER
+
+#undef USE_BOEHM
index 83efc1da02b8455074522fafcb8291835e950144..49166e6a54d76561ee3ea2b12a2296ea4b88fb15 100644 (file)
@@ -1,7 +1,7 @@
 dnl autoconf; autoheader; automake
 
 dnl Process this file with autoconf to produce a configure script.
-AC_INIT(compiler.c)
+AC_INIT(jit.c)
 AC_CANONICAL_HOST
 
 AM_INIT_AUTOMAKE(cacao, 0.40)
@@ -49,6 +49,7 @@ AC_SUBST(SYSDEP_DIR)
 dnl Checks for programs.
 AC_PROG_CC
 AC_PROG_RANLIB
+AC_PROG_MAKE_SET
 
 dnl Checks for libraries.
 AC_CHECK_LIB(m, sin)
@@ -109,7 +110,7 @@ dnl Features
 
 dnl check arguments
 AC_ARG_ENABLE(threads, [  --enable-threads        enable threads support])
-AC_ARG_ENABLE(gc2, [  --enable-gc2            enable new garbage collector])
+AC_ARG_WITH(gc, [  --with-gc[=ARG]         use garbage collector [gc2,gc1,boehm]])
 
 dnl threads
 AC_MSG_CHECKING(whether to include threads support)
@@ -130,16 +131,29 @@ fi
 
 dnl garbage collector version
 AC_MSG_CHECKING(which garbage collector to use)
-if test x"$enable_gc2" = "xno"; then
+case "$with_gc" in
+boehm )
+       AC_MSG_RESULT(Boehm garbage collector)
+       GC_OBJ="mm/libboehm.a libgc.a"
+       if test ! -e libgc.a; then
+               AC_MSG_ERROR(libgc.a not found)
+       fi
+       AC_DEFINE(USE_BOEHM)
+       ;;
+gc1 )
        AC_MSG_RESULT(old garbage collector)
        GC_OBJ="mm/libmm_old.a"
-else
+       ;;
+gc2 | "" )
        AC_MSG_RESULT(new garbage collector)
        GC_OBJ="mm/libmm_new.a"
-fi
+       ;;
+* )
+       AC_MSG_ERROR(Invalid GC)
+       ;;
+esac
 AC_SUBST(GC_OBJ)
 
-
 AC_OUTPUT(Makefile \
          toolbox/Makefile \
           mm/Makefile \
index b21762511d6744ee7b193262d991308c72de1a35..efcbe51c5ccdc9bcec817dda45fd5be071a41f4c 100644 (file)
@@ -1,4 +1,4 @@
-noinst_LIBRARIES = libmm_new.a libmm_old.a
+noinst_LIBRARIES = libmm_new.a libmm_old.a libboehm.a
 
 libmm_new_a_SOURCES = allocator2.c allocator.h \
                      bitmap2.c bitmap2.h \
@@ -6,5 +6,6 @@ libmm_new_a_SOURCES = allocator2.c allocator.h \
                      lifespan.c lifespan.h \
                      mm.h
 libmm_old_a_SOURCES = heap.old.c
+libboehm_a_SOURCES = boehm.c
 
 INCLUDES=-I$(top_srcdir) -I$(top_srcdir)/@SYSDEP_DIR@
index b21762511d6744ee7b193262d991308c72de1a35..efcbe51c5ccdc9bcec817dda45fd5be071a41f4c 100644 (file)
@@ -1,4 +1,4 @@
-noinst_LIBRARIES = libmm_new.a libmm_old.a
+noinst_LIBRARIES = libmm_new.a libmm_old.a libboehm.a
 
 libmm_new_a_SOURCES = allocator2.c allocator.h \
                      bitmap2.c bitmap2.h \
@@ -6,5 +6,6 @@ libmm_new_a_SOURCES = allocator2.c allocator.h \
                      lifespan.c lifespan.h \
                      mm.h
 libmm_old_a_SOURCES = heap.old.c
+libboehm_a_SOURCES = boehm.c
 
 INCLUDES=-I$(top_srcdir) -I$(top_srcdir)/@SYSDEP_DIR@
index b06ba2f0b373614d325105aeb137184ac9f607bd..48e4ccc0945af68e1e587f2504db0542678ee0e4 100644 (file)
@@ -14,6 +14,8 @@
 
 #define CODEMMAP
 
+#include "types.h"
+
 #ifdef USE_BOEHM
 /* Uncollectable memory which can contain references */
 void *heap_alloc_uncollectable(u4 bytelen);
index b06ba2f0b373614d325105aeb137184ac9f607bd..48e4ccc0945af68e1e587f2504db0542678ee0e4 100644 (file)
@@ -14,6 +14,8 @@
 
 #define CODEMMAP
 
+#include "types.h"
+
 #ifdef USE_BOEHM
 /* Uncollectable memory which can contain references */
 void *heap_alloc_uncollectable(u4 bytelen);