cacao.git
16 years ago* src/threads/threads-common.h (THREAD_STATE_*): Changed to be
twisti [Sun, 19 Aug 2007 20:02:34 +0000 (20:02 +0000)]
* src/threads/threads-common.h (THREAD_STATE_*): Changed to be
compatible with OpenJDK (range 1-6).

16 years ago* src/vm/signal.c (signal_init) [!WITH_CLASSPATH_SUN]: Only block
twisti [Sun, 19 Aug 2007 19:59:52 +0000 (19:59 +0000)]
* src/vm/signal.c (signal_init) [!WITH_CLASSPATH_SUN]: Only block
SIGINT for non-Sun configurations.
(signal_thread): Use signal_thread_handler.
(signal_thread_handler): New function.

* src/vm/signallocal.h (signal_thread_handler): New function.

16 years ago* src/vm/primitive.c (primitive_box): Handle PRIMITIVETYPE_VOID type.
twisti [Sun, 19 Aug 2007 19:55:37 +0000 (19:55 +0000)]
* src/vm/primitive.c (primitive_box): Handle PRIMITIVETYPE_VOID type.
(primitive_unbox): Likewise.

16 years ago* src/vm/jit/s390/asmpart.S: Made all function calls PIC (see bug 41), general cleanup.
pm [Sun, 19 Aug 2007 18:32:59 +0000 (18:32 +0000)]
* src/vm/jit/s390/asmpart.S: Made all function calls PIC (see bug 41), general cleanup.
* src/vm/jit/s390/emit.c (emit_verbosecall_enter): Save and restore temporary registers for leaf methods.

16 years ago* configure.ac (JAVA_ARCH): Added.
twisti [Sun, 19 Aug 2007 17:56:23 +0000 (17:56 +0000)]
* configure.ac (JAVA_ARCH): Added.

* src/vm/vm.c (opts): Added Xverify:none (should be handled better).
(vm_create) [WITH_JRE_LAYOUT && WITH_CLASSPATH_SUN]: Implemented.

* src/vm/properties.c (properties_init) [WITH_CLASSPATH_GNU]: Use
JAVA_ARCH.

16 years ago* src/vmcore/linker.c (link_class): Check for CLASS_LINKING.
twisti [Sun, 19 Aug 2007 17:06:20 +0000 (17:06 +0000)]
* src/vmcore/linker.c (link_class): Check for CLASS_LINKING.
(link_class_intern): Removed CLASS_LINKED check, but added an assert.

16 years ago* src/native/vm/sun/jvm.c
panzi [Sun, 19 Aug 2007 15:16:39 +0000 (15:16 +0000)]
* src/native/vm/sun/jvm.c
(JVM_GetArrayElement): Using array_xxxarray_element_get functions now.

* tests/regression/TestAnnotations.output: Added.

* tests/regression/Makefile.am
(SOURCE_FILES): Added TestAnnotations.java.
(EXTRA_DIST): Added TestAnnotations.output.
(OUTPUT_JAVA_TESTS): Added TestAnnotations.

* tests/regression/TestAnnotations.java: Added detailed test cases
for annotations support.

16 years ago* vm/builtin.c (builtin_trace_exception) [__s390__]: Decrement TRACEJAVACALLINDENT...
pm [Sun, 19 Aug 2007 09:27:03 +0000 (09:27 +0000)]
* vm/builtin.c (builtin_trace_exception) [__s390__]: Decrement TRACEJAVACALLINDENT instead of methodindent.
* vm/jit/trace.h: Adapted file to coding conventions.
* vm/jit/trace.c: Likewise.
* vm/jit/s390/md.c (md_dump_context) Fixed printing of java method at failing address, (md_signal_handler_sigsegv) added missing default branch to switch.

16 years ago* src/native/vm/cldc1.1/com_sun_cldc_io_ResourceInputStream.c
twisti [Sat, 18 Aug 2007 13:04:59 +0000 (13:04 +0000)]
* src/native/vm/cldc1.1/com_sun_cldc_io_ResourceInputStream.c
(zip_read_resource, file_read_resource,
Java_com_sun_cldc_io_ResourceInputStream_open,
Java_com_sun_cldc_io_ResourceInputStream_bytesRemain,
Java_com_sun_cldc_io_ResourceInputStream_readByte,
Java_com_sun_cldc_io_ResourceInputStream_readBytes,
Java_com_sun_cldc_io_ResourceInputStream_clone): Used LLNI macros,
implemented missing methods

* src/native/vm/cldc1.1/java_lang_Object.c (native/llni.h): Added
* src/native/vm/cldc1.1/java_lang_Class.c: Likewise

* src/native/vm/cldc1.1/java_lang_String.c
(Java_java_lang_String_hashCode,
Java_java_lang_String_indexOf__I,
Java_java_lang_String_indexOf__II,
Java_java_lang_String_lastIndexOf__I
Java_java_lang_String_lastIndexOf__II,
Java_java_lang_String_equals,
Java_java_lang_String_intern): Used LLNI macros
* src/native/vm/cldc1.1/com_sun_cldc_io_j2me_socket_Protocol.c
(Java_com_sun_cldc_io_j2me_socket_Protocol_open0,
Java_com_sun_cldc_io_j2me_socket_Protocol_readBuf,
Java_com_sun_cldc_io_j2me_socket_Protocol_writeBuf): Likewise

* src/native/vm/cldc1.1/java_lang_System.c
(Java_java_lang_System_arraycopy): Replaced java_arrayheader by
java_handle_t.

* src/vmcore/zip.c: Moved LFH struct to zip.h.
* src/vmcore/zip.h: Likewise.

* src/lib/cldc1.1/com/sun/cldchi/jvm/FileDescriptor.java: New file.

* src/lib/Makefile.am: Changed to build vm.zip for cldc1.1.
* src/native/include/Makefile.am: Likewise.
* src/Makefile.am: Likewise.

16 years ago* src/native/vm/gnu/sun_reflect_ConstantPool.c: Added Id keyword.
twisti [Fri, 17 Aug 2007 22:13:31 +0000 (22:13 +0000)]
* src/native/vm/gnu/sun_reflect_ConstantPool.c: Added Id keyword.

16 years ago* src/native/vm/gnu/sun_reflect_ConstantPool.c (native/llni.h): Added.
twisti [Fri, 17 Aug 2007 22:11:53 +0000 (22:11 +0000)]
* src/native/vm/gnu/sun_reflect_ConstantPool.c (native/llni.h): Added.
(boilerplate): Likewise.

16 years ago* src/vmcore/class.h (classinfo): Removed ENABLE_JAVASE for
twisti [Fri, 17 Aug 2007 22:03:21 +0000 (22:03 +0000)]
* src/vmcore/class.h (classinfo): Removed ENABLE_JAVASE for
enclosingclass and enclosingmethod. I don't think we can save that
much memory for CLDC configurations and it keeps the codebase cleaner.

16 years ago* src/native/llni.h (LLNI_classinfo_wrap, LLNI_classinfo_unwrap): Added new
michi [Fri, 17 Aug 2007 21:32:01 +0000 (21:32 +0000)]
* src/native/llni.h (LLNI_classinfo_wrap, LLNI_classinfo_unwrap): Added new
macros.

Used above two LLNI macros throughout the codebase:
* src/native/jni.c
* src/native/vm/java_lang_ClassLoader.c
* src/native/vm/cldc1.1/java_lang_Class.c
* src/native/vm/cldc1.1/java_lang_Object.c
* src/native/vm/java_lang_Class.c
* src/native/vm/java_lang_Object.c
* src/native/vm/gnu/java_lang_VMClassLoader.c
* src/native/vm/gnu/java_lang_VMClass.c
* src/native/vm/gnu/sun_reflect_ConstantPool.c
* src/native/vm/gnu/java_lang_reflect_Method.c
* src/native/vm/gnu/java_lang_reflect_Field.c
* src/native/vm/gnu/java_lang_VMThrowable.c
* src/native/vm/sun_misc_Unsafe.c
* src/native/vm/sun/jvm.c
* src/native/vm/reflect.c
* src/vmcore/loader.c

16 years ago* src/native/vm/gnu/java_lang_VMClass.c (getEnclosingClass): Typo.
twisti [Fri, 17 Aug 2007 21:28:29 +0000 (21:28 +0000)]
* src/native/vm/gnu/java_lang_VMClass.c (getEnclosingClass): Typo.

16 years ago* src/vm/global.h (ACC_CLASS_MEMBER): New define.
twisti [Fri, 17 Aug 2007 21:21:51 +0000 (21:21 +0000)]
* src/vm/global.h (ACC_CLASS_MEMBER): New define.
(ACC_CLASS_ANONYMOUS): Likewise.

* src/native/vm/java_lang_Class.c
(_Jv_java_lang_Class_getEnclosingClass): Removed.
(_Jv_java_lang_Class_getEnclosingMethod_intern): Use
class_get_enclosingclass.

* src/native/vm/java_lang_Class.h
(_Jv_java_lang_Class_getEnclosingClass): Removed.

* src/native/vm/gnu/java_lang_VMClass.c (stdint.h): Added.
(vmcore/class.h): Likewise.
(methods): Enabled isAnonymousClass, isLocalClass and isMemberClass.
(Java_java_lang_VMClass_getEnclosingClass): Use
class_get_enclosingclass.
(isAnonymousClass): Implemented.
(isLocalClass): Likewise.
(isMemberClass): Likewise.

* src/vmcore/class.c (class_load_attributes): Set ACC_CLASS_MEMBER and
ACC_CLASS_ANONYMOUS flags.
(class_is_anonymousclass): New function.
(class_is_localclass): Likewise.
(class_is_memberclass): Likewise.
(class_get_declaredclasses): Check if outer is NULL.
(class_get_declaringclass): Rewritten to use c->declaringclass.
(class_get_enclosingclass): New function.

