gcc/boehm-gc
Alexandre Oliva 18fa3240db ffi.h.in (ffi_closure_alloc, [...]): New.
libffi/ChangeLog:
* include/ffi.h.in (ffi_closure_alloc, ffi_closure_free): New.
(ffi_prep_closure_loc): New.
(ffi_prep_raw_closure_loc): New.
(ffi_prep_java_raw_closure_loc): New.
* src/closures.c: New file.
* src/dlmalloc.c [FFI_MMAP_EXEC_WRIT] (struct malloc_segment):
Replace sflags with exec_offset.
[FFI_MMAP_EXEC_WRIT] (mmap_exec_offset, add_segment_exec_offset,
sub_segment_exec_offset): New macros.
(get_segment_flags, set_segment_flags, check_segment_merge): New
macros.
(is_mmapped_segment, is_extern_segment): Use get_segment_flags.
(add_segment, sys_alloc, create_mspace, create_mspace_with_base,
destroy_mspace): Use new macros.
(sys_alloc): Silence warning.
* Makefile.am (libffi_la_SOURCES): Add src/closures.c.
* Makefile.in: Rebuilt.
* src/prep_cif [FFI_CLOSURES] (ffi_prep_closure): Implement in
terms of ffi_prep_closure_loc.
* src/raw_api.c (ffi_prep_raw_closure_loc): Renamed and adjusted
from...
(ffi_prep_raw_closure): ... this.  Re-implement in terms of the
renamed version.
* src/java_raw_api (ffi_prep_java_raw_closure_loc): Renamed and
adjusted from...
(ffi_prep_java_raw_closure): ... this.  Re-implement in terms of
the renamed version.
* src/alpha/ffi.c (ffi_prep_closure_loc): Renamed from
(ffi_prep_closure): ... this.
* src/pa/ffi.c: Likewise.
* src/cris/ffi.c: Likewise.  Adjust.
* src/frv/ffi.c: Likewise.
* src/ia64/ffi.c: Likewise.
* src/mips/ffi.c: Likewise.
* src/powerpc/ffi_darwin.c: Likewise.
* src/s390/ffi.c: Likewise.
* src/sh/ffi.c: Likewise.
* src/sh64/ffi.c: Likewise.
* src/sparc/ffi.c: Likewise.
* src/x86/ffi64.c: Likewise.
* src/x86/ffi.c: Likewise.
(FFI_INIT_TRAMPOLINE): Adjust.
(ffi_prep_raw_closure_loc): Renamed and adjusted from...
(ffi_prep_raw_closure): ... this.
* src/powerpc/ffi.c (ffi_prep_closure_loc): Renamed from
(ffi_prep_closure): ... this.
(flush_icache): Adjust.
boehm-gc/ChangeLog:
* include/gc.h (GC_REGISTER_FINALIZER_UNREACHABLE): New.
(GC_register_finalizer_unreachable): Declare.
(GC_debug_register_finalizer_unreachable): Declare.
* finalize.c (GC_unreachable_finalize_mark_proc): New.
(GC_register_finalizer_unreachable): New.
(GC_finalize): Handle it.
* dbg_mlc.c (GC_debug_register_finalizer_unreachable): New.
(GC_debug_register_finalizer_no_order): Fix whitespace.
libjava/ChangeLog:
* include/jvm.h (_Jv_ClosureListFinalizer): New.
(_Jv_Linker::create_error_method): Adjust.
* boehm.cc (_Jv_ClosureListFinalizer): New.
* nogc.cc (_Jv_ClosureListFinalizer): New.
* java/lang/Class.h (class _Jv_ClosureList): New.
(class java::lang::Class): Declare it as friend.
* java/lang/natClass.cc (_Jv_ClosureList::releaseClosures): New.
(_Jv_ClosureList::registerClousure): New.
* include/execution.h (_Jv_ExecutionEngine): Add get_closure_list.
(_Jv_CompiledEngine::do_get_closure_list): New.
(_Jv_CompiledEngine::_Jv_CompiledEngine): Use it.
(_Jv_IndirectCompiledClass): Add closures.
(_Jv_IndirectCompiledEngine::get_aux_info): New.
(_Jv_IndirectCompiledEngine::do_allocate_field_initializers): Use
it.
(_Jv_IndirectCompiledEngine::do_get_closure_list): New.
(_Jv_IndirectCompiledEngine::_Jv_IndirectCompiledEngine): Use it.
(_Jv_InterpreterEngine::do_get_closure_list): Declare.
(_Jv_InterpreterEngine::_Jv_InterpreterEngine): Use it.
* interpret.cc (FFI_PREP_RAW_CLOSURE): Use _loc variants.
(node_closure): Add closure list.
(_Jv_InterpMethod::ncode): Add jclass argument.  Use
ffi_closure_alloc and the separate code pointer.  Register the
closure for finalization.
(_Jv_JNIMethod::ncode): Likewise.
(_Jv_InterpreterEngine::do_create_ncode): Pass klass to ncode.
(_Jv_InterpreterEngine::do_get_closure_list): New.
* include/java-interp.h (_Jv_InterpMethod::ncode): Adjust.
(_Jv_InterpClass): Add closures field.
(_Jv_JNIMethod::ncode): Adjust.
* defineclass.cc (_Jv_ClassReader::handleCodeAttribute): Adjust.
(_Jv_ClassReader::handleMethodsEnd): Likewise.
* link.cc (struct method_closure): Add closure list.
(_Jv_Linker::create_error_method): Add jclass argument.  Use
ffi_closure_alloc and the separate code pointer.  Register the
closure for finalization.
(_Jv_Linker::link_symbol_table): Remove outdated comment about
sharing of otable and atable.  Adjust.
* java/lang/reflect/natVMProxy.cc (ncode_closure): Add closure
list.
(ncode): Add jclass argument.  Use ffi_closure_alloc and the
separate code pointer.  Register the closure for finalization.
(java::lang::reflect::VMProxy::generateProxyClass): Adjust.
* testsuite/libjava.jar/TestClosureGC.java: New.
* testsuite/libjava.jar/TestClosureGC.out: New.
* testsuite/libjava.jar/TestClosureGC.xfail: New.
* testsuite/libjava.jar/TestClosureGC.jar: New.

