Allow compact gc to build simultaneously with newgc
svn: r12243
This commit is contained in:
parent
07474ad477
commit
8a70bde3c1
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
srcdir = @srcdir@
|
srcdir = @srcdir@
|
||||||
builddir = @builddir@
|
builddir = @builddir@
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
|
@ -31,6 +30,9 @@ XSRCDIR = xsrc
|
||||||
XFORM = env XFORM_USE_PRECOMP=$(XSRCDIR)/precomp.h $(XFORM_NOPRECOMP)
|
XFORM = env XFORM_USE_PRECOMP=$(XSRCDIR)/precomp.h $(XFORM_NOPRECOMP)
|
||||||
SRCDIR = $(srcdir)/../src
|
SRCDIR = $(srcdir)/../src
|
||||||
|
|
||||||
|
XFORM_COMPACT_GC_NOPRECOMP = $(XFORM_SETUP) --cpp "$(CPP) $(CPPFLAGS) -DUSE_COMPACT_3M_GC" -o
|
||||||
|
XFORM_COMPACT_GC = env XFORM_USE_PRECOMP=$(XSRCDIR)/precomp.h $(XFORM_COMPACT_GC_NOPRECOMP)
|
||||||
|
|
||||||
FOREIGN_USED_OBJ = foreign.@LTO@
|
FOREIGN_USED_OBJ = foreign.@LTO@
|
||||||
FOREIGN_NOT_USED_OBJ =
|
FOREIGN_NOT_USED_OBJ =
|
||||||
|
|
||||||
|
@ -47,7 +49,6 @@ OBJS = salloc.@LTO@ \
|
||||||
file.@LTO@ \
|
file.@LTO@ \
|
||||||
fun.@LTO@ \
|
fun.@LTO@ \
|
||||||
hash.@LTO@ \
|
hash.@LTO@ \
|
||||||
jit.@LTO@ \
|
|
||||||
list.@LTO@ \
|
list.@LTO@ \
|
||||||
module.@LTO@ \
|
module.@LTO@ \
|
||||||
mzrt.@LTO@ \
|
mzrt.@LTO@ \
|
||||||
|
@ -60,7 +61,7 @@ OBJS = salloc.@LTO@ \
|
||||||
port.@LTO@ \
|
port.@LTO@ \
|
||||||
portfun.@LTO@ \
|
portfun.@LTO@ \
|
||||||
print.@LTO@ \
|
print.@LTO@ \
|
||||||
rational.@LTO@ \
|
rational.@LTO@ \
|
||||||
read.@LTO@ \
|
read.@LTO@ \
|
||||||
regexp.@LTO@ \
|
regexp.@LTO@ \
|
||||||
sema.@LTO@ \
|
sema.@LTO@ \
|
||||||
|
@ -73,8 +74,7 @@ OBJS = salloc.@LTO@ \
|
||||||
thread.@LTO@ \
|
thread.@LTO@ \
|
||||||
type.@LTO@ \
|
type.@LTO@ \
|
||||||
vector.@LTO@ \
|
vector.@LTO@ \
|
||||||
$(@FOREIGN_IF_USED@_OBJ) \
|
$(@FOREIGN_IF_USED@_OBJ)
|
||||||
gc2.@LTO@
|
|
||||||
|
|
||||||
FOREIGN_USED_C = $(XSRCDIR)/foreign.c
|
FOREIGN_USED_C = $(XSRCDIR)/foreign.c
|
||||||
FOREIGN_NOT_USED_C =
|
FOREIGN_NOT_USED_C =
|
||||||
|
@ -93,6 +93,7 @@ XSRCS = $(XSRCDIR)/salloc.c \
|
||||||
$(XSRCDIR)/fun.c \
|
$(XSRCDIR)/fun.c \
|
||||||
$(XSRCDIR)/hash.c \
|
$(XSRCDIR)/hash.c \
|
||||||
$(XSRCDIR)/jit.c \
|
$(XSRCDIR)/jit.c \
|
||||||
|
$(XSRCDIR)/jit_compact_gc.c \
|
||||||
$(XSRCDIR)/list.c \
|
$(XSRCDIR)/list.c \
|
||||||
$(XSRCDIR)/module.c \
|
$(XSRCDIR)/module.c \
|
||||||
$(XSRCDIR)/network.c \
|
$(XSRCDIR)/network.c \
|
||||||
|
@ -104,7 +105,7 @@ XSRCS = $(XSRCDIR)/salloc.c \
|
||||||
$(XSRCDIR)/port.c \
|
$(XSRCDIR)/port.c \
|
||||||
$(XSRCDIR)/portfun.c \
|
$(XSRCDIR)/portfun.c \
|
||||||
$(XSRCDIR)/print.c \
|
$(XSRCDIR)/print.c \
|
||||||
$(XSRCDIR)/rational.c \
|
$(XSRCDIR)/rational.c \
|
||||||
$(XSRCDIR)/read.c \
|
$(XSRCDIR)/read.c \
|
||||||
$(XSRCDIR)/regexp.c \
|
$(XSRCDIR)/regexp.c \
|
||||||
$(XSRCDIR)/sema.c \
|
$(XSRCDIR)/sema.c \
|
||||||
|
@ -124,6 +125,8 @@ all: xsrc
|
||||||
$(MAKE) $(XSRCDIR)/precomp.h
|
$(MAKE) $(XSRCDIR)/precomp.h
|
||||||
$(MAKE) xobjects
|
$(MAKE) xobjects
|
||||||
|
|
||||||
|
all2: all ../mzscheme@MMM@@NOT_OSX@ ../mzscheme_compact_gc@NOT_OSX@
|
||||||
|
|
||||||
xsrcs: $(XSRCS)
|
xsrcs: $(XSRCS)
|
||||||
|
|
||||||
xsrc:
|
xsrc:
|
||||||
|
@ -167,6 +170,10 @@ $(XSRCDIR)/hash.c: ../src/hash.@LTO@ $(XFORMDEP)
|
||||||
$(XFORM) $(XSRCDIR)/hash.c $(SRCDIR)/hash.c
|
$(XFORM) $(XSRCDIR)/hash.c $(SRCDIR)/hash.c
|
||||||
$(XSRCDIR)/jit.c: ../src/jit.@LTO@ $(XFORMDEP)
|
$(XSRCDIR)/jit.c: ../src/jit.@LTO@ $(XFORMDEP)
|
||||||
$(XFORM) $(XSRCDIR)/jit.c $(SRCDIR)/jit.c
|
$(XFORM) $(XSRCDIR)/jit.c $(SRCDIR)/jit.c
|
||||||
|
|
||||||
|
$(XSRCDIR)/jit_compact_gc.c: ../src/jit.@LTO@ $(XFORMDEP)
|
||||||
|
$(XFORM_COMPACT_GC) $(XSRCDIR)/jit_compact_gc.c $(SRCDIR)/jit.c
|
||||||
|
|
||||||
$(XSRCDIR)/module.c: ../src/module.@LTO@ $(XFORMDEP)
|
$(XSRCDIR)/module.c: ../src/module.@LTO@ $(XFORMDEP)
|
||||||
$(XFORM) $(XSRCDIR)/module.c $(SRCDIR)/module.c
|
$(XFORM) $(XSRCDIR)/module.c $(SRCDIR)/module.c
|
||||||
$(XSRCDIR)/list.c: ../src/list.@LTO@ $(XFORMDEP)
|
$(XSRCDIR)/list.c: ../src/list.@LTO@ $(XFORMDEP)
|
||||||
|
@ -249,6 +256,8 @@ hash.@LTO@: $(XSRCDIR)/hash.c
|
||||||
$(CC) $(CFLAGS) -c $(XSRCDIR)/hash.c -o hash.@LTO@
|
$(CC) $(CFLAGS) -c $(XSRCDIR)/hash.c -o hash.@LTO@
|
||||||
jit.@LTO@: $(XSRCDIR)/jit.c
|
jit.@LTO@: $(XSRCDIR)/jit.c
|
||||||
$(CC) $(CFLAGS) -c $(XSRCDIR)/jit.c -o jit.@LTO@
|
$(CC) $(CFLAGS) -c $(XSRCDIR)/jit.c -o jit.@LTO@
|
||||||
|
jit_compact_gc.@LTO@: $(XSRCDIR)/jit_compact_gc.c
|
||||||
|
$(CC) $(CFLAGS) -c $(XSRCDIR)/jit_compact_gc.c -o jit_compact_gc.@LTO@
|
||||||
list.@LTO@: $(XSRCDIR)/list.c
|
list.@LTO@: $(XSRCDIR)/list.c
|
||||||
$(CC) $(CFLAGS) -c $(XSRCDIR)/list.c -o list.@LTO@
|
$(CC) $(CFLAGS) -c $(XSRCDIR)/list.c -o list.@LTO@
|
||||||
module.@LTO@: $(XSRCDIR)/module.c
|
module.@LTO@: $(XSRCDIR)/module.c
|
||||||
|
@ -312,6 +321,30 @@ gc2.@LTO@: $(srcdir)/gc2.c $(srcdir)/newgc.c $(srcdir)/compact.c $(srcdir)/newgc
|
||||||
$(srcdir)/weak.c $(srcdir)/fnls.c $(srcdir)/../include/scheme.h $(srcdir)/../src/schpriv.h
|
$(srcdir)/weak.c $(srcdir)/fnls.c $(srcdir)/../include/scheme.h $(srcdir)/../src/schpriv.h
|
||||||
$(CC) $(CFLAGS) -c $(srcdir)/gc2.c -o gc2.@LTO@
|
$(CC) $(CFLAGS) -c $(srcdir)/gc2.c -o gc2.@LTO@
|
||||||
|
|
||||||
|
new_gc.@LTO@: $(srcdir)/newgc.c $(srcdir)/newgc.c $(srcdir)/compact.c $(srcdir)/newgc.c $(srcdir)/gc2.h \
|
||||||
|
$(srcdir)/vm_osx.c $(srcdir)/vm_mmap.c $(srcdir)/vm_osk.c $(srcdir)/vm.c\
|
||||||
|
$(srcdir)/vm_memalign.c $(srcdir)/alloc_cache.c \
|
||||||
|
$(srcdir)/page_range.c $(srcdir)/protect_range.c $(srcdir)/var_stack.c $(srcdir)/stack_comp.c \
|
||||||
|
$(srcdir)/../utils/splay.c $(srcdir)/my_qsort.c $(srcdir)/backtrace.c \
|
||||||
|
$(srcdir)/weak.c $(srcdir)/fnls.c $(srcdir)/../include/scheme.h $(srcdir)/../src/schpriv.h
|
||||||
|
$(CC) $(CFLAGS) -c $(srcdir)/newgc.c -o new_gc.@LTO@
|
||||||
|
|
||||||
|
copy_gc.@LTO@: $(srcdir)/copy.c $(srcdir)/newgc.c $(srcdir)/compact.c $(srcdir)/newgc.c $(srcdir)/gc2.h \
|
||||||
|
$(srcdir)/vm_osx.c $(srcdir)/vm_mmap.c $(srcdir)/vm_osk.c $(srcdir)/vm.c\
|
||||||
|
$(srcdir)/vm_memalign.c $(srcdir)/alloc_cache.c \
|
||||||
|
$(srcdir)/page_range.c $(srcdir)/protect_range.c $(srcdir)/var_stack.c $(srcdir)/stack_comp.c \
|
||||||
|
$(srcdir)/../utils/splay.c $(srcdir)/my_qsort.c $(srcdir)/backtrace.c \
|
||||||
|
$(srcdir)/weak.c $(srcdir)/fnls.c $(srcdir)/../include/scheme.h $(srcdir)/../src/schpriv.h
|
||||||
|
$(CC) $(CFLAGS) -c $(srcdir)/copy.c -o copy_gc.@LTO@
|
||||||
|
|
||||||
|
compact_gc.@LTO@: $(srcdir)/compact.c $(srcdir)/newgc.c $(srcdir)/compact.c $(srcdir)/newgc.c $(srcdir)/gc2.h \
|
||||||
|
$(srcdir)/vm_osx.c $(srcdir)/vm_mmap.c $(srcdir)/vm_osk.c $(srcdir)/vm.c\
|
||||||
|
$(srcdir)/vm_memalign.c $(srcdir)/alloc_cache.c \
|
||||||
|
$(srcdir)/page_range.c $(srcdir)/protect_range.c $(srcdir)/var_stack.c $(srcdir)/stack_comp.c \
|
||||||
|
$(srcdir)/../utils/splay.c $(srcdir)/my_qsort.c $(srcdir)/backtrace.c \
|
||||||
|
$(srcdir)/weak.c $(srcdir)/fnls.c $(srcdir)/../include/scheme.h $(srcdir)/../src/schpriv.h
|
||||||
|
$(CC) $(CFLAGS) -c $(srcdir)/compact.c -o compact_gc.@LTO@
|
||||||
|
|
||||||
FOREIGN_OBJS = ../../foreign/gcc/libffi/src/*.@LTO@ ../../foreign/gcc/libffi/src/*/*.@LTO@
|
FOREIGN_OBJS = ../../foreign/gcc/libffi/src/*.@LTO@ ../../foreign/gcc/libffi/src/*/*.@LTO@
|
||||||
FOREIGN_LIB = ../../foreign/gcc/libffi/libffi@FOREIGN_CONVENIENCE@.la
|
FOREIGN_LIB = ../../foreign/gcc/libffi/libffi@FOREIGN_CONVENIENCE@.la
|
||||||
FOREIGN_OBJSLIB = @FOREIGN_OBJSLIB@
|
FOREIGN_OBJSLIB = @FOREIGN_OBJSLIB@
|
||||||
|
@ -324,12 +357,20 @@ FOREIGN_NOT_USED_OBJSLIB =
|
||||||
EXTRA_OBJS_T = ../src/gmp.@LTO@ $(@FOREIGN_IF_USED@_LIB)
|
EXTRA_OBJS_T = ../src/gmp.@LTO@ $(@FOREIGN_IF_USED@_LIB)
|
||||||
EXTRA_OBJS_L = ../src/gmp.@LTO@ $(@FOREIGN_IF_USED@_OBJSLIB)
|
EXTRA_OBJS_L = ../src/gmp.@LTO@ $(@FOREIGN_IF_USED@_OBJSLIB)
|
||||||
|
|
||||||
../libmzscheme3m.@LIBSFX@: $(OBJS) $(EXTRA_OBJS_T)
|
../libmzscheme3m.@LIBSFX@: $(OBJS) $(EXTRA_OBJS_T) jit.@LTO@ gc2.@LTO@
|
||||||
$(AR) $(ARFLAGS) ../libmzscheme3m.@LIBSFX@ $(OBJS) $(EXTRA_OBJS_L)
|
$(AR) $(ARFLAGS) ../libmzscheme3m.@LIBSFX@ $(OBJS) $(EXTRA_OBJS_L) jit.@LTO@ gc2.@LTO@
|
||||||
$(RANLIB) ../libmzscheme3m.@LIBSFX@
|
$(RANLIB) ../libmzscheme3m.@LIBSFX@
|
||||||
|
|
||||||
|
../libmzscheme_compact_gc.@LIBSFX@: $(OBJS) $(EXTRA_OBJS_T) jit_compact_gc.@LTO@ compact_gc.@LTO@
|
||||||
|
$(AR) $(ARFLAGS) ../libmzscheme_compact_gc.@LIBSFX@ $(OBJS) $(EXTRA_OBJS_L) jit_compact_gc.@LTO@ compact_gc.@LTO@
|
||||||
|
$(RANLIB) ../libmzscheme_compact_gc.@LIBSFX@
|
||||||
|
|
||||||
../mzscheme@MMM@@NOT_OSX@: main.@LTO@ ../libmzscheme3m.@LIBSFX@
|
../mzscheme@MMM@@NOT_OSX@: main.@LTO@ ../libmzscheme3m.@LIBSFX@
|
||||||
cd ..; @MZLINKER@ -o mzscheme@MMM@ @PROFFLAGS@ gc2/main.@LTO@ libmzscheme3m.@LIBSFX@ @LDFLAGS@ $(LIBS)
|
cd ..; @MZLINKER@ -o mzscheme@MMM@ @PROFFLAGS@ gc2/main.@LTO@ libmzscheme3m.@LIBSFX@ @LDFLAGS@ $(LIBS)
|
||||||
|
|
||||||
|
../mzscheme_compact_gc@NOT_OSX@: main.@LTO@ ../libmzscheme_compact_gc.@LIBSFX@
|
||||||
|
cd ..; @MZLINKER@ -o mzscheme_compact_gc @PROFFLAGS@ gc2/main.@LTO@ libmzscheme_compact_gc.@LIBSFX@ @LDFLAGS@ $(LIBS)
|
||||||
|
|
||||||
# The above "cd .." prevents a problem with libtool's generated script in --enable-shared mode,
|
# The above "cd .." prevents a problem with libtool's generated script in --enable-shared mode,
|
||||||
# at least for Mac OS X. Beware of changing LIBS or LDFLAGS to inclucde something with a relative
|
# at least for Mac OS X. Beware of changing LIBS or LDFLAGS to inclucde something with a relative
|
||||||
# path.
|
# path.
|
||||||
|
|
|
@ -159,6 +159,7 @@ void **GC_variable_stack;
|
||||||
|
|
||||||
void **GC_get_variable_stack() { return GC_variable_stack; }
|
void **GC_get_variable_stack() { return GC_variable_stack; }
|
||||||
void GC_set_variable_stack(void **p) { GC_variable_stack = p; }
|
void GC_set_variable_stack(void **p) { GC_variable_stack = p; }
|
||||||
|
void GC_register_root_custodian(void *_c) {}
|
||||||
|
|
||||||
/********************* Type tags *********************/
|
/********************* Type tags *********************/
|
||||||
Type_Tag pair_tag = 42; /* set by client */
|
Type_Tag pair_tag = 42; /* set by client */
|
||||||
|
@ -661,6 +662,11 @@ static MPage *find_page(void *p)
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int GC_is_allocated(void *p)
|
||||||
|
{
|
||||||
|
return !!find_page(p);
|
||||||
|
}
|
||||||
|
|
||||||
/* Works only during GC: */
|
/* Works only during GC: */
|
||||||
static int is_marked(void *p)
|
static int is_marked(void *p)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user