gcc/libjava/include
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
..
boehm-gc.h re PR libgcj/13212 (JNI/CNI AttachCurrentThread does not register thread with garbage collector) 2006-08-21 22:07:30 +00:00
config.h.in Make-lang.in (JAVA_MANFILES): Add doc/gc-analyze.1. 2007-02-15 17:25:24 +00:00
darwin-signal.h Index: gcc/ChangeLog 2004-07-01 04:09:07 +00:00
default-signal.h prims.cc (unblock_signal): Annotate signum with __unused__ to avoid warnings in the non-POSIX_VERSION case. 2004-09-26 13:38:49 -07:00
dwarf2-signal.h prims.cc (catch_segv): Create exception in handler. 2003-06-13 12:20:45 +00:00
execution.h ffi.h.in (ffi_closure_alloc, [...]): New. 2007-03-07 07:27:25 +00:00
hppa-signal.h configure.ac: Add the POSIX thread libs to the HP-UX PA configuration. 2006-05-20 23:33:07 +02:00
i386-signal.h i386-signal.h: Rewrite to use rt_sigaction. 2007-01-12 12:30:56 +00:00
java-assert.h All files: Updated copyright information. 2000-03-07 19:55:28 +00:00
java-chardecomp.h unicode-decomp.pl: Move from chartables.pl... 2002-03-06 18:54:45 +00:00
java-chartables.h unicode-muncher.pl: Removed this file. 2006-03-28 16:12:52 +00:00
java-cpool.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
java-insns.h java-insns.h (enum java_code): Add op_breakpoint. 2006-10-14 20:11:12 +00:00
java-interp.h ffi.h.in (ffi_closure_alloc, [...]): New. 2007-03-07 07:27:25 +00:00
java-props.h re PR libgcj/23761 (java.library.path doesn't affect module loading path) 2005-09-08 21:26:25 +00:00
java-stack.h java-interp.h: Added _Jv_Frame class and its two subclasses _Jv_InterpFrame and _Jv_NativeFrame. 2007-01-29 22:05:56 +00:00
jni_md.h re PR java/29812 (env->klass value is not updated during the native calls) 2007-01-22 23:04:16 +00:00
jvm.h ffi.h.in (ffi_closure_alloc, [...]): New. 2007-03-07 07:27:25 +00:00
jvmpi.h Forgot to add this file before... 2000-04-02 15:41:00 +00:00
jvmti_md.h jvmti_md.h (_CLASSPATH_VM_JVMTI_TYPES_DEFINED): Define. 2007-01-29 17:43:34 +00:00
jvmti-int.h jvmti-int.h (JVMTI): Declare member "enabled". 2007-01-31 23:25:39 +00:00
Makefile.am Imported Classpath 0.18. 2005-09-23 21:31:04 +00:00
Makefile.in Makefile.am: Add dummy install-pdf target. 2007-03-01 16:14:33 -08:00
mips-signal.h mips-signal.h (sys/syscall.h): Do not include. 2006-11-20 19:49:08 +00:00
no-gc.h no-gc.h (_Jv_SuspendThread): Declare. 2006-06-26 16:31:06 +00:00
no-threads.h re PR libgcj/28546 (./java/lang/Thread.h:31: error: using typedef-name '_Jv_Thread_t' after 'class') 2006-08-02 22:18:05 +02:00
pa-signal.h pa32-linux.h (MD_FALLBACK_FRAME_STATE_FOR): Define. 2004-07-09 03:39:35 +00:00
posix-threads.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
posix.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
powerpc-signal.h powerpc-signal.h: Fix typo in comment. 2006-03-10 23:31:15 +01:00
s390-signal.h s390.md ("udivsi3"): Ensure trap is generated for division by zero. 2004-07-14 13:09:09 +00:00
sh-signal.h linux-unwind.h (shmedia_fallback_frame_state): Set fs->signal_frame. 2006-03-16 02:44:10 +00:00
sparc-signal.h prims.cc (unblock_signal): Annotate signum with __unused__ to avoid warnings in the non-POSIX_VERSION case. 2004-09-26 13:38:49 -07:00
stamp-h.in * include/stamp-h.in: New file. 1999-07-19 18:03:31 +00:00
win32-signal.h prims.cc (catch_segv): Create exception in handler. 2003-06-13 12:20:45 +00:00
win32-threads.h * include/win32-threads.h: Added #undef OUT. 2007-02-22 14:13:34 +00:00
win32.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
x86_64-signal.h i386-signal.h: Rewrite to use rt_sigaction. 2007-01-12 12:30:56 +00:00