cacao.git
16 years ago* src/vm/jit/s390/asmpart.S
Peter Molnar [Wed, 12 Sep 2007 21:17:38 +0000 (21:17 +0000)]
* src/vm/jit/s390/asmpart.S
src/vm/jit/s390/codegen.c,
src/vm/jit/s390/codegen.h,
src/vm/jit/s390/emit.c,
src/vm/jit/s390/emit.h,
src/vm/jit/s390/md-abi.c,
src/vm/jit/s390/md-abi.h,
src/vm/jit/s390/md-asm.h,
src/vm/jit/s390/md.c: Changed JIT ABI on s390: R0 is now REG_ITMP3, R12 is a saved register, REG_ITMPs are reordered, REG_ITMP1_XPTR is now REG_ITMP3_XPTR, REG_ITMP2_XPC is now REG_ITMP1_XPC.

16 years ago* src/native/llni.h
Mathias Panzenboeck [Wed, 12 Sep 2007 16:16:50 +0000 (18:16 +0200)]
* src/native/llni.h
(LLNI_classinfo_field_get): New macro.
(LLNI_classinfo_field_set): Likewise.

* src/vmcore/annotation.c
(LLNI_objectarray_copy): New macro. This macro will be replaced by a
appropriate array_* function once such a function exists.
(annotation_bytearrays_resize): Use above macro and improved variable naming.
(annotation_bytearrays_insert): Changed type of parameter 1 and return type and
improved variable naming.
(annotation_load_attribute_body): Use LLNI_CRITICAL_START and LLNI_CRITICAL_END.
(annotation_load_method_attribute_annotationdefault): Use
LLNI_classinfo_field_get and LLNI_classinfo_field_set macros.
(annotation_load_method_attribute_runtimevisibleparameterannotations): Likewise.
(annotation_load_method_attribute_runtimevisibleannotations): Likewise.
(annotation_load_field_attribute_runtimevisibleannotations): Likewise.
(annotation_load_class_attribute_runtimevisibleannotations): Use
LLNI_classinfo_field_set macro.

* src/vmcore/class.c
(class_get_annotations): Use LLNI_classinfo_field_get macro.

* src/vmcore/class.h
(classinfo.annotations),
(classinfo.method_annotations),
(classinfo.method_parameterannotations),
(classinfo.method_annotationdefaults),
(classinfo.field_annotations): Changed type to java_object_t*.

* src/vmcore/field.c
(native/llni.h): Added include.
(field_get_annotations): Use LLNI_classinfo_field_get macro.

* src/vmcore/method.c
(method_get_annotations): Use LLNI_classinfo_field_get macro.
(method_get_parameterannotations): Likewise.
(method_get_annotationdefault): Likewise.

16 years ago* src/native/jni.c (jni_version_check): New function.
Christian Thalinger [Wed, 12 Sep 2007 15:45:02 +0000 (17:45 +0200)]
* src/native/jni.c (jni_version_check): New function.
* src/native/jni.h: Likewise.

* src/native/vm/sun/jvm.c (JVM_IsSupportedJNIVersion): Use
jni_version_check.
* src/vm/vm.c (vm_create): Likewise.

16 years ago* src/vm/vm.c (vm_create): Initialize properties list before handling
Christian Thalinger [Wed, 12 Sep 2007 15:34:40 +0000 (17:34 +0200)]
* src/vm/vm.c (vm_create): Initialize properties list before handling
-XX options handling.

16 years ago* src/vm/properties.c (properties_add) [!NDEBUG]: Added debug output.
Christian Thalinger [Wed, 12 Sep 2007 15:16:54 +0000 (17:16 +0200)]
* src/vm/properties.c (properties_add) [!NDEBUG]: Added debug output.

* src/vm/vm.c (opts): Removed XX.
(vm_create): Call options_xx almost as first function, so we can
enable debugging from all stuff.

* src/vmcore/options.c (opt_DebugProperties): New option.
(options_xx): Changed signature and parse all options in the array.
* src/vmcore/options.h (opt_DebugProperties): Added.
(options_xx): Changed signature.

16 years agoMerged 7484:52fc709fd248.
Peter Molnar [Wed, 12 Sep 2007 12:44:01 +0000 (12:44 +0000)]
Merged 7484:52fc709fd248.

16 years ago* src/vm/jit/s390/codegen.c (codegen_emit_stub_native): Changed some N_MOV to M_MOV.
Peter Molnar [Wed, 12 Sep 2007 12:33:15 +0000 (12:33 +0000)]
* src/vm/jit/s390/codegen.c (codegen_emit_stub_native): Changed some N_MOV to M_MOV.
* src/vm/jit/s390/asmpart.S, src/vm/jit/s390/md-asm.h, src/vm/jit/s390/md-abi.h, src/vm/jit/s390/md-abi.c: Reverted [7237:9a2ce00b716e] where f4 and f6 were made callee saved.

16 years ago* src/vm/jit/patcher-common.c: Improved comments.
Michael Starzinger [Wed, 12 Sep 2007 11:32:11 +0000 (13:32 +0200)]
* src/vm/jit/patcher-common.c: Improved comments.
(patcher_handler): Enabled use of -XX:+DebugPatcher.

* src/vmcore/options.c (opt_DebugPatcher): Added and set by above debug flag.
* src/vmcore/options.h (opt_DebugPatcher): Added.

16 years ago* src/native/vm/Makefile.am
Christian Thalinger [Wed, 12 Sep 2007 08:51:22 +0000 (10:51 +0200)]
* src/native/vm/Makefile.am
(JAVA_UTIL_CONCURRENT_ATOMIC_ATOMICLONG_SOURCES): Removed.
(libnativevm_la_SOURCES): Removed
JAVA_UTIL_CONCURRENT_ATOMIC_ATOMICLONG_SOURCES.

* src/native/vm/gnu/java_util_concurrent_atomic_AtomicLong.c
(native/vm/java_util_concurrent_atomic_AtomicLong.h): Removed.
(native/include/java_util_concurrent_atomic_AtomicLong.h): Added.
(methods): VMSupportsCS8: Use
Java_java_util_concurrent_atomic_AtomicLong_VMSupportsCS8.
(Java_java_util_concurrent_atomic_AtomicLong_VMSupportsCS8): New
function.

* src/native/vm/sun/jvm.c
(native/vm/java_util_concurrent_atomic_AtomicLong.h): Removed.
(JVM_SupportsCX8): Just return 0 for now.

* src/native/vm/java_util_concurrent_atomic_AtomicLong.c: Removed.
* src/native/vm/java_util_concurrent_atomic_AtomicLong.h: Likewise.

16 years ago* src/native/vm/cldc1.1/java_lang_Class.c (methods): isInterface: Use
Christian Thalinger [Wed, 12 Sep 2007 08:01:19 +0000 (10:01 +0200)]
* src/native/vm/cldc1.1/java_lang_Class.c (methods): isInterface: Use
Java_java_lang_Class_isInterface.
(isInterface): New function.

* src/native/vm/gnu/java_lang_VMClass.c (vm/exceptions.h): Added.
(vm/stringlocal.h): Likewise.
(isInterface): Use class_is_interface.
(getInterfaces): Use class_get_interfaces.
(getDeclaredClasses): Use class_get_declaredclasses.
(throwException): Use exceptions_set_exception.
(getClassSignature): Implemented directly.

