Skip to content

Commit eeb8b00

Browse files
author
yamaken
committed
* include/gcroots.h
- New file - (GCROOTS_VERSION_MAJOR, GCROOTS_VERSION_MINOR, GCROOTS_VERSION_PATCHLEVEL, GCROOTS_API_REVISION, GCROOTS_VERSION_REQUIRE): New macro - (GCROOTS_context, GCROOTS_mark_proc, GCROOTS_user_proc, GCROOTS_context_alloc_proc): New type - (GCROOTS_init, GCROOTS_fin, GCROOTS_call_with_gc_ready_stack, GCROOTS_mark): New function decl * gcroots.c - New file - (struct _GCROOTS_context): New type - (PUSHED_REGS_SIZE): New macro - (n_pushed_regs, pushed_regs): New static variable - (GCROOTS_init, GCROOTS_fin, GCROOTS_call_with_gc_ready_stack, GCROOTS_mark, GC_push_current_stack, GC_push_one): New function * include/private/gcroots_priv.h - (GC_push_regs, GC_push_one, GC_push_current_stack, GC_push_regs_and_stack, GC_with_callee_saves_pushed, GC_noop1, GC_jmp_buf): #define as alias to GCROOTS_* to prevent symbol conflict with libgc * mach_dep.c - Include private/gcroots_priv.h * mark.c - Include gcroots_priv.h and gc_priv.h - Remove all functions but GC_noop1() * alpha_mach_dep.S * rs6000_mach_dep.s * mips_sgi_mach_dep.s * mips_ultrix_mach_dep.s * sparc_mach_dep.S * sparc_sunos4_mach_dep.s * sparc_netbsd_mach_dep.s * ia64_save_regs_in_stack.s - (GC_save_regs_in_stack, GC_push_regs, GC_clear_stack_inner): Rename to GCROOTS_* to prevent symbol conflict with libgc - (GCROOTS_save_regs_in_stack, GCROOTS_push_regs, GCROOTS_clear_stack_inner): Renamed from GC_* - Rename references to GC_push_one with GCROOTS_push_one * configure.ac * Makefile.am - Modify for libgcroots * gcroots.pc.in - New file
1 parent fce2af9 commit eeb8b00

16 files changed

+556
-2093
lines changed

Makefile.am

+82-59
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# Severely truncated by Hans-J. Boehm
1414
# Modified by: Grzegorz Jakacki <jakacki at acm dot org>
1515
# Modified by: Petter Urkedal <[email protected]> (2005-04)
16+
# Modified by: YAMAMOTO Kengo <yamaken AT bp.iij4u.or.jp> (2006-12, libgcroots)
1617

1718
## Process this file with automake to produce Makefile.in.
1819

@@ -44,56 +45,77 @@ check_PROGRAMS =
4445
TESTS =
4546

4647
pkgconfigdir = $(libdir)/pkgconfig
47-
dist_pkgconfig_DATA = bdw-gc.pc
48+
#dist_pkgconfig_DATA = bdw-gc.pc
49+
dist_pkgconfig_DATA = gcroots.pc
4850

49-
include include/include.am
50-
include cord/cord.am
51-
include tests/tests.am
52-
include doc/doc.am
51+
#include include/include.am
52+
#include cord/cord.am
53+
#include tests/tests.am
54+
#include doc/doc.am
5355

5456

5557
# C Library
5658
# ---------
5759

58-
lib_LTLIBRARIES += libgc.la
59-
libgc_la_SOURCES = \
60-
allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
61-
dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c \
62-
malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \
63-
obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \
64-
specific.c stubborn.c typd_mlc.c \
65-
backgraph.c thread_local_alloc.c
60+
#lib_LTLIBRARIES += libgc.la
61+
#libgc_la_SOURCES = \
62+
# allchblk.c alloc.c blacklst.c checksums.c dbg_mlc.c \
63+
# dyn_load.c finalize.c gc_dlopen.c gcj_mlc.c headers.c \
64+
# malloc.c mallocx.c mark.c mark_rts.c misc.c new_hblk.c \
65+
# obj_map.c os_dep.c pcr_interface.c ptr_chck.c real_malloc.c reclaim.c \
66+
# specific.c stubborn.c typd_mlc.c \
67+
# backgraph.c thread_local_alloc.c
68+
pkginclude_HEADERS += include/gcroots.h
69+
dist_noinst_HEADERS += \
70+
include/private/gcroots_priv.h \
71+
include/gc.h \
72+
include/gc_mark.h \
73+
include/gc_tiny_fl.h
74+
include/private/gc_hdrs.h \
75+
include/private/gc_priv.h \
76+
include/private/gcconfig.h
77+
lib_LTLIBRARIES += libgcroots.la
78+
libgcroots_la_SOURCES = mark.c gcroots.c
6679