From-SVN: r122652
2007-03-07 07:27:25 +00:00
..
Mac_files Import GC 6.3alpha1. 2003-07-28 04:18:23 +00:00
cord Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
doc Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
include ffi.h.in (ffi_closure_alloc, [...]): New. 2007-03-07 07:27:25 +00:00
tests Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
AmigaOS.c Initial revision 2001-05-21 07:39:23 +01:00
BCC_MAKEFILE configure.in (GCINCS): Don't use "boehm-cflags". 2004-08-14 00:05:36 +01:00
ChangeLog ffi.h.in (ffi_closure_alloc, [...]): New. 2007-03-07 07:27:25 +00:00
EMX_MAKEFILE Imported version version 6.0alpha7. 2001-05-21 09:35:14 +01:00
MacOS.c Merged GC 5.0alpha4 with local changes, plus: 1999-11-01 23:15:51 +00:00
MacProjects.sit.hqx Initial revision 1999-04-07 08:01:30 +00:00
Makefile.DLLs Initial revision 1999-04-07 08:01:30 +00:00
Makefile.am Makefile.am: Add dummy install-pdf target. 2007-03-01 15:52:38 -08:00
Makefile.direct Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
Makefile.dist configure.in (GCINCS): Don't use "boehm-cflags". 2004-08-14 00:05:36 +01:00
Makefile.dj configure.in (GCINCS): Don't use "boehm-cflags". 2004-08-14 00:05:36 +01:00
Makefile.in Makefile.am: Add dummy install-pdf target. 2007-03-01 15:52:38 -08:00
NT_MAKEFILE configure.in (GCINCS): Don't use "boehm-cflags". 2004-08-14 00:05:36 +01:00
NT_STATIC_THREADS_MAKEFILE Initial revision 2004-08-12 22:14:23 +01:00
NT_THREADS_MAKEFILE Makefile.am, [...]: Imported GC 6.1 Alpha 1 and merged local changes. 2001-10-16 10:01:40 +01:00
OS2_MAKEFILE Imported version version 6.0alpha7. 2001-05-21 09:35:14 +01:00
PCR-Makefile Merged GC 5.0alpha4 with local changes, plus: 1999-11-01 23:15:51 +00:00
SMakefile.amiga Imported version version 6.0alpha7. 2001-05-21 09:35:14 +01:00
WCC_MAKEFILE Imported version version 6.0alpha7. 2001-05-21 09:35:14 +01:00
aclocal.m4 aclocal.m4: Regenerate to use multi.m4. 2007-01-17 19:48:52 +00:00
add_gc_prefix.c Makefile.am, [...]: Imported GC 6.0 and merged local changes. 2001-08-18 01:04:43 +00:00
allchblk.c Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
alloc.c Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
alpha_mach_dep.S Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
backgraph.c backgraph.c, gc_priv.h (GC_traverse_back_graph, [...]): split GC_traverse_back_graph. 2004-08-28 00:41:41 +00:00
blacklst.c Imported version version 6.0alpha7. 2001-05-21 09:35:14 +01:00
callprocs Initial revision 1999-04-07 08:01:30 +00:00
checksums.c configure.in (GCINCS): Don't use "boehm-cflags". 2004-08-14 00:05:36 +01:00
configure configure.ac: Don't define NO_SIGSET and NO_DEBUGGING while cross-compiling. 2007-01-17 23:03:22 +00:00
configure.ac configure.ac: Don't define NO_SIGSET and NO_DEBUGGING while cross-compiling. 2007-01-17 23:03:22 +00:00
configure.host re PR libgcj/19823 (java fails with non-executable memory) 2005-02-16 04:10:42 +00:00
darwin_stop_world.c os_dep.c (defined(MPROTECT_VDB) && defined(DARWIN)): Moved recently added defines to include/private/gc_priv.h 2007-01-19 20:19:35 +01:00
dbg_mlc.c ffi.h.in (ffi_closure_alloc, [...]): New. 2007-03-07 07:27:25 +00:00
depcomp Initial revision 2003-07-28 03:46:07 +00:00
digimars.mak Initial revision 2001-08-17 18:39:15 +00:00
dyn_load.c configure.ac: Replaced HAS_I386_THREAD_STATE_* with HAS_X86_THREAD_STATE32_* and... 2007-01-11 21:06:45 +01:00
finalize.c ffi.h.in (ffi_closure_alloc, [...]): New. 2007-03-07 07:27:25 +00:00
gc.mak Makefile.am, [...]: Imported GC 6.1 Alpha 1 and merged local changes. 2001-10-16 10:01:40 +01:00
gc_cpp.cc Import GC 6.3alpha1. 2003-07-28 04:18:23 +00:00
gc_cpp.cpp Initial revision 2001-05-21 07:39:23 +01:00
gc_dlopen.c Import GC 6.3alpha1. 2003-07-28 04:18:23 +00:00
gcc_support.c Initial revision 1999-04-07 08:01:30 +00:00
gcj_mlc.c configure.in (GCINCS): Don't use "boehm-cflags". 2004-08-14 00:05:36 +01:00
gcname.c Initial revision 2001-08-17 18:39:15 +00:00
headers.c configure.in (GCINCS): Don't use "boehm-cflags". 2004-08-14 00:05:36 +01:00
hpux_test_and_clear.s Initial revision 1999-11-01 20:48:50 +00:00
ia64_save_regs_in_stack.s Initial revision 2001-10-15 05:57:59 +01:00
if_mach.c Import GC 6.3alpha1. 2003-07-28 04:18:23 +00:00
if_not_there.c configure.in (GCINCS): Don't use "boehm-cflags". 2004-08-14 00:05:36 +01:00
mach_dep.c Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
malloc.c configure.in (GCINCS): Don't use "boehm-cflags". 2004-08-14 00:05:36 +01:00
mallocx.c Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
mark.c Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
mark_rts.c allchblk.c (GC_allochblk_nth): Dont overlook available space if GC disabled... 2005-02-09 21:33:02 +00:00
mips_sgi_mach_dep.s ffi.c: Use _ABIN32, _ABIO32 instead of external _MIPS_SIM_NABI32, _MIPS_SIM_ABI32. 2003-10-20 18:37:22 +00:00
mips_ultrix_mach_dep.s Initial revision 1999-04-07 08:01:30 +00:00
misc.c re PR boehm-gc/29068 (Bootstrap fails building libjava on SPARC/Solaris) 2006-09-14 18:06:04 +00:00
new_hblk.c configure.in (GCINCS): Don't use "boehm-cflags". 2004-08-14 00:05:36 +01:00
obj_map.c Imported version version 6.0alpha7. 2001-05-21 09:35:14 +01:00
os_dep.c os_dep.c (defined(MPROTECT_VDB) && defined(DARWIN)): Moved recently added defines to include/private/gc_priv.h 2007-01-19 20:19:35 +01:00
pc_excludes Imported version version 6.0alpha7. 2001-05-21 09:35:14 +01:00
pcr_interface.c Imported version version 6.0alpha7. 2001-05-21 09:35:14 +01:00
powerpc_darwin_mach_dep.s Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
pthread_stop_world.c gcconfig.h: use LINUX_STACKBOTTOM so it works with Linux 2.6, reactivate MPROTECT_VDB 2007-02-05 18:18:11 +00:00
pthread_support.c re PR libgcj/13212 (JNI/CNI AttachCurrentThread does not register thread with garbage collector) 2006-08-21 22:07:30 +00:00
ptr_chck.c Import GC 6.3alpha1. 2003-07-28 04:18:23 +00:00
real_malloc.c Initial revision 1999-04-07 08:01:30 +00:00
reclaim.c Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
rs6000_mach_dep.s gc.h (GC_INIT): Add DATASTART and DATAEND roots on AIX. 2002-01-25 13:06:24 -05:00
setjmp_t.c Imported version version 6.0alpha7. 2001-05-21 09:35:14 +01:00
solaris_pthreads.c Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
solaris_threads.c Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
sparc_mach_dep.S Import GC 6.3alpha1. 2003-07-28 04:18:23 +00:00
sparc_netbsd_mach_dep.s Initial revision 2001-05-21 07:39:23 +01:00
sparc_sunos4_mach_dep.s Merged GC 5.0alpha4 with local changes, plus: 1999-11-01 23:15:51 +00:00
specific.c specific.c: Check GC_LINUX_THREADS before including private/specific.h. 2004-08-17 00:06:46 +01:00
stubborn.c Imported version version 6.0alpha7. 2001-05-21 09:35:14 +01:00
threadlibs.c Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
typd_mlc.c configure.in (GCINCS): Don't use "boehm-cflags". 2004-08-14 00:05:36 +01:00
version.h Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
win32_threads.c Remove svn:executable property. 2006-01-25 03:13:18 +00:00