* src/native/vm/java_lang_Class.c (isInterface): Removed.
(getInterfaces): Likewise.
(getDeclaredClasses): Likewise.
(throwException): Likewise.
(getClassSignature): Likewise.
* src/native/vm/java_lang_Class.h: Likewise.

16 years ago* src/native/vm/sun/jvm.c (JVM_GetClassSignature): Use
Christian Thalinger [Wed, 12 Sep 2007 07:47:34 +0000 (09:47 +0200)]
* src/native/vm/sun/jvm.c (JVM_GetClassSignature): Use
LLNI_classinfo_unwrap and java_handle_t.

16 years ago * Merged with default branch at rev 8806c9bebf3e.
Mathias Panzenboeck [Tue, 11 Sep 2007 22:32:14 +0000 (00:32 +0200)]
 * Merged with default branch at rev 8806c9bebf3e.

16 years ago* src/vmcore/annotation.c: Improved comments.
Mathias Panzenboeck [Tue, 11 Sep 2007 22:27:45 +0000 (00:27 +0200)]
* src/vmcore/annotation.c: Improved comments.
(annotation_bytearrays_resize),
(annotation_bytearrays_insert),
(annotation_load_method_attribute_annotationdefault),
(annotation_load_method_attribute_runtimevisibleparameterannotations),
(annotation_load_class_attribute_runtimevisibleannotations),
(annotation_load_method_attribute_runtimevisibleannotations),
(annotation_load_field_attribute_runtimevisibleannotations):
Restructured so that when it comes to the point when I have to use LLNI macros
for accessing the java objects I store in classinfo I will have not much to do.

* src/lib/gnu/java/lang/reflect/Constructor.java: Improved comments.
* src/lib/gnu/java/lang/reflect/Field.java: Likewise.
* src/lib/gnu/java/lang/reflect/Method.java: Likewise.
* src/lib/gnu/sun/reflect/annotation/AnnotationParser.java: Likewise.
* src/lib/gnu/sun/reflect/annotation/AnnotationType.java: Likewise.
* src/native/vm/gnu/java_lang_reflect_Constructor.c: Likewise.
* src/native/vm/gnu/java_lang_reflect_Field.c: Likewise.
* src/native/vm/gnu/java_lang_reflect_Method.c: Likewise.
* src/native/vm/gnu/sun_reflect_ConstantPool.c: Likewise.
* src/native/vm/java_lang_Class.c: Likewise.
* src/native/vm/reflect.c: Likewise.
* src/native/vm/sun/jvm.c: Likewise.
* src/vmcore/class.c: Likewise.
* src/vmcore/field.c: Likewise.
* src/vmcore/method.c: Likewise.
* src/vmcore/utf8.c: Likewise.
* tests/regression/MinimalClassReflection.java: Likewise.

16 years ago* src/native/vm/gnu/java_lang_VMClass.c (getSuperclass): Use
Christian Thalinger [Tue, 11 Sep 2007 21:52:28 +0000 (23:52 +0200)]
* src/native/vm/gnu/java_lang_VMClass.c (getSuperclass): Use
class_get_superclass.
* src/native/vm/java_lang_Class.c (getSuperclass): Removed.
* src/native/vm/java_lang_Class.h: Likewise.

16 years ago* src/native/vm/gnu/java_lang_VMClass.c (isPrimitive): Use
Christian Thalinger [Tue, 11 Sep 2007 21:35:29 +0000 (23:35 +0200)]
* src/native/vm/gnu/java_lang_VMClass.c (isPrimitive): Use
class_is_primitive.
* src/native/vm/java_lang_Class.c (isPrimitive): Removed.
* src/native/vm/java_lang_Class.h: Likewise.

16 years ago* src/vm/properties.c (properties_set) [WITH_JRE_LAYOUT]: Fixed old variable.
Michael Starzinger [Tue, 11 Sep 2007 00:58:58 +0000 (02:58 +0200)]
* src/vm/properties.c (properties_set) [WITH_JRE_LAYOUT]: Fixed old variable.
* src/native/vm/gnu/gnu_classpath_VMSystemProperties.c
(Java_gnu_classpath_VMSystemProperties_postInit) [WITH_JRE_LAYOUT]: Likewise.

16 years ago* src/vm/jit/mips/codegen.c (codegen_emit_stub_native): Fixed offset
Christian Thalinger [Mon, 10 Sep 2007 23:19:53 +0000 (01:19 +0200)]
* src/vm/jit/mips/codegen.c (codegen_emit_stub_native): Fixed offset
of result saving and restoring (hint: MIPS32 has a PA).

16 years ago* src/vm/jit/x86_64/patcher.c (patcher_resolve_native_function):
Christian Thalinger [Fri, 7 Sep 2007 23:53:30 +0000 (01:53 +0200)]
* src/vm/jit/x86_64/patcher.c (patcher_resolve_native_function):
Removed.

16 years ago* src/vm/jit/patcher-common.h: Added __X86_64__ ifdef.
Christian Thalinger [Fri, 7 Sep 2007 23:50:30 +0000 (01:50 +0200)]
* src/vm/jit/patcher-common.h: Added __X86_64__ ifdef.
* src/vm/signal.c (signal_init): Likewise.
* src/vm/signallocal.h: Likewise.

* src/vm/jit/x86_64/asmpart.S (asm_patcher_wrapper): Removed.

* src/vm/jit/x86_64/codegen.c (vm/jit/patcher.h): Removed.
(vm/jit/patcher-common.h): Added.
(codegen_emit): Implemented patchers-by-signal and load data from data
segment instead of moving inline.
(codegen_emit_stub_native): Likewise.
(codegen_emit_stub_compiler): Quick hack for ALD.

* src/vm/jit/x86_64/codegen.h (PATCHER_CALL_SIZE): Changed to 2.
(PATCHER_NOPS): Likewise.
(M_ALD): Handle RIP properly.

* src/vm/jit/x86_64/emit.c (vm/jit/patcher-common.h): Added.
(emit_patcher_stubs): Removed.
(emit_trap): Emit UD2.

* src/vm/jit/x86_64/linux/md-os.c (md_signal_handler_sigill): New
function.

* src/vm/jit/x86_64/patcher.c (vm/jit/patcher.h): Removed.
(vm/jit/patcher-common.h): Added.
(patcher_wrapper): Removed.
(PATCH_BACK_ORIGINAL_MCODE): New macro.
(patcher_patch_code): New function.
(patcher_resolve_classref_to_classinfo): Likewise.
(patcher_resolve_classref_to_vftbl): Likewise.
(patcher_resolve_classref_to_flags): Likewise.
(patcher_resolve_native_function): Likewise.
(patcher_aconst): Removed.
(patcher_builtin_multianewarray): Likewise.
(patcher_builtin_arraycheckcast): Likewise.
(patcher_checkcast_instanceof_flags): Likewise.
(patcher_checkcast_class): Likewise.
(patcher_instanceof_class): Likewise.
(patcher_clinit): Likewise.
(patcher_athrow_areturn): Likewise.
(patcher_resolve_native): Likewise.

16 years ago* src/vm/jit/patcher-common.c (patcher_add_patch_ref): Added
Christian Thalinger [Fri, 7 Sep 2007 23:42:51 +0000 (01:42 +0200)]
* src/vm/jit/patcher-common.c (patcher_add_patch_ref): Added
lastmcodeptr code. This can be removed when we don't use UD2 on i386
and x86_64 anymore.