6780
# C Library: Architecture Dependent
6881
# ---------------------------------
6982

70-
if PTHREADS
71-
libgc_la_SOURCES += pthread_support.c pthread_stop_world.c
72-
endif
73-
74-
if DARWIN_THREADS
75-
libgc_la_SOURCES += darwin_stop_world.c
76-
endif
77-
78-
if WIN32_THREADS
79-
libgc_la_SOURCES += win32_threads.c
80-
endif
81-
82-
if USE_INTERNAL_LIBATOMIC_OPS
83-
libgc_la_SOURCES += atomic_ops.c
84-
endif
85-
86-
if NEED_ATOMIC_OPS_ASM
87-
libgc_la_SOURCES += atomic_ops_sysdeps.S
88-
endif
83+
#if PTHREADS
84+
#libgc_la_SOURCES += pthread_support.c pthread_stop_world.c
85+
#endif
86+
#
87+
#if DARWIN_THREADS
88+
#libgc_la_SOURCES += darwin_stop_world.c
89+
#endif
90+
#
91+
#if WIN32_THREADS
92+
#libgc_la_SOURCES += win32_threads.c
93+
#endif
94+
#
95+
#if USE_INTERNAL_LIBATOMIC_OPS
96+
#libgc_la_SOURCES += atomic_ops.c
97+
#endif
98+
#
99+
#if NEED_ATOMIC_OPS_ASM
100+
#libgc_la_SOURCES += atomic_ops_sysdeps.S
101+
#endif
89102

90103
# Include THREADDLLIBS here to ensure that the correct versions of
91104
# linuxthread semaphore functions get linked:
92-
libgc_la_LIBADD = @addobjs@ $(THREADDLLIBS) $(UNWINDLIBS)
93-
libgc_la_DEPENDENCIES = @addobjs@
94-
libgc_la_LDFLAGS = -version-info 1:2:0
105+
#libgc_la_LIBADD = @addobjs@ $(THREADDLLIBS) $(UNWINDLIBS)
106+
#libgc_la_DEPENDENCIES = @addobjs@
107+
#libgc_la_LDFLAGS = -version-info 1:2:0
108+
109+
#EXTRA_libgc_la_SOURCES = alpha_mach_dep.S \
110+
# mips_sgi_mach_dep.s mips_ultrix_mach_dep.s \
111+
# rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s \
112+
# sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s
95113

96-
EXTRA_libgc_la_SOURCES = alpha_mach_dep.S \
114+
libgcroots_la_LIBADD = @addobjs@ $(THREADDLLIBS) $(UNWINDLIBS)
115+
libgcroots_la_DEPENDENCIES = @addobjs@
116+
libgcroots_la_LDFLAGS = -version-info 0:0:0
117+
118+
EXTRA_libgcroots_la_SOURCES = alpha_mach_dep.S \
97119
mips_sgi_mach_dep.s mips_ultrix_mach_dep.s \
98120
rs6000_mach_dep.s sparc_mach_dep.S sparc_netbsd_mach_dep.s \
99121
sparc_sunos4_mach_dep.s ia64_save_regs_in_stack.s
@@ -102,18 +124,18 @@ EXTRA_libgc_la_SOURCES = alpha_mach_dep.S \
102124
# C++ Interface
103125
# -------------
104126

105-
if CPLUSPLUS
106-
lib_LTLIBRARIES += libgccpp.la
107-
pkginclude_HEADERS += include/gc_cpp.h include/gc_allocator.h
108-
libgccpp_la_SOURCES = gc_cpp.cc
109-
libgccpp_la_LIBADD = $(THREADDLLIBS) $(UNWINDLIBS)
110-
libgccpp_la_LDFLAGS = -version-info 1:2:0
111-
endif
127+
#if CPLUSPLUS
128+
#lib_LTLIBRARIES += libgccpp.la
129+
#pkginclude_HEADERS += include/gc_cpp.h include/gc_allocator.h
130+
#libgccpp_la_SOURCES = gc_cpp.cc
131+
#libgccpp_la_LIBADD = $(THREADDLLIBS) $(UNWINDLIBS)
132+
#libgccpp_la_LDFLAGS = -version-info 1:2:0
133+
#endif
112134

113135
# FIXME: If Visual C++ users use Makefile.am, this should go into
114136
# pkginclude_HEADERS with proper AM_CONDITIONALization. Otherwise
115137
# delete this comment.
116-
EXTRA_DIST += gc_cpp.cpp
138+
#EXTRA_DIST += gc_cpp.cpp
117139

118140

119141
# Misc
@@ -155,35 +177,36 @@ endif
155177

156178
CCASFLAGS += $(DEFS)
157179