* src/vmcore/class.h (classinfo): Added declaringclass.(
(class_is_anonymousclass): New function.
(class_is_localclass): Likewise.
(class_is_memberclass): Likewise.
(class_get_enclosingclass): Likewise.

* NEWS: Added news.

16 years ago* tests/regression/MinimalClassReflection.output: New file.
panzi [Fri, 17 Aug 2007 20:03:06 +0000 (20:03 +0000)]
* tests/regression/MinimalClassReflection.output: New file.
* tests/regression/MinimalClassReflection.java: New file.
This adds tests for some reflection methods like
java.lang.Class.isLocal/.isMember/.isAnonymous/.getDeclaringClass etc.

* tests/regression/Makefile.am
(SOURCE_FILES): Added MinimalClassReflection.java.
(EXTRA_DIST): Added MinimalClassReflection.output.
(OUTPUT_JAVA_TESTS): Added MinimalClassReflection.

16 years ago* src/vm/jit/sparc64/codegen.h: Improved overflow checking.
ajordan [Thu, 16 Aug 2007 22:10:43 +0000 (22:10 +0000)]
* src/vm/jit/sparc64/codegen.h: Improved overflow checking.

* src/vm/jit/sparc64/codegen.c (check_13bit_imm): Likewise.
(codegen_emit): Fixed ICDM_TABLESWITCH for large negative values.

16 years ago* src/native/vm/sun/jvm.c (JVM_GetProtectionDomain): Return NULL as default.
pm [Thu, 16 Aug 2007 21:46:32 +0000 (21:46 +0000)]
* src/native/vm/sun/jvm.c (JVM_GetProtectionDomain): Return NULL as default.

16 years ago* src/native/vm/sun/jvm.c
panzi [Thu, 16 Aug 2007 19:29:42 +0000 (19:29 +0000)]
* src/native/vm/sun/jvm.c
(JVM_GetArrayElement): Used exceptions_new_arrayindexoutofboundsexception
where exceptions_throw_arrayindexoutofboundsexception should have been used.

16 years ago* src/native/vm/sun/jvm.c
panzi [Thu, 16 Aug 2007 19:21:39 +0000 (19:21 +0000)]
* src/native/vm/sun/jvm.c
(vm/array.h): Added include.
(vm/global.h): Added include.
(JVM_FindPrimitiveClass): Parameter name shadowed type utf.
(JVM_GetComponentType): Missing variable classinfo* c.
(JVM_GetClassAnnotations): java_bytearray -> java_handle_bytearray_t.
(JVM_GetFieldAnnotations): java_bytearray -> java_handle_bytearray_t.
(JVM_GetMethodAnnotations): java_bytearray -> java_handle_bytearray_t.
(JVM_GetMethodDefaultAnnotationValue): java_bytearray -> java_handle_bytearray_t.
(JVM_GetMethodParameterAnnotations): java_bytearray -> java_handle_bytearray_t.
(JVM_GetArrayLength): java_arrayheader -> java_array_t.
(JVM_GetArrayElement): Updated types, renamed wrong named variable.

* src/vmcore/linker.h:
(_vftbl): Fixed formatting of comment.

16 years ago* src/vm/array.c: New file.
twisti [Thu, 16 Aug 2007 18:15:51 +0000 (18:15 +0000)]
* src/vm/array.c: New file.
* src/vm/array.h: Likewise.

* src/vm/Makefile.am (libvm_la_SOURCES): Added array.[ch].

* src/vm/builtin.c,
src/vm/string.c,
src/vm/jit/verify/typecheck-typeinferer.c,
src/vm/jit/verify/typecheck.c,
src/vm/jit/verify/typecheck-stackbased.c,
src/vm/jit/verify/typeinfo.c,
src/vmcore/linker.c (vm/array.h): Added.

* src/vm/primitive.h (ARRAYTYPE_*): Moved to vm/array.h

* src/vmcore/class.c (class_get_componenttype): New function.
* src/vmcore/class.h: Likewise.

* src/native/vm/java_lang_Class.c (getComponentType): Removed.
* src/native/vm/java_lang_Class.h: Likewise.

* src/native/vm/gnu/java_lang_VMClass.c (getComponentType): Call
class_get_componenttype.
* src/native/vm/sun/jvm.c (JVM_GetComponentType): Likewise.

16 years ago* src/vm/vm.c (XXusage): Commented. We don't use it anymore but we
twisti [Thu, 16 Aug 2007 17:57:27 +0000 (17:57 +0000)]
* src/vm/vm.c (XXusage): Commented.  We don't use it anymore but we
keep it to know which switches still need to be converted.

16 years ago* src/vm/vm.c (vm_array_from_objectarray): Use
twisti [Thu, 16 Aug 2007 17:56:19 +0000 (17:56 +0000)]
* src/vm/vm.c (vm_array_from_objectarray): Use
primitive_type_get_by_wrapperclass (typo). Removed debug output.

16 years ago* src/vm/primitive.c (primitive_type_get_by_wrapperclass): New
twisti [Thu, 16 Aug 2007 17:52:48 +0000 (17:52 +0000)]
* src/vm/primitive.c (primitive_type_get_by_wrapperclass): New
function.
(primitive_unbox): Changed signature.
* src/vm/primitive.h: Likewise.

* src/vm/vm.c (vm_array_from_objectarray): Rewritten to use
primitive-unbox function.

16 years ago* src/native/vm/gnu/java_lang_reflect_Constructor.c
twisti [Thu, 16 Aug 2007 17:45:49 +0000 (17:45 +0000)]
* src/native/vm/gnu/java_lang_reflect_Constructor.c
(declaredAnnotations): Use byte-array handle. Don't check for this ==
NULL , this cannot happen.
(getParameterAnnotations): Likewise.

* src/native/vm/gnu/java_lang_reflect_Field.c (declaredAnnotations):
Likewise.

* src/native/vm/gnu/java_lang_reflect_Method.c (declaredAnnotations):
Likewise.
(getParameterAnnotations): Likewise.

16 years ago* src/vmcore/field.c (field_get_annotations): Always enable the
twisti [Thu, 16 Aug 2007 17:25:47 +0000 (17:25 +0000)]
* src/vmcore/field.c (field_get_annotations): Always enable the
method, but return NULL for !ENABLE_ANNOTATIONS. This keeps code
calling this function simpler.

* src/vmcore/field.h (field_get_annotations): Removed
ENABLE_ANNOTATIONS.

16 years ago* src/native/vm/sun/jvm.c (JVM_FindPrimitiveClass): Use TRACEJVMCALLS
twisti [Thu, 16 Aug 2007 16:01:05 +0000 (16:01 +0000)]
* src/native/vm/sun/jvm.c (JVM_FindPrimitiveClass): Use TRACEJVMCALLS
and a better implementation.

16 years ago* src/vmcore/method.c (method_get_annotations): Always enable the
twisti [Thu, 16 Aug 2007 15:54:38 +0000 (15:54 +0000)]
* src/vmcore/method.c (method_get_annotations): Always enable the
method, but return NULL for !ENABLE_ANNOTATIONS. This keeps code
calling this function simpler.
(method_get_parameterannotations): Likewise.
(method_get_annotationdefault): Likewise.

* src/vmcore/method.h (method_get_annotations): Removed
ENABLE_ANNOTATIONS.
(method_get_parameterannotations): Likewise.
(method_get_annotationdefault): Likewise.

* src/native/vm/reflect.c (reflect_constructor_new): Always call
method-annotations functions.
(reflect_field_new): Likewise.
(reflect_method_new): Likewise.

16 years ago* src/vm/jit/allocator/simplereg.c (simplereg_free): Index into memcopycount
michi [Thu, 16 Aug 2007 11:35:14 +0000 (11:35 +0000)]
* src/vm/jit/allocator/simplereg.c (simplereg_free): Index into memcopycount
is divided by SIZE_OF_STACKSLOT now.
(simplereg_allocate_temporaries): Likewise.

16 years ago* src/native/vm/java_lang_Class.c
michi [Thu, 16 Aug 2007 10:43:43 +0000 (10:43 +0000)]
* src/native/vm/java_lang_Class.c
(_Jv_java_lang_Class_getDeclaredFields): Fixed postincrement of array index.
(_Jv_java_lang_Class_getDeclaredMethods): Likewise.
(_Jv_java_lang_Class_getDeclaredConstructors): Likewise.

16 years ago* src/native/llni.h: Added macros for array handling.
michi [Thu, 16 Aug 2007 10:05:34 +0000 (10:05 +0000)]
* src/native/llni.h: Added macros for array handling.

* src/vm/global.h: Added typedefs for array handles. Renamed array types.

Use LLNI macros for array access and adapted to above changes:
* src/vm/access.c
* src/vm/jit/arm/emit.c
* src/vm/jit/arm/codegen.c
* src/vm/jit/powerpc/emit.c
* src/vm/jit/powerpc/codegen.c
* src/vm/jit/sparc64/emit.c
* src/vm/jit/sparc64/codegen.c
* src/vm/jit/alpha/emit.c
* src/vm/jit/alpha/codegen.c
* src/vm/jit/s390/emit.c
* src/vm/jit/s390/codegen.c
* src/vm/jit/mips/emit.c
* src/vm/jit/mips/codegen.c
* src/vm/jit/m68k/emit.c
* src/vm/jit/m68k/codegen.c
* src/vm/jit/powerpc64/emit.c
* src/vm/jit/powerpc64/codegen.c
* src/vm/jit/i386/emit.c
* src/vm/jit/i386/codegen.c
* src/vm/jit/x86_64/emit.c
* src/vm/jit/x86_64/codegen.c
* src/vm/jit/stacktrace.c
* src/vm/jit/stacktrace.h
* src/vm/builtin.c
* src/vm/string.c
* src/vm/builtin.h
* src/vm/exceptions.c
* src/vm/vm.c
* src/vm/stringlocal.h
* src/vm/vm.h
* src/native/jni.c
* src/native/vm/java_lang_ClassLoader.c
* src/native/vm/java_lang_reflect_Constructor.h
* src/native/vm/java_lang_ClassLoader.h
* src/native/vm/java_lang_Class.c
* src/native/vm/gnu/gnu_java_lang_management_VMThreadMXBeanImpl.c
* src/native/vm/gnu/java_security_VMAccessController.c
* src/native/vm/gnu/java_lang_VMClassLoader.c
* src/native/vm/gnu/java_lang_management_VMManagementFactory.c
* src/native/vm/gnu/java_lang_VMClass.c
* src/native/vm/gnu/gnu_java_lang_management_VMRuntimeMXBeanImpl.c
* src/native/vm/gnu/sun_reflect_ConstantPool.c
* src/native/vm/gnu/java_lang_reflect_Method.c
* src/native/vm/gnu/gnu_classpath_VMStackWalker.c
* src/native/vm/gnu/java_lang_VMSystem.c
* src/native/vm/gnu/java_lang_reflect_Constructor.c
* src/native/vm/gnu/java_lang_VMThrowable.c
* src/native/vm/java_lang_Class.h
* src/native/vm/sun_misc_Unsafe.c
* src/native/vm/sun/jvm.c
* src/native/vm/reflect.c
* src/native/vm/java_lang_reflect_Method.c
* src/native/vm/reflect.h
* src/native/vm/java_lang_reflect_Constructor.c
* src/native/vm/java_lang_reflect_Method.h
* src/native/jni.h
* src/vmcore/class.c
* src/vmcore/class.h
* src/vmcore/method.c
* src/vmcore/method.h
* src/vmcore/linker.c
* src/cacaoh/headers.h
* src/cacaoh/dummy.c
* src/cacaoh/headers.c

16 years ago* src/vm/jit/trace (_array_load_param) [SIZEOF_VOID_P == 8]: Bugfix, forgotten obsole...
pm [Thu, 16 Aug 2007 06:53:26 +0000 (06:53 +0000)]
* src/vm/jit/trace (_array_load_param) [SIZEOF_VOID_P == 8]: Bugfix, forgotten obsolete stack_offset.

16 years ago* src/vm/jit/sparc64/codegen.h: Added M_SAVE_REG and 13-bit overflow checking.
ajordan [Wed, 15 Aug 2007 23:32:57 +0000 (23:32 +0000)]
* src/vm/jit/sparc64/codegen.h: Added M_SAVE_REG and 13-bit overflow checking.

* src/vm/jit/sparc64/codegen.c (codegen_emit): Fixed stack increasing for
large stackframe sizes.
(check_13bit_imm): Added for overflow checking.

16 years ago* src/native/vm/reflect.c
panzi [Wed, 15 Aug 2007 22:49:20 +0000 (22:49 +0000)]
* src/native/vm/reflect.c
(reflect_constructor_new): Allocation of the java_bytearray is now done in the
method_get_* functions.
(reflect_field_new): Allocation of the java_bytearray is now done in the
field_get_* functions.
(reflect_method_new): Allocation of the java_bytearray is now done in the
method_get_* functions. Added use of LLNI_field_* macros.

* src/vmcore/method.c
(method_get_annotations): Do allocation of the java_bytearray here.
(method_get_parameterannotations): Do allocation of the java_bytearray here.
(method_get_annotationdefault): Do allocation of the java_bytearray here.

* src/vmcore/method.h
(method_get_annotations): This function now returns java_bytearray*.
(method_get_parameterannotations): This function now returns java_bytearray*.
(method_get_annotationdefault): This function now returns java_bytearray*.

* src/vmcore/field.c
(vm/builtin.h): Added include.
(field_get_annotations): Do allocation of the java_bytearray here.

* src/vmcore/field.h
(field_get_annotations): This function now returns java_bytearray*.

* src/cacaoh/dummy.c
(builtin_newarray_byte): Added.

16 years ago* src/vm/jit/codegen-common.c (native/localref.h): Added.
twisti [Wed, 15 Aug 2007 22:18:44 +0000 (22:18 +0000)]
* src/vm/jit/codegen-common.c (native/localref.h): Added.

16 years ago* src/native/localref.c: Added Id keyword.
twisti [Wed, 15 Aug 2007 22:11:35 +0000 (22:11 +0000)]
* src/native/localref.c: Added Id keyword.
* src/native/localref.h: Likewise.
* src/native/llni.h: Likewise.

16 years ago* src/native/jni.c (native/localref.h): Added.
twisti [Wed, 15 Aug 2007 22:10:22 +0000 (22:10 +0000)]
* src/native/jni.c (native/localref.h): Added.

16 years ago* src/native/vm/java_lang_Class.c
panzi [Wed, 15 Aug 2007 17:03:40 +0000 (17:03 +0000)]
* src/native/vm/java_lang_Class.c
[WITH_CLASSPATH_GNU] [ENABLE_ANNOTATIONS] (vm/vm.h): Added include.

* src/native/vm/gnu/sun_reflect_ConstantPool.c
(vm/stringlocal.h): Added include.
(Java_sun_reflect_ConstantPool_getClassAtIfLoaded0): Removed wrong call of
the macro TRACEJVMCALLS.

* src/native/vm/gnu/java_lang_reflect_Method.c
(Java_java_lang_reflect_Method_getDefaultValue): Added proper casts so
gcc don't give me warnings.

* src/native/vm/gnu/java_lang_reflect_Constructor.c
[ENABLE_ANNOTATIONS] (vm/exceptions.h): Added include.

* src/native/vm/sun/jvm.c
(JVM_ConstantPoolGetStringAt): Corrected cast.
(JVM_ConstantPoolGetUTF8At): Corrected cast.
(JVM_GetArrayElement): Using primitive_box_* functions.

16 years ago* src/native/vm/sun/jvm.c (JVM_GetClassInterfaces): Bugfix, forgot to
twisti [Wed, 15 Aug 2007 16:49:03 +0000 (16:49 +0000)]
* src/native/vm/sun/jvm.c (JVM_GetClassInterfaces): Bugfix, forgot to
set c.

16 years ago* src/vmcore/class.c (vm/builtin.h): Added.
twisti [Wed, 15 Aug 2007 16:42:52 +0000 (16:42 +0000)]
* src/vmcore/class.c (vm/builtin.h): Added.
(class_get_declaredclasses): New function.

* src/vmcore/class.h (class_get_declaredclasses): Likewise.

* src/native/vm/java_lang_Class.c (getDeclaredClasses): Use
class_get_declaredclasses.

* src/native/vm/sun/jvm.c (JVM_GetDeclaredClasses): Likewise.

16 years ago* src/native/vm/sun/jvm.c (JVM_Available) [FIONREAD]: Argument to ioctl is int *.
pm [Wed, 15 Aug 2007 16:03:28 +0000 (16:03 +0000)]
* src/native/vm/sun/jvm.c (JVM_Available) [FIONREAD]: Argument to ioctl is int *.

16 years ago* src/vmcore/class.c (class_get_interfaces): New function.
twisti [Wed, 15 Aug 2007 15:20:47 +0000 (15:20 +0000)]
* src/vmcore/class.c (class_get_interfaces): New function.
* src/vmcore/class.h (class_get_interfaces): Likewise.

* src/native/vm/java_lang_Class.c (getSuperclass): Cast return value.
(getInterfaces): Use class_get_interfaces.
* src/native/vm/sun/jvm.c (JVM_GetClassInterfaces): Likewise.

16 years ago* src/vm/signal.c (signal_init): Cast to functionptr to fix warnings.
twisti [Wed, 15 Aug 2007 14:47:11 +0000 (14:47 +0000)]
* src/vm/signal.c (signal_init): Cast to functionptr to fix warnings.
(signal_register_signal): Changed signature.

* src/vm/signallocal.h (signal_register_signal): Likewise.

16 years ago* src/native/vm/java_lang_Class.c
panzi [Wed, 15 Aug 2007 13:49:26 +0000 (13:49 +0000)]
* src/native/vm/java_lang_Class.c
(_Jv_java_lang_Class_getDeclaredAnnotations): Use LLNI_* macro.

* src/native/vm/gnu/java_lang_reflect_Method.c
(Java_java_lang_reflect_Method_getDefaultValue): Use LLNI_* macros.
(Java_java_lang_reflect_Method_declaredAnnotations): Use LLNI_* macros.
(Java_java_lang_reflect_Method_getParameterAnnotations): Use LLNI_* macros.

* src/native/vm/gnu/java_lang_reflect_Field.c
(Java_java_lang_reflect_Field_declaredAnnotations): Use LLNI_* macros.

* src/native/vm/gnu/java_lang_reflect_Constructor.c
(Java_java_lang_reflect_Constructor_declaredAnnotations): Use LLNI_* macros.
(Java_java_lang_reflect_Constructor_getParameterAnnotations): Use LLNI_* macros.

* src/native/vm/sun/jvm.c
(native/llni.h): Added include.
(JVM_GetFieldAnnotations): Use LLNI_* macros.
(JVM_GetMethodAnnotations): Use LLNI_* macros.
(JVM_GetMethodDefaultAnnotationValue): Use LLNI_* macros.
(JVM_GetMethodParameterAnnotations): Use LLNI_* macros.
(JVM_GetClassConstantPool): Use LLNI_* macros.

* src/native/vm/reflect.c
(reflect_constructor_new): Forgot to set annotations and parameterAnnotations
attributes for GNU Classpath.
(reflect_get_declaredannotatios): Use LLNI_* macros.
(reflect_get_parameterannotations): Use LLNI_* macros.

* src/native/vm/reflect.h
(reflect_get_declaredannotatios): Now the caller has to set the
declaredAnnotations attribute of the according object itself, because the
LLNI_* macros can't get the address of an field.

16 years ago* src/threads/none/threads.h [!defined(NDEBUG)] (_no_threads_tracejavacallindent...
pm [Tue, 14 Aug 2007 19:57:20 +0000 (19:57 +0000)]
* src/threads/none/threads.h [!defined(NDEBUG)] (_no_threads_tracejavacallindent, _no_threads_tracejavacallcount, TRACEJAVACALLINDENT, TRACEJAVACALLCOUNT): added.
* src/threads/native/threads.h [!defined(NDEBUG)] (threadinfo): Added tracejavacallindent, tracejavacallcount members. (TRACEJAVACALLINDENT, TRACEJAVACALLCOUNT): added.
* src/threads/native/threads.c: Likewise.
* src/vm/jit/trace.h New file.
* src/vm/jit/trace.c: Likewise.
* src/vm/jit/Makefile.am (libjit_la_SOURCES): added trace.h and trace.c.
* src/vm/jit/s390/emit.c (emit_verbosecall_enter): adpated to use trace_java_call_enter, (emit_verbosecall_exit): adapted to use trace_java_call_exit.

16 years ago* src/vm/exceptions.c (exceptions_print_exception): Fixed typo.
twisti [Mon, 13 Aug 2007 19:01:52 +0000 (19:01 +0000)]
* src/vm/exceptions.c (exceptions_print_exception): Fixed typo.

16 years ago* configure.ac (dl): Check for dl before all other stuff.
twisti [Mon, 13 Aug 2007 13:34:12 +0000 (13:34 +0000)]
* configure.ac (dl): Check for dl before all other stuff.
(AC_CHECK_ENABLE_LIBJVM): Added.

* m4/libjvm.m4: New file.

16 years ago* src/native/localref.c (localref_table_remove): Fixed assertion.
michi [Mon, 13 Aug 2007 10:23:20 +0000 (10:23 +0000)]
* src/native/localref.c (localref_table_remove): Fixed assertion.

16 years ago* src/vm/jit/dseg.c (dseg_get_linenumber_from_pc) [__S390__]: Clear most significant...
pm [Sun, 12 Aug 2007 18:49:16 +0000 (18:49 +0000)]
* src/vm/jit/dseg.c (dseg_get_linenumber_from_pc) [__S390__]: Clear most significant bit of passed pc parameter.
* src/vm/jit/s390/asmpart.S (asm_handle_exception): Rewritten to be wrapper for md_handle_exception.
* src/vm/jit/s390/md.c (md_handle_exception): New function.
* src/vm/jit/s390/md-abi.h (FLT_SAV_CNT): 2, (FLT_RES_CNT): 0.
* src/vm/jit/s390/md-abi.c (abi_registers_float_saved): Added f4 and f6, (nregdescfloat): Made f4 and f6 saved registers.

16 years ago* src/native/localref.c: Added new file.
michi [Sun, 12 Aug 2007 00:02:48 +0000 (00:02 +0000)]
* src/native/localref.c: Added new file.
* src/native/localref.h: Likewise.

* src/native/Makefile.am: Added above two files.

* src/vm/jit/codegen-common.c (codegen_start_native_call)
(codegen_finish_native_call): Use separate function to deal with localrefs.

* src/native/jni.h: Moved localref stuff to own file.
* src/native/jni.c: Likewise.
(JNI_CALL_VIRTUAL_METHOD): Added new macro.
(JNI_CALL_NONVIRTUAL_METHOD): Likewise.
(JNI_GET_FIELD): Likewise.
(JNI_SET_FIELD): Likewise.
(JNI_CALL_STATIC_METHOD): Likewise.
(JNI_GET_STATIC_FIELD): Likewise.
(JNI_SET_STATIC_FIELD): Likewise.
(JNI_NEW_ARRAY): Likewise.
(JNI_GET_ARRAY_ELEMENTS): Likewise.
(JNI_RELEASE_ARRAY_ELEMENTS): Likewise.
(JNI_GET_ARRAY_REGION): Likewise.
(JNI_SET_ARRAY_REGION): Likewise.

* src/threads/native/threads.h,
* src/vm/jit/arm/codegen.c,
* src/vm/jit/powerpc/codegen.c,
* src/vm/jit/sparc64/codegen.c,
* src/vm/jit/alpha/codegen.c,
* src/vm/jit/s390/codegen.c,
* src/vm/jit/mips/codegen.c,
* src/vm/jit/m68k/codegen.c,
* src/vm/jit/powerpc64/codegen.c,
* src/vm/jit/i386/codegen.c,
* src/vm/jit/x86_64/codegen.c: Added missing include.

16 years ago* src/vm/exceptions.c (exceptions_handle_exception) [__S390__]: Synchronization objec...
pm [Sat, 11 Aug 2007 22:38:38 +0000 (22:38 +0000)]
* src/vm/exceptions.c (exceptions_handle_exception) [__S390__]: Synchronization object is at SP - IsSync - 8.
 * src/vm/vm.c (vm_array_store_flt) [__S390__]: Float value is in bytes 4-7 of uint64_t.
 * src/vm/jit/s390/arch.h,
src/vm/jit/s390/asmpart.S,
src/vm/jit/s390/codegen.c,
src/vm/jit/s390/emit.c,
src/vm/jit/s390/md.c,
src/vm/jit/s390/md-abi.c,
src/vm/jit/s390/md-asm.h: Changed a lot for 8 byte stackslots.

16 years ago* src/vm/global.h (java_handle_t): Added typedef.
michi [Sat, 11 Aug 2007 17:57:24 +0000 (17:57 +0000)]
* src/vm/global.h (java_handle_t): Added typedef.
(java_object_t): New name for what was formerly known as java_objectheader.

Adapted to above changes and decided where to use handles:
* src/vm/initialize.c
* src/vm/properties.h
* src/vm/jit/arm/codegen.c
* src/vm/jit/powerpc/codegen.c
* src/vm/jit/codegen-common.h
* src/vm/jit/sparc64/codegen.c
* src/vm/jit/sparc64/patcher.c
* src/vm/jit/alpha/codegen.c
* src/vm/jit/optimizing/recompile.c
* src/vm/jit/patcher-common.c
* src/vm/jit/s390/codegen.c
* src/vm/jit/show.c
* src/vm/jit/patcher-common.h
* src/vm/jit/mips/codegen.c
* src/vm/jit/patcher.h
* src/vm/jit/m68k/codegen.c
* src/vm/jit/powerpc64/codegen.c
* src/vm/jit/i386/codegen.c
* src/vm/jit/i386/patcher.c
* src/vm/jit/replace.c
* src/vm/jit/asmpart.h
* src/vm/jit/x86_64/codegen.c
* src/vm/jit/x86_64/patcher.c
* src/vm/jit/replace.h
* src/vm/jit/stacktrace.c
* src/vm/jit/stacktrace.h
* src/vm/jit/codegen-common.c
* src/vm/jit/jit.h
* src/vm/builtin.c
* src/vm/string.c
* src/vm/primitive.c
* src/vm/builtin.h
* src/vm/signal.c
* src/vm/primitive.h
* src/vm/exceptions.c
* src/vm/vm.c
* src/vm/finalizer.c
* src/vm/exceptions.h
* src/vm/stringlocal.h
* src/vm/vm.h
* src/vm/properties.c
* src/native/jni.c
* src/native/vm/java_lang_ClassLoader.c
* src/native/vm/cldc1.1/com_sun_cldchi_jvm_JVM.c
* src/native/vm/cldc1.1/java_lang_Class.c
* src/native/vm/cldc1.1/java_lang_String.c
* src/native/vm/cldc1.1/java_lang_Object.c
* src/native/vm/cldc1.1/java_lang_System.c
* src/native/vm/cldc1.1/java_lang_Throwable.c
* src/native/vm/java_lang_Class.c
* src/native/vm/gnu/gnu_java_lang_management_VMMemoryMXBeanImpl.c
* src/native/vm/gnu/java_lang_VMClassLoader.c
* src/native/vm/gnu/gnu_classpath_VMSystemProperties.c
* src/native/vm/gnu/java_lang_reflect_Method.c
* src/native/vm/gnu/java_lang_VMRuntime.c
* src/native/vm/gnu/gnu_classpath_VMStackWalker.c
* src/native/vm/gnu/java_lang_reflect_Field.c
* src/native/vm/gnu/java_lang_reflect_Constructor.c
* src/native/vm/gnu/java_lang_VMThrowable.c
* src/native/vm/java_lang_Object.c
* src/native/vm/java_lang_String.c
* src/native/vm/java_lang_Thread.c
* src/native/vm/sun_misc_Unsafe.c
* src/native/vm/sun/jvm.c
* src/native/vm/reflect.c
* src/native/vm/java_lang_Runtime.c
* src/native/vm/java_lang_reflect_Method.c
* src/native/vm/reflect.h
* src/native/vm/java_lang_Runtime.h
* src/native/vm/java_lang_reflect_Constructor.c
* src/native/jni.h
* src/native/native.c
* src/native/native.h
* src/toolbox/hashtable.h
* src/toolbox/util.c
* src/toolbox/list.h
* src/toolbox/avl.c
* src/toolbox/avl.h
* src/toolbox/hashtable.c
* src/mm/memory.c
* src/threads/none/threads.h
* src/threads/threads-common.c
* src/threads/lock-common.h
* src/threads/native/threads.h
* src/threads/native/lock.c
* src/threads/native/threads.c
* src/threads/native/lock.h
* src/vmcore/class.c
* src/vmcore/loader.c
* src/vmcore/suck.h
* src/vmcore/class.h
* src/vmcore/loader.h
* src/vmcore/method.c
* src/vmcore/method.h
* src/vmcore/classcache.c
* src/vmcore/classcache.h
* src/vmcore/linker.c
* src/vmcore/linker.h
* src/cacaoh/headers.h
* src/cacaoh/dummy.c
* src/cacaoh/headers.c

16 years ago* src/vm/jit/sparc64/md-abi.c (md_param_alloc_native): Fixed pending issue from
ajordan [Sat, 11 Aug 2007 13:42:25 +0000 (13:42 +0000)]
* src/vm/jit/sparc64/md-abi.c (md_param_alloc_native): Fixed pending issue from
regoff change.
* src/vm/jit/sparc64/codegen.c (codegen_emit_stub_native): Likewise.

* src/vm/jit/sparc64/emit.c (emit_trap): Added.

16 years ago* src/vm/vm.h: Set Id keyword.
twisti [Sat, 11 Aug 2007 12:40:22 +0000 (12:40 +0000)]
* src/vm/vm.h: Set Id keyword.

16 years ago* src/vm/vm.c (VM_CALL_METHOD): New macro.
twisti [Sat, 11 Aug 2007 12:39:28 +0000 (12:39 +0000)]
* src/vm/vm.c (VM_CALL_METHOD): New macro.
(VM_CALL_METHOD_VALIST): Likewise.
(VM_CALL_METHOD_JVALUE): Likewise.
(VM_CALL_ARRAY): Likewise.

* src/vm/vm.h (vm_call_method_int): Changed return type to
stdint-type.
(vm_call_method_int_valist): Likewise.
(vm_call_method_int_jvalue): Likewise.
(vm_call_method_long): Likewise.
(vm_call_method_long_valist): Likewise.
(vm_call_method_long_jvalue): Likewise.

16 years ago* src/vm/primitive.c (native/jni.h): Added.
twisti [Sat, 11 Aug 2007 10:43:45 +0000 (10:43 +0000)]
* src/vm/primitive.c (native/jni.h): Added.
(native/llni.h): Likewise.
(native/include/java_lang_Boolean.h,
native/include/java_lang_Byte.h,
native/include/java_lang_Short.h,
native/include/java_lang_Character.h,
native/include/java_lang_Integer.h,
native/include/java_lang_Long.h,
native/include/java_lang_Float.h,
native/include/java_lang_Double.h): Likewise.
(vm/builtin.h): Likewise.
(vm/vm.h): Likewise.
(primitive_box): New function.
(primitive_unbox): Likewise.
(PRIMITIVE_BOX_TYPE): New macro for primitive_box_xxx functions.
(PRIMITIVE_UNBOX_TYPE): New macro for primitive_unbox_xxx functions.

* src/vm/primitive.h (primitive_box): Added.
(primitive_unbox): Likewise.
(primitive_box_boolean,
primitive_box_byte,
primitive_box_char,
primitive_box_short,
primitive_box_int,
primitive_box_long,
primitive_box_float,
primitive_box_double): Likewise.
(primitive_unbox_boolean,
primitive_unbox_byte,
primitive_unbox_char,
primitive_unbox_short,
primitive_unbox_int,
primitive_unbox_long,
primitive_unbox_float,
primitive_unbox_double): Likewise.

* src/native/jni.c (_Jv_jni_invokeNative): Use primitive-box
functions.

* src/native/vm/gnu/java_lang_reflect_Field.c (get): Likewise.

16 years ago* src/native/vm/sun/jvm.c (JVM_GC): Call GC-call directly, use
twisti [Sat, 11 Aug 2007 10:25:40 +0000 (10:25 +0000)]
* src/native/vm/sun/jvm.c (JVM_GC): Call GC-call directly, use
TRACEJVMCALLS.
(JVM_TotalMemory): Likewise.
(JVM_FreeMemory): Likewise.
(JVM_NewArray): Use TRACEJVMCALLS.

16 years ago* src/native/vm/reflect.c (reflect_field_new): Fixed compilation.
twisti [Fri, 10 Aug 2007 15:18:05 +0000 (15:18 +0000)]
* src/native/vm/reflect.c (reflect_field_new): Fixed compilation.
(reflect_method_new): Likewise.

16 years ago* src/vmcore/primitive.c: Removed.
twisti [Fri, 10 Aug 2007 15:12:00 +0000 (15:12 +0000)]
* src/vmcore/primitive.c: Removed.
* src/vmcore/primitive.h: Likewise.

* src/vmcore/Makefile.am (libvmcore_la_SOURCES): Removed
primitive.[ch].

* src/vmcore/primitivecore.c: New file.
* src/vm/primitive.c: Likwise.
* src/vm/primitive.h: Likewise.

* src/vm/Makefile.am (libvm_la_SOURCES): Added primitive.[ch].

* src/cacaoh/dummy.c (vm/primitive.h): Added.
(primitive_class_get_by_type): New function.
(primitive_class_get_by_char): Likewise.

* src/native/jni.c,
src/native/vm/gnu/java_lang_VMClassLoader.c,
src/native/vm/gnu/java_lang_reflect_Field.c,
src/native/vm/java_lang_Class.c,
src/native/vm/sun/jvm.c,
src/vm/builtin.c,
src/vm/jit/verify/typecheck-stackbased.c,
src/vm/jit/verify/typecheck-typeinferer.c,
src/vm/jit/verify/typecheck.c,
src/vm/jit/verify/typeinfo.c,
src/vm/resolve.c,
src/vm/string.c,
src/vm/vm.c,
src/vmcore/descriptor.c,
src/vmcore/field.c,
src/vmcore/linker.c,
src/vmcore/loader.c: Changed primitive.h include.

--HG--
rename : src/vmcore/primitive.c => src/vmcore/primitivecore.c

16 years ago* src/native/jni.c (_Jv_JNI_FromReflectedField): Added missing ;.
twisti [Fri, 10 Aug 2007 15:10:29 +0000 (15:10 +0000)]
* src/native/jni.c (_Jv_JNI_FromReflectedField): Added missing ;.

16 years ago* src/vm/jit/powerpc/patcher.c (patcher_get_putfield): Fixed severe bug for
michi [Fri, 10 Aug 2007 10:46:17 +0000 (10:46 +0000)]
* src/vm/jit/powerpc/patcher.c (patcher_get_putfield): Fixed severe bug for
unalligned long field offsets.

* src/vmcore/linker.c [__POWERPC__ && __DARWIN__]: Long fields are 4-byte
alligned in structs.

* src/vm/jit/patcher-common.c [TRACE_PATCHER]: Left patcher trace code hanging
around, might come handy again.

16 years ago* src/native/vm/gnu/java_lang_reflect_Method.c: Fixed merge problem in
michi [Fri, 10 Aug 2007 09:20:04 +0000 (09:20 +0000)]
* src/native/vm/gnu/java_lang_reflect_Method.c: Fixed merge problem in
previous revision 8284.

* src/native/vm/gnu/java_lang_reflect_Constructor.c: Likewise.

16 years ago* src/native/llni.h: Added LLNI (low level native interface).
michi [Fri, 10 Aug 2007 08:58:39 +0000 (08:58 +0000)]
* src/native/llni.h: Added LLNI (low level native interface).

Use LLNI macros throughout the whole codebase:
* src/vm/jit/stacktrace.c
* src/vm/string.c
* src/vm/builtin.c
* src/vm/exceptions.c
* src/vm/vm.c
* src/native/jni.c
* src/native/vm/java_lang_ClassLoader.c
* src/native/vm/java_lang_Class.c
* src/native/vm/java_lang_String.c
* src/native/vm/java_lang_Object.c
* src/native/vm/gnu/java_lang_VMThread.c
* src/native/vm/gnu/java_lang_reflect_Method.c
* src/native/vm/gnu/java_lang_reflect_Field.c
* src/native/vm/gnu/java_lang_reflect_Constructor.c
* src/native/vm/gnu/java_lang_VMThrowable.c
* src/native/vm/java_lang_Thread.c
* src/native/vm/sun_misc_Unsafe.c
* src/native/vm/reflect.c
* src/native/vm/java_lang_reflect_Method.c
* src/native/vm/java_lang_reflect_Constructor.c
* src/threads/threads-common.c
* src/threads/native/threads.c

16 years ago* src/vm/exceptions.c (toolbox/logging.h): Removed.
twisti [Thu, 9 Aug 2007 15:10:05 +0000 (15:10 +0000)]
* src/vm/exceptions.c (toolbox/logging.h): Removed.
(vm/jit/disass.h): Likewise.
(exceptions_new_hardware_exception): Likewise.

* src/vm/exceptions.h (exceptions_new_hardware_exception): Likewise.

* src/vm/signal.c (stdint.h): Added.
(toolbox/logging.h): Likewise.
(vm/jit/codegen-common.h): Likewise.
(vm/jit/disass.h): Likewise.
(vm/jit/patcher-common.h): Likewise.
(signal_handle): New function.

* src/vm/signallocal.h (signal_handle): Likewise.

* src/vm/jit/alpha/linux/md-os.c,
src/vm/jit/arm/linux/md-os.c,
src/vm/jit/i386/darwin/md-os.c,
src/vm/jit/i386/linux/md-os.c,
src/vm/jit/m68k/linux/md-os.c,
src/vm/jit/mips/irix/md-os.c,
src/vm/jit/mips/linux/md-os.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/s390/md.c,
src/vm/jit/sparc64/linux/md-os.c,
src/vm/jit/sparc64/solaris/md-os.c,
src/vm/jit/x86_64/linux/md-os.c: Use new signal_handle function.

16 years ago* src/vm/signal.c (vm/types.h): Removed.
twisti [Thu, 9 Aug 2007 12:18:47 +0000 (12:18 +0000)]
* src/vm/signal.c (vm/types.h): Removed.
(signal_init): Use signal_register_signal.
(signal_register_signal): New function.

* src/vm/signallocal.h (vm/types.h): Removed.
(signal_register_signal): New function.

16 years ago* NEWS: Added news.
twisti [Thu, 9 Aug 2007 12:09:17 +0000 (12:09 +0000)]
* NEWS: Added news.

16 years ago* NEWS: Added 0.99 release and some news.
twisti [Thu, 9 Aug 2007 11:28:51 +0000 (11:28 +0000)]
* NEWS: Added 0.99 release and some news.

16 years ago* src/vm/jit/alpha/linux/md-os.c
michi [Thu, 9 Aug 2007 09:36:57 +0000 (09:36 +0000)]
* src/vm/jit/alpha/linux/md-os.c
[ENABLE_REPLACEMENT] (md_replace_executionstate_read): Implemented.
[ENABLE_REPLACEMENT] (md_replace_executionstate_write): Likewise.

* src/vm/jit/alpha/asmpart.S (asm_replacement_out): Removed.
(asm_replacement_in): Likewise.

16 years ago* src/vm/jit/s390/emit.c (emit_replacement_stubs): Removed obsolete function.
michi [Wed, 8 Aug 2007 17:10:18 +0000 (17:10 +0000)]
* src/vm/jit/s390/emit.c (emit_replacement_stubs): Removed obsolete function.
* src/vm/jit/s390/codegen.c (codegen_emit): Do not create replacement stubs.
* src/vm/jit/replace.c (replace_me): No longer call asm_replacement_in.
* src/vm/jit/asmpart.h [ENABLE_REPLACEMENT]: Removed obsolete prototypes.

16 years ago* src/vmcore/linker.c (linker_compute_subclasses): Added attention notice about
michi [Wed, 8 Aug 2007 16:42:11 +0000 (16:42 +0000)]
* src/vmcore/linker.c (linker_compute_subclasses): Added attention notice about
the locking mechanism.

* src/vmcore/class.c (class_isanysubclass): Uses linker_classrenumber_lock now.

* src/vm/builtin.c (builtin_canstore): Likewise.
(builtin_canstore_onedim): Likewise.
(builtin_canstore_onedim_class): Likewise.

16 years ago* src/vm/jit/arm/asmpart.S (offsets.h): Removed.
twisti [Wed, 8 Aug 2007 16:09:14 +0000 (16:09 +0000)]
* src/vm/jit/arm/asmpart.S (offsets.h): Removed.

16 years ago* src/vm/jit/tools: Removed.
twisti [Wed, 8 Aug 2007 15:58:17 +0000 (15:58 +0000)]
* src/vm/jit/tools: Removed.

* configure.ac (AC_CONFIG_FILES): Removed src/vm/jit/tools/Makefile.
* src/vm/jit/Makefile.am (DIST_SUBDIRS): Removed tools.
(SUBDIRS): Likewise.

* src/threads/critical.c (stdint.h): Added.
(vm/jit/asmpart.h): Removed.
(critical_init): Don't call critical_register_asm_critical_sections.
(critical_register_asm_critical_sections): Removed.

* src/vm/jit/asmpart.h (ASM_GETCLASSVALUES_ATOMIC): Removed.
(asm_criticalsections): Likewise.
(asm_getclassvalues_atomic): Likewise.
(intrp_asm_getclassvalues_atomic): Likewise.

* src/vm/jit/alpha/Makefile.am,
src/vm/jit/arm/Makefile.am,
src/vm/jit/i386/Makefile.am,
src/vm/jit/m68k/Makefile.am,
src/vm/jit/mips/Makefile.am,
src/vm/jit/powerpc/Makefile.am,
src/vm/jit/powerpc64/Makefile.am,
src/vm/jit/s390/Makefile.am,
src/vm/jit/sparc64/Makefile.am,
src/vm/jit/x86_64/Makefile.am (BUILT_SOURCES): Removed
(CLEANFILES): Likewise.
(offsets.h): Likewise.

* src/vm/jit/alpha/asmpart.S,
src/vm/jit/arm/asmpart.S,
src/vm/jit/i386/asmpart.S,
src/vm/jit/m68k/asmpart.S,
src/vm/jit/mips/asmpart.S,
src/vm/jit/powerpc/asmpart.S,
src/vm/jit/powerpc64/asmpart.S,
src/vm/jit/s390/asmpart.S,
src/vm/jit/sparc64/asmpart.S,
src/vm/jit/x86_64/asmpart.S (offsets.h): Removed.
(asm_getclassvalues_atomic): Likewise.
(asm_criticalsections): Likewise.

* src/vm/jit/powerpc/darwin/md-asm.h (asm_criticalsections): Removed.
(asm_getclassvalues_atomic): Likewise.

16 years ago* src/vmcore/class.c (class_isanysubclass): Don't use
twisti [Wed, 8 Aug 2007 15:33:15 +0000 (15:33 +0000)]
* src/vmcore/class.c (class_isanysubclass): Don't use
ASM_GETCLASSVALUES_ATOMIC anymore, we will change that to use the
class-renumbering lock.

* src/vm/builtin.c (builtin_canstore): Likewise.
(builtin_canstore_onedim): Likewise.
(builtin_canstore_onedim_class): Likewise.

16 years ago* src/threads/threads-common.c (stdint.h): Added.
twisti [Wed, 8 Aug 2007 14:55:00 +0000 (14:55 +0000)]
* src/threads/threads-common.c (stdint.h): Added.
(threads_thread_free): Also save and restore the thread state (this is
required for CLDC1.1, but is generally a good idea).

* src/native/vm/java_lang_Thread.c (isAlive) [WITH_CLASSPATH_CLDC1_1]:
Check for NULL.

16 years ago* src/vm/vm.h (vm_arg): Removed.
twisti [Wed, 8 Aug 2007 14:07:56 +0000 (14:07 +0000)]
* src/vm/vm.h (vm_arg): Removed.

* src/vm/jit/tools/genoffsets.c (main): Removed sizevmarg,
offvmargtype and offvmargdata.

* src/vm/jit/m68k/md.c (md_init): Removed some obsolete checks.

16 years ago* src/vm/vm.c (vm_array_store_flt): Handle __POWERPC__ correctly.
twisti [Wed, 8 Aug 2007 13:57:12 +0000 (13:57 +0000)]
* src/vm/vm.c (vm_array_store_flt): Handle __POWERPC__ correctly.
(vm_vmargs_from_valist): Removed.
(vm_vmargs_from_jvalue): Likewise.
(vm_vmargs_from_objectarray): Likewise.
(vm_call_method_vmarg): Likewise.
(vm_call_method_int_vmarg): Likewise.
(vm_call_method_int_valist): Likewise.
(vm_call_method_int_jvalue): Likewise.
(vm_call_method_long_vmarg): Likewise.
(vm_call_method_long_valist): Likewise.
(vm_call_method_long_jvalue): Likewise.
(vm_call_method_float_vmarg): Likewise.
(vm_call_method_float_valist): Likewise.
(vm_call_method_float_jvalue): Likewise.
(vm_call_method_double_vmarg): Likewise.
(vm_call_method_double_valist): Likewise.
(vm_call_method_double_jvalue): Likewise.
(vm_call_method_valist): Removed old implementation.
(vm_call_method_jvalue): Likewise.

* src/vm/vm.h: Removed old prototypes.
* src/vm/jit/asmpart.h: Likewise.

* src/vm/exceptions.c (exceptions_handle_exception) [__POWERPC__]: Get
monitor object correctly (talk to Michi because of ARM).

* src/native/jni.c (_Jv_jni_invokeNative): Removed old implementation.

* src/vm/jit/powerpc/linux/md-abi.c (md_param_alloc): Use 8-byte
stackslots.
(md_param_alloc_native): Implemented native ABI.

* src/vm/jit/powerpc/emit.c (emit_load): Merged TYPE_FLT and TYPE_DBL.
(emit_store): Likewise
* src/vm/jit/powerpc/darwin/md-abi.c: Likewise.

* src/vm/jit/powerpc/arch.h (HAS_4BYTE_STACKSLOT): Removed.
(ALIGN_LONGS_IN_MEMORY): Likewise.
(ALIGN_DOUBLES_IN_MEMORY): Likewise.

* src/vm/jit/powerpc/codegen.c: Implemented 8-byte stackslots, always
load and store float-values as double (PowerPC's internal register
representation is the same).

* src/vm/jit/powerpc/asmpart.S (asm_vm_call_method): Use new argument
array.
(asm_handle_exception): Restore callee-saved registers from the
correct location.

16 years ago* tests/rtMissedIn0: Removed.
twisti [Tue, 7 Aug 2007 19:21:33 +0000 (19:21 +0000)]
* tests/rtMissedIn0: Removed.
* tests/rtIn: Likewise.

16 years ago* src/vmcore/field.c (mm/memory.h): Added.
twisti [Tue, 7 Aug 2007 13:24:43 +0000 (13:24 +0000)]
* src/vmcore/field.c (mm/memory.h): Added.
(vm/global.h): Likewise.
(field_load): Allocate value memory only for static and final fields.

* src/vmcore/field.h (fieldinfo): Made value a pointer.

* src/vmcore/loader.c (load_class_from_classbuffer): Allocate
fieldinfo's on the C heap.

* src/native/jni.c: fieldinfo->value is now a pointer.
* src/native/vm/sun_misc_Unsafe.c: Likewise.
* src/native/vm/gnu/java_lang_reflect_Field.c: Likewise.

* 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/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/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: Likewise.

16 years ago* src/vm/jit/i386/emit.c (emit_trap): New function.
twisti [Tue, 7 Aug 2007 11:07:48 +0000 (11:07 +0000)]
* src/vm/jit/i386/emit.c (emit_trap): New function.
* src/vm/jit/powerpc64/emit.c: Likewise.
* src/vm/jit/x86_64/emit.c: Likewise.

16 years ago* src/threads/threads-common.c (threads_preinit): Fixed compiler
twisti [Tue, 7 Aug 2007 08:26:38 +0000 (08:26 +0000)]
* src/threads/threads-common.c (threads_preinit): Fixed compiler
warning.

16 years ago* src/vm/jit/emit-common.c: Set Id keyword.
twisti [Mon, 6 Aug 2007 16:10:42 +0000 (16:10 +0000)]
* src/vm/jit/emit-common.c: Set Id keyword.
* src/vm/jit/emit-common.h: Likewise.

16 years ago* src/vm/jit/patcher-common.h: Added __MIPS__ for new patcher
twisti [Mon, 6 Aug 2007 16:02:28 +0000 (16:02 +0000)]
* src/vm/jit/patcher-common.h: Added __MIPS__ for new patcher
functions.

* src/vm/jit/patcher.h: Added __MIPS__ to include-check.

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

* src/vm/jit/mips/codegen.c (vm/jit/patcher.h): Removed.
(vm/jit/patcher-common.h): Added.
(codegen_emit): Replaced codegen_add_patch_ref with
patcher_add_patch_ref, and emit_patcher_stubs with emit_patcher_traps.
(codegen_emit_stub_native): Likewise.

* src/vm/jit/mips/codegen.h (PATCHER_CALL_INSTRUCTIONS): Changed to 1.
(PATCHER_CALL_SIZE): Changed to 1*4.
(PATCHER_NOPS): Emit only one NOP.

* src/vm/jit/mips/linux/md-os.c (md_signal_handler_sigsegv): Check for
exception, set PC in trap-case.

* src/vm/jit/mips/irix/md-os.c (md_signal_handler_sigsegv): Check for
exception.

* src/vm/jit/mips/patcher.c: Renamed function to new patcher
functions, and use patcher references.
(vm/jit/patcher.h): Removed.
(vm/jit/patcher-common.h): Added
(patcher_wrapper): Removed.

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

16 years ago* src/vm/jit/mips/arch.h (SUPPORT_PASS_FLOATARGS_IN_INTREGS): Removed
twisti [Mon, 6 Aug 2007 14:41:05 +0000 (14:41 +0000)]
* src/vm/jit/mips/arch.h (SUPPORT_PASS_FLOATARGS_IN_INTREGS): Removed
duplicate define.

16 years ago* src/lib/gnu/java/lang/reflect/Method.java
panzi [Mon, 6 Aug 2007 12:44:01 +0000 (12:44 +0000)]
* src/lib/gnu/java/lang/reflect/Method.java
(java.lang.annotation.Annotation): Added import.
(java.util.Map): Added import.
(sun.refelct.annotation.AnnotationParser): Added import.
(declaredAnnotations): Added field (inspired by OpenJDK).
(getAnnotation): Added method.
(getDeclaredAnnotations): Added method.
(declaredAnnotations): Added method (inspired by OpenJDK).
(getParameterAnnotations): Added method.

* src/lib/gnu/java/lang/reflect/Field.java
(java.lang.annotation.Annotation): Added import.
(java.util.Map): Added import.
(sun.refelct.annotation.AnnotationParser): Added import.
(declaredAnnotations): Added field (inspired by OpenJDK).
(getAnnotation): Added method.
(getDeclaredAnnotations): Added method.
(declaredAnnotations): Added method (inspired by OpenJDK).

* src/lib/gnu/java/lang/reflect/Constructor.java:
Copied file from GNU Classpath.
(java.lang.annotation.Annotation): Added import.
(java.util.Map): Added import.
(sun.refelct.annotation.AnnotationParser): Added import.
(declaredAnnotations): Added field (inspired by OpenJDK).
(getAnnotation): Added method.
(getDeclaredAnnotations): Added method.
(declaredAnnotations): Added method (inspired by OpenJDK).
(getParameterAnnotations): Added method.

* src/lib/gnu/sun/reflect/generics/parser/SignatureFormatError.java:
Removed.

* src/lib/gnu/sun/reflect/generics/parser/SignatureParser.java:
Removed. I figured out which class of GNU Classpath to use to replace
this self written class.

* src/lib/gnu/sun/reflect/annotation/AnnotationParser.java:
Added a few comments.
(sun.reflect.generics.parser.SignatureParser): Removed import.
(sun.reflect.generics.parser.SignatureFormatError): Removed import.
(gnu.java.lang.reflect.FieldSignatureParser): Added import.
(parseParameterAnnotations): Added method.
(parseSig): Changed method so it uses GNU Classpaths FieldSignatureParser.

* src/lib/Makefile.am
(VM_JAVA_FILES): Added $(top_srcdir)/src/lib/gnu/java/lang/reflect/Constructor.java
(VM_CLASS_FILES): Added classes/java/lang/reflect/Constructor.class

* src/native/vm/java_lang_Class.c
[WITH_CLASSPATH_GNU] [ENABLE_ANNOTATIONS]
(_Jv_java_lang_Class_getDeclaredAnnotations): Cache methodinfo for
sun.reflect.annotation.AnnotationParser.parseAnnotationsIntoArray.

* src/native/vm/gnu/java_lang_reflect_Method.c
[ENABLE_ANNOTATIONS] (native/vm/reflect.h): Added include.
[ENABLE_ANNOTATIONS] (declaredAnnotations): Added method.
[ENABLE_ANNOTATIONS] (getParameterAnnotations): Added method.
[ENABLE_ANNOTATIONS] (Java_java_lang_reflect_Method_getDefaultValue):
Cache methodinfo for sun.reflect.annotation.AnnotationParser.parseDefaultValue.
[ENABLE_ANNOTATIONS] (Java_java_lang_reflect_Method_declaredAnnotations): Added.
[ENABLE_ANNOTATIONS] (Java_java_lang_reflect_Method_getParameterAnnotations): Added.

* src/native/vm/gnu/java_lang_reflect_Field.c
[ENABLE_ANNOTATIONS] (native/include/sun_reflect_ConstantPool.h): Added include.
[ENABLE_ANNOTATIONS] (native/vm/reflect.h): Added include.
[ENABLE_ANNOTATIONS] (declaredAnnotations): Added method.
[ENABLE_ANNOTATIONS] (Java_java_lang_reflect_Field_declaredAnnotations): Added.

* src/native/vm/gnu/java_lang_reflect_Constructor.c
[ENABLE_ANNOTATIONS] (vm/vm.h): Added include.
[ENABLE_ANNOTATIONS] (native/include/sun_reflect_ConstantPool.h): Added include.
[ENABLE_ANNOTATIONS] (native/vm/reflect.h): Added include.
[ENABLE_ANNOTATIONS] (declaredAnnotations): Added method.
[ENABLE_ANNOTATIONS] (getParameterAnnotations): Added method.
[ENABLE_ANNOTATIONS] (Java_java_lang_reflect_Constructor_declaredAnnotations): Added.
[ENABLE_ANNOTATIONS] (Java_java_lang_reflect_Constructor_getParameterAnnotations): Added.

* src/native/vm/reflect.c
[WITH_CLASSPATH_GNU] [ENABLE_ANNOTATIONS] (vm/vm.h): Added include.
[WITH_CLASSPATH_GNU] [ENABLE_ANNOTATIONS] (native/include/sun_reflect_ConstantPool.h): Added include.
[WITH_CLASSPATH_GNU] [ENABLE_ANNOTATIONS] (reflect_get_declaredannotatios): Added.
[WITH_CLASSPATH_GNU] [ENABLE_ANNOTATIONS] (reflect_get_parameterannotations): Added.

* src/native/vm/reflect.h
[WITH_CLASSPATH_GNU] [ENABLE_ANNOTATIONS] (reflect_get_declaredannotatios): Added.
[WITH_CLASSPATH_GNU] [ENABLE_ANNOTATIONS] (reflect_get_parameterannotations): Added.

* src/native/vm/sun/jvm.c
(JVM_GetDeclaredClasses): Implemented (needed by a testcase of mine).

* src/vmcore/method.c (method_get_parametercount): Added.
This function gets the parameter count of a method (not counting the
this pointer of non-static methods). Returns -1 in case of an error.

* src/vmcore/method.h (method_get_parametercount): Added.

16 years ago* src/vm/jit/codegen-common.c (codegen_add_patch_ref): Removed obsolete code
michi [Mon, 6 Aug 2007 12:42:31 +0000 (12:42 +0000)]
* src/vm/jit/codegen-common.c (codegen_add_patch_ref): Removed obsolete code
about PATCHER_LONGBRANCHES_NOPS.

16 years ago* src/vm/jit/emit-common.c (emit_patcher_traps): Added.
michi [Mon, 6 Aug 2007 12:19:01 +0000 (12:19 +0000)]
* src/vm/jit/emit-common.c (emit_patcher_traps): Added.

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

* src/vm/jit/alpha/emit.c (emit_patcher_traps): Removed (moved to emit-common).
(emit_trap): Implemented.

* src/vm/jit/arm/emit.c: Likewise.

* src/vm/jit/powerpc/emit.c: Likewise.

* src/vm/jit/s390/emit.c: Likewise.

16 years ago* src/vm/jit/replace.c (replace_read_executionstate): Improved comments.
edwin [Sun, 5 Aug 2007 20:41:25 +0000 (20:41 +0000)]
* src/vm/jit/replace.c (replace_read_executionstate): Improved comments.
(replace_write_executionstate): Likewise.

16 years ago* src/vm/jit/replace.c (replace_new_sourceframe): Fixed documentation.
edwin [Sun, 5 Aug 2007 20:15:27 +0000 (20:15 +0000)]
* src/vm/jit/replace.c (replace_new_sourceframe): Fixed documentation.

16 years ago* src/vm/jit/patcher-common.c (stdint.h): Added.
twisti [Sun, 5 Aug 2007 11:04:21 +0000 (11:04 +0000)]
* src/vm/jit/patcher-common.c (stdint.h): Added.
(patcher_list_free): Removed unused variable pr.
(patcher_add_patch_ref): Fixed warning.

16 years ago* src/native/vm/sun/jvm.c (JVM_Available) [FIONREAD]: Use
twisti [Sun, 5 Aug 2007 10:58:21 +0000 (10:58 +0000)]
* src/native/vm/sun/jvm.c (JVM_Available) [FIONREAD]: Use
HotSpot-compatible code.

16 years ago* src/vm/jit/patcher-common.c (patcher_list_reset): Added.
michi [Fri, 3 Aug 2007 19:06:37 +0000 (19:06 +0000)]
* src/vm/jit/patcher-common.c (patcher_list_reset): Added.
(patcher_add_patch_ref) [!NDEBUG]: Added sanity check.

* src/vm/jit/patcher-common.h (patcher_list_reset): Added.

* src/vm/jit/codegen-common.c (codegen_reset): Resets the patcher list.

16 years ago* src/vm/jit/patcher-common.c (patcher_handler): Call LOCK_MONITOR_EXIT instead of...
pm [Fri, 3 Aug 2007 18:43:30 +0000 (18:43 +0000)]
* src/vm/jit/patcher-common.c (patcher_handler): Call LOCK_MONITOR_EXIT instead of LOCK_MONITOR_ENTER in double-patching handler code.

16 years ago* src/native/vm/sun/jvm.c (JVM_RaiseSignal): New function.
twisti [Thu, 2 Aug 2007 14:46:00 +0000 (14:46 +0000)]
* src/native/vm/sun/jvm.c (JVM_RaiseSignal): New function.

16 years ago* m4/ac_prog_javac.m4 (AC_PROG_JAVAC): Removed -1.5 from ecj.
twisti [Wed, 1 Aug 2007 22:47:17 +0000 (22:47 +0000)]
* m4/ac_prog_javac.m4 (AC_PROG_JAVAC): Removed -1.5 from ecj.

* src/lib/Makefile.am (vm.zip): Added -source 1.5 -target 1.5. Thanks
to Mark Wielaard.

16 years ago* jit/patcher.h: Added #error if included on s390.
pm [Wed, 1 Aug 2007 15:26:59 +0000 (15:26 +0000)]
* jit/patcher.h: Added #error if included on s390.
* jit/patcher-common.h: Made declarations visible on s390.
* jit/s390/asmpart.S (asm_patcher_wrapper): removed.
* jit/s390/emit.c (emit_patcher_stubs): removed, (emit_patcher_traps): added.
* jit/s390/codegen.h (PATCHER_LONGBRANCHES_NOPS_SKIP, PATCHER_LONGBRANCHES_NOPS): removed, (PATCHER_CALL_SIZE, PATCHER_NOPS, PATCHER_NOPS_SKIP) adapted to patching via signals.
* jit/s390/codegen.c (codegen_emit, codegen_emit_stub_native): Adapted to paching via signals.
* jit/s390/md.c (md_signal_handler_sigill, md_signal_handler_sigsegv): added support for exceptions_new_hardware_exception returning NULL.
* jit/s390/patcher.c: Adapted to paching via signals.

16 years ago* m4/annotations.m4: New file.
twisti [Tue, 31 Jul 2007 13:16:43 +0000 (13:16 +0000)]
* m4/annotations.m4: New file.
* configure.ac: Use AC_CHECK_ENABLE_ANNOTATIONS.

16 years ago* src/lib/gnu/java/lang/reflect/Method.java
panzi [Tue, 31 Jul 2007 12:59:03 +0000 (12:59 +0000)]
* src/lib/gnu/java/lang/reflect/Method.java
(annotations): Added.
(parameterAnnotations): Added.
(annotationDefault): Added.

* src/lib/gnu/java/lang/reflect/Field.java
(annotations): Added.

* src/lib/gnu/sun/reflect: New directory.
* src/lib/gnu/sun/reflect/generics: New directory.
* src/lib/gnu/sun/reflect/generics/parser: New directory.
* src/lib/gnu/sun/reflect/generics/parser/SignatureFormatError.java:
New file.

* src/lib/gnu/sun/reflect/generics/parser/SignatureParser.java:
New file. This class parses type signatures and returns the acording type
as a java.lang.Class instance.

* src/lib/gnu/sun/reflect/ConstantPool.java [WITH_CLASSPATH_GNU]:
New file.

* src/lib/gnu/sun/reflect/annotation: New directory.
* src/lib/gnu/sun/reflect/annotation/AnnotationTypeMismatchExceptionProxy.java
[WITH_CLASSPATH_GNU]: Copied file from OpenJDK.

* src/lib/gnu/sun/reflect/annotation/TypeNotPresentExceptionProxy.java
[WITH_CLASSPATH_GNU]: Copied file from OpenJDK.

* src/lib/gnu/sun/reflect/annotation/AnnotationParser.java
[WITH_CLASSPATH_GNU]: Copied file from OpenJDK and changed a bit so
it can be used with GNU Classpath.
[WITH_CLASSPATH_GNU] (parseAnnotationsIntoArray): Added for
convenience.
[WITH_CLASSPATH_GNU] (parseAnnotationDefault): Added for convenience.

* src/lib/gnu/sun/reflect/annotation/AnnotationType.java
[WITH_CLASSPATH_GNU]: Copied file from OpenJDK and changed a bit so
it can be used with GNU Classpath.
[WITH_CLASSPATH_GNU] (annotationTypes): Added to emulate
sun.misc.SharedSecrets.getJavaLangAccess().getAnnotationType() and
sun.misc.SharedSecrets.getJavaLangAccess().setAnnotationType().

* src/lib/Makefile.am [WITH_CLASSPATH_GNU] [ENABLE_ANNOTATIONS]: Added
classes needed by annotations support.

* src/native/vm/nativevm.h
[ENABLE_ANNOTATIONS] (_Jv_sun_reflect_ConstantPool_init): Added.

* src/native/vm/java_lang_Class.c
[WITH_CLASSPATH_GNU] [ENABLE_ANNOTATIONS] (vmcore/annotation.h):
Include added.
[WITH_CLASSPATH_GNU] [ENABLE_ANNOTATIONS]
(native/include/sun_reflect_ConstantPool.h): Include added.
[WITH_CLASSPATH_GNU] [ENABLE_ANNOTATIONS]
(_Jv_java_lang_Class_getDeclaredAnnotations): Implemented.

* src/native/vm/gnu/java_lang_VMClass.c
[WITH_CLASSPATH_GNU] [ENABLE_ANNOTATIONS]
(Java_java_lang_VMClass_getDeclaredAnnotations): Implemented.

* src/native/vm/gnu/sun_reflect_ConstantPool.c [ENABLE_ANNOTATIONS]:
Added implementation of sun.reflect.ConstantPool class. This is an copy
of the according functions from src/native/vm/sun/jvm.c for I don't know
how to unify it better (needs to be discussed).

* src/native/vm/gnu/java_lang_reflect_Method.c
[ENABLE_ANNOTATIONS] (vm/vm.h): Added include.
[ENABLE_ANNOTATIONS] (native/include/sun_reflect_ConstantPool.h):
Added include.
[ENABLE_ANNOTATIONS] (Java_java_lang_reflect_Method_getDefaultValue):
Implemented.

* src/native/vm/gnu/Makefile.am
[ENABLE_ANNOTATIONS] (SUN_REFLECT_SOURCES): Added sun_reflect_ConstantPool.c

* src/native/vm/java_lang_Class.h
[WITH_CLASSPATH_GNU] [ENABLE_ANNOTATIONS]
(_Jv_java_lang_Class_getDeclaredAnnotations): Added.

* src/native/vm/sun/jvm.c
(assert.h): Added include.
(native/include/java_lang_Integer.h): Added include.
(native/include/java_lang_Long.h): Added include.
(native/include/java_lang_Short.h): Added include.
(native/include/java_lang_Byte.h): Added include.
(native/include/java_lang_Character.h): Added include.
(native/include/java_lang_Boolean.h): Added include.
(native/include/java_lang_Float.h): Added include.
(native/include/java_lang_Double.h): Added include.
[ENABLE_ANNOTATIONS] (native/include/sun_reflect_ConstantPool.h):
Added include.
(JVM_GetDeclaringClass): Implemented.
(JVM_GetClassAnnotations) [ENABLE_ANNOTATIONS]: Implemented.
(JVM_GetFieldAnnotations): Implemented.
(JVM_GetMethodAnnotations): Implemented.
(JVM_GetMethodDefaultAnnotationValue): Implemented.
(JVM_GetMethodParameterAnnotations): Implemented.
[ENABLE_ANNOTATIONS] (JVM_GetClassConstantPool): Implemented.
(JVM_ConstantPoolGetSize): Implemented.
(JVM_ConstantPoolGetClassAt): Implemented.
(JVM_ConstantPoolGetClassAtIfLoaded): Implemented.
(JVM_ConstantPoolGetMethodAt): Implemented.
(JVM_ConstantPoolGetMethodAtIfLoaded): Implemented.
(JVM_ConstantPoolGetFieldAt): Implemented.
(JVM_ConstantPoolGetFieldAtIfLoaded): Implemented.
(JVM_ConstantPoolGetIntAt): Implemented.
(JVM_ConstantPoolGetLongAt): Implemented.
(JVM_ConstantPoolGetFloatAt): Implemented.
(JVM_ConstantPoolGetDoubleAt): Implemented.
(JVM_ConstantPoolGetStringAt): Implemented.
(JVM_ConstantPoolGetUTF8At): Implemented.
(JVM_GetArrayElement): Quickly implemented (will be rewritten by
twisti). I needed this function in a testcase and not directly for
annotations support.

* src/native/vm/reflect.c
[ENABLE_ANNOTATIONS] (mm/memmory.h): Added include.
(reflect_constructor_new) [ENABLE_ANNOTATIONS]: Load annotations and
parameter annotations.
(reflect_field_new) [ENABLE_ANNOTATIONS]: Load annotations.
(reflect_method_new) [ENABLE_ANNOTATIONS]: Load annotations, parameter
annotations and annotation default value.

* src/native/vm/nativevm.c [WITH_CLASSPATH_GNU] [ENABLE_ANNOTATIONS]
(_Jv_sun_reflect_ConstantPool_init): Added call.

* src/native/include/Makefile.am
[WITH_CLASSPATH_GNU] [ENABLE_ANNOTATIONS] (JAVASE_HEADER_FILES):
Added sun_reflect_ConstantPool.h

* src/vmcore/class.c
[ENABLE_ANNOTATIONS] (class_sun_reflect_ConstantPool): Added.
[ENABLE_ANNOTATIONS] (class_sun_reflect_annotation_AnnotationParser):
Added.
(class_load_attributes) [ENABLE_ANNOTATIONS]: Load annotations.
(class_free) [ENABLE_ANNOTATIONS]: Free annotations.

* src/vmcore/loader.c
(loader_init) [ENABLE_ANNOTATIONS]: Load
class_sun_reflect_ConstantPool.
(loader_init) [ENABLE_ANNOTATIONS] [WITH_CLASSPATH_GNU]: Load
class_sun_reflect_annotation_AnnotationParser.

* src/vmcore/annotation.c [!ENABLE_ANNOTATIONS]: Error: annotation
support has to be enabled when compling this file.
(assert.h): Added include.
(toolbox/logging.h): Added include.
(annotation_bytearray_new): Added.
(annotation_bytearray_free): Added.
(annotation_bytearrays_new): Added.
(annotation_bytearrays_resize): Added.
(annotation_bytearrays_insert): Added.
(annotation_bytearrays_free): Added.
(annotation_load_attribute_body): Added. Maybe this function should be
called loader_load_attribute_body and located in vmcore/loader.c?
(annotation_load_method_attribute_annotationdefault): Added.
(annotation_load_method_attribute_runtimevisibleparameterannotations):
Added.
(annotation_load_method_attribute_runtimeinvisibleparameterannotations):
Added.
(annotation_load_class_attribute_runtimevisibleannotations): Added.
(annotation_load_class_attribute_runtimeinvisibleannotations): Added.
(annotation_load_method_attribute_runtimevisibleannotations): Added.
(annotation_load_method_attribute_runtimeinvisibleannotations): Added.
(annotation_load_field_attribute_runtimevisibleannotations): Added.
(annotation_load_field_attribute_runtimeinvisibleannotations): Added.

* src/vmcore/class.h
[ENABLE_ANNOTATIONS] (runtimevisibleannotationscount): Removed.
[ENABLE_ANNOTATIONS] (runtimevisibleannotations): Removed.
[ENABLE_ANNOTATIONS] (annotations): Added. Bytearray of the unparsed
annotations or NULL if none.
[ENABLE_ANNOTATIONS] (method_annotations): Added. Array of bytearrays
of method annotations. This Array is only as big as needed or NULL if
there are no method annotations at all.
[ENABLE_ANNOTATIONS] (method_parameterannotations): Added. Array of bytearrays
of method parameter annotations. This Array is only as big as needed
or NULL if there are no method parameter annotations at all.
[ENABLE_ANNOTATIONS] (method_annotationdefaults): Added. Array of bytearrays
of method annotation default values. This Array is only as big as
needed or NULL if there are no method annotation default values at all.
[ENABLE_ANNOTATIONS] (field_annotations): Added. Array of bytearrays
of field annotations. This Array is only as big as needed or NULL if
there are no field annotations at all.
[ENABLE_ANNOTATIONS] (class_sun_reflect_ConstantPool): Added.
[ENABLE_ANNOTATIONS] [WITH_CLASSPATH_GNU]
(class_sun_reflect_annotation_AnnotationParser): Added.

* src/vmcore/annotation.h
(annotation_bytearray_t): Added. Used to store unparsed (parameter-) annotations or
unparsed annotation default values in.
(annotation_bytearrays_t): Added. Array of bytearrays.
(annotation_bytearray_new): Added.
(annotation_bytearray_free): Added.
(annotation_bytearrays_new): Added.
(annotation_bytearrays_resize): Added.
(annotation_bytearrays_insert): Added.
(annotation_bytearrays_free): Added.
(annotation_load_class_attribute_runtimeinvisibleannotations): Added.
(annotation_load_method_attribute_runtimevisibleannotations): Added.
(annotation_load_method_attribute_runtimeinvisibleannotations): Added.
(annotation_load_field_attribute_runtimevisibleannotations): Added.
(annotation_load_field_attribute_runtimeinvisibleannotations): Added.
(annotation_load_method_attribute_annotationdefault): Added.
(annotation_load_method_attribute_runtimevisibleparameterannotations):
Added.
(annotation_load_method_attribute_runtimeinvisibleparameterannotations):
Added.

* src/vmcore/method.c
(method_load) [ENABLE_ANNOTATIONS]: Load annotations, parameter
annotations and annotation default values.
[ENABLE_ANNOTATIONS] (method_get_annotations): Added.
[ENABLE_ANNOTATIONS] (method_get_parameterannotations): Added.
[ENABLE_ANNOTATIONS] (method_get_annotationdefault): Added.

* src/vmcore/method.h
[ENABLE_ANNOTATIONS] (method_get_annotations): Added.
[ENABLE_ANNOTATIONS] (method_get_parameterannotations): Added.
[ENABLE_ANNOTATIONS] (method_get_annotationdefault): Added.

* src/vmcore/field.c
(mm/memory.h): Added include.
(vmcore/annotations.h): Added include.
(field_load) [ENABLE_ANNOTATIONS]: Laod annotations.
[ENABLE_ANNOTATIONS] (field_get_annotations): Added.

* src/vmcore/utf8.c
[ENABLE_ANNOTATIONS] (utf_sun_reflect_ConstantPool): Added.
[ENABLE_ANNOTATIONS] (utf_RuntimeInvisibleAnnotations): Added.
[ENABLE_ANNOTATIONS] (utf_RuntimeVisibleParameterAnnotations): Added.
[ENABLE_ANNOTATIONS] (utf_RuntimeInvisibleParameterAnnotations):
Added.
[ENABLE_ANNOTATIONS] (utf_AnnotationDefault): Added.
[ENABLE_ANNOTATIONS] [WITH_CLASSPATH_GNU]
(utf_sun_reflect_annotation_AnnotationParser): Added.

* src/vmcore/field.h
[ENABLE_ANNOTATIONS] (field_get_annotations): Added.

* src/vmcore/Makefile.am
[ENABLE_ANNOTATIONS] (ANNOTATION_SOURCES): Only compile annotations
sources when annotations are enabled.

* src/vmcore/utf8.h
[ENABLE_ANNOTATIONS] (utf_sun_reflect_ConstantPool): Added.
[ENABLE_ANNOTATIONS] (utf_RuntimeInvisibleAnnotations): Added.
[ENABLE_ANNOTATIONS] (utf_RuntimeVisibleParameterAnnotations): Added.
[ENABLE_ANNOTATIONS] (utf_RuntimeInvisibleParameterAnnotations):
Added.
[ENABLE_ANNOTATIONS] (utf_AnnotationDefault): Added.
[ENABLE_ANNOTATIONS] [WITH_CLASSPATH_GNU]
(utf_sun_reflect_annotation_AnnotationParser): Added.

* configure.ac (ENABLE_ANNOTATIONS): Added configure option --enable-annotations.

16 years ago* configure.ac: Only check AC_PROG_JAVAC and AC_PROG_JAR for CLDC-1.1
twisti [Tue, 31 Jul 2007 12:47:11 +0000 (12:47 +0000)]
* configure.ac: Only check AC_PROG_JAVAC and AC_PROG_JAR for CLDC-1.1
and GNU.

* m4/classpath.m4 (AC_CHECK_WITH_CLASSPATH_CLASSES): Changed default
value for different configurations..

16 years ago* src/vm/jit/arm/arch.h, src/vm/jit/powerpc/arch.h, src/vm/jit/sparc64/arch.h,
michi [Tue, 31 Jul 2007 12:06:44 +0000 (12:06 +0000)]
* src/vm/jit/arm/arch.h, src/vm/jit/powerpc/arch.h, src/vm/jit/sparc64/arch.h,
src/vm/jit/alpha/arch.h, src/vm/jit/s390/arch.h, src/vm/jit/mips/arch.h,
src/vm/jit/powerpc64/arch.h, src/vm/jit/i386/arch.h, src/vm/jit/x86_64/arch.h
(REPLACEMENT_STUB_SIZE): Removed obsolete define.

* src/vm/jit/powerpc/md.c, src/vm/jit/sparc64/md.c, src/vm/jit/alpha/md.c,
src/vm/jit/mips/md.c, src/vm/jit/powerpc64/md.c, src/vm/jit/i386/md.c,
src/vm/jit/x86_64/md.c
(md_patch_replacement_point): We have to use trap instructions here.

16 years ago* src/vm/jit/sparc64/md.c: Fixed file header.
michi [Tue, 31 Jul 2007 11:36:03 +0000 (11:36 +0000)]
* src/vm/jit/sparc64/md.c: Fixed file header.