16 years ago* src/vm/jit/i386/codegen.c (codegen_emit_stub_native): Loads function pointer
Michael Starzinger [Fri, 7 Sep 2007 23:09:48 +0000 (01:09 +0200)]
* src/vm/jit/i386/codegen.c (codegen_emit_stub_native): Loads function pointer
from data segment now.

* src/vm/jit/patcher-common.c (patcher_resolve_native_function): Implemented
generalized version.

* src/vm/jit/alpha/patcher.c (patcher_resolve_native_function): Removed
obsolete function.

* src/vm/jit/arm/patcher.c: Likewise.
* src/vm/jit/i386/patcher.c: Likewise.
* src/vm/jit/mips/patcher.c: Likewise.
* src/vm/jit/powerpc/patcher.c: Likewise.
* src/vm/jit/powerpc64/patcher.c: Likewise.
* src/vm/jit/s390/patcher.c: Likewise.

16 years ago* src/vm/jit/alpha/md.c (md_dcacheflush): Added dummy function.
Michael Starzinger [Fri, 7 Sep 2007 22:46:55 +0000 (00:46 +0200)]
* src/vm/jit/alpha/md.c (md_dcacheflush): Added dummy function.
* src/vm/jit/arm/md.c (md_dcacheflush): Does nothing now.

16 years ago* src/vm/jit/patcher-common.h (patcher_patch_code): Added prototype.
Michael Starzinger [Fri, 7 Sep 2007 21:20:25 +0000 (23:20 +0200)]
* src/vm/jit/patcher-common.h (patcher_patch_code): Added prototype.

* src/vm/jit/patcher-common.c (patcher_handle) [TRACE_PATCHER]: Improved debug.
(patcher_initialize_class): Implemented generalized version.
(patcher_resolve_class): Likewise.

* src/vm/jit/alpha/patcher.c (patcher_patch_code): Implemented.
(patcher_initialize_class): Removed obsolete patcher function.
(patcher_resolve_class): Likewise.

* src/vm/jit/arm/patcher.c: Likewise.
* src/vm/jit/i386/patcher.c: Likewise.
* src/vm/jit/mips/patcher.c: Likewise.
* src/vm/jit/powerpc/patcher.c: Likewise.
* src/vm/jit/powerpc64/patcher.c: Likewise.
* src/vm/jit/s390/patcher.c: Likewise.

16 years ago* src/vm/jit/i386/emit.c (emit_patcher_stubs): Removed, this is obsolete.
Michael Starzinger [Fri, 7 Sep 2007 20:19:22 +0000 (22:19 +0200)]
* src/vm/jit/i386/emit.c (emit_patcher_stubs): Removed, this is obsolete.
(emit_trap): Fixed trap instruction.

* src/vm/jit/i386/asmpart.S (asm_patcher_wrapper): Removed, this is obsolete.

* src/vm/jit/i386/patcher.c: Adapted patchers to new signature for traps.
(patcher_wrapper): Removed, this is obsolete.

* src/vm/jit/i386/codegen.h (PATCHER_CALL_SIZE, PATCHER_NOPS): Adapted to new
trap instruction.

* src/vm/jit/i386/codegen.c (codegen_emit, codegen_emit_stub_native): Call
the new patcher functions via traps and adapted to above change.

* src/vm/jit/i386/linux/md-os.c (md_signal_handler_sigill): Implemented.

* src/vm/jit/patcher-common.h [__I386__]: Enabled new patcher stuff.

* src/vm/jit/patcher.h [__I386__]: Defined away old patcher stuff.

* src/vm/signal.c (signal_init) [__I386__]: Install SIGILL handler now.

* src/vm/signallocal.h [__I386__] (md_signal_handler_sigill): Enabled prototype.

16 years ago* Merged with 79e3a1932e59.
Christian Thalinger [Fri, 7 Sep 2007 18:55:24 +0000 (20:55 +0200)]
* Merged with 79e3a1932e59.

16 years ago* src/vmcore/loader.c (load_class_from_classloader): Fixed classloader issues.
Michael Starzinger [Fri, 7 Sep 2007 18:49:09 +0000 (20:49 +0200)]
* src/vmcore/loader.c (load_class_from_classloader): Fixed classloader issues.

16 years ago* src/vm/jit/x86_64/codegen.h (M_BYTE1, M_BYTE2): New macros.
Christian Thalinger [Fri, 7 Sep 2007 18:41:11 +0000 (20:41 +0200)]
* src/vm/jit/x86_64/codegen.h (M_BYTE1, M_BYTE2): New macros.
(M_UD2): Added.
(M_RET, M_NOP): Use M_BYTE1.

* src/vm/jit/x86_64/emit.c (emit_ret): Removed.
(emit_nop): Likewise.
* src/vm/jit/x86_64/emit.h: Likewise.

16 years ago* src/vmcore/method.h (method_new_builtin): Fixed typo in function prototype.
Michael Starzinger [Fri, 7 Sep 2007 01:41:49 +0000 (03:41 +0200)]
* src/vmcore/method.h (method_new_builtin): Fixed typo in function prototype.

16 years ago* src/vm/jit/stacktrace.c (stacktrace_create): Skip entries for builtin stubs.
Michael Starzinger [Fri, 7 Sep 2007 01:29:44 +0000 (03:29 +0200)]
* src/vm/jit/stacktrace.c (stacktrace_create): Skip entries for builtin stubs.

16 years ago* src/vm/builtin.c (builtintable_init): Create methodinfos for builtins.
Michael Starzinger [Thu, 6 Sep 2007 23:32:02 +0000 (01:32 +0200)]
* src/vm/builtin.c (builtintable_init): Create methodinfos for builtins.
* src/vm/builtin.h (builtintable_entry): Added forward typedef.
* src/vmcore/method.h (method_new_builtin): Added prototype.
* src/vmcore/method.c (method_new_builtin): Implemented.
* src/vm/jit/codegen-common.h (codegen_generate_stub_builtin): Changed sig.
* src/vm/jit/codegen-common.c (codegen_generate_stub_builtin): Pass methodinfo.

16 years ago* src/vm/jit/argument.c: Added file for argument array handling.
Michael Starzinger [Thu, 6 Sep 2007 15:47:04 +0000 (17:47 +0200)]
* src/vm/jit/argument.c: Added file for argument array handling.
* src/vm/jit/argument.h: Likewise.

* src/vm/jit/Makefile.am (libjit_la_SOURCES): Added above two files.

* src/vm/jit/trace.c: Moved array handling functions to argument.c and adapted
to new name and signature.

* src/native/localref.c (localref_fill): Likewise.

16 years ago* src/vm/jit/powerpc64/patcher.c: Removed obsolete patcher functions.
Michael Starzinger [Thu, 6 Sep 2007 13:50:13 +0000 (15:50 +0200)]
* src/vm/jit/powerpc64/patcher.c: Removed obsolete patcher functions.

16 years ago* src/vmcore/loader.h (classloader) [!ENABLE_HANDLES]: Classloader is a object.
Michael Starzinger [Thu, 6 Sep 2007 13:39:02 +0000 (15:39 +0200)]
* src/vmcore/loader.h (classloader) [!ENABLE_HANDLES]: Classloader is a object.

* src/vmcore/loader.c (loader_hashtable_classloader_add) [!ENABLE_HANDLES]:
Return classloader object instead of entry. Added some debug output.
(loader_hashtable_classloader_find): Likewise.

* src/vmcore/class.c (class_get_classloader): No need to differentiate between
handles or not-handles.

