cacao.git
16 years ago* Merged with f9adc5b4d7f0.
Christian Thalinger [Sat, 26 Apr 2008 14:42:44 +0000 (16:42 +0200)]
* Merged with f9adc5b4d7f0.

16 years ago* .hgignore: Added tests/regression/junit/*.class.
Christian Thalinger [Sat, 26 Apr 2008 14:41:27 +0000 (16:41 +0200)]
* .hgignore: Added tests/regression/junit/*.class.

* configure.ac (AC_CONFIG_FILES): Added
tests/regression/junit/Makefile.

* tests/regression/Makefile.am (SUBDIRS): Added junit.
(SOURCE_FILES): Removed clinitexceptions.java.
(EXTRA_DIST): Removed clinitexceptions.2output.
(OUTPUT_JAVA_TESTS): Removed clinitexception.

* tests/regression/junit/All.java: Likewise.
* tests/regression/junit/Makefile.am: Likewise
* tests/regression/junit/TestExceptionInStaticClassInitializer.java:
Likewise.

* tests/regression/clinitexception.2output: Removed.
* tests/regression/clinitexception.java: Likewise.

16 years ago* tests/regression/bugzilla/Makefile.am (build): Changed -cp to
Christian Thalinger [Sat, 26 Apr 2008 12:19:47 +0000 (14:19 +0200)]
* tests/regression/bugzilla/Makefile.am (build): Changed -cp to
-classpath so GCJ works too.
(check): Likewise.

16 years ago* src/native/vm/gnu/java_lang_reflect_VMMethod.c (getDefaultValue):
Christian Thalinger [Sat, 26 Apr 2008 11:34:12 +0000 (13:34 +0200)]
* src/native/vm/gnu/java_lang_reflect_VMMethod.c (getDefaultValue):
Pass the correct method object to the Java method.

16 years ago* src/vm/vm.c (vm_get_mainclass_from_jar): Print error when Main-Class
Christian Thalinger [Sat, 26 Apr 2008 11:32:30 +0000 (13:32 +0200)]
* src/vm/vm.c (vm_get_mainclass_from_jar): Print error when Main-Class
attribute not found.

16 years ago* m4/jre-layout.m4 (AC_CHECK_WITH_JRE_LAYOUT): Fixed typo, used
Christian Thalinger [Sat, 26 Apr 2008 09:27:56 +0000 (11:27 +0200)]
* m4/jre-layout.m4 (AC_CHECK_WITH_JRE_LAYOUT): Fixed typo, used
enableval instead of withval.

16 years ago* src/native/vm/gnu/gnu_classpath_jdwp_VMFrame.c: Use stdint-types.
Christian Thalinger [Thu, 24 Apr 2008 14:48:06 +0000 (16:48 +0200)]
* src/native/vm/gnu/gnu_classpath_jdwp_VMFrame.c: Use stdint-types.
* src/native/vm/gnu/gnu_classpath_jdwp_VMMethod.c,
src/native/vm/gnu/gnu_classpath_jdwp_VMVirtualMachine.c,
src/native/vm/gnu/java_lang_VMClass.c,
src/native/vm/gnu/java_lang_VMClassLoader.c,
src/native/vm/gnu/java_lang_VMSystem.c,
src/native/vm/gnu/java_lang_reflect_VMMethod.c: Likewise.

16 years ago* src/native/vm/gnu/gnu_java_lang_management_VMMemoryMXBeanImpl.c: Use
Christian Thalinger [Thu, 24 Apr 2008 14:31:18 +0000 (16:31 +0200)]
* src/native/vm/gnu/gnu_java_lang_management_VMMemoryMXBeanImpl.c: Use
stdint-types.

16 years ago* src/cacaoh/dummy.c (heap_alloc_uncollectable): Use stdint-types.
Christian Thalinger [Thu, 24 Apr 2008 14:13:41 +0000 (16:13 +0200)]
* src/cacaoh/dummy.c (heap_alloc_uncollectable): Use stdint-types.
* src/mm/boehm.c: Likewise.
* src/mm/gc-common.h: Likewise.

16 years ago* src/cacaoh/dummy.c: Use stdint-types.
Christian Thalinger [Thu, 24 Apr 2008 13:50:34 +0000 (15:50 +0200)]
* src/cacaoh/dummy.c: Use stdint-types.
* src/mm/memory.c,
src/mm/memory.h,
src/vm/builtin.c,
src/vm/builtin.h: Likewise.

16 years ago* src/native/vm/sun/jvm.c (JVM_GetHostName): Use TRACEJVMCALLSENTER
Christian Thalinger [Thu, 24 Apr 2008 10:12:56 +0000 (12:12 +0200)]
* src/native/vm/sun/jvm.c (JVM_GetHostName): Use TRACEJVMCALLSENTER
and TRACEJVMCALLSEXIT.

16 years ago* src/vm/jit/arm/codegen.h (SPLIT_LOAD): Removed.
Christian Thalinger [Thu, 24 Apr 2008 09:58:13 +0000 (11:58 +0200)]
* src/vm/jit/arm/codegen.h (SPLIT_LOAD): Removed.

16 years ago* src/vm/jit/jit.h (stackptr): Removed.
Christian Thalinger [Wed, 23 Apr 2008 13:23:45 +0000 (15:23 +0200)]
* src/vm/jit/jit.h (stackptr): Removed.
(stackelement): Moved from here...
* src/vm/jit/stack.h (stackelement_t): ...to here.

* src/vm/jit/abi.h,
src/vm/jit/allocator/liveness.c,
src/vm/jit/allocator/lsra.c,
src/vm/jit/allocator/lsra.h,
src/vm/jit/allocator/simplereg.c,
src/vm/jit/alpha/md-abi.c,
src/vm/jit/arm/md-abi.c,
src/vm/jit/i386/asmpart.S,
src/vm/jit/i386/md-abi.c,
src/vm/jit/loop/analyze.c,
src/vm/jit/m68k/linux/md-abi.c,
src/vm/jit/mips/md-abi.c,
src/vm/jit/optimizing/lifetimes.h,
src/vm/jit/optimizing/lsra.c,
src/vm/jit/parse.c,
src/vm/jit/powerpc/darwin/md-abi.c,
src/vm/jit/powerpc/linux/md-abi.c,
src/vm/jit/powerpc/netbsd/md-abi.c,
src/vm/jit/powerpc64/linux/md-abi.c,
src/vm/jit/s390/md-abi.c,
src/vm/jit/sparc64/md-abi.c,
src/vm/jit/stack.c,
src/vm/jit/x86_64/md-abi.c: Replaced stackptr with stackelement_t*.

16 years ago* src/native/vm/gnu/java_lang_VMRuntime.c: Compiler warning squashing.
Stefan Ring [Wed, 23 Apr 2008 07:47:55 +0000 (09:47 +0200)]
* src/native/vm/gnu/java_lang_VMRuntime.c: Compiler warning squashing.
* src/vm/jit/executionstate.c (executionstate_println): Likewise.

16 years ago* autogen.sh: Fixed error output.
Christian Thalinger [Wed, 23 Apr 2008 07:39:27 +0000 (09:39 +0200)]
* autogen.sh: Fixed error output.

16 years ago* autogen.sh: Support libtool-2.x.
Christian Thalinger [Wed, 23 Apr 2008 07:35:46 +0000 (09:35 +0200)]
* autogen.sh: Support libtool-2.x.

16 years ago* src/vmcore/system.h (system_scandir) [__LINUX__]: The signature is different
Christian Thalinger [Wed, 23 Apr 2008 07:26:52 +0000 (09:26 +0200)]
* src/vmcore/system.h (system_scandir) [__LINUX__]: The signature is different
on various OSs.

16 years ago* src/vm/jit/verify/typecheck.c (typecheck): Fixed compiler warning.
Christian Thalinger [Tue, 22 Apr 2008 15:19:15 +0000 (17:19 +0200)]
* src/vm/jit/verify/typecheck.c (typecheck): Fixed compiler warning.

16 years ago* src/native/vm/java_lang_Class.c: Removed.
Christian Thalinger [Tue, 22 Apr 2008 14:35:48 +0000 (16:35 +0200)]
* src/native/vm/java_lang_Class.c: Removed.
* src/native/vm/java_lang_Class.h: Likewise.
* src/native/vm/Makefile.am (libnativevm_la_SOURCES): Removed
java_lang_Class.[ch].

* src/cacaoh/dummy.c (builtin_instanceof): New function.
(reflect_constructor_new, reflect_field_new, reflect_method_new):
Likewise.

* src/native/jni.c (_Jv_JNI_IsAssignableFrom): Use new class
functions.
(_Jv_JNI_IsInstanceOf): Likewise.

* src/native/vm/cldc1.1/java_lang_Class.c (forName): Implemented
directly.
(isInstance): Use new class functions.
(isAssignableFrom): Likewise.
(getName): Likewise.

* src/native/vm/gnu/java_lang_VMClass.c (isInstance): Likewise.
(isAssignableFrom): Likewise.
(getName): Likewise.
(getDeclaredClasses): Likewise.
(getDeclaredFields): Likewise.
(getDeclaredMethods): Likewise.
(getDeclaredConstructors): Likewise.
(forName): Implemented directly.
(getDeclaredAnnotations): Likewise.
(getEnclosingConstructor): Use new class functions.
(getEnclosingMethod): Likewise.
* src/native/vm/gnu/java_lang_VMThrowable.c (getStackTrace): Likewise.

* src/native/vm/reflect.h (_REFLECT_H): Added.

* src/native/vm/sun/jvm.c (JVM_GetStackTraceElement): Use new class
functions.
(JVM_GetClassName): Likewise.
(JVM_GetClassDeclaredFields): Likewise.
(JVM_GetClassDeclaredMethods): Likewise.
(JVM_GetClassDeclaredConstructors): Likewise.
(JVM_LoadLibrary): Use TRACEJVMCALLSENTER and TRACEJVMCALLSEXIT.
(JVM_FindLibraryEntry): Likewise.

* src/vmcore/class.c (class_is_assignable_from): New function.
(class_is_instance): Likewise.
(class_get_declaredconstructors): Likewise.
(class_get_declaredfields): Likewise.
(class_get_declaredmethods): Likewise.
(class_get_enclosingconstructor): Likewise.
(class_get_enclosingmethod): Renamed to class_get_enclosingmethod_raw.
class_get_enclosingmethod): Likewise.
* src/vmcore/class.h (class_get_classname): New function.

16 years ago* src/vm/jit/code.h (codeinfo): Moved stackframesize outside of
Christian Thalinger [Tue, 22 Apr 2008 13:52:57 +0000 (15:52 +0200)]
* src/vm/jit/code.h (codeinfo): Moved stackframesize outside of
ENABLE_REPLACEMENT.

16 years ago* Merged twisti branch.
Christian Thalinger [Tue, 22 Apr 2008 12:41:06 +0000 (14:41 +0200)]
* Merged twisti branch.

16 years agoDummy commit to remove twisti branch.
Christian Thalinger [Tue, 22 Apr 2008 12:40:41 +0000 (14:40 +0200)]
Dummy commit to remove twisti branch.
* NEWS: Useless.

--HG--
branch : twisti

16 years agoDummy commit to create twisti branch.
Christian Thalinger [Tue, 22 Apr 2008 12:39:14 +0000 (14:39 +0200)]
Dummy commit to create twisti branch.
* NEWS: Useless.

--HG--
branch : twisti

16 years ago* Merged with tip.
Christian Thalinger [Tue, 22 Apr 2008 12:36:25 +0000 (14:36 +0200)]
* Merged with tip.

16 years agoReverted 40d6392fb38f.
Christian Thalinger [Tue, 22 Apr 2008 12:35:03 +0000 (14:35 +0200)]
Reverted 40d6392fb38f.
* src/native/vm/sun/jvm.c (JVM_FindLibraryEntry): Using HPI function
crashes.

16 years ago* Merged executionstate branch.
Christian Thalinger [Tue, 22 Apr 2008 11:53:13 +0000 (13:53 +0200)]
* Merged executionstate branch.

16 years ago* src/vm/jit/i386/darwin/md-os.c (md_replace_executionstate_read):
Christian Thalinger [Tue, 22 Apr 2008 11:50:26 +0000 (13:50 +0200)]
* src/vm/jit/i386/darwin/md-os.c (md_replace_executionstate_read):
Renamed to md_executionstate_read.
(md_replace_executionstate_write): Renamed to md_executionstate_write.

--HG--
branch : executionstate-branch

16 years ago* src/native/vm/sun/jvm.c (JVM_FindLibraryEntry): Use HPI.
Christian Thalinger [Tue, 22 Apr 2008 09:44:21 +0000 (11:44 +0200)]
* src/native/vm/sun/jvm.c (JVM_FindLibraryEntry): Use HPI.

16 years ago* src/vm/jit/powerpc/linux/md-os.c (md_executionstate_write): Fixed
Christian Thalinger [Tue, 22 Apr 2008 09:37:59 +0000 (11:37 +0200)]
* src/vm/jit/powerpc/linux/md-os.c (md_executionstate_write): Fixed
comment typo.

--HG--
branch : executionstate-branch

16 years ago* src/vm/jit/powerpc/linux/md-os.c (md_replace_executionstate_read):
Christian Thalinger [Tue, 22 Apr 2008 09:31:46 +0000 (11:31 +0200)]
* src/vm/jit/powerpc/linux/md-os.c (md_replace_executionstate_read):
Renamed to md_executionstate_read.
(md_replace_executionstate_write): Renamed to md_executionstate_write.

--HG--
branch : executionstate-branch

16 years ago* Merged with tip.
Christian Thalinger [Tue, 22 Apr 2008 09:13:27 +0000 (11:13 +0200)]
* Merged with tip.

16 years ago* src/native/jni.h (_Jv_jni_invokeNative): Removed.
Christian Thalinger [Mon, 21 Apr 2008 11:58:21 +0000 (13:58 +0200)]
* src/native/jni.h (_Jv_jni_invokeNative): Removed.

16 years ago* src/native/jni.c (jni_GetPrimitiveArrayCritical): Implemented
Christian Thalinger [Sun, 20 Apr 2008 19:39:13 +0000 (21:39 +0200)]
* src/native/jni.c (jni_GetPrimitiveArrayCritical): Implemented
correcly.
(jni_ReleasePrimitiveArrayCritical): Likewise.

16 years ago* src/vm/jit/linenumbertable.c (linenumbertable_create): Changed the
Christian Thalinger [Thu, 17 Apr 2008 13:01:07 +0000 (15:01 +0200)]
* src/vm/jit/linenumbertable.c (linenumbertable_create): Changed the
direction of the list.
(linenumbertable_list_entry_add): Likewise.
(linenumbertable_list_entry_add_inline_start): Likewise.
(linenumbertable_list_entry_add_inline_end): Likewise.

16 years ago* src/vm/jit/emit-common.c (emit_label_bccz): Code restructured.
Christian Thalinger [Thu, 17 Apr 2008 11:15:20 +0000 (13:15 +0200)]
* src/vm/jit/emit-common.c (emit_label_bccz): Code restructured.
(emit_label): Likewise.

16 years ago* src/vm/jit/patcher-common.c (patcher_resolve): New function.
Christian Thalinger [Thu, 17 Apr 2008 07:46:21 +0000 (09:46 +0200)]
* src/vm/jit/patcher-common.c (patcher_resolve): New function.
* src/vm/jit/patcher-common.h (patcher_resolve): Export.
* src/vm/jit/codegen-common.c (codegen_finish): Use patcher_resolve.

16 years ago* src/vm/jit/verify/typeinfo.h (typeinfo): Renamed to typeinfo_t.
Christian Thalinger [Wed, 16 Apr 2008 12:10:00 +0000 (14:10 +0200)]
* src/vm/jit/verify/typeinfo.h (typeinfo): Renamed to typeinfo_t.
(typeinfo_mergedlist): Renamed to typeinfo_mergedlist_t.
(typedescriptor): Renamed to typedescriptor_t.

* src/vm/jit/reg.h,
src/vm/jit/verify/typecheck-builtins.inc,
src/vm/jit/verify/typecheck-common.h,
src/vm/jit/verify/typecheck-fields.inc,
src/vm/jit/verify/typecheck-invoke.inc,
src/vm/jit/verify/typecheck-stackbased.c,
src/vm/jit/verify/typecheck.c,
src/vm/jit/verify/typeinfo.c,
src/vm/resolve.c,
src/vm/resolve.h: Likewise.

16 years ago* src/vmcore/references.h (parseddesc): Renamed to parseddesc_t.
Christian Thalinger [Wed, 16 Apr 2008 08:52:10 +0000 (10:52 +0200)]
* src/vmcore/references.h (parseddesc): Renamed to parseddesc_t.

* src/vmcore/descriptor.c: Likewise.

16 years ago* src/vmcore/linker.h (_vftbl): Renamed class to clazz.
Christian Thalinger [Wed, 16 Apr 2008 08:16:59 +0000 (10:16 +0200)]
* src/vmcore/linker.h (_vftbl): Renamed class to clazz.

* src/native/jni.c,
src/native/llni.h,
src/vm/builtin.c,
src/vm/exceptions.c,
src/vm/jit/replace.c,
src/vm/jit/trace.c,
src/vm/jit/verify/typeinfo.c,
src/vmcore/class.c,
src/vmcore/linker.c: Likewise.

16 years ago* src/vmcore/loader.h (classloader): Renamed to classloader_t.
Christian Thalinger [Wed, 16 Apr 2008 07:58:50 +0000 (09:58 +0200)]
* src/vmcore/loader.h (classloader): Renamed to classloader_t.

* src/native/jni.c,
src/native/native.c,
src/native/native.h,
src/native/vm/gnu/gnu_classpath_VMStackWalker.c,
src/native/vm/gnu/java_lang_VMClass.c,
src/native/vm/gnu/java_lang_VMClassLoader.c,
src/native/vm/gnu/java_lang_VMRuntime.c,
src/native/vm/java_lang_Class.c,
src/native/vm/sun/jvm.c,
src/native/vm/sun_misc_Unsafe.c,
src/vm/jit/stacktrace.c,
src/vm/jit/stacktrace.h,
src/vmcore/class.c,
src/vmcore/class.h,
src/vmcore/classcache.c,
src/vmcore/classcache.h,
src/vmcore/loader.c: Likewise.

16 years ago* src/vmcore/loader.h (classbuffer): Renamed class to clazz.
Christian Thalinger [Wed, 16 Apr 2008 07:24:55 +0000 (09:24 +0200)]
* src/vmcore/loader.h (classbuffer): Renamed class to clazz.

* src/vmcore/annotation.c,
src/vmcore/class.c,
src/vmcore/field.c,
src/vmcore/loader.c,
src/vmcore/method.c,
src/vmcore/stackmap.c,
src/vmcore/suck.c,
src/vmcore/zip.c: Likewise.

16 years ago* src/vm/jit/s390/patcher.c (patcher_invokeinterface): Forgot to
Christian Thalinger [Tue, 15 Apr 2008 15:35:49 +0000 (17:35 +0200)]
* src/vm/jit/s390/patcher.c (patcher_invokeinterface): Forgot to
rename class to clazz.

16 years ago* src/vmcore/field.h (fieldinfo): Renamed class to clazz.
Christian Thalinger [Tue, 15 Apr 2008 15:22:58 +0000 (17:22 +0200)]
* src/vmcore/field.h (fieldinfo): Renamed class to clazz.

* src/native/vm/reflect.c,
src/vm/access.c,
src/vm/jit/alpha/codegen.c,
src/vm/jit/alpha/patcher.c,
src/vm/jit/arm/codegen.c,
src/vm/jit/arm/patcher.c,
src/vm/jit/i386/codegen.c,
src/vm/jit/i386/patcher.c,
src/vm/jit/intrp/codegen.c,
src/vm/jit/intrp/disass.c,
src/vm/jit/intrp/patcher.c,
src/vm/jit/m68k/codegen.c,
src/vm/jit/m68k/patcher.c,
src/vm/jit/mips/codegen.c,
src/vm/jit/mips/patcher.c,
src/vm/jit/powerpc/codegen.c,
src/vm/jit/powerpc/patcher.c,
src/vm/jit/powerpc64/codegen.c,
src/vm/jit/powerpc64/patcher.c,
src/vm/jit/python.c,
src/vm/jit/s390/codegen.c,
src/vm/jit/s390/patcher.c,
src/vm/jit/sparc64/codegen.c,
src/vm/jit/sparc64/patcher.c,
src/vm/jit/verify/typecheck-fields.inc,
src/vm/jit/x86_64/codegen.c,
src/vm/jit/x86_64/patcher.c,
src/vm/resolve.c,
src/vmcore/annotation.c,
src/vmcore/field.c,
src/vmcore/references.h: Likewise.

16 years ago* src/vmcore/method.h (methodinfo): Renamed class to clazz.
Christian Thalinger [Tue, 15 Apr 2008 14:37:18 +0000 (16:37 +0200)]
* src/vmcore/method.h (methodinfo): Renamed class to clazz.

* src/cacaoh/headers.c,
src/native/native.c,
src/native/vm/gnu/java_lang_VMThrowable.c,
src/native/vm/reflect.c,
src/native/vm/sun/jvm.c,
src/toolbox/logging.c,
src/vm/access.c,
src/vm/exceptions.c,
src/vm/jit/alpha/codegen.c,
src/vm/jit/alpha/patcher.c,
src/vm/jit/arm/codegen.c,
src/vm/jit/arm/patcher.c,
src/vm/jit/codegen-common.c,
src/vm/jit/i386/codegen.c,
src/vm/jit/i386/patcher.c,
src/vm/jit/inline/inline.c,
src/vm/jit/intrp/asmpart.c,
src/vm/jit/intrp/codegen.c,
src/vm/jit/intrp/disass.c,
src/vm/jit/intrp/patcher.c,
src/vm/jit/jit.c,
src/vm/jit/m68k/codegen.c,
src/vm/jit/m68k/patcher.c,
src/vm/jit/mips/codegen.c,
src/vm/jit/mips/patcher.c,
src/vm/jit/optimizing/dominators.c,
src/vm/jit/optimizing/lifetimes.c,
src/vm/jit/optimizing/lsra.c,
src/vm/jit/optimizing/ssa.c,
src/vm/jit/optimizing/ssa3.c,
src/vm/jit/optimizing/ssa_rename.c,
src/vm/jit/parse.c,
src/vm/jit/powerpc/codegen.c,
src/vm/jit/powerpc/patcher.c,
src/vm/jit/powerpc64/codegen.c,
src/vm/jit/powerpc64/patcher.c,
src/vm/jit/python.c,
src/vm/jit/s390/codegen.c,
src/vm/jit/s390/md.c,
src/vm/jit/s390/patcher.c,
src/vm/jit/show.c,
src/vm/jit/sparc64/codegen.c,
src/vm/jit/sparc64/patcher.c,
src/vm/jit/stacktrace.c,
src/vm/jit/trace.c,
src/vm/jit/verify/icmds.c,
src/vm/jit/verify/typecheck-common.c,
src/vm/jit/verify/typecheck-fields.inc,
src/vm/jit/verify/typecheck-invoke.inc,
src/vm/jit/verify/typecheck-stackbased-gen.inc,
src/vm/jit/verify/typecheck-stackbased.c,
src/vm/jit/verify/typecheck-typeinferer-gen.inc,
src/vm/jit/verify/typecheck-variablesbased-gen.inc,
src/vm/jit/x86_64/codegen.c,
src/vm/jit/x86_64/patcher.c,
src/vm/resolve.c,
src/vmcore/annotation.c,
src/vmcore/linker.c,
src/vmcore/loader.c,
src/vmcore/method.c,
src/vmcore/references.h: Likewise.

16 years agoMerging darwin compile fixes -> trunk.
Stefan Ring [Mon, 14 Apr 2008 21:24:46 +0000 (23:24 +0200)]
Merging darwin compile fixes -> trunk.

16 years agoMerging fixes.
Stefan Ring [Mon, 14 Apr 2008 21:20:17 +0000 (23:20 +0200)]
Merging fixes.

16 years ago* src/native/vm/gnu/java_lang_VMThread.c (Java_java_lang_VMThread_getState):
Stefan Ring [Mon, 14 Apr 2008 21:17:33 +0000 (23:17 +0200)]
* src/native/vm/gnu/java_lang_VMThread.c (Java_java_lang_VMThread_getState):
Renamed thread_get_state because of a name conflict with mach headers.
* src/threads/thread.c (thread_print_info, threads_thread_is_alive):
Likewise.
* src/threads/thread.h: Likewise.

16 years agoMerging fixes.
Stefan Ring [Mon, 14 Apr 2008 20:59:38 +0000 (22:59 +0200)]
Merging fixes.

16 years ago* src/threads/posix/thread-posix.c (threads_startup_thread): Compile fix.
Stefan Ring [Mon, 14 Apr 2008 20:57:17 +0000 (22:57 +0200)]
* src/threads/posix/thread-posix.c (threads_startup_thread): Compile fix.

16 years ago* src/threads/posix/thread-posix.c (sem_*): Fixed compile errors.
Stefan Ring [Mon, 14 Apr 2008 20:08:31 +0000 (22:08 +0200)]
* src/threads/posix/thread-posix.c (sem_*): Fixed compile errors.

16 years ago* src/threads/thread.c (thread_set_state_runnable): Moved DEBUGTHREADS
Christian Thalinger [Mon, 14 Apr 2008 14:51:50 +0000 (16:51 +0200)]
* src/threads/thread.c (thread_set_state_runnable): Moved DEBUGTHREADS
into if, so the output is correct.
(thread_set_state_waiting): Likewise.
(thread_set_state_timed_waiting): Likewise.

16 years ago* src/threads/thread.c (threads_thread_state_runnable): Renamed to
Christian Thalinger [Mon, 14 Apr 2008 14:49:00 +0000 (16:49 +0200)]
* src/threads/thread.c (threads_thread_state_runnable): Renamed to
thread_set_state_runnable.
(threads_thread_state_waiting): Renamed to thread_set_state_waiting.
(threads_thread_state_timed_waiting): Renamed to
thread_set_state_timed_waiting.
(thread_set_state_terminated): Renamed to thread_set_state_terminated.
* src/threads/thread.h: Likewise.
* src/threads/posix/thread-posix.c: Use new function names.
* src/vm/signal.c: Likewise.

16 years ago* src/threads/posix/thread-posix.c (threads_sleep): Clear interrupted
Christian Thalinger [Mon, 14 Apr 2008 13:31:13 +0000 (15:31 +0200)]
* src/threads/posix/thread-posix.c (threads_sleep): Clear interrupted
flag in exception case.

16 years ago* src/threads/thread.h (thread_get_state): New function.
Christian Thalinger [Mon, 14 Apr 2008 13:30:29 +0000 (15:30 +0200)]
* src/threads/thread.h (thread_get_state): New function.
(threads_thread_get_state): Removed.
* src/threads/thread.c (thread_print_info): Use thread_get_state.
(threads_thread_is_alive): Likewise.
(threads_thread_get_state): Removed.
* src/native/vm/gnu/java_lang_VMThread.c (getState): Implemented
directly.

16 years ago* src/threads/posix/thread-posix.c (threads_sleep): Throw correct
Christian Thalinger [Mon, 14 Apr 2008 11:52:08 +0000 (13:52 +0200)]
* src/threads/posix/thread-posix.c (threads_sleep): Throw correct
exceptions, use stdint.h types
* src/threads/posix/thread-posix.h (threads_sleep): Use stdint.h
types.

16 years ago* src/threads/posix/thread-posix.c (threads_detach_thread): Reset
Christian Thalinger [Mon, 14 Apr 2008 10:25:37 +0000 (12:25 +0200)]
* src/threads/posix/thread-posix.c (threads_detach_thread): Reset
threadgroup when thread has terminated.

16 years ago* src/native/vm/sun/jvm.c (JVM_IsInterrupted): Handle
Christian Thalinger [Mon, 14 Apr 2008 10:12:49 +0000 (12:12 +0200)]
* src/native/vm/sun/jvm.c (JVM_IsInterrupted): Handle
clear_interrupted.

16 years ago* src/threads/thread.c (threads_attach_current_thread)
Christian Thalinger [Mon, 14 Apr 2008 10:01:16 +0000 (12:01 +0200)]
* src/threads/thread.c (threads_attach_current_thread)
[ENABLE_JAVASE]: Set group to NULL, as it might contain any value.

16 years ago* src/threads/thread.c (threads_attach_current_thread): Set the thread
Christian Thalinger [Mon, 14 Apr 2008 09:52:42 +0000 (11:52 +0200)]
* src/threads/thread.c (threads_attach_current_thread): Set the thread
data-structure in the TSD.

16 years ago* src/threads/posix/thread-posix.c (threads_startup_thread): Renamed
Christian Thalinger [Mon, 14 Apr 2008 09:51:33 +0000 (11:51 +0200)]
* src/threads/posix/thread-posix.c (threads_startup_thread): Renamed
variable thread to t.

16 years ago* src/native/jni.c (JNI_NEW_ARRAY): Fixed typo for short array.
Christian Thalinger [Mon, 14 Apr 2008 08:41:41 +0000 (10:41 +0200)]
* src/native/jni.c (JNI_NEW_ARRAY): Fixed typo for short array.

16 years ago* src/vm/access.c [ENABLE_JAVASE] (access_check_field): Added #ifdef.
Christian Thalinger [Sun, 13 Apr 2008 20:58:42 +0000 (22:58 +0200)]
* src/vm/access.c [ENABLE_JAVASE] (access_check_field): Added #ifdef.
[ENABLE_JAVASE] (access_check_method): Likewise.
* src/vm/access.h: Likewise.

16 years ago* src/native/vm/sun/hpi.c (hpi_initialize): Fixed compiler warning.
Christian Thalinger [Sun, 13 Apr 2008 12:57:08 +0000 (14:57 +0200)]
* src/native/vm/sun/hpi.c (hpi_initialize): Fixed compiler warning.
(hpi_initialize_socket_library): Likewise.

16 years ago* src/vm/jit/stacktrace.c (stacktrace_print_entry): Print newline for
Christian Thalinger [Sun, 13 Apr 2008 12:19:20 +0000 (14:19 +0200)]
* src/vm/jit/stacktrace.c (stacktrace_print_entry): Print newline for
builtins.

16 years ago* Commited with tip.
Christian Thalinger [Fri, 11 Apr 2008 15:10:25 +0000 (17:10 +0200)]
* Commited with tip.

16 years ago* src/threads/posix/thread-posix.c (threads_sleep): Removed
Christian Thalinger [Fri, 11 Apr 2008 15:07:55 +0000 (17:07 +0200)]
* src/threads/posix/thread-posix.c (threads_sleep): Removed
threads_check_if_interrupted_and_reset usage and use new functions.

16 years ago* src/native/vm/gnu/java_lang_reflect_VMField.c
Christian Thalinger [Fri, 11 Apr 2008 14:44:01 +0000 (16:44 +0200)]
* src/native/vm/gnu/java_lang_reflect_VMField.c
(native/include/java_lang_reflect_Field.h): Added include.

16 years ago* src/threads/thread.h (thread_set_interrupted): New function.
Christian Thalinger [Fri, 11 Apr 2008 09:19:40 +0000 (11:19 +0200)]
* src/threads/thread.h (thread_set_interrupted): New function.
* src/threads/posix/thread-posix.c
(threads_check_if_interrupted_and_reset): Removed.
* src/threads/posix/thread-posix.h: Likewise.
* src/native/vm/gnu/java_lang_VMThread.c (interrupted): Use new
function.

16 years ago* src/threads/thread.h (thread_is_interrupted): New function.
Christian Thalinger [Fri, 11 Apr 2008 08:54:48 +0000 (10:54 +0200)]
* src/threads/thread.h (thread_is_interrupted): New function.
* src/threads/posix/thread-posix.c
(threads_thread_has_been_interrupted): Removed.
* src/threads/posix/thread-posix.h: Likewise.
* src/native/vm/gnu/java_lang_VMThread.c (isInterrupted): Use new
function.
* src/native/vm/sun/jvm.c (JVM_IsInterrupted): Likewise.

16 years ago* src/threads/none/thread-none.h: Fixed define name.
Christian Thalinger [Fri, 11 Apr 2008 08:43:18 +0000 (10:43 +0200)]
* src/threads/none/thread-none.h: Fixed define name.
* src/threads/posix/thread-posix.h: Likewise.
* src/threads/thread.h: Likewise.

16 years ago* src/vm/jit/arm/asmpart.S (asm_cacheflush) [__ARM_EABI__]: Use
Christian Thalinger [Thu, 10 Apr 2008 15:40:16 +0000 (17:40 +0200)]
* src/vm/jit/arm/asmpart.S (asm_cacheflush) [__ARM_EABI__]: Use
syscall number 0.

16 years ago src/vm/jit/stacktrace.c (stacktrace_print_entry): New function.
Christian Thalinger [Thu, 10 Apr 2008 14:47:00 +0000 (16:47 +0200)]
 src/vm/jit/stacktrace.c (stacktrace_print_entry): New function.
(stacktrace_print_current): Likewise.
[ENABLE_THREADS] (stacktrace_print_of_thread): Likewise.
[!ENABLE_THREADS] (_no_threads_stackframeinfo): Removed.
* src/vm/jit/stacktrace.h: Likewise.

* src/Makefile.am [ENABLE_THREADS] (THREADS_DIR): Removed.
(SUBDIRS): Added threads.

* src/cacao/Makefile.am [ENABLE_THREADS] (THREAD_LIB): Removed.
(libjvm_la_LIBADD): Removed $(THREAD_LIB), added
$(top_builddir)/src/threads/libthreads.la.
* src/threads/Makefile.am [!ENABLE_THREADS]: Recurse into none/.
* src/threads/none/Makefile.am (EXTRA_DIST): Removed.
(AM_CPPFLAGS): Added.
(LIBS): Likewise.
(noinst_LTLIBRARIES): Likewise.
(libthreadsnone_la_SOURCES): Likewise.

* src/threads/none/thread-none.c: New file.
* src/threads/none/thread-none.h (_no_threads_stackframeinfo): Export.

* src/threads/posix/Makefile.am (noinst_LTLIBRARIES): Renamed library
from libposix to libthreadsposix.
(libposix_la_SOURCES): Renamed to libthreadsposix_la_SOURCES.

* src/threads/thread.c (threads_dump): Use stacktrace_print_of_thread.
(threads_thread_print_stacktrace): Removed.
(threads_print_stacktrace): Likewise.
* src/threads/thread.h (threads_thread_print_stacktrace): Likewise.
(threads_print_stacktrace): Likewise.

* src/vm/jit/methodtree.c (methodtree_find): Use
stacktrace_print_current.
* src/vm/jit/s390/md.c (md_dump_context): Likewise.

16 years ago* src/vm/jit/arm/linux/md-os.c (md_signal_handler_sigill): Use
Christian Thalinger [Thu, 10 Apr 2008 14:37:54 +0000 (16:37 +0200)]
* src/vm/jit/arm/linux/md-os.c (md_signal_handler_sigill): Use
vm_abort instead of assert.

16 years ago* src/vm/exceptions.c (exceptions_print_stacktrace) [!NDEBUG]:
Christian Thalinger [Thu, 10 Apr 2008 14:35:49 +0000 (16:35 +0200)]
* src/vm/exceptions.c (exceptions_print_stacktrace) [!NDEBUG]:
#ifdef'ed class_print.

16 years ago* src/threads/thread.h (thread_current_is_attached): Check if t is
Christian Thalinger [Thu, 10 Apr 2008 14:20:07 +0000 (16:20 +0200)]
* src/threads/thread.h (thread_current_is_attached): Check if t is
NULL and return false in this case.

16 years ago* src/classes/Makefile.am (VM_JAVA_FILES_GNU): Added new VM interface
Christian Thalinger [Mon, 7 Apr 2008 21:03:28 +0000 (23:03 +0200)]
* src/classes/Makefile.am (VM_JAVA_FILES_GNU): Added new VM interface
files.
* src/native/include/Makefile.am (JAVASE_HEADER_FILES): Likewise.

* src/classes/gnu/gnu/java/lang/CPStringBuilder.java,
src/classes/gnu/gnu/java/lang/VMCPStringBuilder.java,
src/classes/gnu/java/lang/reflect/Modifier.java: New file.

* src/classes/gnu/java/lang/reflect/Constructor.java,
src/classes/gnu/java/lang/reflect/Field.java,
src/classes/gnu/java/lang/reflect/Method.java: Updated.

* src/classes/gnu/java/lang/reflect/VMConstructor.java,
src/classes/gnu/java/lang/reflect/VMField.java,
src/classes/gnu/java/lang/reflect/VMMethod.java: New file.

* src/native/jni.c (FromReflectedMethod): Adapted to new VM interface.
(FromReflectedField): Likewise.

* src/native/vm/gnu/Makefile.am (libnativevmcore_la_SOURCES): Removed
java_lang_reflect_Constructor.c, java_lang_reflect_Field.c,
java_lang_reflect_Method.c, added gnu_java_lang_VMCPStringBuilder.c,
java_lang_reflect_VMConstructor.c, java_lang_reflect_VMField.c,
java_lang_reflect_VMMethod.c.

* src/native/vm/gnu/java_lang_reflect_Constructor.c,
src/native/vm/gnu/java_lang_reflect_Field.c,
src/native/vm/gnu/java_lang_reflect_Method.c: Removed.

* src/native/vm/gnu/gnu_java_lang_VMCPStringBuilder.c,
src/native/vm/gnu/java_lang_reflect_VMConstructor.c,
src/native/vm/gnu/java_lang_reflect_VMField.c,
src/native/vm/gnu/java_lang_reflect_VMMethod.c: New file.

* src/native/vm/nativevm.c (nativevm_preinit): Added
_Jv_gnu_java_lang_VMCPStringBuilder_init.
* src/native/vm/nativevm.h: Likewise.

* src/native/vm/reflect.c (reflect_constructor_new): Adapted to new VM
interface.
(reflect_field_new): Likewise.
(reflect_method_new): Likewise.

* src/native/vm/sun_misc_Unsafe.c (objectFieldOffset): Likewise.
(staticFieldBase): Likewise.

* src/vmcore/class.c [WITH_CLASSPATH_GNU]
(class_java_lang_reflect_VMConstructor)
(class_java_lang_reflect_VMField, class_java_lang_reflect_VMMethod):
New global variable.
* src/vmcore/class.h: Likewise.
* src/vmcore/linker.c (linker_init): Added new classes.
* src/vmcore/loader.c (loader_init): Likewise.

* src/vmcore/utf8.c [WITH_CLASSPATH_GNU]
(utf_java_lang_reflect_VMConstructor, utf_java_lang_reflect_VMField)
(utf_java_lang_reflect_VMMethod): New global variable.
* src/vmcore/utf8.h: Likewise.

--HG--
rename : src/native/vm/gnu/java_lang_reflect_Constructor.c => src/native/vm/gnu/java_lang_reflect_VMConstructor.c
rename : src/native/vm/gnu/java_lang_reflect_Field.c => src/native/vm/gnu/java_lang_reflect_VMField.c
rename : src/native/vm/gnu/java_lang_reflect_Method.c => src/native/vm/gnu/java_lang_reflect_VMMethod.c

16 years ago* src/native/vm/java_lang_reflect_Constructor.c: Removed.
Christian Thalinger [Mon, 7 Apr 2008 11:41:46 +0000 (13:41 +0200)]
* src/native/vm/java_lang_reflect_Constructor.c: Removed.
* src/native/vm/java_lang_reflect_Constructor.h: Likewise.
* src/native/vm/java_lang_reflect_Method.c: Likewise.
* src/native/vm/java_lang_reflect_Method.h: Likewise.

* src/native/jni.c (_Jv_jni_invokeNative): Likewise.

* src/native/vm/Makefile.am (JAVA_LANG_REFLECT_CONSTRUCTOR_SOURCES):
Removed.
(JAVA_LANG_REFLECT_METHOD_SOURCES): Likewise.
(libnativevm_la_SOURCES): Removed
JAVA_LANG_REFLECT_CONSTRUCTOR_SOURCES and
JAVA_LANG_REFLECT_METHOD_SOURCES.

* src/native/vm/reflect.c (reflect_invoke): New function.
(reflect_constructor_newinstance): Likewise.
(reflect_method_invoke): Likewise.
* src/native/vm/reflect.h (reflect_constructor_newinstance): Export.
(reflect_method_invoke): Likewise.

* src/native/vm/gnu/java_lang_reflect_Constructor.c (constructNative):
Use reflect_constructor_newinstance.
* src/native/vm/gnu/java_lang_reflect_Method.c (invokeNative): Use
reflect_method_invoke.
* src/native/vm/sun/jvm.c (JVM_InvokeMethod): Use
reflect_method_invoke.
(JVM_NewInstanceFromConstructor): Use reflect_constructor_newinstance.

16 years ago* src/native/vm/gnu/java_lang_reflect_Constructor.c (getSignature):
Christian Thalinger [Mon, 7 Apr 2008 09:30:43 +0000 (11:30 +0200)]
* src/native/vm/gnu/java_lang_reflect_Constructor.c (getSignature):
Implemented directly.
* src/native/vm/java_lang_reflect_Constructor.c (getSignature): Removed.
* src/native/vm/java_lang_reflect_Constructor.h: Likewise.

16 years ago* src/native/vm/gnu/java_lang_reflect_Constructor.c
Christian Thalinger [Mon, 7 Apr 2008 09:14:20 +0000 (11:14 +0200)]
* src/native/vm/gnu/java_lang_reflect_Constructor.c
(getExceptionTypes): Implemented directly.
* src/native/vm/java_lang_reflect_Constructor.c (getExceptionTypes): Removed.
* src/native/vm/java_lang_reflect_Constructor.h: Likewise.

16 years ago* src/native/vm/gnu/java_lang_reflect_Constructor.c
Christian Thalinger [Mon, 7 Apr 2008 09:04:38 +0000 (11:04 +0200)]
* src/native/vm/gnu/java_lang_reflect_Constructor.c
(getParameterTypes): Implemented directly.
* src/native/vm/java_lang_reflect_Constructor.c (getParameterTypes): Removed.
* src/native/vm/java_lang_reflect_Constructor.h: Likewise.

16 years ago* src/native/vm/gnu/java_lang_reflect_Constructor.c
Christian Thalinger [Mon, 7 Apr 2008 08:55:15 +0000 (10:55 +0200)]
* src/native/vm/gnu/java_lang_reflect_Constructor.c
(getModifiersInternal): Implemented directly.
* src/native/vm/java_lang_reflect_Constructor.c (getModifiers): Removed.
* src/native/vm/java_lang_reflect_Constructor.h: Likewise.

16 years ago* src/threads/posix/threadlist-posix.c: Removed.
Christian Thalinger [Thu, 3 Apr 2008 12:22:12 +0000 (14:22 +0200)]
* src/threads/posix/threadlist-posix.c: Removed.
* src/threads/posix/Makefile.am (libposix_la_SOURCES): Removed
threadlist-posix.c.
* src/threads/threadlist.c (threads/mutex.h): Added.
(threadlist_mutex): New global variable.
(threadlist_init): Initialize mutex.
(threadlist_lock, threadlist_unlock): New functions.

16 years ago* src/vm/exceptions.c (exceptions_new_class_utf): Check for c == NULL
Christian Thalinger [Wed, 2 Apr 2008 13:34:17 +0000 (15:34 +0200)]
* src/vm/exceptions.c (exceptions_new_class_utf): Check for c == NULL
when VM is initializing.

16 years ago* src/native/vm/sun/jvm.c (TRACEJVMCALLSENTER, TRACEJVMCALLSEXIT): New
Christian Thalinger [Wed, 2 Apr 2008 12:40:25 +0000 (14:40 +0200)]
* src/native/vm/sun/jvm.c (TRACEJVMCALLSENTER, TRACEJVMCALLSEXIT): New
macro.
(JVM_GetClassLoader): Trace return value.

16 years ago* src/vm/jit/stacktrace.c (stacktrace_get): Correctly skip
Christian Thalinger [Wed, 2 Apr 2008 09:59:24 +0000 (11:59 +0200)]
* src/vm/jit/stacktrace.c (stacktrace_get): Correctly skip
Throwable.init() functions.
(stacktrace_stackframeinfo_fill): Changed debugging messge.

16 years ago* src/threads/thread.c (threads_thread_print_info): Renamed to
Christian Thalinger [Wed, 2 Apr 2008 08:59:16 +0000 (10:59 +0200)]
* src/threads/thread.c (threads_thread_print_info): Renamed to
thread_print_info, removed assert on THREAD_STATE_NEW but print as
much info as possible.
(threads_dump): Use new functio name.
* src/threads/thread.h: Likewise.

16 years ago* Merged with tip.
Christian Thalinger [Wed, 2 Apr 2008 08:24:24 +0000 (10:24 +0200)]
* Merged with tip.

16 years ago* src/mm/Makefile.am: Changed copyright.
Christian Thalinger [Wed, 2 Apr 2008 07:59:32 +0000 (09:59 +0200)]
* src/mm/Makefile.am: Changed copyright.

16 years ago* src/vm/string.c (javastring_safe_new_from_utf8): Don't assert on
Christian Thalinger [Wed, 2 Apr 2008 07:34:11 +0000 (09:34 +0200)]
* src/vm/string.c (javastring_safe_new_from_utf8): Don't assert on
text is NULL, but return NULL.  Checked with jconsole.

16 years ago* src/threads/Makefile.am: Added mutex.h.
Michael Starzinger [Tue, 1 Apr 2008 23:43:27 +0000 (01:43 +0200)]
* src/threads/Makefile.am: Added mutex.h.
* src/threads/posix/Makefile.am: Added mutex-posix.h.

* src/threads/mutex.h: Added new file.
* src/threads/posix/mutex-posix.h: Likewise.
(mutex_init): Implemented inline wrapper function.
(mutex_lock): Likewise.
(mutex_unlock): Likewise.
(mutex_destroy): Likewise.

* src/cacao/cacao.c,
src/native/jvmti/cacaodbg.c,
src/native/jvmti/cacaodbg.h,
src/native/jvmti/jvmti.c,
src/threads/posix/generic-primitives.h,
src/threads/posix/lock.c,
src/threads/posix/lock.h,
src/threads/posix/thread-posix.c,
src/threads/posix/thread-posix.h,
src/threads/posix/threadlist-posix.c,
src/vm/vm.c: Included mutex.h and used wrapper functions
throughout the whole file.

16 years ago* src/threads/none/threads.h: Renamed from here...
Christian Thalinger [Tue, 1 Apr 2008 14:56:24 +0000 (16:56 +0200)]
* src/threads/none/threads.h: Renamed from here...
* src/threads/none/thread-none.h: ...to here.
* src/threads/thread.h: Fixed include.

--HG--
rename : src/threads/none/threads.h => src/threads/none/thread-none.h

16 years ago* src/native/jni.c (_Jv_JNI_FindClass): Renamed to jni_FindClass, call
Christian Thalinger [Tue, 1 Apr 2008 14:47:19 +0000 (16:47 +0200)]
* src/native/jni.c (_Jv_JNI_FindClass): Renamed to jni_FindClass, call
resolve_handle_pending_exception in exception case.
(_Jv_JNI_ExceptionDescribe): Renamed to jni_ExceptionDescribe, use
exceptions_print_stacktrace.
(_Jv_JNI_ExceptionClear): Renamed to jni_ExceptionClear.

* src/threads/thread.h (threads_thread_get_object): Renamed to
thread_get_object.
(threads_thread_set_object): Renamed to thread_set_object.
(threads_get_current_object): Renamed to thread_get_current_object.
(thread_is_attached): Use new function names.
(thread_fprint_name): Export.

* src/threads/none/threads.h (threads_get_current_object): Renamed to
thread_get_current_object.

* src/native/vm/cldc1.1/java_lang_Thread.c (currentThread): Use new
function names.
* src/native/vm/gnu/java_lang_VMThread.c (currentThread): Likewise.
* src/native/vm/sun/jvm.c (JVM_CurrentThread): Likewise.
* src/threads/posix/thread-posix.c (threads_startup_thread): Likewise.
(threads_detach_thread): Likewise.
* src/threads/thread.c (thread_create_object): Likewise.
(thread_free): Likewise.
(threads_thread_start): Likewise.
(thread_fprint_name): New function.
(threads_thread_print_info): Use thread_fprint_name.

* src/vm/exceptions.c (exceptions_print_stacktrace): Implemented
(mostly) as in HotSpot.

16 years ago* src/vm/string.c (javastring_print): Renamed to javastring_fprint and
Christian Thalinger [Tue, 1 Apr 2008 14:30:22 +0000 (16:30 +0200)]
* src/vm/string.c (javastring_print): Renamed to javastring_fprint and
added a stream argument.
* src/vm/stringlocal.h: Likewise.

16 years ago* src/vm/vm.c (vm_run) [ENABLE_THREADS]: #ifdef'ed threading stuff.
Christian Thalinger [Tue, 1 Apr 2008 14:08:23 +0000 (16:08 +0200)]
* src/vm/vm.c (vm_run) [ENABLE_THREADS]: #ifdef'ed threading stuff.

16 years ago* configure.ac (AC_CHECK_HEADERS): Added stdio.h.
Christian Thalinger [Tue, 1 Apr 2008 13:31:55 +0000 (15:31 +0200)]
* configure.ac (AC_CHECK_HEADERS): Added stdio.h.

16 years ago* src/threads/thread.c (thread_create_object): New function.
Christian Thalinger [Tue, 1 Apr 2008 11:49:45 +0000 (13:49 +0200)]
* src/threads/thread.c (thread_create_object): New function.
(thread_method_init): Made static.
(threadgroup_system, threadgroup_main): Changed type to java_handle_t.
(thread_create_initial_threadgroup): Chnaged type of
threadgroup_system and threadgroup_main.
(thread_create_initial_thread): Use thread_create_object.
(threads_thread_start_internal): Likewise.
(threads_attach_current_thread): Likewise.
(threads_thread_print_info): Use thread_is_daemon.
* src/threads/thread.h (thread_method_init): Removed.
(thread_is_daemon): New function.
* src/threads/threadlist.c (threadlist_get_non_daemons): Use
thread_is_daemon.

16 years ago* src/threads/thread.c (threads_thread_new): Renamed to thread_new and
Christian Thalinger [Tue, 1 Apr 2008 09:10:03 +0000 (11:10 +0200)]
* src/threads/thread.c (threads_thread_new): Renamed to thread_new and
made static.
(threads_thread_free): Renamed to thread_free.
(threads_thread_start_internal): Use new function names.
(threads_thread_start): Likewise.
(threads_attach_current_thread): Likewise.
* src/threads/thread.h (threads_thread_new): Removed.
(threads_thread_free): Renamed to thread_free.

* src/threads/posix/thread-posix.c (threads_detach_thread): Use new
function names.

16 years ago* src/threads/posix/threads.c: Renamed from here...
Christian Thalinger [Tue, 1 Apr 2008 08:24:53 +0000 (10:24 +0200)]
* src/threads/posix/threads.c: Renamed from here...
* src/threads/posix/threads.h,
src/threads/threads-common.c,
src/threads/threads-common.h: Likewise.

* src/threads/posix/thread-posix.c: ...to here.
* src/threads/posix/thread-posix.h,
src/threads/thread.c,
src/threads/thread.h: Likewise.

* src/mm/cacao-gc/gc.c,
src/mm/cacao-gc/gc.h,
src/mm/cacao-gc/rootset.c,
src/mm/cacao-gc/rootset.h,
src/mm/codememory.c,
src/mm/dumpmemory.c,
src/mm/memory.c,
src/native/jni.c,
src/native/jvmti/cacaodbg.c,
src/native/jvmti/cacaodbg.h,
src/native/jvmti/jvmti.c,
src/native/llni.c,
src/native/llni.h,
src/native/localref.c,
src/native/vm/cldc1.1/java_lang_Thread.c,
src/native/vm/gnu/java_lang_VMThread.c,
src/native/vm/sun/jvm.c,
src/threads/Makefile.am,
src/threads/posix/lock.c,
src/threads/posix/Makefile.am,
src/threads/threadlist.c,
src/threads/threadlist.h,
src/toolbox/logging.c,
src/vm/builtin.c,
src/vm/exceptions.c,
src/vm/finalizer.c,
src/vm/jit/alpha/linux/md-os.c,
src/vm/jit/arm/linux/md-os.c,
src/vm/jit/codegen-common.c,
src/vm/jit/i386/darwin/md-os.c,
src/vm/jit/i386/linux/md-os.c,
src/vm/jit/inline/inline.c,
src/vm/jit/intrp/asmpart.c,
src/vm/jit/intrp/engine.c,
src/vm/jit/jit.c,
src/vm/jit/methodtree.c,
src/vm/jit/optimizing/profile.c,
src/vm/jit/optimizing/recompile.c,
src/vm/jit/powerpc/codegen.c,
src/vm/jit/powerpc/darwin/md-os.c,
src/vm/jit/powerpc/linux/md-os.c,
src/vm/jit/powerpc64/linux/md-os.c,
src/vm/jit/replace.c,
src/vm/jit/s390/md.c,
src/vm/jit/show.c,
src/vm/jit/stacktrace.c,
src/vm/jit/trace.c,
src/vm/jit/x86_64/freebsd/md-os.c,
src/vm/jit/x86_64/linux/md-os.c,
src/vm/signal.c,
src/vm/vm.c: Changed filename occurrences.

--HG--
rename : src/threads/posix/threads.c => src/threads/posix/thread-posix.c
rename : src/threads/posix/threads.h => src/threads/posix/thread-posix.h
rename : src/threads/threads-common.c => src/threads/thread.c
rename : src/threads/threads-common.h => src/threads/thread.h

16 years agoFixes PR59.
Christian Thalinger [Mon, 31 Mar 2008 15:31:53 +0000 (17:31 +0200)]
Fixes PR59.
* src/native/jni.c (_Jv_JNI_Get##name##Field): Added TRACEJNICALLS.
(_Jv_JNI_Set##name##Field): Likewise.
(_Jv_JNI_CallStaticObjectMethod): Likewise.
(_Jv_JNI_CallStaticObjectMethodV): Likewise.
(_Jv_JNI_CallStaticObjectMethodA): Likewise.
(_Jv_JNI_CallStaticVoidMethod): Likewise.
(_Jv_JNI_CallStaticVoidMethodV): Likewise.
(_Jv_JNI_CallStaticVoidMethodA): Likewise.
(_Jv_JNI_GetArrayLength): Likewise.
(_Jv_JNI_Get##name##ArrayElements): Likewise.
(_Jv_JNI_Get##name##ArrayRegion): Likewise.
(jni_attach_current_thread): Check correctly if current thread is
already attached.
(_Jv_JNI_DetachCurrentThread): Check if current thread is already
detached.
* src/threads/posix/threads.c (threads_detach_thread): Likewise.

* src/threads/threads-common.c (threads_init) [WITH_CLASSPATH_SUN]:
Resolve correct thread init method.
(thread_create_object): New function, but not yet implemented.
(thread_create_initial_thread): Lot of changes.

* src/threads/threads-common.h (thread_is_attached): New function.
(thread_current_is_attached): Likewise.

* src/vm/global.h (STR): New macro, stolen from OpenJDK.

* src/vm/vm.c (vm_run): Detach the main thread before calling
vm_destroy.
(vm_destroy): Attach the main thread again as DestroyJavaVM thread.

16 years ago* src/threads/posix/threads.c (threads_set_current_threadobject):
Christian Thalinger [Mon, 31 Mar 2008 14:54:27 +0000 (16:54 +0200)]
* src/threads/posix/threads.c (threads_set_current_threadobject):
Moved from here...
(threads_get_current_threadobject): Likewise.
* src/threads/posix/threads.h (thread_get_current): ...to here.
(thread_set_current): Likewise.
* src/threads/threads-common.h (threads_set_current_threadobject):
Removed.

* src/native/jni.c (jni_attach_current_thread): Use new function name.
(_Jv_JNI_DetachCurrentThread): Likewise.
(_Jv_JNI_GetEnv): Likewise.
* src/native/jvmti/cacaodbg.c (jvmti_get_current_thread): Likewise.
* src/threads/threads-common.c (threads_preinit): Likewise.