gcc/libjava/java/lang
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
..
annotation
instrument
management [multiple changes] 2007-02-16 13:51:04 +00:00
ref
reflect ffi.h.in (ffi_closure_alloc, [...]): New. 2007-03-07 07:27:25 +00:00
AbstractMethodError.h
Appendable.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
ArithmeticException.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
ArrayIndexOutOfBoundsException.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
ArrayStoreException.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
AssertionError.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Boolean.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Byte.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Character.h Character.java: Re-merged with Classpath. 2007-03-05 17:27:44 +00:00
Character.java Character.java: Re-merged with Classpath. 2007-03-05 17:27:44 +00:00
Character$Subset.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Character$UnicodeBlock.h Character.java: Re-merged with Classpath. 2007-03-05 17:27:44 +00:00
Character$UnicodeBlock$NameType.h Character.java: Re-merged with Classpath. 2007-03-05 17:27:44 +00:00
CharSequence.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Class.h ffi.h.in (ffi_closure_alloc, [...]): New. 2007-03-07 07:27:25 +00:00
Class.java Calendar.java: Implement Comparable<Calendar>. 2007-02-01 20:34:08 +00:00
ClassCastException.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
ClassCircularityError.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
ClassFormatError.h
ClassLoader.h Checking in header files missed by earlier commit 2007-02-06 23:59:34 +00:00
ClassLoader.java * java/lang/ClassLoader.java (getResources): No longer final. 2007-02-01 23:00:01 +00:00
ClassLoader$AnnotationsKey.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
ClassNotFoundException.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Cloneable.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
CloneNotSupportedException.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Comparable.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Compiler.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Deprecated.h
Double.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
EcosProcess.h sources.am, [...]: Rebuilt. 2007-03-05 15:57:13 +00:00
EcosProcess.java sources.am, [...]: Rebuilt. 2007-03-05 15:57:13 +00:00
Enum.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
EnumConstantNotPresentException.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Error.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Exception.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
ExceptionInInitializerError.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Float.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
IllegalAccessError.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
IllegalAccessException.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
IllegalArgumentException.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
IllegalMonitorStateException.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
IllegalStateException.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
IllegalThreadStateException.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
IncompatibleClassChangeError.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
IndexOutOfBoundsException.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
InheritableThreadLocal.h
InstantiationError.h
InstantiationException.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Integer.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
InternalError.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
InterruptedException.h
Iterable.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
LinkageError.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Long.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Math.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Math.java
natCharacter.cc unicode-muncher.pl: Removed this file. 2006-03-28 16:12:52 +00:00
natClass.cc ffi.h.in (ffi_closure_alloc, [...]): New. 2007-03-07 07:27:25 +00:00
natClassLoader.cc prims.cc (_Jv_Abort): fflush (stderr). 2007-01-31 19:04:35 +00:00
natEcosProcess.cc Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
natMath.cc re PR libgcj/27731 (Math cbrt(), cosh(), expm1(), hypot(), log1p(), sinh() and tanh() not implemented) 2006-05-24 17:14:45 +00:00
natObject.cc re PR libgcj/23353 (clone() copies internal lock data with hash synchronization off) 2005-08-12 16:40:32 +00:00
natPosixProcess.cc sources.am, [...]: Rebuilt. 2007-03-05 15:57:13 +00:00
natRuntime.cc sources.am, [...]: Rebuilt. 2007-03-05 15:57:13 +00:00
natString.cc Character.java: Re-merged with Classpath. 2007-03-05 17:27:44 +00:00
natStringBuffer.cc natStringBuffer.cc (regionMatches): New function. 2003-03-24 00:50:18 +00:00
natStringBuilder.cc javaprims.h: Updated. 2005-05-10 18:28:31 +00:00
natSystem.cc win32.cc (_Jv_platform_nanotime): New function. 2006-03-09 18:47:54 +00:00
natThread.cc Thread.java (Thread(ThreadGroup, Runnable, String)): Pass new parameter constructor. 2007-02-16 21:23:10 +00:00
natThreadLocal.cc Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
natVMClassLoader.cc natClass.cc (initializeClass): Re-throw SecurityExceptions. 2007-01-29 13:14:38 +00:00
natVMDouble.cc natVMPipeEcos.cc: Renamed from gnu/java/nio/natPipeImplEcos.cc. 2007-01-18 11:32:40 +00:00
natVMFloat.cc natVMPipeEcos.cc: Renamed from gnu/java/nio/natPipeImplEcos.cc. 2007-01-18 11:32:40 +00:00
natVMProcess.cc sources.am, [...]: Rebuilt. 2007-03-05 15:57:13 +00:00
natVMThrowable.cc prims.cc (_Jv_CreateJavaVM): Move setting runtimeInitialized from the start to the end of the function. 2006-07-28 07:40:17 +00:00
natWin32Process.cc sources.am, [...]: Rebuilt. 2007-03-05 15:57:13 +00:00
NegativeArraySizeException.h
NoClassDefFoundError.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
NoSuchFieldError.h
NoSuchFieldException.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
NoSuchMethodError.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
NoSuchMethodException.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
NullPointerException.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Number.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
NumberFormatException.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Object.h Object.h (throwNoSuchMethodError): New method. 2005-12-08 14:19:13 +00:00
Object.java LogManager.java (loggers): Genericized. 2007-02-01 21:36:01 +00:00
OutOfMemoryError.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Override.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Package.h
PosixProcess.h sources.am, [...]: Rebuilt. 2007-03-05 15:57:13 +00:00
PosixProcess.java sources.am, [...]: Rebuilt. 2007-03-05 15:57:13 +00:00
PosixProcess$EOFInputStream.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
PosixProcess$ProcessManager.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Process.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
ProcessBuilder.h
Readable.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Runnable.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Runtime.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Runtime.java re PR classpath/26990 (SecurityManager.checkExit() problem) 2006-04-04 23:25:09 +00:00
RuntimeException.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
RuntimePermission.h
SecurityContext.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
SecurityException.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
SecurityManager.h Updating header files. Earlier change here seems to have been in error. 2007-03-05 14:29:47 +00:00
SecurityManager$1.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Short.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
StackOverflowError.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
StackTraceElement.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
StrictMath.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
String.h Character.java: Re-merged with Classpath. 2007-03-05 17:27:44 +00:00
String.java Character.java: Re-merged with Classpath. 2007-03-05 17:27:44 +00:00
String$CaseInsensitiveComparator.h Character.java: Re-merged with Classpath. 2007-03-05 17:27:44 +00:00
StringBuffer.h Character.java: Re-merged with Classpath. 2007-03-05 17:27:44 +00:00
StringBuffer.java Character.java: Re-merged with Classpath. 2007-03-05 17:27:44 +00:00
StringBuilder.h Character.java: Re-merged with Classpath. 2007-03-05 17:27:44 +00:00
StringBuilder.java Character.java: Re-merged with Classpath. 2007-03-05 17:27:44 +00:00
StringIndexOutOfBoundsException.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
SuppressWarnings.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
System.h
System.java sources.am, [...]: Rebuilt. 2007-03-05 15:57:13 +00:00
System$EnvironmentCollection.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
System$EnvironmentMap.h sources.am, [...]: Rebuilt. 2007-03-05 15:57:13 +00:00
System$EnvironmentSet.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Thread.h Updating header files. Earlier change here seems to have been in error. 2007-03-05 14:29:47 +00:00
Thread.java Thread.java (Thread(ThreadGroup, Runnable, String)): Pass new parameter constructor. 2007-02-16 21:23:10 +00:00
Thread$State.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Thread$UncaughtExceptionHandler.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
ThreadDeath.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
ThreadGroup.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
ThreadLocal.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
ThreadLocal.java Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Throwable.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
Throwable$StaticData.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
TypeNotPresentException.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
UnknownError.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
UnsatisfiedLinkError.h
UnsupportedClassVersionError.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
UnsupportedOperationException.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
VerifyError.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
VirtualMachineError.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
VMClassLoader.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
VMClassLoader.java VMClassLoader.java (initialize): Set default library control to LIB_NEVER. 2006-05-31 17:47:44 +00:00
VMCompiler.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
VMCompiler.java 2007-02-23 Gary Benson <gbenson@redhat.com> 2007-02-23 15:15:58 +00:00
VMDouble.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
VMDouble.java re PR java/22578 (should inline floatToIntBits et al) 2006-02-08 18:06:11 +00:00
VMFloat.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
VMFloat.java re PR java/22578 (should inline floatToIntBits et al) 2006-02-08 18:06:11 +00:00
VMProcess.h sources.am, [...]: Rebuilt. 2007-03-05 15:57:13 +00:00
VMProcess.java sources.am, [...]: Rebuilt. 2007-03-05 15:57:13 +00:00
VMThrowable.h Merged gcj-eclipse branch to trunk. 2007-01-09 19:58:05 +00:00
VMThrowable.java prims.cc (_Jv_CreateJavaVM): Move setting runtimeInitialized from the start to the end of the function. 2006-07-28 07:40:17 +00:00
Void.h
Win32Process.h sources.am, [...]: Rebuilt. 2007-03-05 15:57:13 +00:00
Win32Process.java sources.am, [...]: Rebuilt. 2007-03-05 15:57:13 +00:00