* src/native/vm/gnu/gnu_classpath_VMStackWalker.c: Fixed bogus classloader
usages.

16 years ago* src/native/native.c (native_resolve_function): Use
Christian Thalinger [Thu, 6 Sep 2007 11:44:32 +0000 (13:44 +0200)]
* src/native/native.c (native_resolve_function): Use
class_get_classloader.

16 years ago* src/vm/jit/patcher-common.h: Removed obsolete patcher function defines.
Michael Starzinger [Thu, 6 Sep 2007 11:15:56 +0000 (13:15 +0200)]
* src/vm/jit/patcher-common.h: Removed obsolete patcher function defines.

* src/vm/jit/powerpc64/codegen.c: Used newer patcher function names.
* src/vm/jit/powerpc64/patcher.c: Likewise.
* src/vm/jit/s390/codegen.c: Likewise.
* src/vm/jit/s390/patcher.c: Likewise.

16 years ago* src/vm/jit/powerpc64/emit.c (emit_patcher_stubs): Removed, this is obsolete.
Michael Starzinger [Wed, 5 Sep 2007 23:28:52 +0000 (01:28 +0200)]
* src/vm/jit/powerpc64/emit.c (emit_patcher_stubs): Removed, this is obsolete.
(emit_trap): Fixed trap instruction:

* src/vm/jit/powerpc64/codegen.c (codegen_emit, codegen_emit_stub_native): Call
the new patcher functions and adapted to above change.

* src/vm/jit/powerpc64/patcher.c: Adapted patchers to new signature for traps.
(patcher_wrapper): Removed, this is obsolete.

* src/vm/jit/powerpc64/asmpart.S (asm_patcher_wrapper): Removed, this is
obsolete.

* src/vm/jit/powerpc64/linux/md-os.c (md_signal_handler_sigsegv): Only calls the
exception handling if exception object present.

* src/vm/jit/patcher-common.h [__POWERPC64__]: Enabled new patcher stuff.

* src/vm/jit/patcher.h [__POWERPC64__]: Defined away old patcher stuff.

16 years ago* Merged with 269162803388.
Christian Thalinger [Wed, 5 Sep 2007 22:06:41 +0000 (00:06 +0200)]
* Merged with 269162803388.

16 years ago* src/native/vm/Makefile.am (libnativevm_la_SOURCES): Removed
Christian Thalinger [Wed, 5 Sep 2007 22:05:41 +0000 (00:05 +0200)]
* src/native/vm/Makefile.am (libnativevm_la_SOURCES): Removed
java_lang_Object.[ch].

* src/native/vm/java_lang_Object.c: Removed.
* src/native/vm/java_lang_Object.h: Likewise.

* src/native/vm/cldc1.1/java_lang_Object.c
(native/vm/java_lang_Object.h): Removed.
(threads/lock-common.h): Added.
(vm/exceptions.h): Likewise.
(getClass): Use LLNI_class_get.
(notify): Use lock_notify_object.
(notifyAll): Use lock_notify_all_object.
(wait): Use lock_wait_for_object.

* src/native/vm/gnu/java_lang_VMObject.c (native/llni.h): Added.
(native/vm/java_lang_Object.h): Removed.
(threads/lock-common.h): Added.
(vm/builtin.h): Likewise.
(vm/exceptions.h): Likewise.
(getClass): Use LLNI_class_get.
(clone): Use builtin_clone.
(notify): Use lock_notify_object.
(notifyAll): Use lock_notify_all_object.
(wait): Use lock_wait_for_object.

* src/native/vm/sun/jvm.c (native/vm/java_lang_Object.h): Removed.
(JVM_MonitorWait): Use lock_wait_for_object.
(JVM_MonitorNotify): Use lock_notify_object.
(JVM_MonitorNotifyAll): Use lock_notify_all_object.

16 years ago* src/vm/jit/codegen-common.c (codegen_start_native_call) [__X86_64__]: Tracer
Michael Starzinger [Wed, 5 Sep 2007 21:33:48 +0000 (23:33 +0200)]
* src/vm/jit/codegen-common.c (codegen_start_native_call) [__X86_64__]: Tracer
for native methods is called from here now.
(codegen_finish_native_call) [__X86_64__]: Likewise.

* src/vm/jit/x86_64/codegen.c (codegen_emit_stub_native): Removed verbosecall
tracer.

16 years ago* src/vm/jit/codegen-common.h (codegen_finish_native_call): Changes signature.
Michael Starzinger [Wed, 5 Sep 2007 21:25:53 +0000 (23:25 +0200)]
* src/vm/jit/codegen-common.h (codegen_finish_native_call): Changes signature.

* src/vm/jit/codegen-common.c (codegen_finish_native_call): Takes the same
arguments as the enter pendant now.

* src/vm/jit/alpha/codegen.c (codegen_emit_stub_native): Adapted to new
signature mentioned above.

* src/vm/jit/arm/codegen.c: Likewise.
* src/vm/jit/i386/codegen.c: Likewise.
* src/vm/jit/m68k/codegen.c: Likewise.
* src/vm/jit/mips/codegen.c: Likewise.
* src/vm/jit/powerpc/codegen.c: Likewise.
* src/vm/jit/powerpc64/codegen.c: Likewise.
* src/vm/jit/s390/codegen.c: Likewise.
* src/vm/jit/x86_64/codegen.c: Likewise.

16 years ago* src/vm/jit/codegen-common.c (codegen_start_native_call) [__POWERPC__]: Tracer
Michael Starzinger [Wed, 5 Sep 2007 19:58:35 +0000 (21:58 +0200)]
* src/vm/jit/codegen-common.c (codegen_start_native_call) [__POWERPC__]: Tracer
for native methods is called from here now.

* src/vm/jit/powerpc/codegen.c (codegen_emit_stub_native): Removed verbosecall
enter tracer.

* src/vm/jit/powerpc/emit.c (emit_verbosecall_enter, emit_verbosecall_exit):
Adapted to new tracer functions.

* src/vm/jit/trace.c (_array_load_param, _array_load_return_value): Optimized
passing of register arguments.

16 years ago* changed src/native/vm/sun/jvm.c: Throw IllegalArgumentException in all
Mathias Panzenboeck [Wed, 5 Sep 2007 16:33:51 +0000 (18:33 +0200)]
* changed src/native/vm/sun/jvm.c: Throw IllegalArgumentException in all
ConstantPool.get*At(int) methods as expected by OpenJDK.

* changed src/native/vm/gnu/sun_reflect_ConstantPool.c: Likewise.

16 years ago* src/native/vm/java_lang_Class.c (getDeclaringClass): Removed.
Christian Thalinger [Wed, 5 Sep 2007 16:04:14 +0000 (18:04 +0200)]
* src/native/vm/java_lang_Class.c (getDeclaringClass): Removed.
* src/native/vm/java_lang_Class.h: Likewise.
* src/native/vm/gnu/java_lang_VMClass.c (getDeclaringClass): Use
class_get_declaringclass.

16 years ago* src/native/vm/java_lang_Class.c (isArray): Removed.
Christian Thalinger [Wed, 5 Sep 2007 15:50:50 +0000 (17:50 +0200)]
* src/native/vm/java_lang_Class.c (isArray): Removed.
* src/native/vm/java_lang_Class.h: Likewise.
* src/native/vm/cldc1.1/java_lang_Class.c (isArray): New function.
* src/native/vm/gnu/java_lang_VMClass.c (isArray): Use class_is_array.