158-
dist_noinst_SCRIPTS = callprocs configure.host
180+
#dist_noinst_SCRIPTS = callprocs configure.host
181+
dist_noinst_SCRIPTS = configure.host
159182
## callprocs --- used by Makefile.{dj,direct}
160183
## configure.host --- used by Makefile.{am,dj,direct}
161184

162185
# headers which are not installed
163186
# (see include/include.am for more)
164187
#
165-
dist_noinst_HEADERS += version.h
188+
#dist_noinst_HEADERS += version.h
166189

167190
# documentation which is not installed
168191
#
169-
EXTRA_DIST += README.QUICK
192+
#EXTRA_DIST += README.QUICK
170193

171194
# other makefiles
172195
# :GOTCHA: deliberately we do not include 'Makefile'
173-
EXTRA_DIST += BCC_MAKEFILE NT_MAKEFILE NT_THREADS_MAKEFILE \
174-
OS2_MAKEFILE PCR-Makefile digimars.mak EMX_MAKEFILE \
175-
Makefile.direct Makefile.dj Makefile.DLLs SMakefile.amiga \
176-
WCC_MAKEFILE
196+
#EXTRA_DIST += BCC_MAKEFILE NT_MAKEFILE NT_THREADS_MAKEFILE \
197+
# OS2_MAKEFILE PCR-Makefile digimars.mak EMX_MAKEFILE \
198+
# Makefile.direct Makefile.dj Makefile.DLLs SMakefile.amiga \
199+
# WCC_MAKEFILE
177200

178201
# files used by makefiles other than Makefile.am
179202
#
180-
EXTRA_DIST += add_gc_prefix.c gcname.c if_mach.c if_not_there.c \
181-
hpux_test_and_clear.s gc.mak MacOS.c \
182-
MacProjects.sit.hqx mach_dep.c setjmp_t.c \
183-
threadlibs.c AmigaOS.c \
184-
Mac_files/datastart.c Mac_files/dataend.c \
185-
Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h \
186-
include/private/msvc_dbg.h msvc_dbg.c
203+
#EXTRA_DIST += add_gc_prefix.c gcname.c if_mach.c if_not_there.c \
204+
# hpux_test_and_clear.s gc.mak MacOS.c \
205+
# MacProjects.sit.hqx mach_dep.c setjmp_t.c \
206+
# threadlibs.c AmigaOS.c \
207+
# Mac_files/datastart.c Mac_files/dataend.c \
208+
# Mac_files/MacOS_config.h Mac_files/MacOS_Test_config.h \
209+
# include/private/msvc_dbg.h msvc_dbg.c
187210
# :CHECK: If pc_excludes still around, re-add to EXTRA_DIST.
188211

189212

@@ -193,7 +216,7 @@ CONFIG_STATUS_DEPENDENCIES = $(srcdir)/configure.host
193216

194217
# :FIXME: why do we distribute this one???
195218
#
196-
EXTRA_DIST += libtool.m4
219+
#EXTRA_DIST += libtool.m4
197220

198221
#
199222
# :GOTCHA: GNU make rule for making .s out of .S is flawed,

alpha_mach_dep.S

+7-7
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22

33
.text
44
.align 4
5-
.globl GC_push_regs
6-
.ent GC_push_regs 2
7-
GC_push_regs:
5+
.globl GCROOTS_push_regs
6+
.ent GCROOTS_push_regs 2
7+
GCROOTS_push_regs:
88
ldgp $gp, 0($27)
99
lda $sp, -16($sp)
1010
stq $26, 0($sp)
@@ -21,7 +21,7 @@ GC_push_regs:
2121

2222
# define call_push(x) \
2323
mov x, $16; \
24-
jsr $26, GC_push_one; \
24+
jsr $26, GCROOTS_push_one; \
2525
ldgp $gp, 0($26)
2626

2727
call_push($9)
@@ -44,7 +44,7 @@ GC_push_regs:
4444
#undef call_push
4545
#define call_push(x) \
4646
ftoit x, $16; \
47-
jsr $26, GC_push_one; \
47+
jsr $26, GCROOTS_push_one; \
4848
ldgp $gp, 0($26)
4949

5050
call_push($f2)
@@ -67,7 +67,7 @@ $use_stack:
6767
#define call_push(x) \
6868
stt x, 8($sp); \
6969
ldq $16, 8($sp); \
70-
jsr $26, GC_push_one; \
70+
jsr $26, GCROOTS_push_one; \
7171
ldgp $gp, 0($26)
7272

7373
call_push($f2)
@@ -83,4 +83,4 @@ $use_stack:
8383
lda $sp, 16($sp)
8484
ret $31, ($26), 1
8585

86-
.end GC_push_regs
86+
.end GCROOTS_push_regs

0 commit comments

Comments
 (0)