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
..
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
Mac_files
tests Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
aclocal.m4 aclocal.m4: Regenerate to use multi.m4. 2007-01-17 19:48:52 +00:00
add_gc_prefix.c
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
AmigaOS.c
backgraph.c backgraph.c, gc_priv.h (GC_traverse_back_graph, [...]): split GC_traverse_back_graph. 2004-08-28 00:41:41 +00:00
BCC_MAKEFILE configure.in (GCINCS): Don't use "boehm-cflags". 2004-08-14 00:05:36 +01:00
blacklst.c
callprocs
ChangeLog ffi.h.in (ffi_closure_alloc, [...]): New. 2007-03-07 07:27:25 +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
digimars.mak
dyn_load.c configure.ac: Replaced HAS_I386_THREAD_STATE_* with HAS_X86_THREAD_STATE32_* and... 2007-01-11 21:06:45 +01:00
EMX_MAKEFILE
finalize.c ffi.h.in (ffi_closure_alloc, [...]): New. 2007-03-07 07:27:25 +00:00
gc_cpp.cc
gc_cpp.cpp
gc_dlopen.c
gc.mak
gcc_support.c
gcj_mlc.c configure.in (GCINCS): Don't use "boehm-cflags". 2004-08-14 00:05:36 +01:00
gcname.c
headers.c configure.in (GCINCS): Don't use "boehm-cflags". 2004-08-14 00:05:36 +01:00
hpux_test_and_clear.s
ia64_save_regs_in_stack.s
if_mach.c
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
MacOS.c
MacProjects.sit.hqx
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.DLLs
Makefile.in Makefile.am: Add dummy install-pdf target. 2007-03-01 15:52:38 -08: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_rts.c allchblk.c (GC_allochblk_nth): Dont overlook available space if GC disabled... 2005-02-09 21:33:02 +00:00
mark.c Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
mips_sgi_mach_dep.s
mips_ultrix_mach_dep.s
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
NT_MAKEFILE configure.in (GCINCS): Don't use "boehm-cflags". 2004-08-14 00:05:36 +01:00
NT_STATIC_THREADS_MAKEFILE
NT_THREADS_MAKEFILE
obj_map.c
OS2_MAKEFILE
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
pcr_interface.c
PCR-Makefile
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
real_malloc.c
reclaim.c Import Boehm GC version 6.6. 2006-01-25 03:03:14 +00:00
rs6000_mach_dep.s
setjmp_t.c
SMakefile.amiga
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
sparc_netbsd_mach_dep.s
sparc_sunos4_mach_dep.s
specific.c specific.c: Check GC_LINUX_THREADS before including private/specific.h. 2004-08-17 00:06:46 +01:00
stubborn.c
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
WCC_MAKEFILE
win32_threads.c Remove svn:executable property. 2006-01-25 03:13:18 +00:00