16 years ago* src/vm/jit/mips/linux/md-os.c (mm/memory.h): Added.
Christian Thalinger [Wed, 5 Sep 2007 15:35:23 +0000 (17:35 +0200)]
* src/vm/jit/mips/linux/md-os.c (mm/memory.h): Added.
(md_init): Use int instead of u1 for GCNEW.

16 years ago* configure.ac (AC_CHECK_ENABLE_INTRP): Added.
Christian Thalinger [Wed, 5 Sep 2007 15:05:58 +0000 (17:05 +0200)]
* configure.ac (AC_CHECK_ENABLE_INTRP): Added.
(AC_CHECK_ENABLE_GC): Likewise.
(AC_CHECK_ENABLE_DEBUG): Likewise.
(AC_CHECK_ENABLE_DUMP): Likewise.

* m4/debug.m4: New file.
* m4/dump.m4: Likewise.
* m4/gc.m4: Likewise.
* m4/intrp.m4: Likewise.

16 years ago* configure.ac (static-classpath): Removed.
Christian Thalinger [Wed, 5 Sep 2007 14:46:18 +0000 (16:46 +0200)]
* configure.ac (static-classpath): Removed.

* src/cacao/Makefile.am,
src/native/Makefile.am,
src/native/include/Makefile.am: Removed WITH_STATIC_CLASSPATH if's.

* src/native/native.c (native_findfunction): Removed.
* src/native/native.h (nativeref, nativecompref): Removed.
(native_findfunction): Removed.

* src/native/tools/Makefile.am: Removed.
* src/native/tools/gennativetable.c: Likewise.

* src/cacao/cacao.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/java.vmg,
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/patcher-common.h,
src/vm/jit/patcher.h,
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/s390/codegen.c,
src/vm/jit/s390/patcher.c,
src/vm/jit/sparc64/codegen.c,
src/vm/jit/sparc64/patcher.c,
src/vm/jit/x86_64/codegen.c,
src/vm/jit/x86_64/patcher.c,
src/vm/properties.c: Removed WITH_STATIC_CLASSPATH #ifdef's.

16 years ago* src/mm/cacao-gc/rootset.c (rootset_readout): Ignore threads in state new.
Michael Starzinger [Wed, 5 Sep 2007 11:35:55 +0000 (13:35 +0200)]
* src/mm/cacao-gc/rootset.c (rootset_readout): Ignore threads in state new.

* src/mm/cacao-gc/heap.c (heap_alloc): Wrap reference befor returning.
(heap_alloc_intern): Respect stress-test option flag.

* src/mm/cacao-gc/gc.c (gc_collect): Respect debug rootset option flag.

* src/vmcore/options.h [ENABLE_GC_CACAO] (opt_GCDebugRootSet): Added.
[ENABLE_GC_CACAO] (opt_GCStress): Likewise.

* src/vmcore/options.c (options_xx) [ENABLE_GC_CACAO]: Parse above two options.

16 years ago* Merged with 3aaaa9f60c5d.
Christian Thalinger [Wed, 5 Sep 2007 11:10:24 +0000 (13:10 +0200)]
* Merged with 3aaaa9f60c5d.

16 years ago* Merge with 405cda264bce.
Christian Thalinger [Wed, 5 Sep 2007 11:09:40 +0000 (13:09 +0200)]
* Merge with 405cda264bce.

16 years ago* src/native/llni.h: Fixed a lot of compiler warnings.
Michael Starzinger [Wed, 5 Sep 2007 11:09:25 +0000 (13:09 +0200)]
* src/native/llni.h: Fixed a lot of compiler warnings.

* src/native/vm/reflect.c (reflect_field_new): Removed bogus cast.
(reflect_method_new): Likewise.

* src/vm/builtin.c (builtin_multianewarray): Fixed compiler warning.

16 years ago* Not sure what this commit should do, let's see.
Christian Thalinger [Wed, 5 Sep 2007 11:07:30 +0000 (13:07 +0200)]
* Not sure what this commit should do, let's see.

16 years ago* src/vmcore/class.c (class_get_classloader): New function.
Christian Thalinger [Wed, 5 Sep 2007 11:03:05 +0000 (13:03 +0200)]
* src/vmcore/class.c (class_get_classloader): New function.
* src/vmcore/class.h: Likewise.
* src/native/vm/java_lang_Class.c
(_Jv_java_lang_Class_getClassLoader): Removed.
* src/native/vm/java_lang_Class.h: Likewise.
* src/native/vm/gnu/java_lang_VMClass.c (getClassLoader): Use
class_get_classloader.
* src/native/vm/sun/jvm.c (JVM_GetClassLoader): Likewise.

16 years ago* src/vm/jit/codegen-common.c (codegen_start_native_call): Return class
Michael Starzinger [Wed, 5 Sep 2007 10:44:01 +0000 (12:44 +0200)]
* src/vm/jit/codegen-common.c (codegen_start_native_call): Return class
argument for static native methods.

* src/vm/jit/codegen-common.h (codegen_start_native_call): Adapted signature.

* src/vm/jit/alpha/codegen.c (codegen_emit_stub_native): Class argument is no
longer placed onto the data segment.

* src/vm/jit/arm/codegen.c: Likewise.
* src/vm/jit/i386/codegen.c: Likewise.
* src/vm/jit/m68k/codegen.c: Likewise.
* src/vm/jit/mips/codegen.c: Likewise.
* src/vm/jit/powerpc/codegen.c: Likewise.
* src/vm/jit/powerpc64/codegen.c: Likewise.
* src/vm/jit/s390/codegen.c: Likewise.
* src/vm/jit/sparc64/codegen.c: Likewise.
* src/vm/jit/x86_64/codegen.c: Likewise.

16 years ago* src/vm/exceptions.c (exceptions_handle_exception): Restructured to create sfi.
Michael Starzinger [Wed, 5 Sep 2007 00:01:47 +0000 (02:01 +0200)]
* src/vm/exceptions.c (exceptions_handle_exception): Restructured to create sfi.

16 years ago* src/mm/cacao-gc/heap.h (FOREACH_OBJECT_REF): Adapted to new classinfo->super.
Michael Starzinger [Tue, 4 Sep 2007 23:00:41 +0000 (01:00 +0200)]
* src/mm/cacao-gc/heap.h (FOREACH_OBJECT_REF): Adapted to new classinfo->super.
* src/mm/cacao-gc/mark.c (mark_recursive): Likewise.

16 years ago* src/native/localref.h (localref_fill): Added prototype.
Michael Starzinger [Tue, 4 Sep 2007 22:40:16 +0000 (00:40 +0200)]
* src/native/localref.h (localref_fill): Added prototype.

* src/native/localref.c (localref_fill): Implemented.
(localref_frame_push): Fixed compiler warning.
(_array_store_param): Added temporarily.

* src/vm/jit/trace.c (_array_load_param): Made non-static.

* src/vm/jit/codegen-common.c (codegen_start_native_call): Call localref_fill.

16 years ago* Merged with 291b838f1aed.
Christian Thalinger [Tue, 4 Sep 2007 22:23:44 +0000 (00:23 +0200)]
* Merged with 291b838f1aed.

16 years ago* tests/regression/jasmin/runtest: Make executable.
Christian Thalinger [Tue, 4 Sep 2007 22:21:11 +0000 (00:21 +0200)]
* tests/regression/jasmin/runtest: Make executable.
* tests/regression/jasmin/show: Likewise.

