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
| Name |
Last commit
|
Last update |
|---|---|---|
| .. | ||
| annotation | Loading commit data... | |
| instrument | Loading commit data... | |
| management | Loading commit data... | |
| ref | Loading commit data... | |
| reflect | Loading commit data... | |
| AbstractMethodError.h | Loading commit data... | |
| Appendable.h | Loading commit data... | |
| ArithmeticException.h | Loading commit data... | |
| ArrayIndexOutOfBoundsException.h | Loading commit data... | |
| ArrayStoreException.h | Loading commit data... | |
| AssertionError.h | Loading commit data... | |
| Boolean.h | Loading commit data... | |
| Byte.h | Loading commit data... | |
| CharSequence.h | Loading commit data... | |
| Character$Subset.h | Loading commit data... | |
| Character$UnicodeBlock$NameType.h | Loading commit data... | |
| Character$UnicodeBlock.h | Loading commit data... | |
| Character.h | Loading commit data... | |
| Character.java | Loading commit data... | |
| Class.h | Loading commit data... | |
| Class.java | Loading commit data... | |
| ClassCastException.h | Loading commit data... | |
| ClassCircularityError.h | Loading commit data... | |
| ClassFormatError.h | Loading commit data... | |
| ClassLoader$AnnotationsKey.h | Loading commit data... | |
| ClassLoader.h | Loading commit data... | |
| ClassLoader.java | Loading commit data... | |
| ClassNotFoundException.h | Loading commit data... | |
| CloneNotSupportedException.h | Loading commit data... | |
| Cloneable.h | Loading commit data... | |
| Comparable.h | Loading commit data... | |
| Compiler.h | Loading commit data... | |
| Deprecated.h | Loading commit data... | |
| Double.h | Loading commit data... | |
| EcosProcess.h | Loading commit data... | |
| EcosProcess.java | Loading commit data... | |
| Enum.h | Loading commit data... | |
| EnumConstantNotPresentException.h | Loading commit data... | |
| Error.h | Loading commit data... | |
| Exception.h | Loading commit data... | |
| ExceptionInInitializerError.h | Loading commit data... | |
| Float.h | Loading commit data... | |
| IllegalAccessError.h | Loading commit data... | |
| IllegalAccessException.h | Loading commit data... | |
| IllegalArgumentException.h | Loading commit data... | |
| IllegalMonitorStateException.h | Loading commit data... | |
| IllegalStateException.h | Loading commit data... | |
| IllegalThreadStateException.h | Loading commit data... | |
| IncompatibleClassChangeError.h | Loading commit data... | |
| IndexOutOfBoundsException.h | Loading commit data... | |
| InheritableThreadLocal.h | Loading commit data... | |
| InstantiationError.h | Loading commit data... | |
| InstantiationException.h | Loading commit data... | |
| Integer.h | Loading commit data... | |
| InternalError.h | Loading commit data... | |
| InterruptedException.h | Loading commit data... | |
| Iterable.h | Loading commit data... | |
| LinkageError.h | Loading commit data... | |
| Long.h | Loading commit data... | |
| Math.h | Loading commit data... | |
| Math.java | Loading commit data... | |
| NegativeArraySizeException.h | Loading commit data... | |
| NoClassDefFoundError.h | Loading commit data... | |
| NoSuchFieldError.h | Loading commit data... | |
| NoSuchFieldException.h | Loading commit data... | |
| NoSuchMethodError.h | Loading commit data... | |
| NoSuchMethodException.h | Loading commit data... | |
| NullPointerException.h | Loading commit data... | |
| Number.h | Loading commit data... | |
| NumberFormatException.h | Loading commit data... | |
| Object.h | Loading commit data... | |
| Object.java | Loading commit data... | |
| OutOfMemoryError.h | Loading commit data... | |
| Override.h | Loading commit data... | |
| Package.h | Loading commit data... | |
| PosixProcess$EOFInputStream.h | Loading commit data... | |
| PosixProcess$ProcessManager.h | Loading commit data... | |
| PosixProcess.h | Loading commit data... | |
| PosixProcess.java | Loading commit data... | |
| Process.h | Loading commit data... | |
| ProcessBuilder.h | Loading commit data... | |
| Readable.h | Loading commit data... | |
| Runnable.h | Loading commit data... | |
| Runtime.h | Loading commit data... | |
| Runtime.java | Loading commit data... | |
| RuntimeException.h | Loading commit data... | |
| RuntimePermission.h | Loading commit data... | |
| SecurityContext.h | Loading commit data... | |
| SecurityException.h | Loading commit data... | |
| SecurityManager$1.h | Loading commit data... | |
| SecurityManager.h | Loading commit data... | |
| Short.h | Loading commit data... | |
| StackOverflowError.h | Loading commit data... | |
| StackTraceElement.h | Loading commit data... | |
| StrictMath.h | Loading commit data... | |
| String$CaseInsensitiveComparator.h | Loading commit data... | |
| String.h | Loading commit data... | |
| String.java | Loading commit data... | |
| StringBuffer.h | Loading commit data... | |
| StringBuffer.java | Loading commit data... | |
| StringBuilder.h | Loading commit data... | |
| StringBuilder.java | Loading commit data... | |
| StringIndexOutOfBoundsException.h | Loading commit data... | |
| SuppressWarnings.h | Loading commit data... | |
| System$EnvironmentCollection.h | Loading commit data... | |
| System$EnvironmentMap.h | Loading commit data... | |
| System$EnvironmentSet.h | Loading commit data... | |
| System.h | Loading commit data... | |
| System.java | Loading commit data... | |
| Thread$State.h | Loading commit data... | |
| Thread$UncaughtExceptionHandler.h | Loading commit data... | |
| Thread.h | Loading commit data... | |
| Thread.java | Loading commit data... | |
| ThreadDeath.h | Loading commit data... | |
| ThreadGroup.h | Loading commit data... | |
| ThreadLocal.h | Loading commit data... | |
| ThreadLocal.java | Loading commit data... | |
| Throwable$StaticData.h | Loading commit data... | |
| Throwable.h | Loading commit data... | |
| TypeNotPresentException.h | Loading commit data... | |
| UnknownError.h | Loading commit data... | |
| UnsatisfiedLinkError.h | Loading commit data... | |
| UnsupportedClassVersionError.h | Loading commit data... | |
| UnsupportedOperationException.h | Loading commit data... | |
| VMClassLoader.h | Loading commit data... | |
| VMClassLoader.java | Loading commit data... | |
| VMCompiler.h | Loading commit data... | |
| VMCompiler.java | Loading commit data... | |
| VMDouble.h | Loading commit data... | |
| VMDouble.java | Loading commit data... | |
| VMFloat.h | Loading commit data... | |
| VMFloat.java | Loading commit data... | |
| VMProcess.h | Loading commit data... | |
| VMProcess.java | Loading commit data... | |
| VMThrowable.h | Loading commit data... | |
| VMThrowable.java | Loading commit data... | |
| VerifyError.h | Loading commit data... | |
| VirtualMachineError.h | Loading commit data... | |
| Void.h | Loading commit data... | |
| Win32Process.h | Loading commit data... | |
| Win32Process.java | Loading commit data... | |
| natCharacter.cc | Loading commit data... | |
| natClass.cc | Loading commit data... | |
| natClassLoader.cc | Loading commit data... | |
| natEcosProcess.cc | Loading commit data... | |
| natMath.cc | Loading commit data... | |
| natObject.cc | Loading commit data... | |
| natPosixProcess.cc | Loading commit data... | |
| natRuntime.cc | Loading commit data... | |
| natString.cc | Loading commit data... | |
| natStringBuffer.cc | Loading commit data... | |
| natStringBuilder.cc | Loading commit data... | |
| natSystem.cc | Loading commit data... | |
| natThread.cc | Loading commit data... | |
| natThreadLocal.cc | Loading commit data... | |
| natVMClassLoader.cc | Loading commit data... | |
| natVMDouble.cc | Loading commit data... | |
| natVMFloat.cc | Loading commit data... | |
| natVMProcess.cc | Loading commit data... | |
| natVMThrowable.cc | Loading commit data... | |
| natWin32Process.cc | Loading commit data... |