cacao.git
16 years ago* Merged with default branch at rev 16f3633aaa5a.
Michael Starzinger [Thu, 30 Aug 2007 21:17:51 +0000 (23:17 +0200)]
* Merged with default branch at rev 16f3633aaa5a.

--HG--
branch : exact-gc

16 years ago* Dummy commit to fix conversion problems with some files.
Michael Starzinger [Thu, 30 Aug 2007 18:44:53 +0000 (20:44 +0200)]
* Dummy commit to fix conversion problems with some files.

--HG--
branch : exact-gc

16 years ago* src/native/jni.c (native/include/java_lang_Byte.h,
Christian Thalinger [Thu, 30 Aug 2007 14:21:15 +0000 (16:21 +0200)]
* src/native/jni.c (native/include/java_lang_Byte.h,
native/include/java_lang_Character.h,
native/include/java_lang_Short.h,
native/include/java_lang_Integer.h,
native/include/java_lang_Boolean.h,
native/include/java_lang_Long.h,
native/include/java_lang_Float.h,
native/include/java_lang_Double.h): Removed.
[WITH_CLASSPATH_SUN] (class_sun_nio_ch_DirectBuffer)
(class_java_nio_DirectByteBuffer, dbb_init): Added.
(jni_init) [WITH_CLASSPATH_SUN]: Added direct-buffer stuff.
(_Jv_JNI_ExceptionOccurred): Added TRACEJNICALLS.
(_Jv_JNI_ToReflectedMethod): Likewise.
(_Jv_JNI_GetStaticMethodID): Likewise.
(_Jv_JNI_DestroyJavaVM): Likewise.
(_Jv_JNI_ExceptionDescribe): Fixed bug.
(_Jv_JNI_NewDirectByteBuffer) [WITH_CLASSPATH_SUN]: Implemented.
(_Jv_JNI_GetDirectBufferAddress): Likewise.

16 years ago* src/native/vm/sun_misc_Unsafe.c (getFloat): Implemented.
Christian Thalinger [Thu, 30 Aug 2007 12:34:50 +0000 (14:34 +0200)]
* src/native/vm/sun_misc_Unsafe.c (getFloat): Implemented.
(getShort): Likewise.
(getFloat): Likewise.

16 years ago* src/native/jni.c (_Jv_JNI_GetVersion): Return JNI_VERSION_1_6.
Christian Thalinger [Thu, 30 Aug 2007 11:28:13 +0000 (13:28 +0200)]
* src/native/jni.c (_Jv_JNI_GetVersion): Return JNI_VERSION_1_6.
(GetObjectRefType): New function.
(_Jv_JNINativeInterface): Added jni_GetObjectRefType.
* src/native/vm/sun/jvm.c (JVM_IsSupportedJNIVersion): Added
JNI_VERSION_1_6.

16 years ago* src/native/vm/sun_misc_Unsafe.c (getLong): Implemented.
Christian Thalinger [Thu, 30 Aug 2007 08:32:50 +0000 (10:32 +0200)]
* src/native/vm/sun_misc_Unsafe.c (getLong): Implemented.
(putByte): Likewise.
(putShort): Likewise.
(setMemory): Likewise.

16 years ago* src/threads/native/threads.h: Added THREAD_NATIVEWORLD macros.
Michael Starzinger [Wed, 29 Aug 2007 16:39:01 +0000 (18:39 +0200)]
* src/threads/native/threads.h: Added THREAD_NATIVEWORLD macros.
* src/threads/none/threads.h: Likewise.
* src/vm/jit/stacktrace.c (stacktrace_remove_stackframeinfo): Use above macros.
(stacktrace_create_extern_stackframe): Likewise.
(stacktrace_create_native_stackframe): Likewise.

--HG--
branch : exact-gc

16 years agomerge with b3167e4ef780
Mathias Panzenboeck [Wed, 29 Aug 2007 13:39:51 +0000 (15:39 +0200)]
merge with b3167e4ef780

16 years agomerge branch
Mathias Panzenboeck [Wed, 29 Aug 2007 12:21:35 +0000 (14:21 +0200)]
merge branch

16 years ago* src/native/vm/sun/jvm.c (JVM_NewArray): Added NPE check.
Christian Thalinger [Wed, 29 Aug 2007 12:09:32 +0000 (14:09 +0200)]
* src/native/vm/sun/jvm.c (JVM_NewArray): Added NPE check.
(JVM_NewMultiArray): Implemented, but needs review at a later point.

16 years ago* src/vmcore/loader.c (load_class_from_classbuffer): Renamed to
Christian Thalinger [Wed, 29 Aug 2007 11:58:01 +0000 (13:58 +0200)]
* src/vmcore/loader.c (load_class_from_classbuffer): Renamed to
load_class_from_classbuffer_intern.
(load_class_from_classbuffer): New function.

16 years ago* src/vmcore/annotations.c (vmcore/loader.h): Added include.
Mathias Panzenboeck [Wed, 29 Aug 2007 11:07:58 +0000 (13:07 +0200)]
* src/vmcore/annotations.c (vmcore/loader.h): Added include.

16 years ago* src/vmcore/loader.c (load_class_from_classloader)
Christian Thalinger [Wed, 29 Aug 2007 09:36:11 +0000 (11:36 +0200)]
* src/vmcore/loader.c (load_class_from_classloader)
[WITH_CLASSPATH_SUN]: Call loadClassInternal.
* src/vmcore/utf8.c (utf_loadClassInternal): Added.
(utf8_init): Initialize utf_loadClassInternal.
* src/vmcore/utf8.h (utf_loadClassInternal): Added.

16 years ago* src/cacaoh/cacaoh.c (main): Added loader_preinit call.
Christian Thalinger [Wed, 29 Aug 2007 08:57:51 +0000 (10:57 +0200)]
* src/cacaoh/cacaoh.c (main): Added loader_preinit call.

* src/vm/primitive.h (primitive_init): Changed return type to void.
(primitive_postinit): New function.

* src/vm/vm.c (vm_create): Use new init functions.

* src/vmcore/linker.c (stdint.h): Added.
(linker_preinit): New function.
(linker_init): Moved basic stuff into linker_preinit, call vm_abort if
error occurred.

* src/vmcore/linker.h (linker_preinit): New function.
(linker_init): Changed return type to void.

* src/vmcore/loader.c (loader_preinit): New function.
(loader_init): Moved basic stuff into loader_preinit, call vm_abort if
error occurred.

* src/vmcore/loader.h (loader_preinit): New function.
(loader_init): Changed return type to void.

* src/vmcore/primitivecore.c (vm/vm.h): Added.
(primitive_init): Load and link primitive-type classes and array-class
ASAP, this is important for annotations.
(primitive_postinit): New function.

16 years ago* src/native/vm/java_lang_Class.c (_Jv_java_lang_Class_getDeclaredAnnotations):
Mathias Panzenboeck [Tue, 28 Aug 2007 16:46:14 +0000 (18:46 +0200)]
* src/native/vm/java_lang_Class.c (_Jv_java_lang_Class_getDeclaredAnnotations):
Removed unnecessary exceptions_get_exception() check.

* src/vmcore/annotation.c (annotation_bytearrays_resize): Fixed comment.

16 years ago* src/vmcore/annotation.c (stdint.h): Added.
Christian Thalinger [Tue, 28 Aug 2007 11:44:40 +0000 (13:44 +0200)]
* src/vmcore/annotation.c (stdint.h): Added.

16 years ago* src/vmcore/field.c
Mathias Panzenboeck [Mon, 27 Aug 2007 22:46:16 +0000 (00:46 +0200)]
* src/vmcore/field.c
(vm/array.h): Added include.
(mm/memory.h): Removed doubled include.
(field_get_annotations): Added cast for array_length_get()s parameter.

* src/vmcore/method.c
(vm/array.h): Added include.
(method_get_annotations): Added cast for array_length_get()s parameter.
(method_get_parameterannotations): Added cast for array_length_get()s parameter.
(method_get_annotationdefault): Added cast for array_length_get()s parameter.

16 years ago* src/vmcore/annotation.c
Mathias Panzenboeck [Mon, 27 Aug 2007 20:46:53 +0000 (22:46 +0200)]
* src/vmcore/annotation.c
(annotation_bytearrays_resize): Removed unused variables.

* src/vmcore/annotation.h: Sorted includes.
(vmcore/utf8.h): Removed include.

16 years ago* autogen.sh: Made executeable.
Mathias Panzenboeck [Mon, 27 Aug 2007 20:18:02 +0000 (22:18 +0200)]
* autogen.sh: Made executeable.

* src/cacaoh/dummy.c
(mm/memory.h): Added include.
(native/llni.h): Added include.
(array_objectarray_element_get): Added dummy implementation.
(array_objectarray_element_set): Added dummy implementation.
(array_length_get): Added dummy implementation.
(builtin_anewarray): Added dummy implementation using MNEW.
(builtin_newarray_byte): Added dummy implementation using MNEW.
(primitive_arrayclass_get_by_type): Added dummy implementation.

* src/mm/boehm-gc/autogen.sh: Made executeable.

* src/native/vm/gnu/java_lang_reflect_Constructor.c
(Java_java_lang_reflect_Constructor_declaredAnnotations):
Removed unused variable o.
(Java_java_lang_reflect_Constructor_getParameterAnnotations):
Removed unused variable o.

* src/native/vm/gnu/java_lang_reflect_Field.c
(Java_java_lang_reflect_Field_declaredAnnotations):
Removed unused variable o.

* src/native/vm/gnu/java_lang_reflect_Method.c
(Java_java_lang_reflect_Method_getDefaultValue):
Removed unused variable o.
(Java_java_lang_reflect_Method_declaredAnnotations):
Removed unused variable o.
(Java_java_lang_reflect_Method_getParameterAnnotations):
Removed unused variable o.

* src/native/vm/gnu/sun_reflect_ConstantPool.c
(_Jv_sun_reflect_ConstantPool_init): Removed usage of global string
utf_sun_reflect_ConstantPool.

* src/native/vm/java_lang_Class.c [WITH_CLASSPATH_GNU] [ENABLE_ANNOTATIONS]:
Sorted includes.
(_Jv_java_lang_Class_getDeclaredAnnotations): Fixed comment.

* src/vmcore/annotation.c
(native/llni.h): Added include.
(vm/array.h): Added include.
(vm/builtin.h): Added include.
(vm/primitive.h): Added include.
(annotation_bytearray_new): Removed.
(annotation_bytearray_free): Removed.
(annotation_bytearrays_new): Removed.
(annotation_bytearrays_free): Removed.
(annotation_bytearrays_resize): Made static and now java_handle_objectarray_t
is used instead of my own array type.
(annotation_bytearrays_insert): Made static and now java_handle_objectarray_t
is used instead of my own array type.
(annotation_load_attribute_body):
Using java_handle_bytearray_t instead of my own array type.
(annotation_load_method_attribute_annotationdefault):
Using java_handle_bytearray_t and java_handle_objectarray_t instead of my own
array types.
(annotation_load_method_attribute_runtimevisibleparameterannotations):
Using java_handle_bytearray_t and java_handle_objectarray_t instead of my own
array types.
(annotation_load_method_attribute_runtimevisibleannotations):
Using java_handle_bytearray_t and java_handle_objectarray_t instead of my own
array types.
(annotation_load_field_attribute_runtimevisibleannotations):
Using java_handle_bytearray_t and java_handle_objectarray_t instead of my own
array types.

* src/vmcore/annotation.h
(annotation_bytearray_t): Removed.
(annotation_bytearrays_t): Removed.
(annotation_bytearray_new): Removed.
(annotation_bytearray_free): Removed.
(annotation_bytearrays_new): Removed.
(annotation_bytearrays_resize): Removed.
(annotation_bytearrays_insert): Removed.
(annotation_bytearrays_free): Removed.

* src/vmcore/class.c
(class_sun_reflect_annotation_AnnotationParser): Is only declared when
WITH_CLASSPATH_GNU is defined.
(class_free) [ENABLE_ANNOTATIONS]: Removed usage of
annotation_bytearray*_free() functions.
(class_get_annotations): Don't have to copy anything now, just return the
java_handle_bytearray_t.

* src/vmcore/class.h
(classinfo): Fixed comments.
(classinfo) [ENABLE_ANNOTATIONS]: Now using java_handle_bytearray_t and
java_handle_objectarray_t instead of my own array types.

* src/vmcore/loader.c
(loader_init): Removed usage of global string utf_sun_reflect_ConstantPool
and utf_sun_reflect_annotation_AnnotationParser.

* src/vmcore/field.c
(vm/array.h): Added include.
(field_get_annotations): Don't have to copy anything now, just return the
java_handle_bytearray_t.

* src/vmcore/method.c
(vm/array.h): Added include.
(method_get_annotations): Don't have to copy anything now, just return the
java_handle_bytearray_t.
(method_get_parameterannotations): Don't have to copy anything now, just return
the java_handle_bytearray_t.
(method_get_annotationdefault): Don't have to copy anything now, just return
the java_handle_bytearray_t.

* src/vmcore/utf8.c
(utf_sun_reflect_ConstantPool): Removed.
(utf_sun_reflect_annotation_AnnotationParser): Removed.

* src/vmcore/utf8.h
(utf_sun_reflect_ConstantPool): Removed.
(utf_sun_reflect_annotation_AnnotationParser): Removed.

16 years ago* src/vm/jit/show.c (show_icmd): ICMD_MULTIANEWARRAY: Print class
Christian Thalinger [Mon, 27 Aug 2007 19:46:42 +0000 (21:46 +0200)]
* src/vm/jit/show.c (show_icmd): ICMD_MULTIANEWARRAY: Print class
name.

16 years ago* Removed all Id tags.
Christian Thalinger [Mon, 27 Aug 2007 14:28:22 +0000 (16:28 +0200)]
* Removed all Id tags.

16 years ago* src/vm/vm.c (vm_printconfig): Better and correct output.
Christian Thalinger [Mon, 27 Aug 2007 08:41:30 +0000 (10:41 +0200)]
* src/vm/vm.c (vm_printconfig): Better and correct output.

16 years ago* Added *~.
Christian Thalinger [Mon, 27 Aug 2007 08:28:30 +0000 (10:28 +0200)]
* Added *~.

16 years ago* .hgignore: New file.
Christian Thalinger [Sat, 25 Aug 2007 14:16:40 +0000 (16:16 +0200)]
* .hgignore: New file.

16 years ago* src/vm/vm.c (vm_create) [ENABLE_JAVASE]: Removed #ifdef for setting
twisti [Wed, 22 Aug 2007 21:34:24 +0000 (21:34 +0000)]
* src/vm/vm.c (vm_create) [ENABLE_JAVASE]: Removed #ifdef for setting
sun.boot.class.path and java.boot.class.path.
* src/vmcore/suck.c (suck_add_from_property): Likewise.

16 years ago* src/vm/vm.c (vm_create): Free properties after they have been
twisti [Wed, 22 Aug 2007 19:59:32 +0000 (19:59 +0000)]
* src/vm/vm.c (vm_create): Free properties after they have been
replaced.
* src/vmcore/suck.c (suck_add_from_property): Likewise.

* src/vm/properties.c (properties_set): Smaller changes.

16 years ago* src/vm/properties.c (properties_set): Fixed build for CLDC-1.1,
twisti [Wed, 22 Aug 2007 19:32:27 +0000 (19:32 +0000)]
* src/vm/properties.c (properties_set): Fixed build for CLDC-1.1,
removed getenv of JAVA_HOME.

* src/threads/native/threads.c (threads_detach_thread): Fixed build
for CLDC-1.1.

16 years ago* src/vm/vm.c [WITH_JRE_LAYOUT] (libgen.h, unistd.h): Removed.
twisti [Wed, 22 Aug 2007 18:45:31 +0000 (18:45 +0000)]
* src/vm/vm.c [WITH_JRE_LAYOUT] (libgen.h, unistd.h): Removed.

* src/vm/properties.c (errno.h): Added.
[WITH_JRE_LAYOUT] (libgen.h): Likewise.
(properties_set) [WITH_CLASSPATH_SUN]: Set sun.boot.library.path
property.

* src/native/vm/nativevm.c (vm/properties.h): Added.
(nativevm_preinit) [WITH_CLASSPATH_SUN]: Use properties_get to get
sun.boot.library.path.

16 years ago* src/vm/jit/s390/codegen.h: Cleanup.
pm [Wed, 22 Aug 2007 18:28:22 +0000 (18:28 +0000)]
* src/vm/jit/s390/codegen.h: Cleanup.
* src/vm/jit/s390/codegen.c (codegen_emit): Tryed to improove ACONST.
* src/vm/jit/s390/emit.c (emit_copy): Use MVC (memcpy instruction) for memory to memory copy.

16 years ago* src/vm/properties.c (list_properties_entry): Renamed to
twisti [Wed, 22 Aug 2007 18:24:23 +0000 (18:24 +0000)]
* src/vm/properties.c (list_properties_entry): Renamed to
list_properties_entry_t.
(properties_init): Only initialize the list.
(properties_set): New function to set default properties (don't use
JAVA_HOME to set java.home).

* src/vm/properties.h (vm/types.h): Removed.
(stdint.h): Added.
(properties_init): Changed signature.
(properties_set): New function.

* src/vm/vm.c (cacao_prefix): Removed.
(cacao_libjvm): Likewise.
(classpath_libdir): Likewise.
(_Jv_bootclasspath): Likewise.
(_Jv_classpath): Likewise.
(_Jv_java_library_path): Likewise.
(specificmethodname): Likewise.
(specificsignature): Likewise.
(startit): Likewise.
(vm_printconfig): Use properties_get to get properties.
(vm_create): Moved properties stuff into properties_set.

* src/vm/vm.h (cacao_prefix): Removed.
(cacao_libjvm): Likewise.
(classpath_libdir): Likewise.
(_Jv_bootclasspath): Likewise.
(_Jv_classpath): Likewise.
(_Jv_java_library_path): Likewise.

* src/vmcore/suck.c (suck_add_from_property): Use properties_get to
manipulate bootclasspath.

16 years ago* m4/classpath.m4 (AC_CHECK_WITH_CLASSPATH_CLASSES): Fixed typo.
twisti [Wed, 22 Aug 2007 16:56:45 +0000 (16:56 +0000)]
* m4/classpath.m4 (AC_CHECK_WITH_CLASSPATH_CLASSES): Fixed typo.

16 years ago* src/vm/vm.c (native/include/java_lang_Byte.h,
twisti [Wed, 22 Aug 2007 15:49:38 +0000 (15:49 +0000)]
* src/vm/vm.c (native/include/java_lang_Byte.h,
native/include/java_lang_Character.h,
native/include/java_lang_Short.h,
native/include/java_lang_Integer.h,
native/include/java_lang_Boolean.h,
native/include/java_lang_Long.h,
native/include/java_lang_Float.h,
native/include/java_lang_Double.h): Removed.

16 years ago* configure.ac (AC_CHECK_HEADERS): Added libgen.h.
twisti [Wed, 22 Aug 2007 15:47:25 +0000 (15:47 +0000)]
* configure.ac (AC_CHECK_HEADERS): Added libgen.h.
(AC_CHECK_FUNCS): Added dirname, readlink.

16 years ago* src/vmcore/class.h
panzi [Wed, 22 Aug 2007 13:12:46 +0000 (13:12 +0000)]
* src/vmcore/class.h
(class_get_annotations): Added. This function encapsulates the access to the
annotations field of the classinfo struct. It is defined even if
ENABLE_ANNOTATIONS is not, but just returns NULL in that case.

* src/vmcore/class.c
(class_get_annotations): Added.

* src/native/vm/java_lang_Class.c
(_Jv_java_lang_Class_getDeclaredAnnotations): Now uses class_get_annotations().

* src/native/vm/sun/jvm.c
(JVM_GetClassAnnotations): Now uses class_get_annotations().

16 years ago* m4/annotations.m4: Fixed comment.
panzi [Wed, 22 Aug 2007 01:19:00 +0000 (01:19 +0000)]
* m4/annotations.m4: Fixed comment.

16 years ago* src/lib/gnu/java/lang/reflect/Method.java
panzi [Wed, 22 Aug 2007 01:10:09 +0000 (01:10 +0000)]
* src/lib/gnu/java/lang/reflect/Method.java
(declaredAnnotations): Added generic type parameters to Class.

* src/lib/gnu/java/lang/reflect/Field.java
(declaredAnnotations): Added generic type parameters to Class.

* src/lib/gnu/java/lang/reflect/Constructor.java
(declaredAnnotations): Added generic type parameters to Class.

* src/lib/gnu/sun/reflect/annotation/AnnotationParser.java: Fixed formatting.
* src/native/vm/gnu/sun_reflect_ConstantPool.c
(Java_sun_reflect_ConstantPool_getMemberRefInfoAt0):
Fixed formatting of log output.

* src/native/vm/gnu/java_lang_reflect_Method.c
(Java_java_lang_reflect_Method_getDefaultValue),
(Java_java_lang_reflect_Method_declaredAnnotations),
(Java_java_lang_reflect_Method_getParameterAnnotations):
Use LLNI_class_get macro.

* src/native/vm/gnu/java_lang_reflect_Field.c
(Java_java_lang_reflect_Method_declaredAnnotations):
Use LLNI_class_get macro.

* src/native/vm/gnu/java_lang_reflect_Constructor.c
(Java_java_lang_reflect_Method_declaredAnnotations),
(Java_java_lang_reflect_Method_getParameterAnnotations):
Use LLNI_class_get macro.

* src/native/vm/sun/jvm.c
(JVM_GetClassConstantPool): Fixed formatting of log output.

* src/native/vm/reflect.c
(reflect_get_declaredannotatios): Fixed comment.

* src/vmcore/class.h
(classinfo): Added comments for annottation fields.

* src/vmcore/annotation.h
(annotation_t), (element_value_t): Removed unused structs.

16 years ago* src/mm/cacao-gc/gc.c (gc_init) [ENABLE_HANDLES]: Added offset check for
michi [Tue, 21 Aug 2007 21:04:37 +0000 (21:04 +0000)]
* src/mm/cacao-gc/gc.c (gc_init) [ENABLE_HANDLES]: Added offset check for
global reference entries.

--HG--
branch : exact-gc

16 years ago* src/native/jni.c (_Jv_JNI_DeleteLocalRef): Moved code to localref_del.
michi [Tue, 21 Aug 2007 20:34:27 +0000 (20:34 +0000)]
* src/native/jni.c (_Jv_JNI_DeleteLocalRef): Moved code to localref_del.

* src/native/localref.c (localref_add): Minor code cleanup.
(localref_del): Moved from jni.c and adapted to work with handles.

* src/native/localref.h (localref_del): Minor signature change.

--HG--
branch : exact-gc

16 years ago* src/native/jni.c: Used LLNI_classinfo_wrap to return classes.
michi [Tue, 21 Aug 2007 19:22:16 +0000 (19:22 +0000)]
* src/native/jni.c: Used LLNI_classinfo_wrap to return classes.
(_Jv_JNI_IsSameObject): Fixed implementation for handles.
(_Jv_JNI_NewLocalRef): Likewise.
(_Jv_JNI_SetObjectArrayElement): Use builtin_canstore correctly.
(_Jv_JNI_NewGlobalRef): Correct implementation for handles.
(_Jv_JNI_DeleteGlobalRef): Likewise.

--HG--
branch : exact-gc

16 years ago* src/vm/properties.c (properties_init): Moved setting java.home into
twisti [Tue, 21 Aug 2007 18:26:33 +0000 (18:26 +0000)]
* src/vm/properties.c (properties_init): Moved setting java.home into
WITH_CLASSPATH_GNU, otherwise it's done twice for WITH_CLASSPATH_SUN.

16 years ago* src/native/jni.c: Fixed LLNI macro usage.
michi [Tue, 21 Aug 2007 16:24:12 +0000 (16:24 +0000)]
* src/native/jni.c: Fixed LLNI macro usage.

--HG--
branch : exact-gc

16 years ago* src/vmcore/class.c (class_define): Added protection domain to
twisti [Tue, 21 Aug 2007 15:37:47 +0000 (15:37 +0000)]
* src/vmcore/class.c (class_define): Added protection domain to
signature.
(class_resolve_superclass): Some changes (not yet correct).
(class_issubclass): Added assert to see if super is resolved.

* src/vmcore/class.h (classinfo) [ENABLE_JAVASE &&
WITH_CLASSPATH_SUN]: Added protectiondomain.

* src/native/jni.c (_Jv_JNI_DefineClass): Pass protection domain to
class_define.
* src/native/vm/java_lang_ClassLoader.c (defineClass): Likewise.

* src/native/vm/sun_misc_Unsafe.c (unistd.h): Added.
(vm/builtin.h): Likewise.
(putShort__Ljava_lang_Object_2JS): Implemented.
(putFloat__Ljava_lang_Object_2JF): Likewise
(putInt__JI): Likewise
(pageSize): Likewise
(allocateInstance): Likewise
(getLongVolatile): Likewise
(defineClass__Ljava_lang_String_2_3BIILjava_lang_ClassLoader_2Ljava_security_ProtectionDomain_2):
Pass protection domain to class_define.

* src/native/vm/sun/jvm.c (threads/threads-common.h): Added.
(vm/signallocal.h): Likewise.
(PRINTJVMWARNINGS): New macro (not enabled yet).
(JVM_MaxMemory): Implemented.
(JVM_EnableCompiler): Likewise.
(JVM_DisableCompiler): Likewise.
(JVM_ResolveClass): Likewise.
(JVM_GetClassSignature): Likewise.
(JVM_Yield): Likewise.
(JVM_GetThreadStateValues): Likewise.
(JVM_GetThreadStateNames): Likewise.
(JVM_RegisterSignal): Likewise.
(JVM_FindSignal): Likewise.
(JVM_DefineClassWithSource): Pass protection domain to class_define.
(JVM_DesiredAssertionStatus): Return false for now.
(JVM_Available): Only ioctl is a correct implementation.

16 years ago* src/vm/access.c (access_is_accessible_class) [WITH_CLASSPATH_SUN]:
twisti [Tue, 21 Aug 2007 15:21:36 +0000 (15:21 +0000)]
* src/vm/access.c (access_is_accessible_class) [WITH_CLASSPATH_SUN]:
Check for referer, not cls.
(access_is_accessible_member) [WITH_CLASSPATH_SUN]: Check for referer,
not declarer.

16 years ago* src/native/vm/java_lang_Object.c (wait): Check for ms < 0.
twisti [Tue, 21 Aug 2007 15:12:38 +0000 (15:12 +0000)]
* src/native/vm/java_lang_Object.c (wait): Check for ms < 0.

16 years ago* src/native/vm/sun/jvm.c
panzi [Tue, 21 Aug 2007 14:44:31 +0000 (14:44 +0000)]
* src/native/vm/sun/jvm.c
(JVM_GetArrayLength): Now using function array_length_get().
(JVM_GetArrayElement): Now using function array_element_get().
(JVM_SetArrayElement): Implemented by using function array_element_set().

16 years ago* src/vm/array.c (vm/exceptions.h): Added.
twisti [Tue, 21 Aug 2007 14:04:59 +0000 (14:04 +0000)]
* src/vm/array.c (vm/exceptions.h): Added.
(vm/primitive.h): Likewise.
(array_element_get): New function.
(array_element_set): Likewise.
(array_element_primitive_get): Cast to specific array-type.
(array_element_primitive_set): New function.
(ARRAY_TYPEARRAY_ELEMENT_GET): Added NPE and AIOOBE checks.
(ARRAY_TYPEARRAY_ELEMENT_SET): New macro.
(array_length_get): New function.

* src/vm/array.h (array_element_get): New function.
(array_element_set): Likewise.
(array_booleanarray_element_get,
array_bytearray_element_get,
array_chararray_element_get,
array_shortarray_element_get,
array_intarray_element_get,
array_longarray_element_get,
array_floatarray_element_get,
array_doublearray_element_get,
array_objectarray_element_get): Changed signature.
(array_booleanarray_element_set,
array_bytearray_element_set,
array_chararray_element_set,
array_shortarray_element_set,
array_intarray_element_set,
array_longarray_element_set,
array_floatarray_element_set,
array_doublearray_element_set,
array_objectarray_element_set): New function.
(array_length_get): Likewise.

16 years ago* src/vm/properties.c (properties_init) [WITH_CLASSPATH_SUN]: Removed
twisti [Tue, 21 Aug 2007 13:05:42 +0000 (13:05 +0000)]
* src/vm/properties.c (properties_init) [WITH_CLASSPATH_SUN]: Removed
debug output.

16 years ago* configure.ac (AC_CHECK_FUNCS): Added access.
twisti [Tue, 21 Aug 2007 13:00:21 +0000 (13:00 +0000)]
* configure.ac (AC_CHECK_FUNCS): Added access.
* src/vm/properties.c (unistd.h): Added.
(properties_init) [WITH_CLASSPATH_SUN]: Find correct java.home.

16 years ago* src/vm/properties.c (properties_system_add): Use LLNI macros.
michi [Tue, 21 Aug 2007 12:43:00 +0000 (12:43 +0000)]
* src/vm/properties.c (properties_system_add): Use LLNI macros.
(properties_system_add_all): Likewise.

* src/vm/primitive.c (primitive_unbox): Likewise.

* src/native/vm/gnu/java_lang_reflect_Constructor.c: Fixed assertion.

* src/native/vm/java_lang_Thread.c: Fixed LLNI macro usage.

--HG--
branch : exact-gc

16 years ago* THIRDPARTY
panzi [Tue, 21 Aug 2007 12:42:41 +0000 (12:42 +0000)]
* THIRDPARTY
(src/lib/gnu/sun/reflect/ConstantPool.java),
(src/lib/gnu/sun/reflect/annotation/AnnotationParser.java),
(src/lib/gnu/sun/reflect/annotation/AnnotationType.java),
(src/lib/gnu/sun/reflect/annotation/AnnotationTypeMismatchExceptionProxy.java),
(src/lib/gnu/sun/reflect/annotation/TypeNotPresentExceptionProxy.java):
These files are licensed by sun under the GPLv2.

16 years ago* src/native/vm/nativevm.c [WITH_CLASSPATH_SUN] (string.h): Added.
twisti [Tue, 21 Aug 2007 11:18:01 +0000 (11:18 +0000)]
* src/native/vm/nativevm.c [WITH_CLASSPATH_SUN] (string.h): Added.
[WITH_CLASSPATH_SUN] (mm/memory.h): Likewise.
(nativevm_preinit) [WITH_CLASSPATH_SUN]: Use classpath_libdir variable
instead of CLASSPATH_LIBDIR. This is correct for WITH_JRE_LAYOUT.

16 years ago* src/cacaoh/headers.c (HEAP_PREFIX): Added define.
michi [Tue, 21 Aug 2007 11:16:03 +0000 (11:16 +0000)]
* src/cacaoh/headers.c (HEAP_PREFIX): Added define.
(printtype): Added arguments prefix and infix.
(printfields): Pass correct prefix for reference types.
(printmethod): Pass correct infix for array types.
(headerfile_generate): Print correct prefix for heap object.
(headerfile_generate) [ENABLE_HANDLES]: Also create struct typedef for handle.

--HG--
branch : exact-gc

16 years ago* m4/classpath.m4 (AC_CHECK_WITH_CLASSPATH_LIBDIR): Set
twisti [Tue, 21 Aug 2007 11:09:38 +0000 (11:09 +0000)]
* m4/classpath.m4 (AC_CHECK_WITH_CLASSPATH_LIBDIR): Set
CLASSPATH_LIBDIR correctly for OpenJDK.

16 years ago* configure.ac (AC_CHECK_ENABLE_STATICVM): Added.
twisti [Tue, 21 Aug 2007 11:04:23 +0000 (11:04 +0000)]
* configure.ac (AC_CHECK_ENABLE_STATICVM): Added.
* m4/staticvm.m4: New file.

16 years ago* src/mm/cacao-gc/gc.h (list_gcref_entry_t): Renamed type to reftype.
michi [Tue, 21 Aug 2007 10:20:33 +0000 (10:20 +0000)]
* src/mm/cacao-gc/gc.h (list_gcref_entry_t): Renamed type to reftype.
[!ENABLE_HANDLES]: Added development break.

* src/mm/cacao-gc/gc.c (gc_reference_register): Added reftype to arguments.

* src/mm/gc-common.h: Added reftype defines.
* src/mm/cacao-gc/rootset.h: Removed reftype defines.

* src/mm/cacao-gc/rootset.c: Adapted to changes.

* src/vmcore/loader.c (loader_hashtable_classloader_add): Pass reftype to GC.
* src/native/jni.c (_Jv_JNI_NewGlobalRef): Likewise.
* src/threads/native/threads.c (threads_init): Likewise.
* src/threads/threads-common.c (threads_thread_new): Likewise.
(threads_thread_print_info) [WITH_CLASSPATH_GNU]: Fixed thread name printing.

* src/cacaoh/dummy.c (gc_reference_register): Adapted dummy function to new sig.

--HG--
branch : exact-gc

16 years ago* m4/jre-layout.m4: Set Id keyword.
twisti [Mon, 20 Aug 2007 22:43:09 +0000 (22:43 +0000)]
* m4/jre-layout.m4: Set Id keyword.

16 years ago* configure.ac (AC_CHECK_WITH_JRE_LAYOUT): Added.
twisti [Mon, 20 Aug 2007 22:21:43 +0000 (22:21 +0000)]
* configure.ac (AC_CHECK_WITH_JRE_LAYOUT): Added.
* m4/jre-layout.m4: New file.

16 years ago* src/mm/boehm.c (heap_alloc_uncollectable): Fixed typo.
michi [Mon, 20 Aug 2007 22:05:08 +0000 (22:05 +0000)]
* src/mm/boehm.c (heap_alloc_uncollectable): Fixed typo.
* src/vm/jit/replace.h [!ENABLE_REPLACEMENT]: Added missing defines.

--HG--
branch : exact-gc

16 years ago* src/vm/signal.c (signal_thread): Removed debug output.
twisti [Mon, 20 Aug 2007 21:44:10 +0000 (21:44 +0000)]
* src/vm/signal.c (signal_thread): Removed debug output.
(signal_thread_handler): Likewise.

16 years ago* src/vmcore/loader.c: Fixed typos, LLNI_direct is called LLNI_DIRECT.
michi [Mon, 20 Aug 2007 21:39:32 +0000 (21:39 +0000)]
* src/vmcore/loader.c: Fixed typos, LLNI_direct is called LLNI_DIRECT.

--HG--
branch : exact-gc

16 years ago* src/native/Makefile.am: Added llni.c.
michi [Mon, 20 Aug 2007 21:36:53 +0000 (21:36 +0000)]
* src/native/Makefile.am: Added llni.c.

* src/native/llni.c: Added new file.
(llni_critical_start, llni_critical_end): Implemented.

* src/native/llni.h: Major cleanup of LLNI macros
(LLNI_CRITICAL_START, LLNI_CRITICAL_END): Added.

* src/cacaoh/dummy.c (llni_critical_start, llni_critical_end): Added dummies.

--HG--
branch : exact-gc

16 years ago* src/vmcore/utf8.c (utf_uncaughtException): Added.
twisti [Mon, 20 Aug 2007 20:26:16 +0000 (20:26 +0000)]
* src/vmcore/utf8.c (utf_uncaughtException): Added.
(utf_java_lang_Thread_java_lang_Throwable__V): Likewise.
(utf8_init): Initialize new variables.
* src/vmcore/utf8.h: Likewise.

16 years ago* src/threads/native/threads.c (threads_init) [WITH_CLASSPATH_SUN]:
twisti [Mon, 20 Aug 2007 20:24:35 +0000 (20:24 +0000)]
* src/threads/native/threads.c (threads_init) [WITH_CLASSPATH_SUN]:
Added code to initialize the thread.
(threads_startup_thread): Ignore the return value of
threads_detach_thread.
(threads_detach_thread) [ENABLE_JAVASE]: Implemented
UncaughtExceptionHandler stuff.

16 years ago* src/native/localref.c (localref_add): Disabled debug output.
michi [Mon, 20 Aug 2007 19:57:08 +0000 (19:57 +0000)]
* src/native/localref.c (localref_add): Disabled debug output.

--HG--
branch : exact-gc

16 years ago* src/native/localref.c (localref_add): Implemented (moved parts from jni.c).
michi [Mon, 20 Aug 2007 19:52:00 +0000 (19:52 +0000)]
* src/native/localref.c (localref_add): Implemented (moved parts from jni.c).
[!NDEBUG] (localref_dump): Improved debug output.

* src/native/localref.h: Added prototypes.

* src/native/jni.c (_Jv_JNI_NewLocalRef): Now uses localref_add.

--HG--
branch : exact-gc

16 years ago* src/native/vm/java_lang_Class.c (_Jv_java_lang_Class_getClassLoader)
michi [Mon, 20 Aug 2007 19:10:46 +0000 (19:10 +0000)]
* src/native/vm/java_lang_Class.c (_Jv_java_lang_Class_getClassLoader)
[ENABLE_HANDLES]: Fixed implementation.

* src/native/vm/gnu/java_lang_VMSystem.c
(Java_java_lang_VMSystem_identityHashCode) [ENABLE_GC_CACAO]: Likewise.

--HG--
branch : exact-gc

16 years ago* src/native/localref.c (localref_table_destroy): Added (moved from jni.c).
michi [Mon, 20 Aug 2007 18:35:26 +0000 (18:35 +0000)]
* src/native/localref.c (localref_table_destroy): Added (moved from jni.c).
Improved documentation.

* src/native/localref.h: Likewise.

* src/native/jni.c (jni_free_localref_table): Removed.

* src/vm/vm.c (vm_createjvm): Added comment about localreftable.

--HG--
branch : exact-gc

16 years ago* src/vm/jit/x86_64/codegen.c (codegen_emit_stub_builtin): Fixed bug in
michi [Mon, 20 Aug 2007 18:06:03 +0000 (18:06 +0000)]
* src/vm/jit/x86_64/codegen.c (codegen_emit_stub_builtin): Fixed bug in
stackframesize calculation.

--HG--
branch : exact-gc

16 years ago* src/vm/signal.c (signal_init): Use signal_register_signal to register SIGUSR1.
michi [Mon, 20 Aug 2007 18:02:50 +0000 (18:02 +0000)]
* src/vm/signal.c (signal_init): Use signal_register_signal to register SIGUSR1.

* src/vm/builtin.c: Adapted to changes on trunk.
* src/vm/builtin.h: Likewise.
* src/mm/cacao-gc/heap.h: Likewise.
* src/threads/threads-common.c: Likewise.
* src/threads/native/threads.c: Likewise.
* src/cacaoh/dummy.c: Likewise.

--HG--
branch : exact-gc

16 years ago* configure.ac: Checks for --enable-handles and sets define accordingly.
michi [Mon, 20 Aug 2007 17:02:14 +0000 (17:02 +0000)]
* configure.ac: Checks for --enable-handles and sets define accordingly.

* src/vm/global.h (java_handle_t): Changed ifdef to use ENABLE_HANDLES.

* src/vmcore/loader.c (load_class_from_classloader): Likewise

* src/mm/cacao-gc/gc.c (gc_init) [ENABLE_HANDLES]: Ifdefed offset check of
indirection cells.

--HG--
branch : exact-gc

16 years ago* src/vm/builtin.c (builtintable_init): Create builtin stubs for
michi [Mon, 20 Aug 2007 14:25:59 +0000 (14:25 +0000)]
* src/vm/builtin.c (builtintable_init): Create builtin stubs for
builtintable_function as well.

* src/vm/builtintable.inc (builtintable_function): Create stubs for arraycopy.

--HG--
branch : exact-gc

16 years ago* src/vm/string.c (javastring_intern): New function.
twisti [Sun, 19 Aug 2007 22:59:43 +0000 (22:59 +0000)]
* src/vm/string.c (javastring_intern): New function.
(javastring_print): Likewise.
* src/vm/stringlocal.h

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

* src/native/vm/cldc1.1/java_lang_String.c (intern): Use
javastring_intern.

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

* src/native/vm/gnu/java_lang_VMString.c (native/vm/java_lang_String.h):
Removed.
(intern): Use javastring_intern.

* src/native/vm/sun/jvm.c (native/vm/java_lang_String.h): Removed.
(JVM_GetSystemPackage): Added debug output.

* src/native/vm/reflect.c (native/vm/java_lang_String.h): Removed.
(reflect_field_new): Use javastring_intern.
(reflect_method_new): Likewise.

* src/native/vm/Makefile.am (libnativevm_la_SOURCES): Removed
java_lang_String.[ch].

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 agoMerged revisions 8321-8342 via svnmerge from
michi [Fri, 17 Aug 2007 21:39:32 +0000 (21:39 +0000)]
Merged revisions 8321-8342 via svnmerge from
svn+ssh://michi@c1.complang.tuwien.ac.at/ahome/cacao/svn/cacao/trunk

........
  r8322 | twisti | 2007-08-16 17:54:38 +0200 (Thu, 16 Aug 2007) | 16 lines

  * 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.
........
  r8323 | twisti | 2007-08-16 18:01:05 +0200 (Thu, 16 Aug 2007) | 3 lines

  * src/native/vm/sun/jvm.c (JVM_FindPrimitiveClass): Use TRACEJVMCALLS
  and a better implementation.
........
  r8325 | twisti | 2007-08-16 19:25:47 +0200 (Thu, 16 Aug 2007) | 7 lines

  * 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.
........
  r8326 | twisti | 2007-08-16 19:45:49 +0200 (Thu, 16 Aug 2007) | 12 lines

  * 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.
........
  r8327 | twisti | 2007-08-16 19:52:48 +0200 (Thu, 16 Aug 2007) | 8 lines

  * 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.
........
  r8328 | twisti | 2007-08-16 19:56:19 +0200 (Thu, 16 Aug 2007) | 3 lines

  * src/vm/vm.c (vm_array_from_objectarray): Use
  primitive_type_get_by_wrapperclass (typo). Removed debug output.
........
  r8329 | twisti | 2007-08-16 19:57:27 +0200 (Thu, 16 Aug 2007) | 3 lines

  * 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.
........
  r8330 | twisti | 2007-08-16 20:15:51 +0200 (Thu, 16 Aug 2007) | 25 lines

  * 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.
........
  r8331 | panzi | 2007-08-16 21:21:39 +0200 (Thu, 16 Aug 2007) | 16 lines

  * 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.
........
  r8332 | panzi | 2007-08-16 21:29:42 +0200 (Thu, 16 Aug 2007) | 5 lines

  * src/native/vm/sun/jvm.c
  (JVM_GetArrayElement): Used exceptions_new_arrayindexoutofboundsexception
  where exceptions_throw_arrayindexoutofboundsexception should have been used.
........
  r8333 | pm | 2007-08-16 23:46:32 +0200 (Thu, 16 Aug 2007) | 2 lines

  * src/native/vm/sun/jvm.c (JVM_GetProtectionDomain): Return NULL as default.
........
  r8334 | ajordan | 2007-08-17 00:10:43 +0200 (Fri, 17 Aug 2007) | 5 lines

  * 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.
........
  r8338 | panzi | 2007-08-17 22:03:06 +0200 (Fri, 17 Aug 2007) | 10 lines

  * 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.
........
  r8339 | twisti | 2007-08-17 23:21:51 +0200 (Fri, 17 Aug 2007) | 37 lines

  * 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.
........
  r8340 | twisti | 2007-08-17 23:28:29 +0200 (Fri, 17 Aug 2007) | 2 lines

  * src/native/vm/gnu/java_lang_VMClass.c (getEnclosingClass): Typo.
........
  r8341 | michi | 2007-08-17 23:32:01 +0200 (Fri, 17 Aug 2007) | 21 lines

  * 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
........

--HG--
branch : exact-gc

16 years ago* src/mm/cacao-gc/heap.c: Adapted to changes on trunk.
michi [Fri, 17 Aug 2007 21:37:42 +0000 (21:37 +0000)]
* src/mm/cacao-gc/heap.c: Adapted to changes on trunk.
* src/mm/cacao-gc/heap.h: Likewise.
* src/mm/cacao-gc/mark.c: Likewise.

--HG--
branch : exact-gc

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/native/native.h (hashtable_library_loader_entry): Classloader is
michi [Fri, 17 Aug 2007 18:41:19 +0000 (18:41 +0000)]
* src/native/native.h (hashtable_library_loader_entry): Classloader is
represented by the classloader typedef.

* src/native/native.c (native_library_add, native_library_find): Classloader
does not need to be registered again.

--HG--
branch : exact-gc

16 years ago* src/vmcore/class.h (classinfo): Added missing endif.
michi [Fri, 17 Aug 2007 11:09:20 +0000 (11:09 +0000)]
* src/vmcore/class.h (classinfo): Added missing endif.

--HG--
branch : exact-gc

16 years ago* src/vmcore/loader.c (load_class_from_classloader) [!ENABLE_GC_CACAO]: Pass
michi [Fri, 17 Aug 2007 11:04:35 +0000 (11:04 +0000)]
* src/vmcore/loader.c (load_class_from_classloader) [!ENABLE_GC_CACAO]: Pass
object instead of classloader entry to function.

* src/native/jni.c (_Jv_JNI_DefineClass): Register classloader.

* src/native/vm/gnu/java_lang_VMRuntime.c (Java_java_lang_VMRuntime_nativeLoad):
Likewise.

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

* src/native/vm/gnu/java_lang_VMClassLoader.c
(Java_java_lang_VMClassLoader_findLoadedClass): Search for classloader instead
of adding a new one.

* src/native/vm/java_lang_Class.c: Fixed compiler warning.

* src/native/vm/java_lang_ClassLoader.c: Likewise.

--HG--
branch : exact-gc

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.