16 years ago* src/vm/jit/codegen-common.c (codegen_generate_stub_builtin): Added workaround
Michael Starzinger [Tue, 4 Sep 2007 21:29:18 +0000 (23:29 +0200)]
* src/vm/jit/codegen-common.c (codegen_generate_stub_builtin): Added workaround
for builtins returning booleans to indicate exceptions.

* src/vm/jit/powerpc/codegen.c (codegen_emit_stub_builtin): Workaround was
moved to codegen-common.c to keep codegens clean.

16 years ago* src/native/vm/sun_misc_Unsafe.c
Michael Starzinger [Tue, 4 Sep 2007 20:58:25 +0000 (22:58 +0200)]
* src/native/vm/sun_misc_Unsafe.c
(Java_sun_misc_Unsafe_defineClass) [ENABLE_HANDLES]: Fixed array access.
(Java_sun_misc_Unsafe_allocateInstance): Fixed compiler warning.

16 years ago* src/vmcore/class.c (classref_or_classinfo_println): Fixed infinite recursion.
edwin@localhost.localdomain [Tue, 4 Sep 2007 20:32:06 +0000 (22:32 +0200)]
* src/vmcore/class.c (classref_or_classinfo_println): Fixed infinite recursion.

16 years ago* tests/regression/native/testarguments.c: Adapted testcase to support handles.
Michael Starzinger [Tue, 4 Sep 2007 16:55:13 +0000 (18:55 +0200)]
* tests/regression/native/testarguments.c: Adapted testcase to support handles.

16 years ago* src/vm/jit/codegen-common.h (codegen_start_native_call): Changed signature.
Michael Starzinger [Tue, 4 Sep 2007 16:07:24 +0000 (18:07 +0200)]
* src/vm/jit/codegen-common.h (codegen_start_native_call): Changed signature.

* src/vm/jit/codegen-common.c (codegen_start_native_call): Takes less arguments
now and computes values by itself. This makes the codegens simpler.

* src/vm/jit/alpha/codegen.c (codegen_emit_stub_native): Adapted to new
signature mentioned above.

* src/vm/jit/arm/codegen.c: Likewise.
* src/vm/jit/i386/codegen.c: Likewise.
* src/vm/jit/m68k/codegen.c: Likewise.
* src/vm/jit/mips/codegen.c: Likewise.
* src/vm/jit/powerpc/codegen.c: Likewise.
* src/vm/jit/powerpc64/codegen.c: Likewise.
* src/vm/jit/s390/codegen.c: Likewise.
* src/vm/jit/x86_64/codegen.c: Likewise.

16 years ago* tests/gc/NativeGlobalRef.java: Improved testcase.
Michael Starzinger [Mon, 3 Sep 2007 23:06:30 +0000 (01:06 +0200)]
* tests/gc/NativeGlobalRef.java: Improved testcase.
* tests/gc/native.c: Likewise.

16 years ago* src/native/localref.c (localref_del): Go through all local frames.
Michael Starzinger [Mon, 3 Sep 2007 21:46:18 +0000 (23:46 +0200)]
* src/native/localref.c (localref_del): Go through all local frames.

16 years agosrc/vm/exceptions.c (exceptions_asm_new_abstractmethoderror): Unwrap exception.
Michael Starzinger [Mon, 3 Sep 2007 21:45:05 +0000 (23:45 +0200)]
src/vm/exceptions.c (exceptions_asm_new_abstractmethoderror): Unwrap exception.

16 years ago* src/vm/jit/stacktrace.c (stacktrace_create): Enabled -XX:+DebugStackTrace.
Michael Starzinger [Mon, 3 Sep 2007 20:38:47 +0000 (22:38 +0200)]
* src/vm/jit/stacktrace.c (stacktrace_create): Enabled -XX:+DebugStackTrace.
* src/vmcore/options.c (options_XX): Added some descriptions.

16 years ago* src/native/jni.c (_Jv_JNI_DetachCurrentThread): We need to pop all
Christian Thalinger [Mon, 3 Sep 2007 20:36:27 +0000 (22:36 +0200)]
* src/native/jni.c (_Jv_JNI_DetachCurrentThread): We need to pop all
frames before we can destroy the table.

16 years ago* src/vm/jit/trace.c (native/jni.h): Added.
Christian Thalinger [Mon, 3 Sep 2007 20:32:56 +0000 (22:32 +0200)]
* src/vm/jit/trace.c (native/jni.h): Added.

16 years ago* src/vm/jit/codegen-common.c (codegen_generate_stub_builtin)
Christian Thalinger [Mon, 3 Sep 2007 20:19:49 +0000 (22:19 +0200)]
* src/vm/jit/codegen-common.c (codegen_generate_stub_builtin)
[__POWERPC__]: Define added.
* src/vm/jit/powerpc/codegen.c (codegen_emit): ICMD_BUILTIN: Use stub.
(codegen_emit_stub_builtin): New function.
(codegen_emit_stub_native): Fixed some offsets.
* src/vm/jit/powerpc/linux/md-os.c (md_signal_handler_sigusr1): New
function.

16 years agomerge with branch e6c59621d39a
Mathias Panzenboeck [Mon, 3 Sep 2007 19:29:40 +0000 (21:29 +0200)]
merge with branch e6c59621d39a

16 years ago* src/native/vm/sun/jvm.c (JVM_FindClassFromClassLoader): Add CL to hashtable.
Michael Starzinger [Mon, 3 Sep 2007 19:26:59 +0000 (21:26 +0200)]
* src/native/vm/sun/jvm.c (JVM_FindClassFromClassLoader): Add CL to hashtable.
(JVM_DefineClassWithSource): Likewise.
(JVM_FindLoadedClass): Likewise.

16 years ago* tests/regression/TestAnnotations.java: Removed umlauts.
Mathias Panzenboeck [Mon, 3 Sep 2007 19:15:25 +0000 (21:15 +0200)]
* tests/regression/TestAnnotations.java: Removed umlauts.

16 years ago* src/vm/builtin.c (methodindent, callcount): Removed static variables.
Michael Starzinger [Mon, 3 Sep 2007 18:55:04 +0000 (20:55 +0200)]
* src/vm/builtin.c (methodindent, callcount): Removed static variables.
(builtin_throw_exception): Use trace_exception_builtin.
(builtin_verbosecall_enter): Use thread-specific variables.
(builtin_verbosecall_exit): Likewise.

* src/vm/exceptions.c (exceptions_handle_exception): Fixed methodindent for
java call traces.

* src/vm/jit/trace.c: Added comments and minor cleanups.
(trace_exception_builtin): Implemented (moved from builtin.c).

* src/vm/jit/trace.h (trace_exception_builtin): Added prototype.

16 years ago* src/vm/jit/powerpc/emit.c (emit_verbosecall_exit) [__DARWIN__]: Fixed passing
Michael Starzinger [Mon, 3 Sep 2007 16:40:05 +0000 (18:40 +0200)]
* src/vm/jit/powerpc/emit.c (emit_verbosecall_exit) [__DARWIN__]: Fixed passing
of methodinfo argument.

16 years ago* src/vm/builtin.c (builtin_canstore): Throw an ArrayStoreException.
Michael Starzinger [Mon, 3 Sep 2007 13:15:14 +0000 (15:15 +0200)]
* src/vm/builtin.c (builtin_canstore): Throw an ArrayStoreException.
(builtin_fast_canstore): Do not throw any exceptions.

* src/vm/builtin.h (BUILTIN_canstore): Removed.

* src/vm/builtintable.inc: Adapted entry for builtin_canstore.

* src/vm/exceptions.h (EXCEPTION_HARDWARE_ARRAYSTORE): Added.

* src/vm/signal.c (signal_handle): Added case for ArrayStoreException.

* src/vm/jit/emit-common.h (emit_arraystore_check): Added prototype.

* src/vm/jit/stack.c (stack_analyse): ICMD_AASTORE now uses fast canstore.

* src/vm/jit/alpha/codegen.c (codegen_emit): ICMD_AASTORE uses fast canstore.
* src/vm/jit/alpha/emit.c (emit_arraystore_check): Implemented.

* src/vm/jit/arm/codegen.c: Likewise.
* src/vm/jit/arm/emit.c: Likewise.
* src/vm/jit/i386/codegen.c: Likewise.
* src/vm/jit/i386/emit.c: Likewise.
* src/vm/jit/m68k/codegen.c: Likewise.
* src/vm/jit/m68k/emit.c: Likewise.
* src/vm/jit/mips/codegen.c: Likewise.
* src/vm/jit/mips/emit.c: Likewise.
* src/vm/jit/powerpc/codegen.c: Likewise.
* src/vm/jit/powerpc/emit.c: Likewise.
* src/vm/jit/powerpc64/codegen.c: Likewise.
* src/vm/jit/powerpc64/emit.c: Likewise.
* src/vm/jit/s390/codegen.c: Likewise.
* src/vm/jit/s390/emit.c: Likewise.
* src/vm/jit/sparc64/codegen.c: Likewise.
* src/vm/jit/sparc64/emit.c: Likewise.
* src/vm/jit/x86_64/codegen.c: Likewise.
* src/vm/jit/x86_64/emit.c: Likewise.

16 years ago* src/vm/array.c (array_length_get): Better use LLNI_class_get here.
Michael Starzinger [Mon, 3 Sep 2007 12:16:37 +0000 (14:16 +0200)]
* src/vm/array.c (array_length_get): Better use LLNI_class_get here.

16 years ago* THIRDPARTY: Added copyright notice for newly imported files.
Mathias Panzenboeck [Mon, 3 Sep 2007 12:09:02 +0000 (14:09 +0200)]
* THIRDPARTY: Added copyright notice for newly imported files.

* src/lib/Makefile.am
(VM_JAVA_FILES) [ENABLE_ANNOTATIONS]: Added
$(top_srcdir)/src/lib/gnu/sun/reflect/annotation/ExceptionProxy.java and
$(top_srcdir)/src/lib/gnu/sun/reflect/annotation/EnumConstantNotPresentExceptionProxy.java
(VM_CLASS_FILES) [ENABLE_ANNOTATIONS]: Added
classes/sun/reflect/annotation/ExceptionProxy.class and
classes/sun/reflect/annotation/EnumConstantNotPresentExceptionProxy.class

* src/lib/gnu/sun/reflect/annotation/EnumConstantNotPresentExceptionProxy.java:
Imported from OpenJDK. This file was only an unimplemented stub in GNU Classpath.

* src/lib/gnu/sun/reflect/annotation/ExceptionProxy.java: Likewise.

16 years ago* src/native/jni.c (_Jv_JNI_FindClass) [ENABLE_JAVAME_CLDC1_1]:
Christian Thalinger [Sun, 2 Sep 2007 20:05:54 +0000 (22:05 +0200)]
* src/native/jni.c (_Jv_JNI_FindClass) [ENABLE_JAVAME_CLDC1_1]:
Implemented.

16 years ago* src/vmcore/class.h (classinfo): Changed type of super and interfaces
Christian Thalinger [Sun, 2 Sep 2007 17:37:50 +0000 (19:37 +0200)]
* src/vmcore/class.h (classinfo): Changed type of super and interfaces
to classinfo*.
* src/cacaoh/headers.c (printfields): Removed .cls for super class
and/or interfaces.
* src/vm/initialize.c (initialize_class_intern): Likewise.
* src/vm/jit/verify/typecheck-invoke.inc: Likewise.
* src/vm/jit/verify/typeinfo.c (interface_extends_interface):
Likewise.
(typeinfo_merge_nonarrays): Likewise.
* src/vm/resolve.c (resolve_method_invokespecial_lookup): Likwise.
* src/vmcore/class.c (class_free): Likewise.
(class_resolvemethod): Likewise.
(class_resolveinterface_intern): Likewise.
(class_resolveclassmethod): Likewise.
(class_findfield): Likewise.
(class_resolvefield_int): Likewise.
(class_get_interfaces): Likewise.
(class_issubclass): Likewise.
(class_get_superclass): Likewise.
(class_showmethods): Likewise.
(class_showmethods): Likewise.
(class_resolve_superclass): Removed.
* src/vmcore/linker.c (linker_init): Removed .cls for super class
and/or interfaces.
(linker_compute_subclasses): Likewise.
(linker_addinterface): Likewise.
(link_class_intern): Moved verifier checks into classfile parsing
stage.
* src/vmcore/loader.c (vm/resolve.h): Added.
(load_class_from_classbuffer_intern): Resolve super class and super
interfaces during loading. This is also done by the RI.
(load_newly_created_array): Removed .cls for super class and/or
interfaces.
* src/vmcore/primitivecore.c (primitive_init): Likewise.

16 years ago* .hgignore: Ignore files in tests/.
Christian Thalinger [Sun, 2 Sep 2007 15:57:33 +0000 (17:57 +0200)]
* .hgignore: Ignore files in tests/.

16 years ago* src/vm/jit/codegen-common.c (llni.h): Added.
Michael Starzinger [Sat, 1 Sep 2007 16:25:39 +0000 (18:25 +0200)]
* src/vm/jit/codegen-common.c (llni.h): Added.
(codegen_stub_builtin_exit): Use stacktrace function to remove stackframeinfo.
(codegen_finish_native_call): Likewise. Unwrap exception object before return.

16 years ago* src/vm/jit/stacktrace.h (stacktracebuffer): Entries are stored inside stb now.
Michael Starzinger [Sat, 1 Sep 2007 15:04:16 +0000 (17:04 +0200)]
* src/vm/jit/stacktrace.h (stacktracebuffer): Entries are stored inside stb now.
(stacktracecontainer): Removed data field.

* src/vm/jit/stacktrace.c (stacktrace_add_entry) Adapted to above changes.
(stacktrace_add_method): Likewise.
(stacktrace_create): Likewise.
(stacktrace_fillInStackTrace): Stacktracebuffer can be copied at once.

* tests/StackTraceBig.java: Added testcase for large stacktraces.

16 years ago* src/vm/builtin.c (builtin_canstore): Fixed severe typo.
Michael Starzinger [Sat, 1 Sep 2007 12:19:04 +0000 (14:19 +0200)]
* src/vm/builtin.c (builtin_canstore): Fixed severe typo.

16 years ago* src/vm/builtin.c: Use LLNI macros throughout the file.
Michael Starzinger [Fri, 31 Aug 2007 22:11:34 +0000 (00:11 +0200)]
* src/vm/builtin.c: Use LLNI macros throughout the file.
(builtin_fast_canstore): Previously builtin_canstore.
(builtin_canstore): Implemented.
(builtin_trace_exception): Moved to trace.c.

* src/vm/builtin.h: Fixed prototypes.

* src/vm/exceptions.c (exceptions_handle_exception): Use trace_exception
instead of builtin.

* src/vm/jit/trace.c (trace_exception): Added (moved from builtin.c).

* src/vm/jit/trace.h (trace_exception): Added prototype.

16 years ago* src/vm/jit/trace.c (trace_java_call_print_argument): Deals with java_object_t.
Michael Starzinger [Fri, 31 Aug 2007 21:11:10 +0000 (23:11 +0200)]
* src/vm/jit/trace.c (trace_java_call_print_argument): Deals with java_object_t.

* src/vm/exceptions.h (exceptions_asm_new_abstractmethoderror): Fixed prototype.

* src/vm/exceptions.c: Use LLNI_class_get throughout file.
(exceptions_get_exception): Wrap exception object.
(exceptions_set_exception): Unwrap exception object.

* src/vm/vm.c: Use LLNI_class_get throughout file.

16 years ago* src/cacaoh/dummy.c (array_objectarray_element_set): Fixed for handles.
Michael Starzinger [Fri, 31 Aug 2007 20:21:38 +0000 (22:21 +0200)]
* src/cacaoh/dummy.c (array_objectarray_element_set): Fixed for handles.
(array_objectarray_element_get): Likewise.
(builtin_anewarray): Likewise.
(builtin_newarray_byte): Likewise.
(localref_add): Added.

* src/native/include/Makefile.am [ENABLE_ANNOTATIONS]: Create java_util_Map.h.

* src/native/vm/gnu/java_lang_reflect_Constructor.c: Use above header.
* src/native/vm/gnu/java_lang_reflect_Field.c: Likewise.
* src/native/vm/gnu/java_lang_reflect_Method.c: Likewise.

16 years ago* src/native/vm/java_lang_ClassLoader.c (_Jv_java_lang_ClassLoader_defineClass):
Michael Starzinger [Fri, 31 Aug 2007 19:16:01 +0000 (21:16 +0200)]
* src/native/vm/java_lang_ClassLoader.c (_Jv_java_lang_ClassLoader_defineClass):
Removed bugging assertion. It seems defineClass can take NULL as classloader.

16 years ago* src/native/jni.c (_Jv_JNI_GetObjectField): Fixed implementation for handles.
Michael Starzinger [Fri, 31 Aug 2007 13:58:07 +0000 (15:58 +0200)]
* src/native/jni.c (_Jv_JNI_GetObjectField): Fixed implementation for handles.
(_Jv_JNI_SetObjectField): Likewise.

* tests/regression/native/checkjni.c: Added testcase for above change.
* tests/regression/native/checkjni.java: Likewise.
* tests/regression/native/checkjni.output: Adapted output to above changes.

16 years ago* src/vm/jit/i386/codegen.c (codegen_emit_stub_builtin): Removed obsolete
Michael Starzinger [Fri, 31 Aug 2007 13:02:37 +0000 (15:02 +0200)]
* src/vm/jit/i386/codegen.c (codegen_emit_stub_builtin): Removed obsolete
assertion.

* src/vm/jit/m68k/codegen.c (codegen_emit_stub_builtin): Likewise.

16 years ago* Merged with exact-gc branch at rev 2d4098fc2ea4.
Michael Starzinger [Fri, 31 Aug 2007 12:35:03 +0000 (14:35 +0200)]
* Merged with exact-gc branch at rev 2d4098fc2ea4.

16 years ago* src/lib/Makefile.am: Fixed another merge problem.
Michael Starzinger [Fri, 31 Aug 2007 12:26:15 +0000 (14:26 +0200)]
* src/lib/Makefile.am: Fixed another merge problem.
* src/native/vm/Makefile.am: Removed resurrected files.
* src/native/vm/java_lang_String.c: Removed resurrected file.
* src/native/vm/java_lang_String.h: Likewise.

--HG--
branch : exact-gc

16 years ago* src/vmcore/class.c (class_free): Fixed another merge problem (thx to panzi).
Michael Starzinger [Fri, 31 Aug 2007 11:23:22 +0000 (13:23 +0200)]
* src/vmcore/class.c (class_free): Fixed another merge problem (thx to panzi).

--HG--
branch : exact-gc

16 years ago* src/native/vm/gnu/java_lang_VMClassLoader.c
Michael Starzinger [Fri, 31 Aug 2007 10:51:30 +0000 (12:51 +0200)]
* src/native/vm/gnu/java_lang_VMClassLoader.c
(Java_java_lang_VMClassLoader_findLoadedClass): Add classloader to hashtable
instead of searching for it.

--HG--
branch : exact-gc

16 years ago* src/threads/native/threads.c (threads_stopworld) [__DARWIN__]: Disabled.
Michael Starzinger [Fri, 31 Aug 2007 10:39:38 +0000 (12:39 +0200)]
* src/threads/native/threads.c (threads_stopworld) [__DARWIN__]: Disabled.
(threads_startworld) [__DARWIN__]: Likewise.

* src/vm/jit/codegen-common.c (codegen_generate_stub_builtin): Disabled for
archs where codegen_emit_stub_builtin is not yet implemented.

--HG--
branch : exact-gc

16 years ago* tests/gc/ClassUnload.java: Added testcase for class unloading.
Michael Starzinger [Fri, 31 Aug 2007 10:13:55 +0000 (12:13 +0200)]
* tests/gc/ClassUnload.java: Added testcase for class unloading.

--HG--
branch : exact-gc

16 years ago* src/native/vm/gnu/java_lang_reflect_Method.c
Michael Starzinger [Fri, 31 Aug 2007 00:01:29 +0000 (02:01 +0200)]
* src/native/vm/gnu/java_lang_reflect_Method.c
(Java_java_lang_reflect_Method_invokeNative): Fixed LLNI macro usage.

* src/native/vm/java_lang_String.c (_Jv_java_lang_String_intern): Wrap interned
strings into a handle.

* src/vm/access.c (access_check_field): Use LLNI macro for array access.
(access_check_method): Likewise.

* src/vm/jit/stacktrace.c (stacktrace_getClassContext): Likewise.
(stacktrace_getStack): Likewise.

* src/vm/jit/stacktrace.h (md-abi.h): Added missing include.

--HG--
branch : exact-gc

16 years ago* src/mm/cacao-gc/heap.c (heap_alloc_intern) [!NDEBUG]: Added sanity check.
Michael Starzinger [Thu, 30 Aug 2007 23:41:05 +0000 (01:41 +0200)]
* src/mm/cacao-gc/heap.c (heap_alloc_intern) [!NDEBUG]: Added sanity check.

* src/vm/jit/codegen-common.c
(codegen_stub_builtin_enter): Removed native-world flag manipulation.
(codegen_stub_builtin_exit): Likewise.
(codegen_start_native_call): Likewise.
(codegen_finish_native_call): Likewise.

--HG--
branch : exact-gc

16 years ago* configure.ac: Added missing newline.
Michael Starzinger [Thu, 30 Aug 2007 23:29:33 +0000 (01:29 +0200)]
* configure.ac: Added missing newline.
* src/native/jni.c: Fixed some merge problems
* src/native/vm/java_lang_ClassLoader.c: Likewise.
* src/native/vm/nativevm.c: Likewise.
* src/vmcore/loader.c: Likewise.

--HG--
branch : exact-gc