From: michi Date: Sat, 11 Aug 2007 17:57:24 +0000 (+0000) Subject: * src/vm/global.h (java_handle_t): Added typedef. X-Git-Url: http://wien.tomnetworks.com/gitweb/?a=commitdiff_plain;h=910cbf961bf0e79bff9bcb1a9ddc59f5169d5555;p=cacao.git * 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 --- diff --git a/src/cacaoh/dummy.c b/src/cacaoh/dummy.c index 6b3272fce..2f8206949 100644 --- a/src/cacaoh/dummy.c +++ b/src/cacaoh/dummy.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: dummy.c 8288 2007-08-10 15:12:00Z twisti $ + $Id: dummy.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -53,7 +53,7 @@ char *_Jv_bootclasspath; -java_objectheader *javastring_new_slash_to_dot(utf *u) +java_handle_t *javastring_new_slash_to_dot(utf *u) { vm_abort("javastring_new_slash_to_dot"); @@ -102,7 +102,7 @@ void intrp_asm_getclassvalues_atomic(vftbl_t *super, vftbl_t *sub, castinfo *out /* builtin ********************************************************************/ -java_objectheader *builtin_clone(void *env, java_objectheader *o) +java_handle_t *builtin_clone(void *env, java_handle_t *o) { abort(); @@ -116,7 +116,7 @@ int32_t builtin_isanysubclass(classinfo *sub, classinfo *super) return 0; } -java_objectheader *builtin_new(classinfo *c) +java_handle_t *builtin_new(classinfo *c) { abort(); @@ -397,16 +397,16 @@ void jit_invalidate_code(methodinfo *m) /* lock ***********************************************************************/ -void lock_init_object_lock(java_objectheader *o) +void lock_init_object_lock(java_object_t *o) { } -bool lock_monitor_enter(java_objectheader *o) +bool lock_monitor_enter(java_object_t *o) { return true; } -bool lock_monitor_exit(java_objectheader *o) +bool lock_monitor_exit(java_object_t *o) { return true; } @@ -628,7 +628,7 @@ void vm_abort(const char *text, ...) abort(); } -java_objectheader *vm_call_method(methodinfo *m, java_objectheader *o, ...) +java_handle_t *vm_call_method(methodinfo *m, java_handle_t *o, ...) { return NULL; } @@ -641,7 +641,7 @@ void stringtable_update(void) log_println("stringtable_update: REMOVE ME!"); } -java_objectheader *literalstring_new(utf *u) +java_object_t *literalstring_new(utf *u) { log_println("literalstring_new: REMOVE ME!"); diff --git a/src/cacaoh/headers.c b/src/cacaoh/headers.c index 1016e30fd..2e597df29 100644 --- a/src/cacaoh/headers.c +++ b/src/cacaoh/headers.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: headers.c 8123 2007-06-20 23:50:55Z michi $ + $Id: headers.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -201,7 +201,7 @@ static char *printtype(char *utf_ptr) break; case 'L': - addoutputsize ( sizeof(java_objectheader*)); + addoutputsize ( sizeof(java_object_t*)); fprintf (file, "struct "); while ( (c = utf_nextu2(&utf_ptr)) != ';' ) printIDpart (c); fprintf (file, "*"); @@ -241,8 +241,8 @@ static void printfields(classinfo *c) int ident_count; if (!c) { - addoutputsize(sizeof(java_objectheader)); - fprintf(file, " java_objectheader header;\n"); + addoutputsize(sizeof(java_object_t)); + fprintf(file, " java_object_t header;\n"); return; } diff --git a/src/cacaoh/headers.h b/src/cacaoh/headers.h index e12c74de1..a404eff6b 100644 --- a/src/cacaoh/headers.h +++ b/src/cacaoh/headers.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: headers.h 7246 2007-01-29 18:49:05Z twisti $ + $Id: headers.h 8295 2007-08-11 17:57:24Z michi $ */ @@ -42,7 +42,8 @@ /* export variables ***********************************************************/ -extern java_objectheader *_exceptionptr; +#warning object or handle??? +extern java_object_t *_exceptionptr; extern chain *nativemethod_chain; extern chain *nativeclass_chain; extern chain *ident_chain; @@ -53,7 +54,7 @@ extern FILE *file; void printID(utf *u); void printOverloadPart(utf *desc); -void literalstring_free(java_objectheader *o); +void literalstring_free(java_object_t *o); void printmethod(methodinfo *m); void gen_header_filename(char *buffer, utf *u); void headerfile_generate(classinfo *c, char *opt_directory); diff --git a/src/mm/memory.c b/src/mm/memory.c index 6039e2abf..479e4c822 100644 --- a/src/mm/memory.c +++ b/src/mm/memory.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: memory.c 8112 2007-06-20 17:54:36Z twisti $ + $Id: memory.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -100,11 +100,11 @@ static dumpinfo_t _no_threads_dumpinfo; #define DEFAULT_CODE_MEMORY_SIZE 128 * 1024 /* defaulting to 128kB */ #if defined(ENABLE_THREADS) -static java_objectheader *lock_code_memory = NULL; +static java_object_t *lock_code_memory = NULL; #endif -static void *code_memory = NULL; -static int code_memory_size = 0; -static int pagesize = 0; +static void *code_memory = NULL; +static int code_memory_size = 0; +static int pagesize = 0; /* memory_init ***************************************************************** @@ -118,7 +118,7 @@ bool memory_init(void) #if defined(ENABLE_THREADS) /* create lock for code memory */ - lock_code_memory = NEW(java_objectheader); + lock_code_memory = NEW(java_object_t); lock_init_object_lock(lock_code_memory); #endif diff --git a/src/native/jni.c b/src/native/jni.c index 957188ec3..f4a2e8564 100644 --- a/src/native/jni.c +++ b/src/native/jni.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: jni.c 8291 2007-08-11 10:43:45Z twisti $ + $Id: jni.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -263,7 +263,7 @@ bool jni_init_localref_table(void) /* clear the references array (memset is faster then a for-loop) */ - MSET(lrt->refs, 0, java_objectheader*, LOCALREFTABLE_CAPACITY); + MSET(lrt->refs, 0, void*, LOCALREFTABLE_CAPACITY); LOCALREFTABLE = lrt; @@ -277,12 +277,12 @@ bool jni_init_localref_table(void) *******************************************************************************/ -static java_objectheader *_Jv_jni_CallObjectMethod(java_objectheader *o, - vftbl_t *vftbl, - methodinfo *m, va_list ap) +static java_handle_t *_Jv_jni_CallObjectMethod(java_handle_t *o, + vftbl_t *vftbl, + methodinfo *m, va_list ap) { - methodinfo *resm; - java_objectheader *ro; + methodinfo *resm; + java_handle_t *ro; STATISTICS(jniinvokation()); @@ -324,13 +324,13 @@ static java_objectheader *_Jv_jni_CallObjectMethod(java_objectheader *o, *******************************************************************************/ -static java_objectheader *_Jv_jni_CallObjectMethodA(java_objectheader *o, - vftbl_t *vftbl, - methodinfo *m, - const jvalue *args) +static java_handle_t *_Jv_jni_CallObjectMethodA(java_handle_t *o, + vftbl_t *vftbl, + methodinfo *m, + const jvalue *args) { - methodinfo *resm; - java_objectheader *ro; + methodinfo *resm; + java_handle_t *ro; STATISTICS(jniinvokation()); @@ -373,7 +373,7 @@ static java_objectheader *_Jv_jni_CallObjectMethodA(java_objectheader *o, *******************************************************************************/ -static jint _Jv_jni_CallIntMethod(java_objectheader *o, vftbl_t *vftbl, +static jint _Jv_jni_CallIntMethod(java_handle_t *o, vftbl_t *vftbl, methodinfo *m, va_list ap) { methodinfo *resm; @@ -420,7 +420,7 @@ static jint _Jv_jni_CallIntMethod(java_objectheader *o, vftbl_t *vftbl, *******************************************************************************/ -static jint _Jv_jni_CallIntMethodA(java_objectheader *o, vftbl_t *vftbl, +static jint _Jv_jni_CallIntMethodA(java_handle_t *o, vftbl_t *vftbl, methodinfo *m, const jvalue *args) { methodinfo *resm; @@ -466,7 +466,7 @@ static jint _Jv_jni_CallIntMethodA(java_objectheader *o, vftbl_t *vftbl, *******************************************************************************/ -static jlong _Jv_jni_CallLongMethod(java_objectheader *o, vftbl_t *vftbl, +static jlong _Jv_jni_CallLongMethod(java_handle_t *o, vftbl_t *vftbl, methodinfo *m, va_list ap) { methodinfo *resm; @@ -512,7 +512,7 @@ static jlong _Jv_jni_CallLongMethod(java_objectheader *o, vftbl_t *vftbl, *******************************************************************************/ -static jlong _Jv_jni_CallLongMethodA(java_objectheader *o, vftbl_t *vftbl, +static jlong _Jv_jni_CallLongMethodA(java_handle_t *o, vftbl_t *vftbl, methodinfo *m, const jvalue *args) { methodinfo *resm; @@ -558,7 +558,7 @@ static jlong _Jv_jni_CallLongMethodA(java_objectheader *o, vftbl_t *vftbl, *******************************************************************************/ -static jfloat _Jv_jni_CallFloatMethod(java_objectheader *o, vftbl_t *vftbl, +static jfloat _Jv_jni_CallFloatMethod(java_handle_t *o, vftbl_t *vftbl, methodinfo *m, va_list ap) { methodinfo *resm; @@ -597,7 +597,7 @@ static jfloat _Jv_jni_CallFloatMethod(java_objectheader *o, vftbl_t *vftbl, *******************************************************************************/ -static jfloat _Jv_jni_CallFloatMethodA(java_objectheader *o, vftbl_t *vftbl, +static jfloat _Jv_jni_CallFloatMethodA(java_handle_t *o, vftbl_t *vftbl, methodinfo *m, const jvalue *args) { methodinfo *resm; @@ -636,7 +636,7 @@ static jfloat _Jv_jni_CallFloatMethodA(java_objectheader *o, vftbl_t *vftbl, *******************************************************************************/ -static jdouble _Jv_jni_CallDoubleMethod(java_objectheader *o, vftbl_t *vftbl, +static jdouble _Jv_jni_CallDoubleMethod(java_handle_t *o, vftbl_t *vftbl, methodinfo *m, va_list ap) { methodinfo *resm; @@ -673,7 +673,7 @@ static jdouble _Jv_jni_CallDoubleMethod(java_objectheader *o, vftbl_t *vftbl, *******************************************************************************/ -static jdouble _Jv_jni_CallDoubleMethodA(java_objectheader *o, vftbl_t *vftbl, +static jdouble _Jv_jni_CallDoubleMethodA(java_handle_t *o, vftbl_t *vftbl, methodinfo *m, const jvalue *args) { methodinfo *resm; @@ -710,7 +710,7 @@ static jdouble _Jv_jni_CallDoubleMethodA(java_objectheader *o, vftbl_t *vftbl, *******************************************************************************/ -static void _Jv_jni_CallVoidMethod(java_objectheader *o, vftbl_t *vftbl, +static void _Jv_jni_CallVoidMethod(java_handle_t *o, vftbl_t *vftbl, methodinfo *m, va_list ap) { methodinfo *resm; @@ -751,7 +751,7 @@ static void _Jv_jni_CallVoidMethod(java_objectheader *o, vftbl_t *vftbl, *******************************************************************************/ -static void _Jv_jni_CallVoidMethodA(java_objectheader *o, vftbl_t *vftbl, +static void _Jv_jni_CallVoidMethodA(java_handle_t *o, vftbl_t *vftbl, methodinfo *m, const jvalue *args) { methodinfo *resm; @@ -797,16 +797,16 @@ static void _Jv_jni_CallVoidMethodA(java_objectheader *o, vftbl_t *vftbl, *******************************************************************************/ -java_objectheader *_Jv_jni_invokeNative(methodinfo *m, java_objectheader *o, - java_objectarray *params) +java_handle_t *_Jv_jni_invokeNative(methodinfo *m, java_handle_t *o, + java_objectarray *params) { - methodinfo *resm; - java_objectheader *ro; - s4 argcount; - s4 paramcount; - java_objectheader *xptr; - int32_t dumpsize; - uint64_t *array; + methodinfo *resm; + java_handle_t *ro; + s4 argcount; + s4 paramcount; + java_handle_t *xptr; + int32_t dumpsize; + uint64_t *array; imm_union value; if (m == NULL) { @@ -969,14 +969,14 @@ jclass _Jv_JNI_DefineClass(JNIEnv *env, const char *name, jobject loader, const jbyte *buf, jsize bufLen) { #if defined(ENABLE_JAVASE) - utf *u; - java_objectheader *cl; - classinfo *c; + utf *u; + classloader *cl; + classinfo *c; TRACEJNICALLS("_Jv_JNI_DefineClass(env=%p, name=%s, loader=%p, buf=%p, bufLen=%d", env, name, loader, buf, bufLen); u = utf_new_char(name); - cl = (java_objectheader *) loader; + cl = (classloader *) loader; c = class_define(u, cl, bufLen, (const uint8_t *) buf); @@ -1102,11 +1102,11 @@ jboolean _Jv_JNI_IsAssignableFrom(JNIEnv *env, jclass sub, jclass sup) jint _Jv_JNI_Throw(JNIEnv *env, jthrowable obj) { - java_objectheader *o; + java_handle_t *o; STATISTICS(jniinvokation()); - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; exceptions_set_exception(o); @@ -1124,9 +1124,9 @@ jint _Jv_JNI_Throw(JNIEnv *env, jthrowable obj) jint _Jv_JNI_ThrowNew(JNIEnv* env, jclass clazz, const char *msg) { - classinfo *c; - java_objectheader *o; - java_objectheader *s; + classinfo *c; + java_handle_t *o; + java_handle_t *s; STATISTICS(jniinvokation()); @@ -1158,7 +1158,7 @@ jint _Jv_JNI_ThrowNew(JNIEnv* env, jclass clazz, const char *msg) jthrowable _Jv_JNI_ExceptionOccurred(JNIEnv *env) { - java_objectheader *o; + java_handle_t *o; STATISTICS(jniinvokation()); @@ -1178,8 +1178,8 @@ jthrowable _Jv_JNI_ExceptionOccurred(JNIEnv *env) void _Jv_JNI_ExceptionDescribe(JNIEnv *env) { - java_objectheader *o; - methodinfo *m; + java_handle_t *o; + methodinfo *m; STATISTICS(jniinvokation()); @@ -1330,7 +1330,7 @@ jobject _Jv_JNI_PopLocalFrame(JNIEnv* env, jobject result) /* clear all reference entries */ - MSET(&lrt->refs[0], 0, java_objectheader*, lrt->capacity); + MSET(&lrt->refs[0], 0, void*, lrt->capacity); lrt->prev = NULL; @@ -1357,13 +1357,13 @@ jobject _Jv_JNI_PopLocalFrame(JNIEnv* env, jobject result) void _Jv_JNI_DeleteLocalRef(JNIEnv *env, jobject localRef) { - java_objectheader *o; - localref_table *lrt; - s4 i; + java_handle_t *o; + localref_table *lrt; + s4 i; STATISTICS(jniinvokation()); - o = (java_objectheader *) localRef; + o = (java_handle_t *) localRef; /* get local reference table (thread specific) */ @@ -1447,7 +1447,7 @@ jobject _Jv_JNI_NewLocalRef(JNIEnv *env, jobject ref) for (i = 0; i < lrt->capacity; i++) { if (lrt->refs[i] == NULL) { - lrt->refs[i] = (java_objectheader *) ref; + lrt->refs[i] = (java_handle_t *) ref; lrt->used++; return ref; @@ -1499,8 +1499,8 @@ jint _Jv_JNI_EnsureLocalCapacity(JNIEnv* env, jint capacity) jobject _Jv_JNI_AllocObject(JNIEnv *env, jclass clazz) { - classinfo *c; - java_objectheader *o; + classinfo *c; + java_handle_t *o; STATISTICS(jniinvokation()); @@ -1528,10 +1528,10 @@ jobject _Jv_JNI_AllocObject(JNIEnv *env, jclass clazz) jobject _Jv_JNI_NewObject(JNIEnv *env, jclass clazz, jmethodID methodID, ...) { - java_objectheader *o; - classinfo *c; - methodinfo *m; - va_list ap; + java_handle_t *o; + classinfo *c; + methodinfo *m; + va_list ap; STATISTICS(jniinvokation()); @@ -1568,9 +1568,9 @@ jobject _Jv_JNI_NewObject(JNIEnv *env, jclass clazz, jmethodID methodID, ...) jobject _Jv_JNI_NewObjectV(JNIEnv* env, jclass clazz, jmethodID methodID, va_list args) { - java_objectheader *o; - classinfo *c; - methodinfo *m; + java_handle_t *o; + classinfo *c; + methodinfo *m; STATISTICS(jniinvokation()); @@ -1605,9 +1605,9 @@ jobject _Jv_JNI_NewObjectV(JNIEnv* env, jclass clazz, jmethodID methodID, jobject _Jv_JNI_NewObjectA(JNIEnv* env, jclass clazz, jmethodID methodID, const jvalue *args) { - java_objectheader *o; - classinfo *c; - methodinfo *m; + java_handle_t *o; + classinfo *c; + methodinfo *m; STATISTICS(jniinvokation()); @@ -1637,12 +1637,12 @@ jobject _Jv_JNI_NewObjectA(JNIEnv* env, jclass clazz, jmethodID methodID, jclass _Jv_JNI_GetObjectClass(JNIEnv *env, jobject obj) { - java_objectheader *o; - classinfo *c; + java_handle_t *o; + classinfo *c; STATISTICS(jniinvokation()); - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; if ((o == NULL) || (o->vftbl == NULL)) return NULL; @@ -1685,14 +1685,14 @@ jboolean _Jv_JNI_IsInstanceOf(JNIEnv *env, jobject obj, jclass clazz) jmethodID _Jv_JNI_FromReflectedMethod(JNIEnv *env, jobject method) { #if defined(ENABLE_JAVASE) - java_objectheader *o; - classinfo *c; - methodinfo *m; - s4 slot; + java_handle_t *o; + classinfo *c; + methodinfo *m; + s4 slot; STATISTICS(jniinvokation()); - o = (java_objectheader *) method; + o = (java_handle_t *) method; if (o == NULL) return NULL; @@ -1879,12 +1879,12 @@ jmethodID _Jv_JNI_GetMethodID(JNIEnv* env, jclass clazz, const char *name, jobject _Jv_JNI_CallObjectMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) { - java_objectheader *o; - methodinfo *m; - java_objectheader *ret; - va_list ap; + java_handle_t *o; + methodinfo *m; + java_handle_t *ret; + va_list ap; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; m = (methodinfo *) methodID; va_start(ap, methodID); @@ -1898,11 +1898,11 @@ jobject _Jv_JNI_CallObjectMethod(JNIEnv *env, jobject obj, jmethodID methodID, jobject _Jv_JNI_CallObjectMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { - java_objectheader *o; - methodinfo *m; - java_objectheader *ret; + java_handle_t *o; + methodinfo *m; + java_handle_t *ret; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; m = (methodinfo *) methodID; ret = _Jv_jni_CallObjectMethod(o, o->vftbl, m, args); @@ -1914,11 +1914,11 @@ jobject _Jv_JNI_CallObjectMethodV(JNIEnv *env, jobject obj, jmethodID methodID, jobject _Jv_JNI_CallObjectMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) { - java_objectheader *o; - methodinfo *m; - java_objectheader *ret; + java_handle_t *o; + methodinfo *m; + java_handle_t *ret; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; m = (methodinfo *) methodID; ret = _Jv_jni_CallObjectMethodA(o, o->vftbl, m, args); @@ -1930,12 +1930,12 @@ jobject _Jv_JNI_CallObjectMethodA(JNIEnv *env, jobject obj, jmethodID methodID, jboolean _Jv_JNI_CallBooleanMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) { - java_objectheader *o; - methodinfo *m; - va_list ap; - jboolean b; + java_handle_t *o; + methodinfo *m; + va_list ap; + jboolean b; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; m = (methodinfo *) methodID; va_start(ap, methodID); @@ -1949,11 +1949,11 @@ jboolean _Jv_JNI_CallBooleanMethod(JNIEnv *env, jobject obj, jmethodID methodID, jboolean _Jv_JNI_CallBooleanMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { - java_objectheader *o; - methodinfo *m; - jboolean b; + java_handle_t *o; + methodinfo *m; + jboolean b; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; m = (methodinfo *) methodID; b = _Jv_jni_CallIntMethod(o, o->vftbl, m, args); @@ -1965,11 +1965,11 @@ jboolean _Jv_JNI_CallBooleanMethodV(JNIEnv *env, jobject obj, jboolean _Jv_JNI_CallBooleanMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) { - java_objectheader *o; - methodinfo *m; - jboolean b; + java_handle_t *o; + methodinfo *m; + jboolean b; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; m = (methodinfo *) methodID; b = _Jv_jni_CallIntMethodA(o, o->vftbl, m, args); @@ -1980,12 +1980,12 @@ jboolean _Jv_JNI_CallBooleanMethodA(JNIEnv *env, jobject obj, jbyte _Jv_JNI_CallByteMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) { - java_objectheader *o; - methodinfo *m; - va_list ap; - jbyte b; + java_handle_t *o; + methodinfo *m; + va_list ap; + jbyte b; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; m = (methodinfo *) methodID; va_start(ap, methodID); @@ -2000,11 +2000,11 @@ jbyte _Jv_JNI_CallByteMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) jbyte _Jv_JNI_CallByteMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { - java_objectheader *o; - methodinfo *m; - jbyte b; + java_handle_t *o; + methodinfo *m; + jbyte b; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; m = (methodinfo *) methodID; b = _Jv_jni_CallIntMethod(o, o->vftbl, m, args); @@ -2024,12 +2024,12 @@ jbyte _Jv_JNI_CallByteMethodA(JNIEnv *env, jobject obj, jmethodID methodID, jchar _Jv_JNI_CallCharMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) { - java_objectheader *o; - methodinfo *m; - va_list ap; - jchar c; + java_handle_t *o; + methodinfo *m; + va_list ap; + jchar c; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; m = (methodinfo *) methodID; va_start(ap, methodID); @@ -2043,11 +2043,11 @@ jchar _Jv_JNI_CallCharMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) jchar _Jv_JNI_CallCharMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { - java_objectheader *o; - methodinfo *m; - jchar c; + java_handle_t *o; + methodinfo *m; + jchar c; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; m = (methodinfo *) methodID; c = _Jv_jni_CallIntMethod(o, o->vftbl, m, args); @@ -2068,12 +2068,12 @@ jchar _Jv_JNI_CallCharMethodA(JNIEnv *env, jobject obj, jmethodID methodID, jshort _Jv_JNI_CallShortMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) { - java_objectheader *o; - methodinfo *m; - va_list ap; - jshort s; + java_handle_t *o; + methodinfo *m; + va_list ap; + jshort s; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; m = (methodinfo *) methodID; va_start(ap, methodID); @@ -2087,11 +2087,11 @@ jshort _Jv_JNI_CallShortMethod(JNIEnv *env, jobject obj, jmethodID methodID, jshort _Jv_JNI_CallShortMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { - java_objectheader *o; - methodinfo *m; - jshort s; + java_handle_t *o; + methodinfo *m; + jshort s; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; m = (methodinfo *) methodID; s = _Jv_jni_CallIntMethod(o, o->vftbl, m, args); @@ -2112,12 +2112,12 @@ jshort _Jv_JNI_CallShortMethodA(JNIEnv *env, jobject obj, jmethodID methodID, jint _Jv_JNI_CallIntMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) { - java_objectheader *o; - methodinfo *m; - va_list ap; - jint i; + java_handle_t *o; + methodinfo *m; + va_list ap; + jint i; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; m = (methodinfo *) methodID; va_start(ap, methodID); @@ -2131,11 +2131,11 @@ jint _Jv_JNI_CallIntMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) jint _Jv_JNI_CallIntMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { - java_objectheader *o; - methodinfo *m; - jint i; + java_handle_t *o; + methodinfo *m; + jint i; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; m = (methodinfo *) methodID; i = _Jv_jni_CallIntMethod(o, o->vftbl, m, args); @@ -2156,12 +2156,12 @@ jint _Jv_JNI_CallIntMethodA(JNIEnv *env, jobject obj, jmethodID methodID, jlong _Jv_JNI_CallLongMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) { - java_objectheader *o; - methodinfo *m; - va_list ap; - jlong l; + java_handle_t *o; + methodinfo *m; + va_list ap; + jlong l; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; m = (methodinfo *) methodID; va_start(ap, methodID); @@ -2175,11 +2175,11 @@ jlong _Jv_JNI_CallLongMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) jlong _Jv_JNI_CallLongMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { - java_objectheader *o; - methodinfo *m; - jlong l; + java_handle_t *o; + methodinfo *m; + jlong l; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; m = (methodinfo *) methodID; l = _Jv_jni_CallLongMethod(o, o->vftbl, m, args); @@ -2201,12 +2201,12 @@ jlong _Jv_JNI_CallLongMethodA(JNIEnv *env, jobject obj, jmethodID methodID, jfloat _Jv_JNI_CallFloatMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) { - java_objectheader *o; - methodinfo *m; - va_list ap; - jfloat f; + java_handle_t *o; + methodinfo *m; + va_list ap; + jfloat f; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; m = (methodinfo *) methodID; va_start(ap, methodID); @@ -2220,11 +2220,11 @@ jfloat _Jv_JNI_CallFloatMethod(JNIEnv *env, jobject obj, jmethodID methodID, jfloat _Jv_JNI_CallFloatMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { - java_objectheader *o; - methodinfo *m; - jfloat f; + java_handle_t *o; + methodinfo *m; + jfloat f; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; m = (methodinfo *) methodID; f = _Jv_jni_CallFloatMethod(o, o->vftbl, m, args); @@ -2246,12 +2246,12 @@ jfloat _Jv_JNI_CallFloatMethodA(JNIEnv *env, jobject obj, jmethodID methodID, jdouble _Jv_JNI_CallDoubleMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) { - java_objectheader *o; - methodinfo *m; - va_list ap; - jdouble d; + java_handle_t *o; + methodinfo *m; + va_list ap; + jdouble d; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; m = (methodinfo *) methodID; va_start(ap, methodID); @@ -2265,11 +2265,11 @@ jdouble _Jv_JNI_CallDoubleMethod(JNIEnv *env, jobject obj, jmethodID methodID, jdouble _Jv_JNI_CallDoubleMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { - java_objectheader *o; - methodinfo *m; - jdouble d; + java_handle_t *o; + methodinfo *m; + jdouble d; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; m = (methodinfo *) methodID; d = _Jv_jni_CallDoubleMethod(o, o->vftbl, m, args); @@ -2290,11 +2290,11 @@ jdouble _Jv_JNI_CallDoubleMethodA(JNIEnv *env, jobject obj, jmethodID methodID, void _Jv_JNI_CallVoidMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) { - java_objectheader *o; - methodinfo *m; - va_list ap; + java_handle_t *o; + methodinfo *m; + va_list ap; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; m = (methodinfo *) methodID; va_start(ap, methodID); @@ -2306,10 +2306,10 @@ void _Jv_JNI_CallVoidMethod(JNIEnv *env, jobject obj, jmethodID methodID, ...) void _Jv_JNI_CallVoidMethodV(JNIEnv *env, jobject obj, jmethodID methodID, va_list args) { - java_objectheader *o; - methodinfo *m; + java_handle_t *o; + methodinfo *m; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; m = (methodinfo *) methodID; _Jv_jni_CallVoidMethod(o, o->vftbl, m, args); @@ -2319,10 +2319,10 @@ void _Jv_JNI_CallVoidMethodV(JNIEnv *env, jobject obj, jmethodID methodID, void _Jv_JNI_CallVoidMethodA(JNIEnv *env, jobject obj, jmethodID methodID, const jvalue *args) { - java_objectheader *o; - methodinfo *m; + java_handle_t *o; + methodinfo *m; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; m = (methodinfo *) methodID; _Jv_jni_CallVoidMethodA(o, o->vftbl, m, args); @@ -2334,13 +2334,13 @@ jobject _Jv_JNI_CallNonvirtualObjectMethod(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...) { - java_objectheader *o; - classinfo *c; - methodinfo *m; - java_objectheader *r; - va_list ap; + java_handle_t *o; + classinfo *c; + methodinfo *m; + java_handle_t *r; + va_list ap; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; c = (classinfo *) clazz; m = (methodinfo *) methodID; @@ -2356,12 +2356,12 @@ jobject _Jv_JNI_CallNonvirtualObjectMethodV(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args) { - java_objectheader *o; - classinfo *c; - methodinfo *m; - java_objectheader *r; + java_handle_t *o; + classinfo *c; + methodinfo *m; + java_handle_t *r; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; c = (classinfo *) clazz; m = (methodinfo *) methodID; @@ -2386,13 +2386,13 @@ jboolean _Jv_JNI_CallNonvirtualBooleanMethod(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...) { - java_objectheader *o; - classinfo *c; - methodinfo *m; - va_list ap; - jboolean b; + java_handle_t *o; + classinfo *c; + methodinfo *m; + va_list ap; + jboolean b; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; c = (classinfo *) clazz; m = (methodinfo *) methodID; @@ -2408,12 +2408,12 @@ jboolean _Jv_JNI_CallNonvirtualBooleanMethodV(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args) { - java_objectheader *o; - classinfo *c; - methodinfo *m; - jboolean b; + java_handle_t *o; + classinfo *c; + methodinfo *m; + jboolean b; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; c = (classinfo *) clazz; m = (methodinfo *) methodID; @@ -2436,13 +2436,13 @@ jboolean _Jv_JNI_CallNonvirtualBooleanMethodA(JNIEnv *env, jobject obj, jbyte _Jv_JNI_CallNonvirtualByteMethod(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...) { - java_objectheader *o; - classinfo *c; - methodinfo *m; - va_list ap; - jbyte b; + java_handle_t *o; + classinfo *c; + methodinfo *m; + va_list ap; + jbyte b; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; c = (classinfo *) clazz; m = (methodinfo *) methodID; @@ -2457,12 +2457,12 @@ jbyte _Jv_JNI_CallNonvirtualByteMethod(JNIEnv *env, jobject obj, jclass clazz, jbyte _Jv_JNI_CallNonvirtualByteMethodV(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args) { - java_objectheader *o; - classinfo *c; - methodinfo *m; - jbyte b; + java_handle_t *o; + classinfo *c; + methodinfo *m; + jbyte b; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; c = (classinfo *) clazz; m = (methodinfo *) methodID; @@ -2485,13 +2485,13 @@ jbyte _Jv_JNI_CallNonvirtualByteMethodA(JNIEnv *env, jobject obj, jclass clazz, jchar _Jv_JNI_CallNonvirtualCharMethod(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...) { - java_objectheader *o; - classinfo *c; - methodinfo *m; - va_list ap; - jchar ch; + java_handle_t *o; + classinfo *c; + methodinfo *m; + va_list ap; + jchar ch; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; c = (classinfo *) clazz; m = (methodinfo *) methodID; @@ -2506,12 +2506,12 @@ jchar _Jv_JNI_CallNonvirtualCharMethod(JNIEnv *env, jobject obj, jclass clazz, jchar _Jv_JNI_CallNonvirtualCharMethodV(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args) { - java_objectheader *o; - classinfo *c; - methodinfo *m; - jchar ch; + java_handle_t *o; + classinfo *c; + methodinfo *m; + jchar ch; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; c = (classinfo *) clazz; m = (methodinfo *) methodID; @@ -2534,13 +2534,13 @@ jchar _Jv_JNI_CallNonvirtualCharMethodA(JNIEnv *env, jobject obj, jclass clazz, jshort _Jv_JNI_CallNonvirtualShortMethod(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...) { - java_objectheader *o; - classinfo *c; - methodinfo *m; - va_list ap; - jshort s; + java_handle_t *o; + classinfo *c; + methodinfo *m; + va_list ap; + jshort s; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; c = (classinfo *) clazz; m = (methodinfo *) methodID; @@ -2556,12 +2556,12 @@ jshort _Jv_JNI_CallNonvirtualShortMethodV(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args) { - java_objectheader *o; - classinfo *c; - methodinfo *m; - jshort s; + java_handle_t *o; + classinfo *c; + methodinfo *m; + jshort s; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; c = (classinfo *) clazz; m = (methodinfo *) methodID; @@ -2585,13 +2585,13 @@ jshort _Jv_JNI_CallNonvirtualShortMethodA(JNIEnv *env, jobject obj, jint _Jv_JNI_CallNonvirtualIntMethod(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...) { - java_objectheader *o; - classinfo *c; - methodinfo *m; - va_list ap; - jint i; + java_handle_t *o; + classinfo *c; + methodinfo *m; + va_list ap; + jint i; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; c = (classinfo *) clazz; m = (methodinfo *) methodID; @@ -2606,12 +2606,12 @@ jint _Jv_JNI_CallNonvirtualIntMethod(JNIEnv *env, jobject obj, jclass clazz, jint _Jv_JNI_CallNonvirtualIntMethodV(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args) { - java_objectheader *o; - classinfo *c; - methodinfo *m; - jint i; + java_handle_t *o; + classinfo *c; + methodinfo *m; + jint i; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; c = (classinfo *) clazz; m = (methodinfo *) methodID; @@ -2634,13 +2634,13 @@ jint _Jv_JNI_CallNonvirtualIntMethodA(JNIEnv *env, jobject obj, jclass clazz, jlong _Jv_JNI_CallNonvirtualLongMethod(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...) { - java_objectheader *o; - classinfo *c; - methodinfo *m; - va_list ap; - jlong l; + java_handle_t *o; + classinfo *c; + methodinfo *m; + va_list ap; + jlong l; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; c = (classinfo *) clazz; m = (methodinfo *) methodID; @@ -2655,12 +2655,12 @@ jlong _Jv_JNI_CallNonvirtualLongMethod(JNIEnv *env, jobject obj, jclass clazz, jlong _Jv_JNI_CallNonvirtualLongMethodV(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args) { - java_objectheader *o; - classinfo *c; - methodinfo *m; - jlong l; + java_handle_t *o; + classinfo *c; + methodinfo *m; + jlong l; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; c = (classinfo *) clazz; m = (methodinfo *) methodID; @@ -2683,13 +2683,13 @@ jlong _Jv_JNI_CallNonvirtualLongMethodA(JNIEnv *env, jobject obj, jclass clazz, jfloat _Jv_JNI_CallNonvirtualFloatMethod(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...) { - java_objectheader *o; - classinfo *c; - methodinfo *m; - va_list ap; - jfloat f; + java_handle_t *o; + classinfo *c; + methodinfo *m; + va_list ap; + jfloat f; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; c = (classinfo *) clazz; m = (methodinfo *) methodID; @@ -2705,12 +2705,12 @@ jfloat _Jv_JNI_CallNonvirtualFloatMethodV(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args) { - java_objectheader *o; - classinfo *c; - methodinfo *m; - jfloat f; + java_handle_t *o; + classinfo *c; + methodinfo *m; + jfloat f; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; c = (classinfo *) clazz; m = (methodinfo *) methodID; @@ -2735,13 +2735,13 @@ jdouble _Jv_JNI_CallNonvirtualDoubleMethod(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...) { - java_objectheader *o; - classinfo *c; - methodinfo *m; - va_list ap; - jdouble d; + java_handle_t *o; + classinfo *c; + methodinfo *m; + va_list ap; + jdouble d; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; c = (classinfo *) clazz; m = (methodinfo *) methodID; @@ -2757,12 +2757,12 @@ jdouble _Jv_JNI_CallNonvirtualDoubleMethodV(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args) { - java_objectheader *o; - classinfo *c; - methodinfo *m; - jdouble d; + java_handle_t *o; + classinfo *c; + methodinfo *m; + jdouble d; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; c = (classinfo *) clazz; m = (methodinfo *) methodID; @@ -2786,12 +2786,12 @@ jdouble _Jv_JNI_CallNonvirtualDoubleMethodA(JNIEnv *env, jobject obj, void _Jv_JNI_CallNonvirtualVoidMethod(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, ...) { - java_objectheader *o; - classinfo *c; - methodinfo *m; - va_list ap; + java_handle_t *o; + classinfo *c; + methodinfo *m; + va_list ap; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; c = (classinfo *) clazz; m = (methodinfo *) methodID; @@ -2804,11 +2804,11 @@ void _Jv_JNI_CallNonvirtualVoidMethod(JNIEnv *env, jobject obj, jclass clazz, void _Jv_JNI_CallNonvirtualVoidMethodV(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, va_list args) { - java_objectheader *o; - classinfo *c; - methodinfo *m; + java_handle_t *o; + classinfo *c; + methodinfo *m; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; c = (classinfo *) clazz; m = (methodinfo *) methodID; @@ -2819,11 +2819,11 @@ void _Jv_JNI_CallNonvirtualVoidMethodV(JNIEnv *env, jobject obj, jclass clazz, void _Jv_JNI_CallNonvirtualVoidMethodA(JNIEnv *env, jobject obj, jclass clazz, jmethodID methodID, const jvalue * args) { - java_objectheader *o; - classinfo *c; - methodinfo *m; + java_handle_t *o; + classinfo *c; + methodinfo *m; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; c = (classinfo *) clazz; m = (methodinfo *) methodID; @@ -2878,11 +2878,12 @@ jfieldID _Jv_JNI_GetFieldID(JNIEnv *env, jclass clazz, const char *name, jobject _Jv_JNI_GetObjectField(JNIEnv *env, jobject obj, jfieldID fieldID) { - java_objectheader *o; + java_handle_t *o; STATISTICS(jniinvokation()); - o = GET_FIELD(obj, java_objectheader*, fieldID); +#warning this needs to be fixed + o = GET_FIELD(obj, java_handle_t*, fieldID); return _Jv_JNI_NewLocalRef(env, (jobject) o); } @@ -2938,16 +2939,11 @@ jshort _Jv_JNI_GetShortField(JNIEnv *env, jobject obj, jfieldID fieldID) jint _Jv_JNI_GetIntField(JNIEnv *env, jobject obj, jfieldID fieldID) { - java_objectheader *o; - fieldinfo *f; s4 i; STATISTICS(jniinvokation()); - o = (java_objectheader *) obj; - f = (fieldinfo *) fieldID; - - i = GET_FIELD(o, s4, f); + i = GET_FIELD(obj, s4, fieldID); return i; } @@ -3002,7 +2998,8 @@ void _Jv_JNI_SetObjectField(JNIEnv *env, jobject obj, jfieldID fieldID, { STATISTICS(jniinvokation()); - SET_FIELD(obj, java_objectheader*, fieldID, value); +#warning this needs to be fixed + SET_FIELD(obj, java_handle_t*, fieldID, value); } @@ -3128,9 +3125,9 @@ jmethodID _Jv_JNI_GetStaticMethodID(JNIEnv *env, jclass clazz, const char *name, jobject _Jv_JNI_CallStaticObjectMethod(JNIEnv *env, jclass clazz, jmethodID methodID, ...) { - methodinfo *m; - java_objectheader *o; - va_list ap; + methodinfo *m; + java_handle_t *o; + va_list ap; m = (methodinfo *) methodID; @@ -3145,8 +3142,8 @@ jobject _Jv_JNI_CallStaticObjectMethod(JNIEnv *env, jclass clazz, jobject _Jv_JNI_CallStaticObjectMethodV(JNIEnv *env, jclass clazz, jmethodID methodID, va_list args) { - methodinfo *m; - java_objectheader *o; + methodinfo *m; + java_handle_t *o; m = (methodinfo *) methodID; @@ -3159,8 +3156,8 @@ jobject _Jv_JNI_CallStaticObjectMethodV(JNIEnv *env, jclass clazz, jobject _Jv_JNI_CallStaticObjectMethodA(JNIEnv *env, jclass clazz, jmethodID methodID, const jvalue *args) { - methodinfo *m; - java_objectheader *o; + methodinfo *m; + java_handle_t *o; m = (methodinfo *) methodID; @@ -4159,7 +4156,7 @@ const char *_Jv_JNI_GetStringUTFChars(JNIEnv *env, jstring string, if (isCopy) *isCopy = JNI_TRUE; - u = javastring_toutf((java_objectheader *) string, false); + u = javastring_toutf((java_handle_t *) string, false); if (u != NULL) return u->text; @@ -4217,14 +4214,14 @@ jobjectArray _Jv_JNI_NewObjectArray(JNIEnv *env, jsize length, jclass elementClass, jobject initialElement) { classinfo *c; - java_objectheader *o; + java_handle_t *o; java_objectarray *oa; s4 i; STATISTICS(jniinvokation()); c = (classinfo *) elementClass; - o = (java_objectheader *) initialElement; + o = (java_handle_t *) initialElement; if (length < 0) { exceptions_throw_negativearraysizeexception(); @@ -4248,8 +4245,8 @@ jobjectArray _Jv_JNI_NewObjectArray(JNIEnv *env, jsize length, jobject _Jv_JNI_GetObjectArrayElement(JNIEnv *env, jobjectArray array, jsize index) { - java_objectarray *oa; - java_objectheader *o; + java_objectarray *oa; + java_handle_t *o; STATISTICS(jniinvokation()); @@ -4269,13 +4266,13 @@ jobject _Jv_JNI_GetObjectArrayElement(JNIEnv *env, jobjectArray array, void _Jv_JNI_SetObjectArrayElement(JNIEnv *env, jobjectArray array, jsize index, jobject val) { - java_objectarray *oa; - java_objectheader *o; + java_objectarray *oa; + java_handle_t *o; STATISTICS(jniinvokation()); oa = (java_objectarray *) array; - o = (java_objectheader *) val; + o = (java_handle_t *) val; if (index >= oa->header.size) { exceptions_throw_arrayindexoutofboundsexception(); @@ -5341,11 +5338,11 @@ jobject _Jv_JNI_NewGlobalRef(JNIEnv* env, jobject obj) hashtable_global_ref_entry *gre; u4 key; /* hashkey */ u4 slot; /* slot in hashtable */ - java_objectheader *o; + java_handle_t *o; STATISTICS(jniinvokation()); - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; LOCK_MONITOR_ENTER(hashtable_global_ref->header); @@ -5406,11 +5403,11 @@ void _Jv_JNI_DeleteGlobalRef(JNIEnv* env, jobject globalRef) hashtable_global_ref_entry *prevgre; u4 key; /* hashkey */ u4 slot; /* slot in hashtable */ - java_objectheader *o; + java_handle_t *o; STATISTICS(jniinvokation()); - o = (java_objectheader *) globalRef; + o = (java_handle_t *) globalRef; LOCK_MONITOR_ENTER(hashtable_global_ref->header); @@ -5469,7 +5466,7 @@ void _Jv_JNI_DeleteGlobalRef(JNIEnv* env, jobject globalRef) jboolean _Jv_JNI_ExceptionCheck(JNIEnv *env) { - java_objectheader *o; + java_handle_t *o; STATISTICS(jniinvokation()); @@ -5492,7 +5489,7 @@ jboolean _Jv_JNI_ExceptionCheck(JNIEnv *env) jobject _Jv_JNI_NewDirectByteBuffer(JNIEnv *env, void *address, jlong capacity) { #if defined(ENABLE_JAVASE) && defined(WITH_CLASSPATH_GNU) - java_objectheader *nbuf; + java_handle_t *nbuf; # if SIZEOF_VOID_P == 8 gnu_classpath_Pointer64 *paddress; @@ -5596,13 +5593,13 @@ void *_Jv_JNI_GetDirectBufferAddress(JNIEnv *env, jobject buf) jlong _Jv_JNI_GetDirectBufferCapacity(JNIEnv* env, jobject buf) { #if defined(ENABLE_JAVASE) && defined(WITH_CLASSPATH_GNU) - java_objectheader *o; - java_nio_Buffer *nbuf; - jlong capacity; + java_handle_t *o; + java_nio_Buffer *nbuf; + jlong capacity; STATISTICS(jniinvokation()); - o = (java_objectheader *) buf; + o = (java_handle_t *) buf; if (!builtin_instanceof(o, class_java_nio_DirectByteBufferImpl)) return -1; diff --git a/src/native/jni.h b/src/native/jni.h index 8848d5245..7ca7dc983 100644 --- a/src/native/jni.h +++ b/src/native/jni.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: jni.h 8132 2007-06-22 11:15:47Z twisti $ + $Id: jni.h 8295 2007-08-11 17:57:24Z michi $ */ @@ -116,7 +116,7 @@ struct localref_table { s4 localframes; /* number of current frames */ s4 PADDING; /* 8-byte padding */ localref_table *prev; /* link to prev table (LocalFrame) */ - java_objectheader *refs[LOCALREFTABLE_CAPACITY]; /* references */ + java_object_t *refs[LOCALREFTABLE_CAPACITY]; /* references */ }; #if defined(ENABLE_THREADS) @@ -133,7 +133,7 @@ extern localref_table *_no_threads_localref_table; typedef struct hashtable_global_ref_entry hashtable_global_ref_entry; struct hashtable_global_ref_entry { - java_objectheader *o; /* object pointer of global ref */ + java_object_t *o; /* object pointer of global ref */ s4 refs; /* references of the current pointer */ hashtable_global_ref_entry *hashlink; /* link for external chaining */ }; @@ -145,7 +145,7 @@ struct hashtable_global_ref_entry { bool jni_init(void); bool jni_init_localref_table(void); -java_objectheader *_Jv_jni_invokeNative(methodinfo *m, java_objectheader *o, +java_handle_t *_Jv_jni_invokeNative(methodinfo *m, java_handle_t *o, java_objectarray *params); #endif /* _JNI_H */ diff --git a/src/native/native.c b/src/native/native.c index 3d38089c6..53bb49cf9 100644 --- a/src/native/native.c +++ b/src/native/native.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: native.c 8166 2007-06-29 19:45:17Z twisti $ + $Id: native.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -557,8 +557,7 @@ lt_dlhandle native_library_open(utf *filename) *******************************************************************************/ #if defined(ENABLE_LTDL) -void native_library_add(utf *filename, java_objectheader *loader, - lt_dlhandle handle) +void native_library_add(utf *filename, classloader *loader, lt_dlhandle handle) { hashtable_library_loader_entry *le; hashtable_library_name_entry *ne; /* library name */ @@ -641,7 +640,7 @@ void native_library_add(utf *filename, java_objectheader *loader, #if defined(ENABLE_LTDL) hashtable_library_name_entry *native_library_find(utf *filename, - java_objectheader *loader) + classloader *loader) { hashtable_library_loader_entry *le; hashtable_library_name_entry *ne; /* library name */ @@ -750,7 +749,7 @@ functionptr native_findfunction(utf *cname, utf *mname, utf *desc, functionptr native_resolve_function(methodinfo *m) { - java_objectheader *cl; + classloader *cl; utf *name; utf *newname; functionptr f; @@ -762,7 +761,7 @@ functionptr native_resolve_function(methodinfo *m) #endif #if defined(WITH_CLASSPATH_SUN) methodinfo *method_findNative; - java_objectheader *s; + java_handle_t *s; #endif cl = m->class->classloader; @@ -892,10 +891,10 @@ functionptr native_resolve_function(methodinfo *m) *******************************************************************************/ -java_objectheader *native_new_and_init(classinfo *c) +java_handle_t *native_new_and_init(classinfo *c) { - methodinfo *m; - java_objectheader *o; + methodinfo *m; + java_handle_t *o; if (c == NULL) vm_abort("native_new_and_init: c == NULL"); @@ -925,10 +924,10 @@ java_objectheader *native_new_and_init(classinfo *c) } -java_objectheader *native_new_and_init_string(classinfo *c, java_objectheader *s) +java_handle_t *native_new_and_init_string(classinfo *c, java_handle_t *s) { - methodinfo *m; - java_objectheader *o; + methodinfo *m; + java_handle_t *o; if (c == NULL) vm_abort("native_new_and_init_string: c == NULL"); diff --git a/src/native/native.h b/src/native/native.h index b5b1631c7..5ed65384e 100644 --- a/src/native/native.h +++ b/src/native/native.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: native.h 8167 2007-06-29 20:27:41Z twisti $ + $Id: native.h 8295 2007-08-11 17:57:24Z michi $ */ @@ -79,7 +79,7 @@ typedef struct hashtable_library_loader_entry hashtable_library_loader_entry; typedef struct hashtable_library_name_entry hashtable_library_name_entry; struct hashtable_library_loader_entry { - java_objectheader *loader; /* class loader */ + classloader *loader; /* class loader */ hashtable_library_name_entry *namelink;/* libs loaded by this loader */ hashtable_library_loader_entry *hashlink;/* link for external chaining */ }; @@ -132,20 +132,19 @@ functionptr native_findfunction(utf *cname, utf *mname, utf *desc, # if defined(ENABLE_LTDL) lt_dlhandle native_library_open(utf *filename); -void native_library_add(utf *filename, java_objectheader *loader, +void native_library_add(utf *filename, classloader *loader, lt_dlhandle handle); hashtable_library_name_entry *native_library_find(utf *filename, - java_objectheader *loader); + classloader *loader); # endif functionptr native_resolve_function(methodinfo *m); #endif /* defined(WITH_STATIC_CLASSPATH) */ -java_objectheader *native_new_and_init(classinfo *c); +java_handle_t *native_new_and_init(classinfo *c); -java_objectheader *native_new_and_init_string(classinfo *c, - java_objectheader *s); +java_handle_t *native_new_and_init_string(classinfo *c, java_handle_t *s); #endif /* _NATIVE_H */ diff --git a/src/native/vm/cldc1.1/com_sun_cldchi_jvm_JVM.c b/src/native/vm/cldc1.1/com_sun_cldchi_jvm_JVM.c index c9e82a7b7..3db610c64 100644 --- a/src/native/vm/cldc1.1/com_sun_cldchi_jvm_JVM.c +++ b/src/native/vm/cldc1.1/com_sun_cldchi_jvm_JVM.c @@ -85,7 +85,7 @@ JNIEXPORT void JNICALL Java_com_sun_cldchi_jvm_JVM_loadLibrary(JNIEnv *env, jcla /* check for error and throw one in case */ if (result == 0) { - name = javastring_toutf((java_objectheader *) libName, false); + name = javastring_toutf((java_handle_t *) libName, false); exceptions_throw_unsatisfiedlinkerror(name); } } diff --git a/src/native/vm/cldc1.1/java_lang_Class.c b/src/native/vm/cldc1.1/java_lang_Class.c index dd4ff460c..1a6a39af2 100644 --- a/src/native/vm/cldc1.1/java_lang_Class.c +++ b/src/native/vm/cldc1.1/java_lang_Class.c @@ -87,8 +87,8 @@ JNIEXPORT java_lang_Class* JNICALL Java_java_lang_Class_forName(JNIEnv *env, jcl */ JNIEXPORT java_lang_Object* JNICALL Java_java_lang_Class_newInstance(JNIEnv *env, java_lang_Class* this) { - classinfo *c; - java_objectheader *o; + classinfo *c; + java_handle_t *o; c = (classinfo *) this; diff --git a/src/native/vm/cldc1.1/java_lang_Object.c b/src/native/vm/cldc1.1/java_lang_Object.c index 369e21e16..d9b844af8 100644 --- a/src/native/vm/cldc1.1/java_lang_Object.c +++ b/src/native/vm/cldc1.1/java_lang_Object.c @@ -78,10 +78,10 @@ void _Jv_java_lang_Object_init(void) */ JNIEXPORT java_lang_Class* JNICALL Java_java_lang_Object_getClass(JNIEnv *env, java_lang_Object *obj) { - java_objectheader *o; - classinfo *c; + java_handle_t *o; + classinfo *c; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; if (o == NULL) return NULL; diff --git a/src/native/vm/cldc1.1/java_lang_String.c b/src/native/vm/cldc1.1/java_lang_String.c index ad60b48bd..7d2dc5353 100644 --- a/src/native/vm/cldc1.1/java_lang_String.c +++ b/src/native/vm/cldc1.1/java_lang_String.c @@ -246,7 +246,7 @@ JNIEXPORT s4 JNICALL Java_java_lang_String_equals(JNIEnv *env, java_lang_String* */ JNIEXPORT java_lang_String* JNICALL Java_java_lang_String_intern(JNIEnv *env, java_lang_String *this) { - java_objectheader *o; + java_handle_t *o; if (this == NULL) return NULL; diff --git a/src/native/vm/cldc1.1/java_lang_System.c b/src/native/vm/cldc1.1/java_lang_System.c index 3547a504b..25097feec 100644 --- a/src/native/vm/cldc1.1/java_lang_System.c +++ b/src/native/vm/cldc1.1/java_lang_System.c @@ -92,12 +92,12 @@ JNIEXPORT void JNICALL Java_java_lang_System_arraycopy(JNIEnv *env, jclass clazz JNIEXPORT java_lang_String* JNICALL Java_java_lang_System_getProperty0(JNIEnv *env, jclass clazz, java_lang_String *s) { - java_objectheader *so; - char* key; - char* value; - java_objectheader *result; + java_handle_t *so; + char* key; + char* value; + java_handle_t *result; - so = (java_objectheader *) s; + so = (java_handle_t *) s; /* build an ASCII string out of the java/lang/String passed */ diff --git a/src/native/vm/cldc1.1/java_lang_Throwable.c b/src/native/vm/cldc1.1/java_lang_Throwable.c index 68f86c537..e13bdef6d 100644 --- a/src/native/vm/cldc1.1/java_lang_Throwable.c +++ b/src/native/vm/cldc1.1/java_lang_Throwable.c @@ -74,9 +74,9 @@ void _Jv_java_lang_Throwable_init(void) */ JNIEXPORT void JNICALL Java_java_lang_Throwable_printStackTrace(JNIEnv *env, java_lang_Throwable *this) { - java_objectheader *o; + java_handle_t *o; - o = (java_objectheader *) this; + o = (java_handle_t *) this; exceptions_print_exception(o); stacktrace_print_trace(o); diff --git a/src/native/vm/gnu/gnu_classpath_VMStackWalker.c b/src/native/vm/gnu/gnu_classpath_VMStackWalker.c index 7df2bd89a..5e800e07d 100644 --- a/src/native/vm/gnu/gnu_classpath_VMStackWalker.c +++ b/src/native/vm/gnu/gnu_classpath_VMStackWalker.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: gnu_classpath_VMStackWalker.c 7910 2007-05-16 08:02:52Z twisti $ + $Id: gnu_classpath_VMStackWalker.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -114,9 +114,9 @@ JNIEXPORT java_lang_Class* JNICALL Java_gnu_classpath_VMStackWalker_getCallingCl */ JNIEXPORT java_lang_ClassLoader* JNICALL Java_gnu_classpath_VMStackWalker_getCallingClassLoader(JNIEnv *env, jclass clazz) { - java_objectarray *oa; - classinfo *c; - java_objectheader *cl; + java_objectarray *oa; + classinfo *c; + classloader *cl; oa = stacktrace_getClassContext(); @@ -140,10 +140,10 @@ JNIEXPORT java_lang_ClassLoader* JNICALL Java_gnu_classpath_VMStackWalker_getCal */ JNIEXPORT java_lang_ClassLoader* JNICALL Java_gnu_classpath_VMStackWalker_firstNonNullClassLoader(JNIEnv *env, jclass clazz) { - java_objectarray *oa; - classinfo *c; - java_objectheader *cl; - s4 i; + java_objectarray *oa; + classinfo *c; + classloader *cl; + s4 i; oa = stacktrace_getClassContext(); diff --git a/src/native/vm/gnu/gnu_classpath_VMSystemProperties.c b/src/native/vm/gnu/gnu_classpath_VMSystemProperties.c index f4ad3f8b0..d1b1abc25 100644 --- a/src/native/vm/gnu/gnu_classpath_VMSystemProperties.c +++ b/src/native/vm/gnu/gnu_classpath_VMSystemProperties.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: gnu_classpath_VMSystemProperties.c 7910 2007-05-16 08:02:52Z twisti $ + $Id: gnu_classpath_VMSystemProperties.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -79,9 +79,9 @@ void _Jv_gnu_classpath_VMSystemProperties_init(void) */ JNIEXPORT void JNICALL Java_gnu_classpath_VMSystemProperties_preInit(JNIEnv *env, jclass clazz, java_util_Properties *properties) { - java_objectheader *p; + java_handle_t *p; - p = (java_objectheader *) properties; + p = (java_handle_t *) properties; if (p == NULL) { exceptions_throw_nullpointerexception(); @@ -101,13 +101,13 @@ JNIEXPORT void JNICALL Java_gnu_classpath_VMSystemProperties_preInit(JNIEnv *env */ JNIEXPORT void JNICALL Java_gnu_classpath_VMSystemProperties_postInit(JNIEnv *env, jclass clazz, java_util_Properties *properties) { - java_objectheader *p; + java_handle_t *p; #if defined(WITH_JRE_LAYOUT) char *path; s4 len; #endif - p = (java_objectheader *) properties; + p = (java_handle_t *) properties; if (p == NULL) { exceptions_throw_nullpointerexception(); diff --git a/src/native/vm/gnu/gnu_java_lang_management_VMMemoryMXBeanImpl.c b/src/native/vm/gnu/gnu_java_lang_management_VMMemoryMXBeanImpl.c index 780a6e8f1..8c0a5514a 100644 --- a/src/native/vm/gnu/gnu_java_lang_management_VMMemoryMXBeanImpl.c +++ b/src/native/vm/gnu/gnu_java_lang_management_VMMemoryMXBeanImpl.c @@ -83,7 +83,7 @@ void _Jv_gnu_java_lang_management_VMMemoryMXBeanImpl_init(void) JNIEXPORT java_lang_management_MemoryUsage* JNICALL Java_gnu_java_lang_management_VMMemoryMXBeanImpl_getHeapMemoryUsage(JNIEnv *env, jclass clazz) { classinfo *class_java_lang_management_MemoryUsage; - java_objectheader *o; + java_handle_t *o; java_lang_management_MemoryUsage *mu; methodinfo *m; s8 init; diff --git a/src/native/vm/gnu/java_lang_VMClassLoader.c b/src/native/vm/gnu/java_lang_VMClassLoader.c index d9f97608c..cad477724 100644 --- a/src/native/vm/gnu/java_lang_VMClassLoader.c +++ b/src/native/vm/gnu/java_lang_VMClassLoader.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: java_lang_VMClassLoader.c 8288 2007-08-10 15:12:00Z twisti $ + $Id: java_lang_VMClassLoader.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -174,7 +174,7 @@ JNIEXPORT java_lang_Class* JNICALL Java_java_lang_VMClassLoader_loadClass(JNIEnv /* create utf string in which '.' is replaced by '/' */ - u = javastring_toutf((java_objectheader *) name, true); + u = javastring_toutf((java_handle_t *) name, true); /* load class */ @@ -200,9 +200,9 @@ JNIEXPORT java_lang_Class* JNICALL Java_java_lang_VMClassLoader_loadClass(JNIEnv */ JNIEXPORT java_util_Vector* JNICALL Java_java_lang_VMClassLoader_nativeGetResources(JNIEnv *env, jclass clazz, java_lang_String *name) { - java_objectheader *o; /* vector being created */ + java_handle_t *o; /* vector being created */ methodinfo *m; /* "add" method of vector */ - java_objectheader *path; /* path to be added */ + java_handle_t *path; /* path to be added */ list_classpath_entry *lce; /* classpath entry */ utf *utfname; /* utf to look for */ char *buffer; /* char buffer */ @@ -217,7 +217,7 @@ JNIEXPORT java_util_Vector* JNICALL Java_java_lang_VMClassLoader_nativeGetResour /* get the resource name as utf string */ - utfname = javastring_toutf((java_objectheader *) name, false); + utfname = javastring_toutf((java_handle_t *) name, false); if (utfname == NULL) return NULL; @@ -363,7 +363,7 @@ JNIEXPORT java_lang_Class* JNICALL Java_java_lang_VMClassLoader_findLoadedClass( /* replace `.' by `/', this is required by the classcache */ - u = javastring_toutf((java_objectheader *) name, true); + u = javastring_toutf((java_handle_t *) name, true); /* lookup for defining classloader */ diff --git a/src/native/vm/gnu/java_lang_VMRuntime.c b/src/native/vm/gnu/java_lang_VMRuntime.c index 202ada6f4..6eeb01bb9 100644 --- a/src/native/vm/gnu/java_lang_VMRuntime.c +++ b/src/native/vm/gnu/java_lang_VMRuntime.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: java_lang_VMRuntime.c 8147 2007-06-27 09:23:24Z twisti $ + $Id: java_lang_VMRuntime.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -277,9 +277,9 @@ JNIEXPORT int32_t JNICALL Java_java_lang_VMRuntime_availableProcessors(JNIEnv *e */ JNIEXPORT int32_t JNICALL Java_java_lang_VMRuntime_nativeLoad(JNIEnv *env, jclass clazz, java_lang_String *libname, java_lang_ClassLoader *loader) { - java_objectheader *cl; + classloader *cl; - cl = (java_objectheader *) loader; + cl = (classloader *) loader; #if defined(ENABLE_JNI) return _Jv_java_lang_Runtime_loadLibrary(env, libname, cl); @@ -296,18 +296,18 @@ JNIEXPORT int32_t JNICALL Java_java_lang_VMRuntime_nativeLoad(JNIEnv *env, jclas */ JNIEXPORT java_lang_String* JNICALL Java_java_lang_VMRuntime_mapLibraryName(JNIEnv *env, jclass clazz, java_lang_String *libname) { - utf *u; - char *buffer; - int32_t buffer_len; - int32_t dumpsize; - java_objectheader *o; + utf *u; + char *buffer; + int32_t buffer_len; + int32_t dumpsize; + java_handle_t *o; if (libname == NULL) { exceptions_throw_nullpointerexception(); return NULL; } - u = javastring_toutf((java_objectheader *) libname, false); + u = javastring_toutf((java_handle_t *) libname, false); /* calculate length of library name */ diff --git a/src/native/vm/gnu/java_lang_VMThrowable.c b/src/native/vm/gnu/java_lang_VMThrowable.c index 5830c0b4e..e7a2427eb 100644 --- a/src/native/vm/gnu/java_lang_VMThrowable.c +++ b/src/native/vm/gnu/java_lang_VMThrowable.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: java_lang_VMThrowable.c 8284 2007-08-10 08:58:39Z michi $ + $Id: java_lang_VMThrowable.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -263,7 +263,7 @@ JNIEXPORT java_objectarray* JNICALL Java_java_lang_VMThrowable_getStackTrace(JNI LLNI_field_set_ref(o, methodName , (java_lang_String *) javastring_new(ste->method->name)); LLNI_field_set_val(o, isNative , (ste->method->flags & ACC_NATIVE) ? 1 : 0); - oa->data[i] = (java_objectheader *) o; + oa->data[i] = o; } return oa; diff --git a/src/native/vm/gnu/java_lang_reflect_Constructor.c b/src/native/vm/gnu/java_lang_reflect_Constructor.c index 0c020bf8b..3a82a63aa 100644 --- a/src/native/vm/gnu/java_lang_reflect_Constructor.c +++ b/src/native/vm/gnu/java_lang_reflect_Constructor.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: java_lang_reflect_Constructor.c 8285 2007-08-10 09:20:04Z michi $ + $Id: java_lang_reflect_Constructor.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -112,7 +112,7 @@ JNIEXPORT java_lang_Object* JNICALL Java_java_lang_reflect_Constructor_construct */ JNIEXPORT struct java_util_Map* JNICALL Java_java_lang_reflect_Constructor_declaredAnnotations(JNIEnv *env, struct java_lang_reflect_Constructor* this) { - java_objectheader *o = (java_objectheader*)this; + java_handle_t *o = (java_handle_t*)this; if (this == NULL) { exceptions_throw_nullpointerexception(); @@ -130,14 +130,14 @@ JNIEXPORT struct java_util_Map* JNICALL Java_java_lang_reflect_Constructor_decla */ JNIEXPORT java_objectarray* JNICALL Java_java_lang_reflect_Constructor_getParameterAnnotations(JNIEnv *env, struct java_lang_reflect_Constructor* this) { - java_objectheader *o = (java_objectheader*)this; + java_handle_t *o = (java_handle_t*)this; if (this == NULL) { exceptions_throw_nullpointerexception(); return NULL; } - return reflect_get_parameterannotations((java_objectheader*)this->parameterAnnotations, this->slot, this->clazz, o->vftbl->class); + return reflect_get_parameterannotations((java_handle_t*)this->parameterAnnotations, this->slot, this->clazz, o->vftbl->class); } #endif diff --git a/src/native/vm/gnu/java_lang_reflect_Field.c b/src/native/vm/gnu/java_lang_reflect_Field.c index 67b95dfd0..b35f70a14 100644 --- a/src/native/vm/gnu/java_lang_reflect_Field.c +++ b/src/native/vm/gnu/java_lang_reflect_Field.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: java_lang_reflect_Field.c 8291 2007-08-11 10:43:45Z twisti $ + $Id: java_lang_reflect_Field.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -177,7 +177,7 @@ static void *cacao_get_field_address(java_lang_reflect_Field *this, return NULL; } - if (builtin_instanceof((java_objectheader *) o, c)) + if (builtin_instanceof((java_handle_t *) o, c)) return (void *) (((intptr_t) o) + f->offset); } @@ -246,7 +246,7 @@ JNIEXPORT java_lang_Object* JNICALL Java_java_lang_reflect_Field_get(JNIEnv *env void *addr; int32_t slot; imm_union value; - java_objectheader *o; + java_handle_t *o; LLNI_field_get_cls(this, clazz, c); LLNI_field_get_val(this, slot , slot); @@ -279,7 +279,8 @@ JNIEXPORT java_lang_Object* JNICALL Java_java_lang_reflect_Field_get(JNIEnv *env break; case TYPE_ADR: - return (java_lang_Object *) *((java_objectheader **) addr); +#warning this whole thing needs to be inside a critical section! + return (java_lang_Object *) *((java_handle_t **) addr); } /* Now box the primitive types. */ @@ -857,7 +858,7 @@ JNIEXPORT void JNICALL Java_java_lang_reflect_Field_set(JNIEnv *env, java_lang_r /* check if value is an instance of the destination class */ /* XXX TODO */ - /* if (!builtin_instanceof((java_objectheader *) value, df->class)) */ + /* if (!builtin_instanceof((java_handle_t *) value, df->class)) */ /* break; */ *((java_lang_Object **) faddr) = value; @@ -1222,10 +1223,10 @@ JNIEXPORT void JNICALL Java_java_lang_reflect_Field_setDouble(JNIEnv *env, java_ */ JNIEXPORT java_lang_String* JNICALL Java_java_lang_reflect_Field_getSignature(JNIEnv *env, java_lang_reflect_Field* this) { - classinfo *c; - fieldinfo *f; - java_objectheader *o; - int32_t slot; + classinfo *c; + fieldinfo *f; + java_handle_t *o; + int32_t slot; /* get the class and the field */ @@ -1252,7 +1253,7 @@ JNIEXPORT java_lang_String* JNICALL Java_java_lang_reflect_Field_getSignature(JN */ JNIEXPORT struct java_util_Map* JNICALL Java_java_lang_reflect_Field_declaredAnnotations(JNIEnv *env, struct java_lang_reflect_Field* this) { - java_objectheader *o = (java_objectheader*)this; + java_handle_t *o = (java_handle_t*)this; if (this == NULL) { exceptions_throw_nullpointerexception(); diff --git a/src/native/vm/gnu/java_lang_reflect_Method.c b/src/native/vm/gnu/java_lang_reflect_Method.c index 61b7ea0dd..826fbdc19 100644 --- a/src/native/vm/gnu/java_lang_reflect_Method.c +++ b/src/native/vm/gnu/java_lang_reflect_Method.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: java_lang_reflect_Method.c 8285 2007-08-10 09:20:04Z michi $ + $Id: java_lang_reflect_Method.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -200,10 +200,10 @@ JNIEXPORT java_lang_Object* JNICALL Java_java_lang_reflect_Method_invokeNative(J */ JNIEXPORT java_lang_String* JNICALL Java_java_lang_reflect_Method_getSignature(JNIEnv *env, java_lang_reflect_Method* this) { - classinfo *c; - methodinfo *m; - java_objectheader *o; - int32_t slot; + classinfo *c; + methodinfo *m; + java_handle_t *o; + int32_t slot; LLNI_field_get_cls(this, clazz, c); LLNI_field_get_val(this, slot , slot); @@ -231,7 +231,7 @@ JNIEXPORT struct java_lang_Object* JNICALL Java_java_lang_reflect_Method_getDefa utf *utf_parseAnnotationDefault = NULL; utf *utf_desc = NULL; sun_reflect_ConstantPool *constantPool = NULL; - java_objectheader *o = (java_objectheader*)this; + java_handle_t *o = (java_handle_t*)this; if (this == NULL) { exceptions_throw_nullpointerexception(); @@ -288,7 +288,7 @@ JNIEXPORT struct java_lang_Object* JNICALL Java_java_lang_reflect_Method_getDefa */ JNIEXPORT struct java_util_Map* JNICALL Java_java_lang_reflect_Method_declaredAnnotations(JNIEnv *env, struct java_lang_reflect_Method* this) { - java_objectheader *o = (java_objectheader*)this; + java_handle_t *o = (java_handle_t*)this; if (this == NULL) { exceptions_throw_nullpointerexception(); @@ -306,14 +306,14 @@ JNIEXPORT struct java_util_Map* JNICALL Java_java_lang_reflect_Method_declaredAn */ JNIEXPORT java_objectarray* JNICALL Java_java_lang_reflect_Method_getParameterAnnotations(JNIEnv *env, struct java_lang_reflect_Method* this) { - java_objectheader *o = (java_objectheader*)this; + java_handle_t *o = (java_handle_t*)this; if (this == NULL) { exceptions_throw_nullpointerexception(); return NULL; } - return reflect_get_parameterannotations((java_objectheader*)this->parameterAnnotations, this->slot, this->clazz, o->vftbl->class); + return reflect_get_parameterannotations((java_handle_t*)this->parameterAnnotations, this->slot, this->clazz, o->vftbl->class); } #endif diff --git a/src/native/vm/java_lang_Class.c b/src/native/vm/java_lang_Class.c index 5a7a37b68..b7bc93bf2 100644 --- a/src/native/vm/java_lang_Class.c +++ b/src/native/vm/java_lang_Class.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: java_lang_Class.c 8288 2007-08-10 15:12:00Z twisti $ + $Id: java_lang_Class.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -132,16 +132,16 @@ java_lang_Class *_Jv_java_lang_Class_forName(java_lang_String *name) #endif { #if defined(ENABLE_JAVASE) - java_objectheader *cl; + classloader *cl; #endif - utf *ufile; - utf *uname; - classinfo *c; - u2 *pos; - s4 i; + utf *ufile; + utf *uname; + classinfo *c; + u2 *pos; + s4 i; #if defined(ENABLE_JAVASE) - cl = (java_objectheader *) loader; + cl = (classloader *) loader; #endif /* illegal argument */ @@ -153,8 +153,8 @@ java_lang_Class *_Jv_java_lang_Class_forName(java_lang_String *name) /* create utf string in which '.' is replaced by '/' */ - ufile = javastring_toutf((java_objectheader *) name, true); - uname = javastring_toutf((java_objectheader *) name, false); + ufile = javastring_toutf((java_handle_t *) name, true); + uname = javastring_toutf((java_handle_t *) name, false); /* name must not contain '/' (mauve test) */ @@ -200,11 +200,11 @@ java_lang_Class *_Jv_java_lang_Class_forName(java_lang_String *name) */ s4 _Jv_java_lang_Class_isInstance(java_lang_Class *klass, java_lang_Object *o) { - classinfo *c; - java_objectheader *ob; + classinfo *c; + java_handle_t *ob; c = (classinfo *) klass; - ob = (java_objectheader *) o; + ob = (java_handle_t *) o; if (!(c->state & CLASS_LINKED)) if (!link_class(c)) @@ -320,7 +320,7 @@ java_objectarray *_Jv_java_lang_Class_getInterfaces(java_lang_Class *klass) for (i = 0; i < c->interfacescount; i++) { ic = c->interfaces[i].cls; - oa->data[i] = (java_objectheader *) ic; + oa->data[i] = ic; } return oa; @@ -490,7 +490,7 @@ java_objectarray *_Jv_java_lang_Class_getDeclaredClasses(java_lang_Class *klass, if (!link_class(inner)) return NULL; - oa->data[pos++] = (java_objectheader *) inner; + oa->data[pos++] = inner; } } @@ -540,7 +540,7 @@ java_objectarray *_Jv_java_lang_Class_getDeclaredFields(java_lang_Class *klass, /* store object into array */ - oa->data[pos++] = (java_objectheader *) rf; + oa->data[pos++] = rf; } } @@ -603,7 +603,7 @@ java_objectarray *_Jv_java_lang_Class_getDeclaredMethods(java_lang_Class *klass, /* store object into array */ - oa->data[pos++] = (java_objectheader *) rm; + oa->data[pos++] = rm; } } @@ -654,7 +654,7 @@ java_objectarray *_Jv_java_lang_Class_getDeclaredConstructors(java_lang_Class *k /* store object into array */ - oa->data[pos++] = (java_objectheader *) rc; + oa->data[pos++] = rc; } } @@ -703,9 +703,9 @@ JNIEXPORT int32_t JNICALL _Jv_java_lang_Class_isArray(JNIEnv *env, java_lang_Cla */ void _Jv_java_lang_Class_throwException(java_lang_Throwable *t) { - java_objectheader *o; + java_handle_t *o; - o = (java_objectheader *) t; + o = (java_handle_t *) t; exceptions_set_exception(o); } @@ -948,8 +948,8 @@ java_lang_reflect_Method *_Jv_java_lang_Class_getEnclosingMethod(java_lang_Class */ java_lang_String *_Jv_java_lang_Class_getClassSignature(java_lang_Class* klass) { - classinfo *c; - java_objectheader *o; + classinfo *c; + java_handle_t *o; c = (classinfo *) klass; diff --git a/src/native/vm/java_lang_ClassLoader.c b/src/native/vm/java_lang_ClassLoader.c index d09e4592b..d51687bd9 100644 --- a/src/native/vm/java_lang_ClassLoader.c +++ b/src/native/vm/java_lang_ClassLoader.c @@ -76,17 +76,17 @@ */ java_lang_Class *_Jv_java_lang_ClassLoader_defineClass(java_lang_ClassLoader *cl, java_lang_String *name, java_bytearray *data, s4 offset, s4 len, java_security_ProtectionDomain *pd) { - java_objectheader *loader; - utf *utfname; - classinfo *c; - java_lang_Class *o; + classloader *loader; + utf *utfname; + classinfo *c; + java_lang_Class *o; #if defined(ENABLE_JVMTI) jint new_class_data_len = 0; unsigned char* new_class_data = NULL; #endif - loader = (java_objectheader *) cl; + loader = (classloader *) cl; /* check if data was passed */ @@ -105,7 +105,7 @@ java_lang_Class *_Jv_java_lang_ClassLoader_defineClass(java_lang_ClassLoader *cl if (name != NULL) { /* convert '.' to '/' in java string */ - utfname = javastring_toutf((java_objectheader *) name, true); + utfname = javastring_toutf((java_handle_t *) name, true); } else { utfname = NULL; @@ -116,7 +116,7 @@ java_lang_Class *_Jv_java_lang_ClassLoader_defineClass(java_lang_ClassLoader *cl if (jvmti) jvmti_ClassFileLoadHook(utfname, len, (unsigned char *) data->data, - loader, (java_objectheader *) pd, + loader, (java_handle_t *) pd, &new_class_data_len, &new_class_data); #endif diff --git a/src/native/vm/java_lang_Object.c b/src/native/vm/java_lang_Object.c index e96faf429..f5ff5afa7 100644 --- a/src/native/vm/java_lang_Object.c +++ b/src/native/vm/java_lang_Object.c @@ -69,17 +69,14 @@ */ java_lang_Class *_Jv_java_lang_Object_getClass(java_lang_Object *obj) { - java_objectheader *o; - classinfo *c; + classinfo *c; - o = (java_objectheader *) obj; - - if (o == NULL) { + if (obj == NULL) { exceptions_throw_nullpointerexception(); return NULL; } - c = o->vftbl->class; + LLNI_class_get(obj, c); return (java_lang_Class *) c; } @@ -144,10 +141,10 @@ void _Jv_java_lang_Object_wait(java_lang_Object *o, s8 ms, s4 ns) */ java_lang_Object *_Jv_java_lang_Object_clone(java_lang_Cloneable *this) { - java_objectheader *o; - java_objectheader *co; + java_handle_t *o; + java_handle_t *co; - o = (java_objectheader *) this; + o = (java_handle_t *) this; co = builtin_clone(NULL, o); diff --git a/src/native/vm/java_lang_Runtime.c b/src/native/vm/java_lang_Runtime.c index daa4bf0f2..4a363e368 100644 --- a/src/native/vm/java_lang_Runtime.c +++ b/src/native/vm/java_lang_Runtime.c @@ -108,9 +108,9 @@ void _Jv_java_lang_Runtime_gc(void) * Signature: (Ljava/lang/String;Ljava/lang/ClassLoader;)I */ #if defined(ENABLE_JNI) -s4 _Jv_java_lang_Runtime_loadLibrary(JNIEnv *env, java_lang_String *libname, java_objectheader *cl) +s4 _Jv_java_lang_Runtime_loadLibrary(JNIEnv *env, java_lang_String *libname, classloader *cl) #else -s4 _Jv_java_lang_Runtime_loadLibrary(java_lang_String *libname, java_objectheader *cl) +s4 _Jv_java_lang_Runtime_loadLibrary(java_lang_String *libname, classloader *cl) #endif { #if defined(ENABLE_LTDL) @@ -126,7 +126,7 @@ s4 _Jv_java_lang_Runtime_loadLibrary(java_lang_String *libname, java_objectheade return 0; } - name = javastring_toutf((java_objectheader *) libname, false); + name = javastring_toutf((java_handle_t *) libname, false); /* is the library already loaded? */ diff --git a/src/native/vm/java_lang_Runtime.h b/src/native/vm/java_lang_Runtime.h index 2061a651e..eed7b92a9 100644 --- a/src/native/vm/java_lang_Runtime.h +++ b/src/native/vm/java_lang_Runtime.h @@ -45,9 +45,9 @@ s8 _Jv_java_lang_Runtime_totalMemory(void); void _Jv_java_lang_Runtime_gc(void); #if defined(ENABLE_JNI) -s4 _Jv_java_lang_Runtime_loadLibrary(JNIEnv *env, java_lang_String *libname, java_objectheader *cl); +s4 _Jv_java_lang_Runtime_loadLibrary(JNIEnv *env, java_lang_String *libname, classloader *cl); #else -s4 _Jv_java_lang_Runtime_loadLibrary(java_lang_String *libname, java_objectheader *cl); +s4 _Jv_java_lang_Runtime_loadLibrary(java_lang_String *libname, classloader *cl); #endif #if defined(ENABLE_JAVASE) diff --git a/src/native/vm/java_lang_String.c b/src/native/vm/java_lang_String.c index 422e780c3..495209cd9 100644 --- a/src/native/vm/java_lang_String.c +++ b/src/native/vm/java_lang_String.c @@ -46,7 +46,7 @@ */ java_lang_String *_Jv_java_lang_String_intern(java_lang_String *s) { - java_objectheader *o; + java_handle_t *o; if (s == NULL) return NULL; diff --git a/src/native/vm/java_lang_Thread.c b/src/native/vm/java_lang_Thread.c index 0742d1740..0e33fc253 100644 --- a/src/native/vm/java_lang_Thread.c +++ b/src/native/vm/java_lang_Thread.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: java_lang_Thread.c 8284 2007-08-10 08:58:39Z michi $ + $Id: java_lang_Thread.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -356,9 +356,9 @@ s4 _Jv_java_lang_Thread_interrupted(void) s4 _Jv_java_lang_Thread_holdsLock(java_lang_Object* obj) { #if defined(ENABLE_THREADS) - java_objectheader *o; + java_handle_t *o; - o = (java_objectheader *) obj; + o = (java_handle_t *) obj; if (o == NULL) { exceptions_throw_nullpointerexception(); @@ -380,9 +380,9 @@ s4 _Jv_java_lang_Thread_holdsLock(java_lang_Object* obj) java_lang_String *_Jv_java_lang_Thread_getState(java_lang_Thread *this) { #if defined(ENABLE_THREADS) - threadobject *thread; - utf *u; - java_objectheader *o; + threadobject *thread; + utf *u; + java_handle_t *o; # if defined(WITH_CLASSPATH_GNU) thread = (threadobject *) LLNI_field_direct(LLNI_field_direct(this, vmThread), vmdata); diff --git a/src/native/vm/java_lang_reflect_Constructor.c b/src/native/vm/java_lang_reflect_Constructor.c index 77131359c..583f5f253 100644 --- a/src/native/vm/java_lang_reflect_Constructor.c +++ b/src/native/vm/java_lang_reflect_Constructor.c @@ -127,11 +127,11 @@ java_objectarray *_Jv_java_lang_reflect_Constructor_getExceptionTypes(JNIEnv *en */ java_lang_Object *_Jv_java_lang_reflect_Constructor_newInstance(JNIEnv *env, java_lang_reflect_Constructor *this, java_objectarray *args) { - classinfo *c; - methodinfo *m; - s4 override; - java_objectheader *o; - int32_t slot; + classinfo *c; + methodinfo *m; + s4 override; + java_handle_t *o; + int32_t slot; LLNI_field_get_cls(this, clazz, c); LLNI_field_get_val(this, slot , slot); @@ -176,10 +176,10 @@ java_lang_Object *_Jv_java_lang_reflect_Constructor_newInstance(JNIEnv *env, jav */ java_lang_String *_Jv_java_lang_reflect_Constructor_getSignature(JNIEnv *env, java_lang_reflect_Constructor *this) { - classinfo *c; - methodinfo *m; - java_objectheader *o; - int32_t slot; + classinfo *c; + methodinfo *m; + java_handle_t *o; + int32_t slot; LLNI_field_get_cls(this, clazz, c); LLNI_field_get_val(this, slot , slot); diff --git a/src/native/vm/java_lang_reflect_Method.c b/src/native/vm/java_lang_reflect_Method.c index f7d5707b6..7e48c32e9 100644 --- a/src/native/vm/java_lang_reflect_Method.c +++ b/src/native/vm/java_lang_reflect_Method.c @@ -91,7 +91,7 @@ java_lang_Object *_Jv_java_lang_reflect_Method_invoke(java_lang_reflect_Method * /* call the Java method via a helper function */ - return (java_lang_Object *) _Jv_jni_invokeNative(m, (java_objectheader *) o, args); + return (java_lang_Object *) _Jv_jni_invokeNative(m, (java_handle_t *) o, args); } diff --git a/src/native/vm/reflect.c b/src/native/vm/reflect.c index c243d5041..93bc6a2a3 100644 --- a/src/native/vm/reflect.c +++ b/src/native/vm/reflect.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: reflect.c 8289 2007-08-10 15:18:05Z twisti $ + $Id: reflect.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -80,7 +80,7 @@ java_lang_reflect_Constructor *reflect_constructor_new(methodinfo *m) { classinfo *c; - java_objectheader *o; + java_handle_t *o; java_lang_reflect_Constructor *rc; int32_t slot; java_bytearray *annotations = NULL; @@ -171,7 +171,7 @@ java_lang_reflect_Constructor *reflect_constructor_new(methodinfo *m) java_lang_reflect_Field *reflect_field_new(fieldinfo *f) { classinfo *c; - java_objectheader *o; + java_handle_t *o; java_lang_reflect_Field *rf; int32_t slot; java_bytearray *annotations = NULL; @@ -253,7 +253,7 @@ java_lang_reflect_Field *reflect_field_new(fieldinfo *f) java_lang_reflect_Method *reflect_method_new(methodinfo *m) { classinfo *c; - java_objectheader *o; + java_handle_t *o; java_lang_reflect_Method *rm; int32_t slot; java_bytearray *annotations = NULL; @@ -431,7 +431,7 @@ struct java_util_Map* reflect_get_declaredannotatios( *******************************************************************************/ java_objectarray* reflect_get_parameterannotations( - java_objectheader *parameterAnnotations, + java_handle_t *parameterAnnotations, int32_t slot, java_lang_Class *declaringClass, classinfo *referer) diff --git a/src/native/vm/reflect.h b/src/native/vm/reflect.h index 410e28cfb..51f8e8ff5 100644 --- a/src/native/vm/reflect.h +++ b/src/native/vm/reflect.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: reflect.h 8262 2007-08-06 12:44:01Z panzi $ + $Id: reflect.h 8295 2007-08-11 17:57:24Z michi $ */ @@ -72,10 +72,10 @@ struct java_util_Map* reflect_get_declaredannotatios( classinfo *referer); java_objectarray* reflect_get_parameterannotations( - java_objectheader *parameterAnnotations, - int32_t slot, - java_lang_Class *declaringClass, - classinfo *referer); + java_handle_t *parameterAnnotations, + int32_t slot, + java_lang_Class *declaringClass, + classinfo *referer); #endif /* diff --git a/src/native/vm/sun/jvm.c b/src/native/vm/sun/jvm.c index cce6ff494..69ebaa76d 100644 --- a/src/native/vm/sun/jvm.c +++ b/src/native/vm/sun/jvm.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: jvm.c 8290 2007-08-11 10:25:40Z twisti $ + $Id: jvm.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -251,7 +251,7 @@ jobject JVM_InitProperties(JNIEnv *env, jobject properties) #if PRINTJVM log_println("JVM_InitProperties: properties=%d", properties); #endif - properties_system_add_all((java_objectheader *) properties); + properties_system_add_all((java_handle_t *) properties); } @@ -527,7 +527,7 @@ jobject JVM_Clone(JNIEnv* env, jobject handle) #if PRINTJVM log_println("JVM_Clone: handle=%p", handle); #endif - return (jobject) builtin_clone(env, (java_objectheader *) handle); + return (jobject) builtin_clone(env, (java_handle_t *) handle); } @@ -678,7 +678,7 @@ jclass JVM_FindClassFromClassLoader(JNIEnv* env, const char* name, jboolean init log_println("JVM_FindClassFromClassLoader: name=%s, init=%d, loader=%p, throwError=%d", name, init, loader, throwError); #endif - c = load_class_from_classloader(utf_new_char(name), (java_objectheader *) loader); + c = load_class_from_classloader(utf_new_char(name), (classloader *) loader); if (c == NULL) return NULL; @@ -717,7 +717,7 @@ jclass JVM_DefineClassWithSource(JNIEnv *env, const char *name, jobject loader, #endif /* XXX do something with pd and source */ - return (jclass) class_define(utf_new_char(name), (java_objectheader *) loader, len, (u1 *) buf); + return (jclass) class_define(utf_new_char(name), (classloader *) loader, len, (u1 *) buf); } @@ -736,7 +736,7 @@ jclass JVM_FindLoadedClass(JNIEnv *env, jobject loader, jstring name) log_println("JVM_FindLoadedClass(loader=%p, name=%p)", loader, name); #endif - u = javastring_toutf((java_objectheader *) name, true); + u = javastring_toutf((java_handle_t *) name, true); c = classcache_lookup(cl, u); return (jclass) c; @@ -844,17 +844,17 @@ void JVM_SetProtectionDomain(JNIEnv *env, jclass cls, jobject protection_domain) jobject JVM_DoPrivileged(JNIEnv *env, jclass cls, jobject action, jobject context, jboolean wrapException) { - java_objectheader *o; - classinfo *c; - methodinfo *m; - java_objectheader *result; - java_objectheader *e; + java_handle_t *o; + classinfo *c; + methodinfo *m; + java_handle_t *result; + java_handle_t *e; #if PRINTJVM log_println("JVM_DoPrivileged: action=%p, context=%p, wrapException=%d", action, context, wrapException); #endif - o = (java_objectheader *) action; + o = (java_handle_t *) action; c = o->vftbl->class; if (action == NULL) { @@ -2168,7 +2168,7 @@ jobject JVM_GetArrayElement(JNIEnv *env, jobject arr, jint index) /* log_println("JVM_GetArrayElement: IMPLEMENT ME!"); */ java_arrayheader *a; - java_objectheader *o = NULL; + java_handle_t *o = NULL; TRACEJVMCALLS("JVM_GetArrayElement: arr=%p, index=%d", arr, index); @@ -2571,13 +2571,13 @@ jstring JVM_InternString(JNIEnv *env, jstring str) JNIEXPORT void* JNICALL JVM_RawMonitorCreate(void) { - java_objectheader *o; + java_object_t *o; #if PRINTJVM log_println("JVM_RawMonitorCreate"); #endif - o = NEW(java_objectheader); + o = NEW(java_object_t); lock_init_object_lock(o); @@ -2592,7 +2592,7 @@ JNIEXPORT void JNICALL JVM_RawMonitorDestroy(void *mon) #if PRINTJVM log_println("JVM_RawMonitorDestroy: mon=%p", mon); #endif - FREE(mon, java_objectheader); + FREE(mon, java_object_t); } @@ -2603,7 +2603,7 @@ JNIEXPORT jint JNICALL JVM_RawMonitorEnter(void *mon) #if PRINTJVM log_println("JVM_RawMonitorEnter: mon=%p", mon); #endif - (void) lock_monitor_enter((java_objectheader *) mon); + (void) lock_monitor_enter((java_object_t *) mon); return 0; } @@ -2616,7 +2616,7 @@ JNIEXPORT void JNICALL JVM_RawMonitorExit(void *mon) #if PRINTJVM log_println("JVM_RawMonitorExit: mon=%p", mon); #endif - (void) lock_monitor_exit((java_objectheader *) mon); + (void) lock_monitor_exit((java_object_t *) mon); } diff --git a/src/native/vm/sun_misc_Unsafe.c b/src/native/vm/sun_misc_Unsafe.c index 807027cba..11ec8c5c4 100644 --- a/src/native/vm/sun_misc_Unsafe.c +++ b/src/native/vm/sun_misc_Unsafe.c @@ -537,12 +537,12 @@ JNIEXPORT int32_t JNICALL Java_sun_misc_Unsafe_addressSize(JNIEnv *env, sun_misc */ JNIEXPORT java_lang_Class* JNICALL Java_sun_misc_Unsafe_defineClass__Ljava_lang_String_2_3BIILjava_lang_ClassLoader_2Ljava_security_ProtectionDomain_2(JNIEnv *env, sun_misc_Unsafe *this, java_lang_String *name, java_bytearray *b, int32_t off, int32_t len, java_lang_ClassLoader *loader, java_security_ProtectionDomain *protectionDomain) { - java_objectheader *cl; - utf *utfname; - classinfo *c; - java_lang_Class *o; + classloader *cl; + utf *utfname; + classinfo *c; + java_lang_Class *o; - cl = (java_objectheader *) loader; + cl = (classloader *) loader; /* check if data was passed */ @@ -561,7 +561,7 @@ JNIEXPORT java_lang_Class* JNICALL Java_sun_misc_Unsafe_defineClass__Ljava_lang_ if (name != NULL) { /* convert '.' to '/' in java string */ - utfname = javastring_toutf((java_objectheader *) name, true); + utfname = javastring_toutf((java_handle_t *) name, true); } else { utfname = NULL; @@ -595,9 +595,9 @@ JNIEXPORT java_lang_Class* JNICALL Java_sun_misc_Unsafe_defineClass__Ljava_lang_ */ JNIEXPORT void JNICALL Java_sun_misc_Unsafe_throwException(JNIEnv *env, sun_misc_Unsafe *this, java_lang_Throwable *ee) { - java_objectheader *o; + java_handle_t *o; - o = (java_objectheader *) ee; + o = (java_handle_t *) ee; exceptions_set_exception(o); } diff --git a/src/threads/lock-common.h b/src/threads/lock-common.h index 75d8687a1..7cabe9cc1 100644 --- a/src/threads/lock-common.h +++ b/src/threads/lock-common.h @@ -54,22 +54,22 @@ void lock_init(void); -void lock_init_object_lock(java_objectheader *); +void lock_init_object_lock(java_object_t *); lock_record_t *lock_get_initial_lock_word(void); ptrint lock_pre_compute_thinlock(s4 index); -bool lock_monitor_enter(java_objectheader *); -bool lock_monitor_exit(java_objectheader *); +bool lock_monitor_enter(java_object_t *); +bool lock_monitor_exit(java_object_t *); #define LOCK_monitor_enter (functionptr) lock_monitor_enter #define LOCK_monitor_exit (functionptr) lock_monitor_exit -bool lock_is_held_by_current_thread(java_objectheader *o); +bool lock_is_held_by_current_thread(java_object_t *o); -void lock_wait_for_object(java_objectheader *o, s8 millis, s4 nanos); -void lock_notify_object(java_objectheader *o); -void lock_notify_all_object(java_objectheader *o); +void lock_wait_for_object(java_object_t *o, s8 millis, s4 nanos); +void lock_notify_object(java_object_t *o); +void lock_notify_all_object(java_object_t *o); #endif /* ENABLE_THREADS */ diff --git a/src/threads/native/lock.c b/src/threads/native/lock.c index a10877933..fd5e6f5fa 100644 --- a/src/threads/native/lock.c +++ b/src/threads/native/lock.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: lock.c 7954 2007-05-23 17:58:18Z twisti $ + $Id: lock.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -426,7 +426,7 @@ static void lock_hashtable_grow(void) static void lock_record_finalizer(void *object, void *p); #endif -static lock_record_t *lock_hashtable_get(java_objectheader *o) +static lock_record_t *lock_hashtable_get(java_object_t *o) { ptrint lockword; u4 slot; @@ -499,7 +499,7 @@ static lock_record_t *lock_hashtable_get(java_objectheader *o) *******************************************************************************/ -static void lock_hashtable_remove(java_objectheader *o) +static void lock_hashtable_remove(java_object_t *o) { ptrint lockword; lock_record_t *lr; @@ -557,11 +557,11 @@ static void lock_hashtable_remove(java_objectheader *o) static void lock_record_finalizer(void *object, void *p) { - java_objectheader *o; - ptrint lockword; - lock_record_t *lr; + java_object_t *o; + ptrint lockword; + lock_record_t *lr; - o = (java_objectheader *) object; + o = (java_object_t *) object; /* check for a finalizer function */ @@ -598,7 +598,7 @@ static void lock_record_finalizer(void *object, void *p) *******************************************************************************/ -void lock_init_object_lock(java_objectheader *o) +void lock_init_object_lock(java_object_t *o) { assert(o); @@ -683,7 +683,7 @@ static inline void lock_record_exit(threadobject *t, lock_record_t *lr) *******************************************************************************/ -static void lock_inflate(threadobject *t, java_objectheader *o, lock_record_t *lr) +static void lock_inflate(threadobject *t, java_object_t *o, lock_record_t *lr) { ptrint lockword; @@ -736,7 +736,7 @@ static void lock_inflate(threadobject *t, java_objectheader *o, lock_record_t *l *******************************************************************************/ -bool lock_monitor_enter(java_objectheader *o) +bool lock_monitor_enter(java_object_t *o) { threadobject *t; /* CAUTION: This code assumes that ptrint is unsigned! */ @@ -888,7 +888,7 @@ bool lock_monitor_enter(java_objectheader *o) *******************************************************************************/ -bool lock_monitor_exit(java_objectheader *o) +bool lock_monitor_exit(java_object_t *o) { threadobject *t; ptrint lockword; @@ -1143,7 +1143,7 @@ static void lock_record_wait(threadobject *thread, lock_record_t *lr, s8 millis, *******************************************************************************/ -static void lock_monitor_wait(threadobject *t, java_objectheader *o, s8 millis, s4 nanos) +static void lock_monitor_wait(threadobject *t, java_object_t *o, s8 millis, s4 nanos) { ptrint lockword; lock_record_t *lr; @@ -1246,7 +1246,7 @@ static void lock_record_notify(threadobject *t, lock_record_t *lr, bool one) *******************************************************************************/ -static void lock_monitor_notify(threadobject *t, java_objectheader *o, bool one) +static void lock_monitor_notify(threadobject *t, java_object_t *o, bool one) { ptrint lockword; lock_record_t *lr; @@ -1306,7 +1306,7 @@ static void lock_monitor_notify(threadobject *t, java_objectheader *o, bool one) *******************************************************************************/ -bool lock_is_held_by_current_thread(java_objectheader *o) +bool lock_is_held_by_current_thread(java_object_t *o) { threadobject *t; ptrint lockword; @@ -1352,7 +1352,7 @@ bool lock_is_held_by_current_thread(java_objectheader *o) *******************************************************************************/ -void lock_wait_for_object(java_objectheader *o, s8 millis, s4 nanos) +void lock_wait_for_object(java_object_t *o, s8 millis, s4 nanos) { threadobject *thread; @@ -1371,7 +1371,7 @@ void lock_wait_for_object(java_objectheader *o, s8 millis, s4 nanos) *******************************************************************************/ -void lock_notify_object(java_objectheader *o) +void lock_notify_object(java_object_t *o) { threadobject *thread; @@ -1390,7 +1390,7 @@ void lock_notify_object(java_objectheader *o) *******************************************************************************/ -void lock_notify_all_object(java_objectheader *o) +void lock_notify_all_object(java_object_t *o) { threadobject *thread; diff --git a/src/threads/native/lock.h b/src/threads/native/lock.h index 094584386..b6cf995ca 100644 --- a/src/threads/native/lock.h +++ b/src/threads/native/lock.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: lock.h 7954 2007-05-23 17:58:18Z twisti $ + $Id: lock.h 8295 2007-08-11 17:57:24Z michi $ */ @@ -66,7 +66,7 @@ struct lock_waiter_t { *******************************************************************************/ struct lock_record_t { - java_objectheader *object; /* object for which this lock is */ + java_object_t *object; /* object for which this lock is */ struct threadobject *owner; /* current owner of this monitor */ s4 count; /* recursive lock count */ pthread_mutex_t mutex; /* mutex for synchronizing */ @@ -91,10 +91,10 @@ struct lock_hashtable_t { /* defines ********************************************************************/ -#define LOCK_INIT_OBJECT_LOCK(o) lock_init_object_lock((java_objectheader *) (o)) +#define LOCK_INIT_OBJECT_LOCK(o) lock_init_object_lock((java_object_t *) (o)) -#define LOCK_MONITOR_ENTER(o) lock_monitor_enter((java_objectheader *) (o)) -#define LOCK_MONITOR_EXIT(o) lock_monitor_exit((java_objectheader *) (o)) +#define LOCK_MONITOR_ENTER(o) lock_monitor_enter((java_object_t *) (o)) +#define LOCK_MONITOR_EXIT(o) lock_monitor_exit((java_object_t *) (o)) #endif /* _LOCK_H */ diff --git a/src/threads/native/threads.c b/src/threads/native/threads.c index 671f45fa4..bdbc47ee6 100644 --- a/src/threads/native/threads.c +++ b/src/threads/native/threads.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: threads.c 8284 2007-08-10 08:58:39Z michi $ + $Id: threads.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -784,10 +784,10 @@ void threads_mutex_join_unlock(void) bool threads_init(void) { - threadobject *mainthread; - java_objectheader *threadname; - java_lang_Thread *t; - java_objectheader *o; + threadobject *mainthread; + java_handle_t *threadname; + java_lang_Thread *t; + java_handle_t *o; #if defined(ENABLE_JAVASE) java_lang_ThreadGroup *threadgroup; @@ -872,7 +872,7 @@ bool threads_init(void) LLNI_field_set_val(vmt, vmdata, (java_lang_Object *) mainthread); /* call java.lang.Thread.(Ljava/lang/VMThread;Ljava/lang/String;IZ)V */ - o = (java_objectheader *) t; + o = (java_handle_t *) t; (void) vm_call_method(method_thread_init, o, vmt, threadname, NORM_PRIORITY, false); @@ -892,7 +892,7 @@ bool threads_init(void) /* call public Thread(String name) */ - o = (java_objectheader *) t; + o = (java_handle_t *) t; (void) vm_call_method(method_thread_init, o, threadname); #else @@ -914,7 +914,7 @@ bool threads_init(void) class_java_lang_ThreadGroup, true); - o = (java_objectheader *) threadgroup; + o = (java_handle_t *) threadgroup; (void) vm_call_method(m, o, t); @@ -979,7 +979,7 @@ static void *threads_startup_thread(void *arg) sem_t *psem; classinfo *c; methodinfo *m; - java_objectheader *o; + java_handle_t *o; functionptr function; #if defined(ENABLE_INTRP) @@ -1087,10 +1087,10 @@ static void *threads_startup_thread(void *arg) /* we need to start the run method of java.lang.VMThread */ vmt = (java_lang_VMThread *) LLNI_field_direct(thread->object, vmThread); - o = (java_objectheader *) vmt; + o = (java_handle_t *) vmt; #elif defined(WITH_CLASSPATH_SUN) || defined(WITH_CLASSPATH_CLDC1_1) - o = (java_objectheader *) thread->object; + o = (java_handle_t *) thread->object; #else # error unknown classpath configuration #endif @@ -1250,8 +1250,8 @@ bool threads_attach_current_thread(JavaVMAttachArgs *vm_aargs, bool isdaemon) { threadobject *thread; utf *u; - java_objectheader *s; - java_objectheader *o; + java_handle_t *s; + java_handle_t *o; java_lang_Thread *t; #if defined(ENABLE_JAVASE) @@ -1367,7 +1367,7 @@ bool threads_attach_current_thread(JavaVMAttachArgs *vm_aargs, bool isdaemon) /* for convenience */ - o = (java_objectheader *) thread->object; + o = (java_handle_t *) thread->object; #if defined(WITH_CLASSPATH_GNU) (void) vm_call_method(method_thread_init, o, vmt, s, NORM_PRIORITY, @@ -1394,7 +1394,7 @@ bool threads_attach_current_thread(JavaVMAttachArgs *vm_aargs, bool isdaemon) class_java_lang_ThreadGroup, true); - o = (java_objectheader *) group; + o = (java_handle_t *) group; (void) vm_call_method(m, o, t); @@ -1418,7 +1418,7 @@ bool threads_detach_thread(threadobject *thread) java_lang_ThreadGroup *group; classinfo *c; methodinfo *m; - java_objectheader *o; + java_handle_t *o; java_lang_Thread *t; #endif @@ -1453,7 +1453,7 @@ bool threads_detach_thread(threadobject *thread) if (m == NULL) return false; - o = (java_objectheader *) group; + o = (java_handle_t *) group; t = thread->object; (void) vm_call_method(m, o, t); diff --git a/src/threads/native/threads.h b/src/threads/native/threads.h index 199261ca2..b279f4709 100644 --- a/src/threads/native/threads.h +++ b/src/threads/native/threads.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: threads.h 8222 2007-07-22 20:07:55Z twisti $ + $Id: threads.h 8295 2007-08-11 17:57:24Z michi $ */ @@ -126,7 +126,7 @@ struct threadobject { u1 *pc; /* current PC (used for profiling) */ - java_objectheader *_exceptionptr; /* current exception */ + java_object_t *_exceptionptr; /* current exception */ stackframeinfo *_stackframeinfo; /* current native stackframeinfo */ localref_table *_localref_table; /* JNI local references */ diff --git a/src/threads/none/threads.h b/src/threads/none/threads.h index 19146040a..044bc3259 100644 --- a/src/threads/none/threads.h +++ b/src/threads/none/threads.h @@ -46,7 +46,7 @@ /* exception pointer **********************************************************/ -extern java_objectheader *_no_threads_exceptionptr; +extern java_object_t *_no_threads_exceptionptr; #define exceptionptr (&_no_threads_exceptionptr) diff --git a/src/threads/threads-common.c b/src/threads/threads-common.c index 6a192f000..31d345c6d 100644 --- a/src/threads/threads-common.c +++ b/src/threads/threads-common.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: threads-common.c 8284 2007-08-10 08:58:39Z michi $ + $Id: threads-common.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -530,7 +530,7 @@ void threads_thread_print_info(threadobject *t) /* get thread name */ #if defined(WITH_CLASSPATH_GNU) - name = javastring_toutf((java_objectheader *) LLNI_field_direct(object, name), false); + name = javastring_toutf((java_handle_t *) LLNI_field_direct(object, name), false); #elif defined(WITH_CLASSPATH_SUN) || defined(WITH_CLASSPATH_CLDC1_1) /* FIXME: In cldc the name is a char[] */ /* name = object->name; */ diff --git a/src/toolbox/avl.c b/src/toolbox/avl.c index 54195c0aa..ded095ab5 100644 --- a/src/toolbox/avl.c +++ b/src/toolbox/avl.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: avl.c 7862 2007-05-03 14:53:39Z twisti $ + $Id: avl.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -63,7 +63,7 @@ avl_tree_t *avl_create(avl_comparator *comparator) #if defined(ENABLE_THREADS) /* create lock object for this tree */ - t->lock = NEW(java_objectheader); + t->lock = NEW(java_object_t); LOCK_INIT_OBJECT_LOCK(t->lock); #endif diff --git a/src/toolbox/avl.h b/src/toolbox/avl.h index 9e9b05229..5b2ce8808 100644 --- a/src/toolbox/avl.h +++ b/src/toolbox/avl.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: avl.h 7860 2007-05-03 12:30:05Z twisti $ + $Id: avl.h 8295 2007-08-11 17:57:24Z michi $ */ @@ -58,7 +58,7 @@ typedef struct avl_node_t avl_node_t; struct avl_tree_t { #if defined(ENABLE_THREADS) - java_objectheader *lock; /* threads lock object */ + java_object_t *lock; /* threads lock object */ #endif avl_node_t *root; /* pointer to root node */ avl_comparator *comparator; /* pointer to comparison function */ diff --git a/src/toolbox/hashtable.c b/src/toolbox/hashtable.c index 4c394c79c..fa3519266 100644 --- a/src/toolbox/hashtable.c +++ b/src/toolbox/hashtable.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: hashtable.c 7813 2007-04-25 19:20:13Z twisti $ + $Id: hashtable.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -51,11 +51,11 @@ void hashtable_create(hashtable *hash, u4 size) /* initialize locking pointer */ #if defined(ENABLE_THREADS) - /* We need to seperately allocate a java_objectheader here, as we + /* We need to seperately allocate a java_object_t here, as we need to store the lock object in the new hashtable if it's resized. Otherwise we get an IllegalMonitorStateException. */ - hash->header = NEW(java_objectheader); + hash->header = NEW(java_object_t); LOCK_INIT_OBJECT_LOCK(hash->header); #endif @@ -91,7 +91,7 @@ hashtable *hashtable_resize(hashtable *hash, u4 size) /* We need to store the old lock object in the new hashtable. Otherwise we get an IllegalMonitorStateException. */ - FREE(newhash->header, java_objectheader); + FREE(newhash->header, java_object_t); newhash->header = hash->header; #endif diff --git a/src/toolbox/hashtable.h b/src/toolbox/hashtable.h index 056dbc1c0..f88f6f888 100644 --- a/src/toolbox/hashtable.h +++ b/src/toolbox/hashtable.h @@ -27,7 +27,7 @@ Authors: Reinhard Grafl Christian Thalinger - $Id: hashtable.h 7246 2007-01-29 18:49:05Z twisti $ + $Id: hashtable.h 8295 2007-08-11 17:57:24Z michi $ */ @@ -102,7 +102,7 @@ hashtable.ptr-->+-------------------+ struct hashtable { #if defined(ENABLE_THREADS) - java_objectheader *header; /* required for locking */ + java_object_t *header; /* required for locking */ #endif u4 size; /* current size of the hashtable */ u4 entries; /* number of entries in the table */ diff --git a/src/toolbox/list.h b/src/toolbox/list.h index 230a80fa2..0552d6bbf 100644 --- a/src/toolbox/list.h +++ b/src/toolbox/list.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: list.h 7905 2007-05-14 14:11:33Z twisti $ + $Id: list.h 8295 2007-08-11 17:57:24Z michi $ */ @@ -109,7 +109,7 @@ typedef struct list_t list_t; struct list_t { #if defined(ENABLE_THREADS) - java_objectheader lock; /* threads lock object */ + java_object_t lock; /* threads lock object */ #endif listnode_t *first; listnode_t *last; diff --git a/src/toolbox/util.c b/src/toolbox/util.c index 548823e1e..a69287905 100644 --- a/src/toolbox/util.c +++ b/src/toolbox/util.c @@ -28,7 +28,7 @@ Changes: - $Id: util.c 5252 2006-08-18 13:07:21Z twisti $ + $Id: util.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -43,8 +43,6 @@ #include "vm/types.h" #include "mm/memory.h" -#include "vm/exceptions.h" -#include "vm/stringlocal.h" #include "vm/vm.h" diff --git a/src/vm/builtin.c b/src/vm/builtin.c index 76662b7f9..77f3ff323 100644 --- a/src/vm/builtin.c +++ b/src/vm/builtin.c @@ -28,7 +28,7 @@ calls instead of machine instructions, using the C calling convention. - $Id: builtin.c 8288 2007-08-10 15:12:00Z twisti $ + $Id: builtin.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -392,7 +392,7 @@ bool builtintable_replace_function(void *iptr_) *******************************************************************************/ -s4 builtin_instanceof(java_objectheader *o, classinfo *class) +s4 builtin_instanceof(java_handle_t *o, classinfo *class) { if (o == NULL) return 0; @@ -409,7 +409,7 @@ s4 builtin_instanceof(java_objectheader *o, classinfo *class) *******************************************************************************/ -s4 builtin_checkcast(java_objectheader *o, classinfo *class) +s4 builtin_checkcast(java_handle_t *o, classinfo *class) { if (o == NULL) return 1; @@ -479,7 +479,7 @@ static s4 builtin_descriptorscompatible(arraydescriptor *desc, *******************************************************************************/ -s4 builtin_arraycheckcast(java_objectheader *o, classinfo *targetclass) +s4 builtin_arraycheckcast(java_handle_t *o, classinfo *targetclass) { arraydescriptor *desc; @@ -495,7 +495,7 @@ s4 builtin_arraycheckcast(java_objectheader *o, classinfo *targetclass) } -s4 builtin_arrayinstanceof(java_objectheader *o, classinfo *targetclass) +s4 builtin_arrayinstanceof(java_handle_t *o, classinfo *targetclass) { if (o == NULL) return 0; @@ -511,7 +511,7 @@ s4 builtin_arrayinstanceof(java_objectheader *o, classinfo *targetclass) *******************************************************************************/ -void *builtin_throw_exception(java_objectheader *xptr) +void *builtin_throw_exception(java_handle_t *xptr) { #if !defined(NDEBUG) java_lang_Throwable *t; @@ -559,7 +559,7 @@ void *builtin_throw_exception(java_objectheader *xptr) if (s) { char *buf; - buf = javastring_tochar((java_objectheader *) s); + buf = javastring_tochar((java_handle_t *) s); strcat(logtext, ": "); strcat(logtext, buf); MFREE(buf, char, strlen(buf) + 1); @@ -597,7 +597,7 @@ void *builtin_throw_exception(java_objectheader *xptr) *******************************************************************************/ -s4 builtin_canstore(java_objectarray *oa, java_objectheader *o) +s4 builtin_canstore(java_objectarray *oa, java_handle_t *o) { arraydescriptor *desc; arraydescriptor *valuedesc; @@ -672,7 +672,7 @@ s4 builtin_canstore(java_objectarray *oa, java_objectheader *o) /* This is an optimized version where a is guaranteed to be one-dimensional */ -s4 builtin_canstore_onedim (java_objectarray *a, java_objectheader *o) +s4 builtin_canstore_onedim (java_objectarray *a, java_handle_t *o) { arraydescriptor *desc; vftbl_t *elementvftbl; @@ -723,7 +723,7 @@ s4 builtin_canstore_onedim (java_objectarray *a, java_objectheader *o) /* This is an optimized version where a is guaranteed to be a * one-dimensional array of a class type */ -s4 builtin_canstore_onedim_class(java_objectarray *a, java_objectheader *o) +s4 builtin_canstore_onedim_class(java_objectarray *a, java_handle_t *o) { vftbl_t *elementvftbl; vftbl_t *valuevftbl; @@ -770,9 +770,9 @@ s4 builtin_canstore_onedim_class(java_objectarray *a, java_objectheader *o) *******************************************************************************/ -java_objectheader *builtin_new(classinfo *c) +java_handle_t *builtin_new(classinfo *c) { - java_objectheader *o; + java_object_t *o; #if defined(ENABLE_RT_TIMING) struct timespec time_start, time_end; #endif @@ -1113,7 +1113,7 @@ static java_arrayheader *builtin_multianewarray_intern(int n, if (!ea) return NULL; - ((java_objectarray *) a)->data[i] = (java_objectheader *) ea; + ((java_objectarray *) a)->data[i] = (java_object_t *) ea; } return a; @@ -1167,10 +1167,10 @@ java_arrayheader *builtin_multianewarray(int n, classinfo *arrayclass, static s4 methodindent = 0; static u4 callcount = 0; -java_objectheader *builtin_trace_exception(java_objectheader *xptr, - methodinfo *m, - void *pos, - s4 indent) +java_handle_t *builtin_trace_exception(java_handle_t *xptr, + methodinfo *m, + void *pos, + s4 indent) { char *logtext; s4 logtextlen; @@ -1320,7 +1320,7 @@ static char *builtin_print_argument(char *logtext, s4 *logtextlen, typedesc *paramtype, s8 value) { imm_union imu; - java_objectheader *o; + java_handle_t *o; classinfo *c; utf *u; u4 len; @@ -1368,7 +1368,7 @@ static char *builtin_print_argument(char *logtext, s4 *logtextlen, /* cast to java.lang.Object */ - o = (java_objectheader *) (ptrint) value; + o = (java_handle_t *) (ptrint) value; /* check return argument for java.lang.Class or java.lang.String */ @@ -2614,7 +2614,7 @@ bool builtin_arraycopy(java_arrayheader *src, s4 srcStart, if (destStart <= srcStart) { for (i = 0; i < len; i++) { - java_objectheader *o = oas->data[srcStart + i]; + java_handle_t *o = oas->data[srcStart + i]; if (!builtin_canstore(oad, o)) return false; @@ -2630,7 +2630,7 @@ bool builtin_arraycopy(java_arrayheader *src, s4 srcStart, index have been copied before the throw. */ for (i = len - 1; i >= 0; i--) { - java_objectheader *o = oas->data[srcStart + i]; + java_handle_t *o = oas->data[srcStart + i]; if (!builtin_canstore(oad, o)) return false; @@ -2686,13 +2686,13 @@ s8 builtin_currenttimemillis(void) *******************************************************************************/ -java_objectheader *builtin_clone(void *env, java_objectheader *o) +java_handle_t *builtin_clone(void *env, java_handle_t *o) { arraydescriptor *ad; java_arrayheader *ah; u4 size; classinfo *c; - java_objectheader *co; /* cloned object header */ + java_handle_t *co; /* cloned object header */ /* get the array descriptor */ diff --git a/src/vm/builtin.h b/src/vm/builtin.h index b845fa0dd..063c61cca 100644 --- a/src/vm/builtin.h +++ b/src/vm/builtin.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: builtin.h 8044 2007-06-07 19:24:35Z twisti $ + $Id: builtin.h 8295 2007-08-11 17:57:24Z michi $ */ @@ -115,24 +115,24 @@ bool builtintable_replace_function(void *iptr); * ICMD_BUILTIN3.) */ -s4 builtin_instanceof(java_objectheader *obj, classinfo *class); +s4 builtin_instanceof(java_handle_t *obj, classinfo *class); #define BUILTIN_instanceof (functionptr) builtin_instanceof -s4 builtin_checkcast(java_objectheader *obj, classinfo *class); +s4 builtin_checkcast(java_handle_t *obj, classinfo *class); /* NOT AN OP */ -s4 builtin_arrayinstanceof(java_objectheader *o, classinfo *targetclass); +s4 builtin_arrayinstanceof(java_handle_t *o, classinfo *targetclass); #define BUILTIN_arrayinstanceof (functionptr) builtin_arrayinstanceof -s4 builtin_arraycheckcast(java_objectheader *o, classinfo *targetclass); +s4 builtin_arraycheckcast(java_handle_t *o, classinfo *targetclass); #define BUILTIN_arraycheckcast (functionptr) builtin_arraycheckcast -void *builtin_throw_exception(java_objectheader *exception); +void *builtin_throw_exception(java_handle_t *exception); /* NOT AN OP */ -java_objectheader *builtin_trace_exception(java_objectheader *xptr, +java_handle_t *builtin_trace_exception(java_handle_t *xptr, methodinfo *m, void *pos, s4 indent); /* NOT AN OP */ -java_objectheader *builtin_new(classinfo *c); +java_handle_t *builtin_new(classinfo *c); #define BUILTIN_new (functionptr) builtin_new java_arrayheader *builtin_newarray(s4 size, classinfo *arrayclass); @@ -162,7 +162,7 @@ java_arrayheader *builtin_multianewarray(int n, classinfo *arrayclass, long *dims); #define BUILTIN_multianewarray (functionptr) builtin_multianewarray -s4 builtin_canstore(java_objectarray *oa, java_objectheader *o); +s4 builtin_canstore(java_objectarray *oa, java_handle_t *o); #define BUILTIN_canstore (functionptr) builtin_canstore #if defined(TRACE_ARGS_NUM) @@ -288,7 +288,7 @@ s8 asm_builtin_d2l(double a); float builtin_d2f(double a); #define BUILTIN_d2f (functionptr) builtin_d2f -java_objectheader *builtin_clone(void *env, java_objectheader *o); +java_handle_t *builtin_clone(void *env, java_handle_t *o); #define BUILTIN_clone (functionptr) builtin_clone bool builtin_arraycopy(java_arrayheader *src, s4 srcStart, diff --git a/src/vm/exceptions.c b/src/vm/exceptions.c index 468137629..6bcd4fd19 100644 --- a/src/vm/exceptions.c +++ b/src/vm/exceptions.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: exceptions.c 8284 2007-08-10 08:58:39Z michi $ + $Id: exceptions.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -79,7 +79,7 @@ /* for raising exceptions from native methods *********************************/ #if !defined(ENABLE_THREADS) -java_objectheader *_no_threads_exceptionptr = NULL; +java_object_t *_no_threads_exceptionptr = NULL; #endif @@ -202,7 +202,7 @@ bool exceptions_init(void) *******************************************************************************/ -java_objectheader *exceptions_get_exception(void) +java_handle_t *exceptions_get_exception(void) { /* return the exception */ @@ -216,7 +216,7 @@ java_objectheader *exceptions_get_exception(void) *******************************************************************************/ -void exceptions_set_exception(java_objectheader *o) +void exceptions_set_exception(java_handle_t *o) { /* set the exception */ @@ -243,9 +243,9 @@ void exceptions_clear_exception(void) *******************************************************************************/ -java_objectheader *exceptions_get_and_clear_exception(void) +java_handle_t *exceptions_get_and_clear_exception(void) { - java_objectheader *o; + java_handle_t *o; /* get the exception */ @@ -270,9 +270,9 @@ java_objectheader *exceptions_get_and_clear_exception(void) *******************************************************************************/ -static java_objectheader *exceptions_new_class(classinfo *c) +static java_handle_t *exceptions_new_class(classinfo *c) { - java_objectheader *o; + java_handle_t *o; o = native_new_and_init(c); @@ -292,10 +292,10 @@ static java_objectheader *exceptions_new_class(classinfo *c) *******************************************************************************/ -static java_objectheader *exceptions_new_utf(utf *classname) +static java_handle_t *exceptions_new_utf(utf *classname) { - classinfo *c; - java_objectheader *o; + classinfo *c; + java_handle_t *o; c = load_class_bootstrap(classname); @@ -320,7 +320,7 @@ static java_objectheader *exceptions_new_utf(utf *classname) static void exceptions_throw_class(classinfo *c) { - java_objectheader *o; + java_handle_t *o; o = exceptions_new_class(c); @@ -366,10 +366,10 @@ static void exceptions_throw_utf(utf *classname) *******************************************************************************/ static void exceptions_throw_utf_throwable(utf *classname, - java_objectheader *cause) + java_handle_t *cause) { classinfo *c; - java_objectheader *o; + java_handle_t *o; methodinfo *m; java_lang_Throwable *object; @@ -416,11 +416,11 @@ static void exceptions_throw_utf_throwable(utf *classname, *******************************************************************************/ static void exceptions_throw_utf_exception(utf *classname, - java_objectheader *exception) + java_handle_t *exception) { - classinfo *c; - java_objectheader *o; - methodinfo *m; + classinfo *c; + java_handle_t *o; + methodinfo *m; c = load_class_bootstrap(classname); @@ -462,10 +462,10 @@ static void exceptions_throw_utf_exception(utf *classname, *******************************************************************************/ -static void exceptions_throw_utf_cause(utf *classname, java_objectheader *cause) +static void exceptions_throw_utf_cause(utf *classname, java_handle_t *cause) { classinfo *c; - java_objectheader *o; + java_handle_t *o; methodinfo *m; java_lang_String *s; java_lang_Throwable *object; @@ -531,11 +531,11 @@ static void exceptions_throw_utf_cause(utf *classname, java_objectheader *cause) *******************************************************************************/ -static java_objectheader *exceptions_new_utf_javastring(utf *classname, - java_objectheader *message) +static java_handle_t *exceptions_new_utf_javastring(utf *classname, + java_handle_t *message) { - java_objectheader *o; - classinfo *c; + java_handle_t *o; + classinfo *c; c = load_class_bootstrap(classname); @@ -561,10 +561,10 @@ static java_objectheader *exceptions_new_utf_javastring(utf *classname, *******************************************************************************/ -static java_objectheader *exceptions_new_class_utf(classinfo *c, utf *message) +static java_handle_t *exceptions_new_class_utf(classinfo *c, utf *message) { - java_objectheader *o; - java_objectheader *s; + java_handle_t *o; + java_handle_t *s; s = javastring_new(message); @@ -595,10 +595,10 @@ static java_objectheader *exceptions_new_class_utf(classinfo *c, utf *message) *******************************************************************************/ -static java_objectheader *exceptions_new_utf_utf(utf *classname, utf *message) +static java_handle_t *exceptions_new_utf_utf(utf *classname, utf *message) { - classinfo *c; - java_objectheader *o; + classinfo *c; + java_handle_t *o; c = load_class_bootstrap(classname); @@ -624,7 +624,7 @@ static java_objectheader *exceptions_new_utf_utf(utf *classname, utf *message) static void exceptions_throw_class_utf(classinfo *c, utf *message) { - java_objectheader *o; + java_handle_t *o; o = exceptions_new_class_utf(c, message); @@ -645,7 +645,7 @@ static void exceptions_throw_class_utf(classinfo *c, utf *message) static void exceptions_throw_utf_utf(utf *classname, utf *message) { - java_objectheader *o; + java_handle_t *o; o = exceptions_new_utf_utf(classname, message); @@ -659,9 +659,9 @@ static void exceptions_throw_utf_utf(utf *classname, utf *message) *******************************************************************************/ -java_objectheader *exceptions_new_abstractmethoderror(void) +java_handle_t *exceptions_new_abstractmethoderror(void) { - java_objectheader *o; + java_handle_t *o; o = exceptions_new_utf(utf_java_lang_AbstractMethodError); @@ -676,9 +676,9 @@ java_objectheader *exceptions_new_abstractmethoderror(void) *******************************************************************************/ #if defined(ENABLE_JAVAME_CLDC1_1) -static java_objectheader *exceptions_new_error(utf *message) +static java_handle_t *exceptions_new_error(utf *message) { - java_objectheader *o; + java_handle_t *o; o = exceptions_new_class_utf(class_java_lang_Error, message); @@ -694,10 +694,10 @@ static java_objectheader *exceptions_new_error(utf *message) *******************************************************************************/ -java_objectheader *exceptions_asm_new_abstractmethoderror(u1 *sp, u1 *ra) +java_object_t *exceptions_asm_new_abstractmethoderror(u1 *sp, u1 *ra) { - stackframeinfo sfi; - java_objectheader *e; + stackframeinfo sfi; + java_handle_t *e; /* create the stackframeinfo (XPC is equal to RA) */ @@ -725,9 +725,9 @@ java_objectheader *exceptions_asm_new_abstractmethoderror(u1 *sp, u1 *ra) *******************************************************************************/ -java_objectheader *exceptions_new_arraystoreexception(void) +java_handle_t *exceptions_new_arraystoreexception(void) { - java_objectheader *o; + java_handle_t *o; o = exceptions_new_utf(utf_java_lang_ArrayStoreException); @@ -869,7 +869,7 @@ void exceptions_throw_noclassdeffounderror(utf *name) *******************************************************************************/ -void exceptions_throw_noclassdeffounderror_cause(java_objectheader *cause) +void exceptions_throw_noclassdeffounderror_cause(java_handle_t *cause) { exceptions_throw_utf_cause(utf_java_lang_NoClassDefFoundError, cause); } @@ -919,7 +919,7 @@ void exceptions_throw_noclassdeffounderror_wrong_name(classinfo *c, utf *name) *******************************************************************************/ -void exceptions_throw_exceptionininitializererror(java_objectheader *cause) +void exceptions_throw_exceptionininitializererror(java_handle_t *cause) { exceptions_throw_utf_throwable(utf_java_lang_ExceptionInInitializerError, cause); @@ -1034,9 +1034,9 @@ void exceptions_throw_internalerror(const char *message, ...) void exceptions_throw_linkageerror(const char *message, classinfo *c) { - java_objectheader *o; - char *msg; - s4 msglen; + java_handle_t *o; + char *msg; + s4 msglen; /* calculate exception message length */ @@ -1385,9 +1385,9 @@ void exceptions_throw_verifyerror_for_stack(methodinfo *m, int type) *******************************************************************************/ -java_objectheader *exceptions_new_arithmeticexception(void) +java_handle_t *exceptions_new_arithmeticexception(void) { - java_objectheader *o; + java_handle_t *o; o = exceptions_new_utf_utf(utf_java_lang_ArithmeticException, utf_division_by_zero); @@ -1403,11 +1403,11 @@ java_objectheader *exceptions_new_arithmeticexception(void) *******************************************************************************/ -java_objectheader *exceptions_new_arrayindexoutofboundsexception(s4 index) +java_handle_t *exceptions_new_arrayindexoutofboundsexception(s4 index) { - java_objectheader *o; - methodinfo *m; - java_objectheader *s; + java_handle_t *o; + methodinfo *m; + java_handle_t *s; /* convert the index into a String, like Sun does */ @@ -1467,10 +1467,10 @@ void exceptions_throw_arraystoreexception(void) *******************************************************************************/ -java_objectheader *exceptions_new_classcastexception(java_objectheader *o) +java_handle_t *exceptions_new_classcastexception(java_handle_t *o) { - java_objectheader *e; - utf *classname; + java_handle_t *e; + utf *classname; classname = o->vftbl->class->name; @@ -1565,7 +1565,7 @@ void exceptions_throw_interruptedexception(void) *******************************************************************************/ -void exceptions_throw_invocationtargetexception(java_objectheader *cause) +void exceptions_throw_invocationtargetexception(java_handle_t *cause) { exceptions_throw_utf_throwable(utf_java_lang_reflect_InvocationTargetException, cause); @@ -1591,9 +1591,9 @@ void exceptions_throw_negativearraysizeexception(void) *******************************************************************************/ -java_objectheader *exceptions_new_nullpointerexception(void) +java_handle_t *exceptions_new_nullpointerexception(void) { - java_objectheader *o; + java_handle_t *o; o = exceptions_new_class(class_java_lang_NullPointerException); @@ -1620,7 +1620,7 @@ void exceptions_throw_nullpointerexception(void) *******************************************************************************/ -void exceptions_throw_privilegedactionexception(java_objectheader *exception) +void exceptions_throw_privilegedactionexception(java_handle_t *exception) { exceptions_throw_utf_exception(utf_java_security_PrivilegedActionException, exception); @@ -1649,8 +1649,8 @@ void exceptions_throw_stringindexoutofboundsexception(void) void exceptions_classnotfoundexception_to_noclassdeffounderror(void) { - java_objectheader *o; - java_objectheader *cause; + java_handle_t *o; + java_handle_t *cause; java_lang_Throwable *object; java_lang_String *s; @@ -1671,7 +1671,7 @@ void exceptions_classnotfoundexception_to_noclassdeffounderror(void) LLNI_field_get_ref(object, detailMessage, s); o = exceptions_new_utf_javastring(utf_java_lang_NoClassDefFoundError, - (java_objectheader *) s); + (java_handle_t *) s); /* we had an exception while creating the error */ @@ -1692,10 +1692,10 @@ void exceptions_classnotfoundexception_to_noclassdeffounderror(void) *******************************************************************************/ -java_objectheader *exceptions_fillinstacktrace(void) +java_handle_t *exceptions_fillinstacktrace(void) { - java_objectheader *o; - methodinfo *m; + java_handle_t *o; + methodinfo *m; /* get exception */ @@ -1746,7 +1746,7 @@ java_objectheader *exceptions_fillinstacktrace(void) *******************************************************************************/ #if defined(ENABLE_JIT) -u1 *exceptions_handle_exception(java_objectheader *xptr, u1 *xpc, u1 *pv, u1 *sp) +u1 *exceptions_handle_exception(java_object_t *xptr, u1 *xpc, u1 *pv, u1 *sp) { methodinfo *m; codeinfo *code; @@ -1757,7 +1757,7 @@ u1 *exceptions_handle_exception(java_objectheader *xptr, u1 *xpc, u1 *pv, u1 *sp classref_or_classinfo cr; classinfo *c; #if defined(ENABLE_THREADS) - java_objectheader *o; + java_object_t *o; #endif #ifdef __S390__ @@ -1900,9 +1900,9 @@ u1 *exceptions_handle_exception(java_objectheader *xptr, u1 *xpc, u1 *pv, u1 *sp # if (defined(__MIPS__) && (SIZEOF_VOID_P == 4)) || defined(__I386__) || defined(__POWERPC__) /* XXX change this if we ever want to use 4-byte stackslots */ - o = *((java_objectheader **) (sp + issync - 8)); + o = *((java_object_t **) (sp + issync - 8)); # else - o = *((java_objectheader **) (sp + issync - SIZEOF_VOID_P)); + o = *((java_object_t **) (sp + issync - SIZEOF_VOID_P)); # endif assert(o != NULL); @@ -1929,7 +1929,7 @@ u1 *exceptions_handle_exception(java_objectheader *xptr, u1 *xpc, u1 *pv, u1 *sp *******************************************************************************/ -void exceptions_print_exception(java_objectheader *xptr) +void exceptions_print_exception(java_handle_t *xptr) { java_lang_Throwable *t; #if defined(ENABLE_JAVASE) @@ -1958,7 +1958,7 @@ void exceptions_print_exception(java_objectheader *xptr) LLNI_field_get_ref(t, detailMessage, s); if (s != NULL) { - u = javastring_toutf((java_objectheader *) s, false); + u = javastring_toutf((java_handle_t *) s, false); printf(": "); utf_display_printable_ascii(u); @@ -1978,7 +1978,7 @@ void exceptions_print_exception(java_objectheader *xptr) LLNI_field_get_ref(cause, detailMessage, s); if (s != NULL) { - u = javastring_toutf((java_objectheader *) s, false); + u = javastring_toutf((java_handle_t *) s, false); printf(": "); utf_display_printable_ascii(u); @@ -1999,7 +1999,7 @@ void exceptions_print_exception(java_objectheader *xptr) void exceptions_print_current_exception(void) { - java_objectheader *o; + java_handle_t *o; o = exceptions_get_exception(); @@ -2019,10 +2019,10 @@ void exceptions_print_current_exception(void) void exceptions_print_stacktrace(void) { - java_objectheader *oxptr; - java_objectheader *xptr; - classinfo *c; - methodinfo *m; + java_handle_t *oxptr; + java_handle_t *xptr; + classinfo *c; + methodinfo *m; /* get original exception */ diff --git a/src/vm/exceptions.h b/src/vm/exceptions.h index 5144a8ff4..627169e7d 100644 --- a/src/vm/exceptions.h +++ b/src/vm/exceptions.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: exceptions.h 8283 2007-08-09 15:10:05Z twisti $ + $Id: exceptions.h 8295 2007-08-11 17:57:24Z michi $ */ @@ -54,7 +54,7 @@ a base of NULL which should result in a NullPointerException. NOTE: In exceptions_init() we have a check whether the offset of - java_objectheader.data[0] is greater than the largest displacement + java_arrayheader.data[0] is greater than the largest displacement defined below. Otherwise normal array loads/stores could trigger an exception. @@ -74,34 +74,34 @@ /* function prototypes ********************************************************/ -bool exceptions_init(void); +bool exceptions_init(void); -java_objectheader *exceptions_get_exception(void); -void exceptions_set_exception(java_objectheader *o); -void exceptions_clear_exception(void); -java_objectheader *exceptions_get_and_clear_exception(void); +java_handle_t *exceptions_get_exception(void); +void exceptions_set_exception(java_handle_t *o); +void exceptions_clear_exception(void); +java_handle_t *exceptions_get_and_clear_exception(void); -java_objectheader *new_exception_utfmessage(const char *classname, +java_handle_t *new_exception_utfmessage(const char *classname, utf *message); /* functions to generate compiler exceptions */ -java_objectheader *exceptions_new_abstractmethoderror(void); -java_objectheader *exceptions_asm_new_abstractmethoderror(u1 *sp, u1 *ra); -java_objectheader *exceptions_new_arraystoreexception(void); +java_handle_t *exceptions_new_abstractmethoderror(void); +java_handle_t *exceptions_asm_new_abstractmethoderror(u1 *sp, u1 *ra); +java_handle_t *exceptions_new_arraystoreexception(void); void exceptions_throw_abstractmethoderror(void); void exceptions_throw_classcircularityerror(classinfo *c); void exceptions_throw_classformaterror(classinfo *c, const char *message, ...); void exceptions_throw_classnotfoundexception(utf *name); void exceptions_throw_noclassdeffounderror(utf *name); -void exceptions_throw_noclassdeffounderror_cause(java_objectheader *cause); +void exceptions_throw_noclassdeffounderror_cause(java_handle_t *cause); void exceptions_throw_noclassdeffounderror_wrong_name(classinfo *c, utf *name); void exceptions_throw_linkageerror(const char *message, classinfo *c); void exceptions_throw_nosuchfielderror(classinfo *c, utf *name); void exceptions_throw_nosuchmethoderror(classinfo *c, utf *name, utf *desc); -void exceptions_throw_exceptionininitializererror(java_objectheader *cause); +void exceptions_throw_exceptionininitializererror(java_handle_t *cause); void exceptions_throw_incompatibleclasschangeerror(classinfo *c, const char *message); void exceptions_throw_instantiationerror(classinfo *c); @@ -112,13 +112,13 @@ void exceptions_throw_verifyerror_for_stack(methodinfo *m, int type); void exceptions_throw_unsatisfiedlinkerror(utf *name); void exceptions_throw_unsupportedclassversionerror(classinfo *c, u4 ma, u4 mi); -java_objectheader *exceptions_new_arithmeticexception(void); +java_handle_t *exceptions_new_arithmeticexception(void); -java_objectheader *exceptions_new_arrayindexoutofboundsexception(s4 index); +java_handle_t *exceptions_new_arrayindexoutofboundsexception(s4 index); void exceptions_throw_arrayindexoutofboundsexception(void); void exceptions_throw_arraystoreexception(void); -java_objectheader *exceptions_new_classcastexception(java_objectheader *o); +java_handle_t *exceptions_new_classcastexception(java_handle_t *o); void exceptions_throw_clonenotsupportedexception(void); void exceptions_throw_illegalaccessexception(utf *message); @@ -126,19 +126,19 @@ void exceptions_throw_illegalargumentexception(void); void exceptions_throw_illegalmonitorstateexception(void); void exceptions_throw_interruptedexception(void); void exceptions_throw_instantiationexception(classinfo *c); -void exceptions_throw_invocationtargetexception(java_objectheader *cause); +void exceptions_throw_invocationtargetexception(java_handle_t *cause); void exceptions_throw_negativearraysizeexception(void); -java_objectheader *exceptions_new_nullpointerexception(void); +java_handle_t *exceptions_new_nullpointerexception(void); void exceptions_throw_nullpointerexception(void); -void exceptions_throw_privilegedactionexception(java_objectheader *cause); +void exceptions_throw_privilegedactionexception(java_handle_t *cause); void exceptions_throw_stringindexoutofboundsexception(void); void exceptions_classnotfoundexception_to_noclassdeffounderror(void); -java_objectheader *exceptions_fillinstacktrace(void); +java_handle_t *exceptions_fillinstacktrace(void); -void exceptions_print_exception(java_objectheader *xptr); +void exceptions_print_exception(java_handle_t *xptr); void exceptions_print_current_exception(void); void exceptions_print_stacktrace(void); diff --git a/src/vm/finalizer.c b/src/vm/finalizer.c index 4c77e4af2..d265cfae0 100644 --- a/src/vm/finalizer.c +++ b/src/vm/finalizer.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: finalizer.c 7831 2007-04-26 12:48:16Z twisti $ + $Id: finalizer.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -52,7 +52,7 @@ /* global variables ***********************************************************/ #if defined(ENABLE_THREADS) -static java_objectheader *lock_thread_finalizer; +static java_object_t *lock_thread_finalizer; #endif @@ -65,7 +65,7 @@ static java_objectheader *lock_thread_finalizer; bool finalizer_init(void) { #if defined(ENABLE_THREADS) - lock_thread_finalizer = NEW(java_objectheader); + lock_thread_finalizer = NEW(java_object_t); LOCK_INIT_OBJECT_LOCK(lock_thread_finalizer); #endif @@ -168,9 +168,9 @@ void finalizer_notify(void) void finalizer_run(void *o, void *p) { - java_objectheader *ob; + java_object_t *ob; - ob = (java_objectheader *) o; + ob = (java_object_t *) o; /* call the finalizer function */ diff --git a/src/vm/global.h b/src/vm/global.h index ab6165cd9..c0000bbda 100644 --- a/src/vm/global.h +++ b/src/vm/global.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: global.h 8210 2007-07-18 12:51:00Z twisti $ + $Id: global.h 8295 2007-08-11 17:57:24Z michi $ */ @@ -81,7 +81,7 @@ typedef union { /* forward typedefs ***********************************************************/ -typedef struct java_objectheader java_objectheader; +typedef struct java_object_t java_object_t; typedef struct java_objectarray java_objectarray; @@ -196,7 +196,7 @@ typedef struct java_objectarray java_objectarray; /* data structures of the runtime system **************************************/ -/* java_objectheader *********************************************************** +/* java_object_t *************************************************************** All objects (and arrays) which resides on the heap need the following header at the beginning of the data structure. @@ -207,7 +207,7 @@ typedef struct java_objectarray java_objectarray; #define HDRFLAG_FLC 0x01 -struct java_objectheader { /* header for all objects */ +struct java_object_t { /* header for all objects */ struct _vftbl *vftbl; /* pointer to virtual function table */ #if defined(ENABLE_THREADS) struct lock_record_t *monitorPtr; @@ -218,6 +218,15 @@ struct java_objectheader { /* header for all objects */ }; +#if 0 +typedef struct java_handle_t { + java_object_t *heap_object; +} java_handle_t; +#else +typedef java_object_t java_handle_t; +#endif + + /* arrays ********************************************************************** All arrays are objects (they need the object header with a pointer @@ -227,7 +236,7 @@ struct java_objectheader { /* header for all objects */ */ typedef struct java_arrayheader { /* header for all arrays */ - java_objectheader objheader; /* object header */ + java_object_t objheader; /* object header */ s4 size; /* array size */ } java_arrayheader; @@ -282,8 +291,8 @@ typedef struct java_doublearray { use the same machine code */ struct java_objectarray { - java_arrayheader header; - java_objectheader *data[1]; + java_arrayheader header; + java_object_t *data[1]; }; diff --git a/src/vm/initialize.c b/src/vm/initialize.c index 9619b9656..e7b9df436 100644 --- a/src/vm/initialize.c +++ b/src/vm/initialize.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: initialize.c 7813 2007-04-25 19:20:13Z twisti $ + $Id: initialize.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -130,8 +130,8 @@ bool initialize_class(classinfo *c) static bool initialize_class_intern(classinfo *c) { - methodinfo *m; - java_objectheader *xptr; + methodinfo *m; + java_handle_t *xptr; /* maybe the class is not already linked */ diff --git a/src/vm/jit/alpha/codegen.c b/src/vm/jit/alpha/codegen.c index eaafaefc5..42f525979 100644 --- a/src/vm/jit/alpha/codegen.c +++ b/src/vm/jit/alpha/codegen.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: codegen.c 8268 2007-08-07 13:24:43Z twisti $ + $Id: codegen.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -2649,7 +2649,7 @@ gen_method: sizeof(methodptr) * lm->vftblindex; /* implicit null-pointer check */ - M_ALD(REG_METHODPTR, REG_A0, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_METHODPTR, REG_A0, OFFSET(java_object_t, vftbl)); M_ALD(REG_PV, REG_METHODPTR, s1); /* generate the actual call */ @@ -2675,7 +2675,7 @@ gen_method: } /* implicit null-pointer check */ - M_ALD(REG_METHODPTR, REG_A0, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_METHODPTR, REG_A0, OFFSET(java_object_t, vftbl)); M_ALD(REG_METHODPTR, REG_METHODPTR, s1); M_ALD(REG_PV, REG_METHODPTR, s2); @@ -2758,7 +2758,7 @@ gen_method: else emit_label_beqz(cd, BRANCH_LABEL_3, s1); - M_ALD(REG_ITMP2, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ITMP2, s1, OFFSET(java_object_t, vftbl)); M_ILD(REG_ITMP3, REG_ITMP2, OFFSET(vftbl_t, interfacetablelength)); M_LDA(REG_ITMP3, REG_ITMP3, -superindex); @@ -2794,7 +2794,7 @@ gen_method: emit_label_beqz(cd, BRANCH_LABEL_5, s1); } - M_ALD(REG_ITMP2, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ITMP2, s1, OFFSET(java_object_t, vftbl)); M_ALD(REG_ITMP3, REG_PV, disp); CODEGEN_CRITICAL_SECTION_START; @@ -2931,7 +2931,7 @@ gen_method: emit_label_beqz(cd, BRANCH_LABEL_3, s1); } - M_ALD(REG_ITMP1, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ITMP1, s1, OFFSET(java_object_t, vftbl)); M_ILD(REG_ITMP3, REG_ITMP1, OFFSET(vftbl_t, interfacetablelength)); M_LDA(REG_ITMP3, REG_ITMP3, -superindex); M_BLEZ(REG_ITMP3, 2); @@ -2965,7 +2965,7 @@ gen_method: emit_label_beqz(cd, BRANCH_LABEL_5, s1); } - M_ALD(REG_ITMP1, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ITMP1, s1, OFFSET(java_object_t, vftbl)); M_ALD(REG_ITMP2, REG_PV, disp); CODEGEN_CRITICAL_SECTION_START; diff --git a/src/vm/jit/arm/codegen.c b/src/vm/jit/arm/codegen.c index 75a182106..598fdb3aa 100644 --- a/src/vm/jit/arm/codegen.c +++ b/src/vm/jit/arm/codegen.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: codegen.c 8268 2007-08-07 13:24:43Z twisti $ + $Id: codegen.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -2318,7 +2318,7 @@ bool codegen_emit(jitdata *jd) /* implicit null-pointer check */ M_LDR_INTERN(REG_METHODPTR, REG_A0, - OFFSET(java_objectheader, vftbl)); + OFFSET(java_object_t, vftbl)); M_LDR_INTERN(REG_PV, REG_METHODPTR, s1); /* generate the actual call */ @@ -2347,7 +2347,7 @@ bool codegen_emit(jitdata *jd) /* implicit null-pointer check */ M_LDR_INTERN(REG_METHODPTR, REG_A0, - OFFSET(java_objectheader, vftbl)); + OFFSET(java_object_t, vftbl)); M_LDR_INTERN(REG_METHODPTR, REG_METHODPTR, s1); M_LDR_INTERN(REG_PV, REG_METHODPTR, s2); @@ -2472,7 +2472,7 @@ bool codegen_emit(jitdata *jd) emit_label_beq(cd, BRANCH_LABEL_3); } - M_LDR_INTERN(REG_ITMP2, s1, OFFSET(java_objectheader, vftbl)); + M_LDR_INTERN(REG_ITMP2, s1, OFFSET(java_object_t, vftbl)); M_LDR_INTERN(REG_ITMP3, REG_ITMP2, OFFSET(vftbl_t, interfacetablelength)); /* we put unresolved or non-immediate superindices onto dseg */ @@ -2491,7 +2491,7 @@ bool codegen_emit(jitdata *jd) things differently here! */ if ((super == NULL) || !IS_IMM(superindex)) { - M_LDR_INTERN(REG_ITMP3, s1, OFFSET(java_objectheader, vftbl)); + M_LDR_INTERN(REG_ITMP3, s1, OFFSET(java_object_t, vftbl)); /* this assumes something */ assert(OFFSET(vftbl_t, interfacetable[0]) == 0); @@ -2541,7 +2541,7 @@ bool codegen_emit(jitdata *jd) emit_label_beq(cd, BRANCH_LABEL_5); } - M_LDR_INTERN(REG_ITMP2, s1, OFFSET(java_objectheader, vftbl)); + M_LDR_INTERN(REG_ITMP2, s1, OFFSET(java_object_t, vftbl)); M_DSEG_LOAD(REG_ITMP3, disp); CODEGEN_CRITICAL_SECTION_START; @@ -2678,7 +2678,7 @@ bool codegen_emit(jitdata *jd) emit_label_beq(cd, BRANCH_LABEL_3); } - M_LDR_INTERN(REG_ITMP1, s1, OFFSET(java_objectheader, vftbl)); + M_LDR_INTERN(REG_ITMP1, s1, OFFSET(java_object_t, vftbl)); M_LDR_INTERN(REG_ITMP3, REG_ITMP1, OFFSET(vftbl_t, interfacetablelength)); @@ -2752,7 +2752,7 @@ bool codegen_emit(jitdata *jd) emit_label_beq(cd, BRANCH_LABEL_5); } - M_LDR_INTERN(REG_ITMP1, s1, OFFSET(java_objectheader, vftbl)); + M_LDR_INTERN(REG_ITMP1, s1, OFFSET(java_object_t, vftbl)); M_DSEG_LOAD(REG_ITMP2, disp); CODEGEN_CRITICAL_SECTION_START; diff --git a/src/vm/jit/asmpart.h b/src/vm/jit/asmpart.h index 2a5ab87a3..a6bd7ad34 100644 --- a/src/vm/jit/asmpart.h +++ b/src/vm/jit/asmpart.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: asmpart.h 8278 2007-08-08 17:10:18Z michi $ + $Id: asmpart.h 8295 2007-08-11 17:57:24Z michi $ */ @@ -59,12 +59,12 @@ s4 asm_md_init(void); void asm_call_jit_compiler(void); #if defined(ENABLE_JIT) -java_objectheader *asm_vm_call_method(void *pv, uint64_t *array, int32_t stackargs); -int32_t asm_vm_call_method_int(void *pv, uint64_t *array, int32_t stackargs); +java_object_t *asm_vm_call_method(void *pv, uint64_t *array, int32_t stackargs); +int32_t asm_vm_call_method_int(void *pv, uint64_t *array, int32_t stackargs); -int64_t asm_vm_call_method_long(void *pv, uint64_t *array, int32_t stackargs); -float asm_vm_call_method_float(void *pv, uint64_t *array, int32_t stackargs); -double asm_vm_call_method_double(void *pv, uint64_t *array, int32_t stackargs); +int64_t asm_vm_call_method_long(void *pv, uint64_t *array, int32_t stackargs); +float asm_vm_call_method_float(void *pv, uint64_t *array, int32_t stackargs); +double asm_vm_call_method_double(void *pv, uint64_t *array, int32_t stackargs); void asm_vm_call_method_exception_handler(void); void asm_vm_call_method_end(void); diff --git a/src/vm/jit/codegen-common.c b/src/vm/jit/codegen-common.c index ce73608cc..e7ceb3c9f 100644 --- a/src/vm/jit/codegen-common.c +++ b/src/vm/jit/codegen-common.c @@ -39,7 +39,7 @@ memory. All functions writing values into the data area return the offset relative the begin of the code area (start of procedure). - $Id: codegen-common.c 8261 2007-08-06 12:42:31Z michi $ + $Id: codegen-common.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -1402,7 +1402,7 @@ void codegen_start_native_call(u1 *datasp, u1 *pv, u1 *sp, u1 *ra) /* clear the references array (memset is faster the a for-loop) */ - MSET(lrt->refs, 0, java_objectheader*, LOCALREFTABLE_CAPACITY); + MSET(lrt->refs, 0, void*, LOCALREFTABLE_CAPACITY); LOCALREFTABLE = lrt; #endif @@ -1417,16 +1417,16 @@ void codegen_start_native_call(u1 *datasp, u1 *pv, u1 *sp, u1 *ra) *******************************************************************************/ -java_objectheader *codegen_finish_native_call(u1 *datasp) +java_object_t *codegen_finish_native_call(u1 *datasp) { - stackframeinfo *sfi; - stackframeinfo **psfi; + stackframeinfo *sfi; + stackframeinfo **psfi; #if defined(ENABLE_JNI) - localref_table *lrt; - localref_table *plrt; - s4 localframes; + localref_table *lrt; + localref_table *plrt; + s4 localframes; #endif - java_objectheader *e; + java_handle_t *e; /* get data structures from stack */ @@ -1454,7 +1454,7 @@ java_objectheader *codegen_finish_native_call(u1 *datasp) the Java heap). */ if (localframes > 1) - MSET(&lrt->refs[0], 0, java_objectheader*, lrt->capacity); + MSET(&lrt->refs[0], 0, void*, lrt->capacity); lrt->prev = NULL; diff --git a/src/vm/jit/codegen-common.h b/src/vm/jit/codegen-common.h index c6194a63e..d5b41e83b 100644 --- a/src/vm/jit/codegen-common.h +++ b/src/vm/jit/codegen-common.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: codegen-common.h 7908 2007-05-15 09:55:17Z christian $ + $Id: codegen-common.h 8295 2007-08-11 17:57:24Z michi $ */ @@ -325,7 +325,7 @@ void removecompilerstub(u1 *stub); void removenativestub(u1 *stub); void codegen_start_native_call(u1 *datasp, u1 *pv, u1 *sp, u1 *ra); -java_objectheader *codegen_finish_native_call(u1 *datasp); +java_object_t *codegen_finish_native_call(u1 *datasp); s4 codegen_reg_of_var(u2 opcode, varinfo *v, s4 tempregnum); s4 codegen_reg_of_dst(jitdata *jd, instruction *iptr, s4 tempregnum); diff --git a/src/vm/jit/i386/codegen.c b/src/vm/jit/i386/codegen.c index a5629b453..884adc089 100644 --- a/src/vm/jit/i386/codegen.c +++ b/src/vm/jit/i386/codegen.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: codegen.c 8268 2007-08-07 13:24:43Z twisti $ + $Id: codegen.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -3006,7 +3006,7 @@ gen_method: } M_ALD(REG_METHODPTR, REG_ITMP1, - OFFSET(java_objectheader, vftbl)); + OFFSET(java_object_t, vftbl)); M_ALD32(REG_ITMP3, REG_METHODPTR, s1); M_CALL(REG_ITMP3); break; @@ -3034,7 +3034,7 @@ gen_method: } M_ALD(REG_METHODPTR, REG_ITMP1, - OFFSET(java_objectheader, vftbl)); + OFFSET(java_object_t, vftbl)); M_ALD32(REG_METHODPTR, REG_METHODPTR, s1); M_ALD32(REG_ITMP3, REG_METHODPTR, s2); M_CALL(REG_ITMP3); @@ -3120,7 +3120,7 @@ gen_method: emit_label_beq(cd, BRANCH_LABEL_3); } - M_ALD(REG_ITMP2, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ITMP2, s1, OFFSET(java_object_t, vftbl)); if (super == NULL) { codegen_addpatchref(cd, PATCHER_checkcast_interface, @@ -3158,7 +3158,7 @@ gen_method: emit_label_beq(cd, BRANCH_LABEL_5); } - M_ALD(REG_ITMP2, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ITMP2, s1, OFFSET(java_object_t, vftbl)); if (super == NULL) { codegen_addpatchref(cd, PATCHER_checkcast_class, @@ -3283,7 +3283,7 @@ gen_method: emit_label_beq(cd, BRANCH_LABEL_3); } - M_ALD(REG_ITMP1, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ITMP1, s1, OFFSET(java_object_t, vftbl)); if (super == NULL) { codegen_addpatchref(cd, PATCHER_instanceof_interface, @@ -3325,7 +3325,7 @@ gen_method: emit_label_beq(cd, BRANCH_LABEL_5); } - M_ALD(REG_ITMP1, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ITMP1, s1, OFFSET(java_object_t, vftbl)); if (super == NULL) { codegen_addpatchref(cd, PATCHER_instanceof_class, diff --git a/src/vm/jit/i386/patcher.c b/src/vm/jit/i386/patcher.c index 8bd37746e..709cc5a03 100644 --- a/src/vm/jit/i386/patcher.c +++ b/src/vm/jit/i386/patcher.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: patcher.c 8268 2007-08-07 13:24:43Z twisti $ + $Id: patcher.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -64,14 +64,14 @@ *******************************************************************************/ -java_objectheader *patcher_wrapper(u1 *sp, u1 *pv, u1 *ra) +java_object_t *patcher_wrapper(u1 *sp, u1 *pv, u1 *ra) { stackframeinfo sfi; u1 *xpc; - java_objectheader *o; + java_object_t *o; functionptr f; bool result; - java_objectheader *e; + java_handle_t *e; /* define the patcher function */ @@ -80,7 +80,7 @@ java_objectheader *patcher_wrapper(u1 *sp, u1 *pv, u1 *ra) /* get stuff from the stack */ xpc = (u1 *) *((ptrint *) (sp + 6 * 4)); - o = (java_objectheader *) *((ptrint *) (sp + 4 * 4)); + o = (java_object_t *) *((ptrint *) (sp + 4 * 4)); f = (functionptr) *((ptrint *) (sp + 0 * 4)); /* calculate and set the new return address */ diff --git a/src/vm/jit/jit.h b/src/vm/jit/jit.h index 95015104d..a9dff9f33 100644 --- a/src/vm/jit/jit.h +++ b/src/vm/jit/jit.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: jit.h 8123 2007-06-20 23:50:55Z michi $ + $Id: jit.h 8295 2007-08-11 17:57:24Z michi $ */ @@ -333,7 +333,7 @@ typedef union { float f; double d; void *anyptr; - java_objectheader *stringconst; /* for ACONST with string */ + java_handle_t *stringconst; /* for ACONST with string */ classref_or_classinfo c; /* for ACONST with class */ } val_operand_t; diff --git a/src/vm/jit/m68k/codegen.c b/src/vm/jit/m68k/codegen.c index b3ecefddb..d218170c0 100644 --- a/src/vm/jit/m68k/codegen.c +++ b/src/vm/jit/m68k/codegen.c @@ -1730,7 +1730,7 @@ bool codegen_emit(jitdata *jd) /* load object pointer (==argument 0) */ M_ALD(REG_ATMP1, REG_SP, 0); /* implicit null-pointer check */ - M_ALD(REG_METHODPTR, REG_ATMP1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_METHODPTR, REG_ATMP1, OFFSET(java_object_t, vftbl)); M_ALD(REG_ATMP3, REG_METHODPTR, s1); /* generate the actual call */ M_JSR(REG_ATMP3); @@ -1749,7 +1749,7 @@ bool codegen_emit(jitdata *jd) M_ALD(REG_ATMP1, REG_SP, 0); /* implicit null-pointer check */ - M_ALD(REG_METHODPTR, REG_ATMP1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_METHODPTR, REG_ATMP1, OFFSET(java_object_t, vftbl)); M_ALD(REG_METHODPTR, REG_METHODPTR, s1); M_ALD(REG_ATMP3, REG_METHODPTR, s2); @@ -2037,7 +2037,7 @@ nowperformreturn: emit_label_beq(cd, BRANCH_LABEL_3); } - M_ALD(REG_ATMP1, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ATMP1, s1, OFFSET(java_object_t, vftbl)); M_ILD(REG_ITMP3, REG_ATMP1, OFFSET(vftbl_t, interfacetablelength)); M_IADD_IMM(-superindex, REG_ITMP3); /* -superindex may be patched patched */ M_ITST(REG_ITMP3); @@ -2067,7 +2067,7 @@ nowperformreturn: emit_label_beq(cd, BRANCH_LABEL_5); } - M_ALD(REG_ATMP1, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ATMP1, s1, OFFSET(java_object_t, vftbl)); CODEGEN_CRITICAL_SECTION_START; @@ -2157,7 +2157,7 @@ nowperformreturn: emit_label_beq(cd, BRANCH_LABEL_3); } - M_ALD(REG_ATMP2, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ATMP2, s1, OFFSET(java_object_t, vftbl)); M_ILD(REG_ITMP3, REG_ATMP2, OFFSET(vftbl_t, interfacetablelength)); M_IADD_IMM(-superindex, REG_ITMP3); /* superindex patched */ @@ -2188,7 +2188,7 @@ nowperformreturn: emit_label_beq(cd, BRANCH_LABEL_5); } - M_ALD(REG_ATMP2, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ATMP2, s1, OFFSET(java_object_t, vftbl)); CODEGEN_CRITICAL_SECTION_START; diff --git a/src/vm/jit/mips/codegen.c b/src/vm/jit/mips/codegen.c index a55c3a964..2940354fb 100644 --- a/src/vm/jit/mips/codegen.c +++ b/src/vm/jit/mips/codegen.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: codegen.c 8268 2007-08-07 13:24:43Z twisti $ + $Id: codegen.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -3156,7 +3156,7 @@ gen_method: sizeof(methodptr) * lm->vftblindex; /* implicit null-pointer check */ - M_ALD(REG_METHODPTR, REG_A0, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_METHODPTR, REG_A0, OFFSET(java_object_t, vftbl)); M_ALD(REG_PV, REG_METHODPTR, s1); /* generate the actual call */ @@ -3185,7 +3185,7 @@ gen_method: } /* implicit null-pointer check */ - M_ALD(REG_METHODPTR, REG_A0, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_METHODPTR, REG_A0, OFFSET(java_object_t, vftbl)); M_ALD(REG_METHODPTR, REG_METHODPTR, s1); M_ALD(REG_PV, REG_METHODPTR, s2); @@ -3280,7 +3280,7 @@ gen_method: emit_label_beqz(cd, BRANCH_LABEL_3, s1); } - M_ALD(REG_ITMP2, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ITMP2, s1, OFFSET(java_object_t, vftbl)); M_ILD(REG_ITMP3, REG_ITMP2, OFFSET(vftbl_t, interfacetablelength)); M_IADD_IMM(REG_ITMP3, -superindex, REG_ITMP3); @@ -3316,7 +3316,7 @@ gen_method: emit_label_beqz(cd, BRANCH_LABEL_5, s1); } - M_ALD(REG_ITMP2, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ITMP2, s1, OFFSET(java_object_t, vftbl)); M_ALD(REG_ITMP3, REG_PV, disp); CODEGEN_CRITICAL_SECTION_START; @@ -3443,7 +3443,7 @@ gen_method: emit_label_beqz(cd, BRANCH_LABEL_3, s1); } - M_ALD(REG_ITMP1, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ITMP1, s1, OFFSET(java_object_t, vftbl)); M_ILD(REG_ITMP3, REG_ITMP1, OFFSET(vftbl_t, interfacetablelength)); M_IADD_IMM(REG_ITMP3, -superindex, REG_ITMP3); @@ -3478,7 +3478,7 @@ gen_method: emit_label_beqz(cd, BRANCH_LABEL_5, s1); } - M_ALD(REG_ITMP1, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ITMP1, s1, OFFSET(java_object_t, vftbl)); M_ALD(REG_ITMP2, REG_PV, disp); CODEGEN_CRITICAL_SECTION_START; diff --git a/src/vm/jit/optimizing/recompile.c b/src/vm/jit/optimizing/recompile.c index bca3ef36c..558236c20 100644 --- a/src/vm/jit/optimizing/recompile.c +++ b/src/vm/jit/optimizing/recompile.c @@ -55,8 +55,8 @@ /* global variables ***********************************************************/ -static java_objectheader *lock_thread_recompile; -static list_t *list_recompile_methods; +static java_object_t *lock_thread_recompile; +static list_t *list_recompile_methods; /* recompile_init ************************************************************** @@ -69,7 +69,7 @@ bool recompile_init(void) { /* initialize the recompile lock object */ - lock_thread_recompile = NEW(java_objectheader); + lock_thread_recompile = NEW(java_object_t); lock_init_object_lock(lock_thread_recompile); diff --git a/src/vm/jit/patcher-common.c b/src/vm/jit/patcher-common.c index 30c99e37f..83d308c64 100644 --- a/src/vm/jit/patcher-common.c +++ b/src/vm/jit/patcher-common.c @@ -197,14 +197,14 @@ static int patcher_depth = 0; # define TRACE_PATCHER_INDENT for (i=0; idown == calleeframe); @@ -3214,8 +3214,8 @@ void replace_executionstate_println(executionstate_t *es) #if !defined(NDEBUG) static void java_value_print(s4 type, replace_val_t value) { - java_objectheader *obj; - utf *u; + java_object_t *obj; + utf *u; printf("%016llx",(unsigned long long) value.l); diff --git a/src/vm/jit/replace.h b/src/vm/jit/replace.h index a4fb44a32..b27ae9b43 100644 --- a/src/vm/jit/replace.h +++ b/src/vm/jit/replace.h @@ -139,16 +139,16 @@ struct rplpoint { union replace_val_t { - s4 i; - s8 l; - ptrint p; + s4 i; + s8 l; + ptrint p; struct { u4 lo; u4 hi; - } words; - float f; - double d; - java_objectheader *a; + } words; + float f; + double d; + java_object_t *a; }; diff --git a/src/vm/jit/s390/codegen.c b/src/vm/jit/s390/codegen.c index c7d0e2ff4..c12b0170c 100644 --- a/src/vm/jit/s390/codegen.c +++ b/src/vm/jit/s390/codegen.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: codegen.c 8278 2007-08-08 17:10:18Z michi $ + $Id: codegen.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -2851,7 +2851,7 @@ gen_method: /* implicit null-pointer check */ - M_ALD(REG_METHODPTR, REG_A0, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_METHODPTR, REG_A0, OFFSET(java_object_t, vftbl)); M_ALD(REG_PV, REG_METHODPTR, s1); break; @@ -2876,7 +2876,7 @@ gen_method: } /* Implicit null-pointer check */ - M_ALD(REG_METHODPTR, REG_A0, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_METHODPTR, REG_A0, OFFSET(java_object_t, vftbl)); N_LHI(REG_ITMP1, s1); N_L(REG_METHODPTR, 0, REG_ITMP1, REG_METHODPTR); M_ALD(REG_PV, REG_METHODPTR, s2); @@ -3011,7 +3011,7 @@ gen_method: emit_label_beq(cd, LABEL_EXIT_INTERFACE_NULL); } - M_ALD(REG_ITMP2, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ITMP2, s1, OFFSET(java_object_t, vftbl)); M_ILD(REG_ITMP3, REG_ITMP2, OFFSET(vftbl_t, interfacetablelength)); M_ISUB_IMM(superindex, REG_ITMP3); emit_classcast_check(cd, iptr, BRANCH_LE, RN, s1); @@ -3049,7 +3049,7 @@ gen_method: emit_label_beq(cd, LABEL_EXIT_CLASS_NULL); } - M_ALD(REG_ITMP2, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ITMP2, s1, OFFSET(java_object_t, vftbl)); M_ALD_DSEG(REG_ITMP3, disp); CODEGEN_CRITICAL_SECTION_START; @@ -3217,7 +3217,7 @@ gen_method: emit_label_beq(cd, LABEL_EXIT_INTERFACE_NULL); } - M_ALD(REG_ITMP1, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ITMP1, s1, OFFSET(java_object_t, vftbl)); M_ILD(REG_ITMP3, REG_ITMP1, OFFSET(vftbl_t, interfacetablelength)); M_ISUB_IMM(superindex, REG_ITMP3); @@ -3264,7 +3264,7 @@ gen_method: emit_label_beq(cd, LABEL_EXIT_CLASS_NULL); } - M_ALD(REG_ITMP1, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ITMP1, s1, OFFSET(java_object_t, vftbl)); M_ALD_DSEG(REG_ITMP2, disp); CODEGEN_CRITICAL_SECTION_START; diff --git a/src/vm/jit/show.c b/src/vm/jit/show.c index 0c2d989ed..11f01a5c3 100644 --- a/src/vm/jit/show.c +++ b/src/vm/jit/show.c @@ -64,7 +64,7 @@ /* global variables ***********************************************************/ #if defined(ENABLE_THREADS) && !defined(NDEBUG) -static java_objectheader *show_global_lock; +static java_object_t *show_global_lock; #endif @@ -87,7 +87,7 @@ bool show_init(void) #if defined(ENABLE_THREADS) /* initialize the show lock */ - show_global_lock = NEW(java_objectheader); + show_global_lock = NEW(java_object_t); LOCK_INIT_OBJECT_LOCK(show_global_lock); #endif @@ -696,7 +696,7 @@ void show_basicblock(jitdata *jd, basicblock *bptr, int stage) if (stage >= SHOW_PARSE) { \ putchar('"'); \ utf_display_printable_ascii( \ - javastring_toutf((java_objectheader *)(val), false)); \ + javastring_toutf((java_handle_t *)(val), false)); \ printf("\" "); \ } \ else { \ diff --git a/src/vm/jit/sparc64/codegen.c b/src/vm/jit/sparc64/codegen.c index acc2f5c31..46a1557b9 100644 --- a/src/vm/jit/sparc64/codegen.c +++ b/src/vm/jit/sparc64/codegen.c @@ -2557,7 +2557,7 @@ gen_method: sizeof(methodptr) * lm->vftblindex; /* implicit null-pointer check */ - M_ALD(REG_METHODPTR, REG_OUT0,OFFSET(java_objectheader, vftbl)); + M_ALD(REG_METHODPTR, REG_OUT0,OFFSET(java_object_t, vftbl)); M_ALD(REG_PV_CALLER, REG_METHODPTR, s1); /* generate the actual call */ @@ -2586,7 +2586,7 @@ gen_method: } /* implicit null-pointer check */ - M_ALD(REG_METHODPTR, REG_OUT0, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_METHODPTR, REG_OUT0, OFFSET(java_object_t, vftbl)); M_ALD(REG_METHODPTR, REG_METHODPTR, s1); M_ALD(REG_PV_CALLER, REG_METHODPTR, s2); @@ -2685,7 +2685,7 @@ gen_method: emit_label_beqz(cd, BRANCH_LABEL_3, s1); } - M_ALD(REG_ITMP2, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ITMP2, s1, OFFSET(java_object_t, vftbl)); M_ILD(REG_ITMP3, REG_ITMP2, OFFSET(vftbl_t, interfacetablelength)); M_ADD_IMM(REG_ITMP3, -superindex, REG_ITMP3); @@ -2721,7 +2721,7 @@ gen_method: emit_label_beqz(cd, BRANCH_LABEL_5, s1); } - M_ALD(REG_ITMP2, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ITMP2, s1, OFFSET(java_object_t, vftbl)); M_ALD(REG_ITMP3, REG_PV, disp); CODEGEN_CRITICAL_SECTION_START; @@ -2857,7 +2857,7 @@ gen_method: emit_label_beqz(cd, BRANCH_LABEL_3, s1); } - M_ALD(REG_ITMP1, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ITMP1, s1, OFFSET(java_object_t, vftbl)); M_ILD(REG_ITMP3, REG_ITMP1, OFFSET(vftbl_t, interfacetablelength)); M_CMP_IMM(REG_ITMP3, superindex); M_BLE(4); @@ -2891,7 +2891,7 @@ gen_method: emit_label_beqz(cd, BRANCH_LABEL_5, s1); } - M_ALD(REG_ITMP1, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ITMP1, s1, OFFSET(java_object_t, vftbl)); M_ALD(REG_ITMP2, REG_PV, disp); CODEGEN_CRITICAL_SECTION_START; diff --git a/src/vm/jit/sparc64/patcher.c b/src/vm/jit/sparc64/patcher.c index c3afd5ec1..ce1e45d08 100644 --- a/src/vm/jit/sparc64/patcher.c +++ b/src/vm/jit/sparc64/patcher.c @@ -69,12 +69,12 @@ *******************************************************************************/ -java_objectheader *patcher_wrapper(u1 *sp, u1 *pv, u1 *ra) +java_object_t *patcher_wrapper(u1 *sp, u1 *pv, u1 *ra) { stackframeinfo sfi; u1 *xpc; u1 *javasp; - java_objectheader *o; + java_object_t *o; #if SIZEOF_VOID_P == 8 u8 mcode; #else @@ -82,7 +82,7 @@ java_objectheader *patcher_wrapper(u1 *sp, u1 *pv, u1 *ra) #endif functionptr f; bool result; - java_objectheader *e; + java_handle_t *e; /* define the patcher function */ @@ -93,7 +93,7 @@ java_objectheader *patcher_wrapper(u1 *sp, u1 *pv, u1 *ra) /* get stuff from the stack */ xpc = (u1 *) *((ptrint *) (sp + 5 * 8)); - o = (java_objectheader *) *((ptrint *) (sp + 4 * 8)); + o = (java_object_t *) *((ptrint *) (sp + 4 * 8)); f = (functionptr) *((ptrint *) (sp + 0 * 8)); /* store PV into the patcher function position */ diff --git a/src/vm/jit/stacktrace.c b/src/vm/jit/stacktrace.c index c207af31f..91a25d18d 100644 --- a/src/vm/jit/stacktrace.c +++ b/src/vm/jit/stacktrace.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: stacktrace.c 8284 2007-08-10 08:58:39Z michi $ + $Id: stacktrace.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -782,7 +782,7 @@ java_objectarray *stacktrace_getClassContext(void) continue; } - oa->data[i] = (java_objectheader *) ste->method->class; + oa->data[i] = (java_object_t *) ste->method->class; } /* release dump memory */ @@ -892,7 +892,7 @@ java_objectarray *stacktrace_getStack(void) java_objectarray *classes; java_objectarray *methodnames; classinfo *c; - java_objectheader *string; + java_handle_t *string; s4 i; s4 dumpsize; CYCLES_STATS_DECLARE_AND_START @@ -931,15 +931,15 @@ java_objectarray *stacktrace_getStack(void) /* set up the 2-dimensional array */ - oa->data[0] = (java_objectheader *) classes; - oa->data[1] = (java_objectheader *) methodnames; + oa->data[0] = (java_object_t *) classes; + oa->data[1] = (java_object_t *) methodnames; /* iterate over all stacktrace entries */ for (i = 0, ste = &(stb->entries[0]); i < stb->used; i++, ste++) { c = ste->method->class; - classes->data[i] = (java_objectheader *) c; + classes->data[i] = (java_object_t *) c; string = javastring_new(ste->method->name); @@ -1015,7 +1015,7 @@ void stacktrace_print_trace_from_buffer(stacktracebuffer *stb) *******************************************************************************/ -void stacktrace_print_trace(java_objectheader *xptr) +void stacktrace_print_trace(java_handle_t *xptr) { java_lang_Throwable *t; #if defined(WITH_CLASSPATH_GNU) diff --git a/src/vm/jit/stacktrace.h b/src/vm/jit/stacktrace.h index e771a1ac5..ebdb2a2c8 100644 --- a/src/vm/jit/stacktrace.h +++ b/src/vm/jit/stacktrace.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: stacktrace.h 7658 2007-04-03 16:06:30Z twisti $ + $Id: stacktrace.h 8295 2007-08-11 17:57:24Z michi $ */ @@ -125,7 +125,7 @@ java_objectarray *stacktrace_getStack(void); #endif void stacktrace_print_trace_from_buffer(stacktracebuffer *stb); -void stacktrace_print_trace(java_objectheader *xptr); +void stacktrace_print_trace(java_handle_t *xptr); /* machine dependent functions (code in ARCH_DIR/md.c) */ diff --git a/src/vm/jit/x86_64/codegen.c b/src/vm/jit/x86_64/codegen.c index 08789c8f5..357e0731c 100644 --- a/src/vm/jit/x86_64/codegen.c +++ b/src/vm/jit/x86_64/codegen.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: codegen.c 8268 2007-08-07 13:24:43Z twisti $ + $Id: codegen.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -2466,7 +2466,7 @@ gen_method: } /* implicit null-pointer check */ - M_ALD(REG_METHODPTR, REG_A0, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_METHODPTR, REG_A0, OFFSET(java_object_t, vftbl)); M_ALD32(REG_ITMP3, REG_METHODPTR, s1); M_CALL(REG_ITMP3); break; @@ -2486,7 +2486,7 @@ gen_method: } /* implicit null-pointer check */ - M_ALD(REG_METHODPTR, REG_A0, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_METHODPTR, REG_A0, OFFSET(java_object_t, vftbl)); M_ALD32(REG_METHODPTR, REG_METHODPTR, s1); M_ALD32(REG_ITMP3, REG_METHODPTR, s2); M_CALL(REG_ITMP3); @@ -2571,7 +2571,7 @@ gen_method: emit_label_beq(cd, BRANCH_LABEL_3); } - M_ALD(REG_ITMP2, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ITMP2, s1, OFFSET(java_object_t, vftbl)); if (super == NULL) { codegen_add_patch_ref(cd, PATCHER_checkcast_interface, @@ -2607,7 +2607,7 @@ gen_method: emit_label_beq(cd, BRANCH_LABEL_5); } - M_ALD(REG_ITMP2, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ITMP2, s1, OFFSET(java_object_t, vftbl)); if (super == NULL) { codegen_add_patch_ref(cd, PATCHER_checkcast_class, @@ -2737,7 +2737,7 @@ gen_method: emit_label_beq(cd, BRANCH_LABEL_3); } - M_ALD(REG_ITMP1, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ITMP1, s1, OFFSET(java_object_t, vftbl)); if (super == NULL) { codegen_add_patch_ref(cd, PATCHER_instanceof_interface, @@ -2774,7 +2774,7 @@ gen_method: emit_label_beq(cd, BRANCH_LABEL_5); } - M_ALD(REG_ITMP1, s1, OFFSET(java_objectheader, vftbl)); + M_ALD(REG_ITMP1, s1, OFFSET(java_object_t, vftbl)); if (super == NULL) { codegen_add_patch_ref(cd, PATCHER_instanceof_class, diff --git a/src/vm/jit/x86_64/patcher.c b/src/vm/jit/x86_64/patcher.c index dee83f47e..664090fa3 100644 --- a/src/vm/jit/x86_64/patcher.c +++ b/src/vm/jit/x86_64/patcher.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: patcher.c 8268 2007-08-07 13:24:43Z twisti $ + $Id: patcher.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -64,14 +64,14 @@ *******************************************************************************/ -java_objectheader *patcher_wrapper(u1 *sp, u1 *pv, u1 *ra) +java_object_t *patcher_wrapper(u1 *sp, u1 *pv, u1 *ra) { stackframeinfo sfi; u1 *xpc; - java_objectheader *o; + java_object_t *o; functionptr f; bool result; - java_objectheader *e; + java_handle_t *e; /* define the patcher function */ @@ -80,7 +80,7 @@ java_objectheader *patcher_wrapper(u1 *sp, u1 *pv, u1 *ra) /* get stuff from the stack */ xpc = (u1 *) *((ptrint *) (sp + 5 * 8)); - o = (java_objectheader *) *((ptrint *) (sp + 4 * 8)); + o = (java_object_t *) *((ptrint *) (sp + 4 * 8)); f = (functionptr) *((ptrint *) (sp + 0 * 8)); /* calculate and set the new return address */ diff --git a/src/vm/primitive.c b/src/vm/primitive.c index 53e0e9837..93eac1d73 100644 --- a/src/vm/primitive.c +++ b/src/vm/primitive.c @@ -174,9 +174,9 @@ classinfo *primitive_arrayclass_get_by_type(int type) *******************************************************************************/ -java_objectheader *primitive_box(int type, imm_union value) +java_handle_t *primitive_box(int type, imm_union value) { - java_objectheader *o; + java_handle_t *o; switch (type) { case PRIMITIVETYPE_BOOLEAN: @@ -217,7 +217,7 @@ java_objectheader *primitive_box(int type, imm_union value) *******************************************************************************/ -imm_union primitive_unbox(int type, java_objectheader *o) +imm_union primitive_unbox(int type, java_handle_t *o) { imm_union value; @@ -261,9 +261,9 @@ imm_union primitive_unbox(int type, java_objectheader *o) *******************************************************************************/ #define PRIMITIVE_BOX_TYPE(name, object, type) \ -java_objectheader *primitive_box_##name(type value) \ +java_handle_t *primitive_box_##name(type value) \ { \ - java_objectheader *o; \ + java_handle_t *o; \ java_lang_##object *jo; \ \ o = builtin_new(class_java_lang_##object); \ @@ -295,7 +295,7 @@ PRIMITIVE_BOX_TYPE(double, Double, double) *******************************************************************************/ #define PRIMITIVE_UNBOX_TYPE(name, object, type) \ -type primitive_unbox_##name(java_objectheader *o) \ +type primitive_unbox_##name(java_handle_t *o) \ { \ java_lang_##object *jo; \ type value; \ diff --git a/src/vm/primitive.h b/src/vm/primitive.h index b2caca5cc..5695f8fdd 100644 --- a/src/vm/primitive.h +++ b/src/vm/primitive.h @@ -113,26 +113,26 @@ classinfo *primitive_class_get_by_char(char ch); classinfo *primitive_arrayclass_get_by_name(utf *name); classinfo *primitive_arrayclass_get_by_type(int type); -java_objectheader *primitive_box(int type, imm_union value); -imm_union primitive_unbox(int type, java_objectheader *o); - -java_objectheader *primitive_box_boolean(int32_t value); -java_objectheader *primitive_box_byte(int32_t value); -java_objectheader *primitive_box_char(int32_t value); -java_objectheader *primitive_box_short(int32_t value); -java_objectheader *primitive_box_int(int32_t value); -java_objectheader *primitive_box_long(int64_t value); -java_objectheader *primitive_box_float(float value); -java_objectheader *primitive_box_double(double value); - -int32_t primitive_unbox_boolean(java_objectheader *o); -int32_t primitive_unbox_byte(java_objectheader *o); -int32_t primitive_unbox_char(java_objectheader *o); -int32_t primitive_unbox_short(java_objectheader *o); -int32_t primitive_unbox_int(java_objectheader *o); -int64_t primitive_unbox_long(java_objectheader *o); -float primitive_unbox_float(java_objectheader *o); -double primitive_unbox_double(java_objectheader *o); +java_handle_t *primitive_box(int type, imm_union value); +imm_union primitive_unbox(int type, java_handle_t *o); + +java_handle_t *primitive_box_boolean(int32_t value); +java_handle_t *primitive_box_byte(int32_t value); +java_handle_t *primitive_box_char(int32_t value); +java_handle_t *primitive_box_short(int32_t value); +java_handle_t *primitive_box_int(int32_t value); +java_handle_t *primitive_box_long(int64_t value); +java_handle_t *primitive_box_float(float value); +java_handle_t *primitive_box_double(double value); + +int32_t primitive_unbox_boolean(java_handle_t *o); +int32_t primitive_unbox_byte(java_handle_t *o); +int32_t primitive_unbox_char(java_handle_t *o); +int32_t primitive_unbox_short(java_handle_t *o); +int32_t primitive_unbox_int(java_handle_t *o); +int64_t primitive_unbox_long(java_handle_t *o); +float primitive_unbox_float(java_handle_t *o); +double primitive_unbox_double(java_handle_t *o); #endif /* _PRIMITIVE_H */ diff --git a/src/vm/properties.c b/src/vm/properties.c index ab49257b1..69458063f 100644 --- a/src/vm/properties.c +++ b/src/vm/properties.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: properties.c 8236 2007-07-27 10:18:17Z twisti $ + $Id: properties.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -390,11 +390,11 @@ char *properties_get(char *key) *******************************************************************************/ -void properties_system_add(java_objectheader *p, char *key, char *value) +void properties_system_add(java_handle_t *p, char *key, char *value) { - methodinfo *m; - java_objectheader *k; - java_objectheader *v; + methodinfo *m; + java_handle_t *k; + java_handle_t *v; /* search for method to add properties */ @@ -427,12 +427,12 @@ void properties_system_add(java_objectheader *p, char *key, char *value) *******************************************************************************/ #if defined(ENABLE_JAVASE) -void properties_system_add_all(java_objectheader *p) +void properties_system_add_all(java_handle_t *p) { list_properties_entry *pe; methodinfo *m; - java_objectheader *key; - java_objectheader *value; + java_handle_t *key; + java_handle_t *value; /* search for method to add properties */ @@ -454,7 +454,7 @@ void properties_system_add_all(java_objectheader *p) key = javastring_new_from_utf_string(pe->key); value = javastring_new_from_utf_string(pe->value); - (void) vm_call_method(m, (java_objectheader *) p, key, value); + (void) vm_call_method(m, (java_handle_t *) p, key, value); } } #endif /* defined(ENABLE_JAVASE) */ diff --git a/src/vm/properties.h b/src/vm/properties.h index a983c081d..d1e383751 100644 --- a/src/vm/properties.h +++ b/src/vm/properties.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: properties.h 8236 2007-07-27 10:18:17Z twisti $ + $Id: properties.h 8295 2007-08-11 17:57:24Z michi $ */ @@ -43,10 +43,10 @@ bool properties_init(void); void properties_add(char *key, char *value); char *properties_get(char *key); -void properties_system_add(java_objectheader *p, char *key, char *value); +void properties_system_add(java_handle_t *p, char *key, char *value); #if defined(ENABLE_JAVASE) -void properties_system_add_all(java_objectheader *p); +void properties_system_add_all(java_handle_t *p); #endif #endif /* _PROPERTIES_H */ diff --git a/src/vm/signal.c b/src/vm/signal.c index 794bc54b9..ec84f5180 100644 --- a/src/vm/signal.c +++ b/src/vm/signal.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: signal.c 8283 2007-08-09 15:10:05Z twisti $ + $Id: signal.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -217,9 +217,9 @@ void signal_register_signal(int signum, void *handler, int flags) void *signal_handle(void *xpc, int type, intptr_t val) { - void *p; - int32_t index; - java_objectheader *o; + void *p; + int32_t index; + java_object_t *o; switch (type) { case EXCEPTION_HARDWARE_NULLPOINTER: @@ -236,7 +236,7 @@ void *signal_handle(void *xpc, int type, intptr_t val) break; case EXCEPTION_HARDWARE_CLASSCAST: - o = (java_objectheader *) val; + o = (java_object_t *) val; p = exceptions_new_classcastexception(o); break; diff --git a/src/vm/string.c b/src/vm/string.c index d291704be..8f13e685e 100644 --- a/src/vm/string.c +++ b/src/vm/string.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: string.c 8288 2007-08-10 15:12:00Z twisti $ + $Id: string.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -64,7 +64,7 @@ hashtable hashtable_string; /* hashtable for javastrings */ #if defined(ENABLE_THREADS) -static java_objectheader *lock_hashtable_string; +static java_object_t *lock_hashtable_string; #endif @@ -83,7 +83,7 @@ bool string_init(void) #if defined(ENABLE_THREADS) /* create string hashtable lock object */ - lock_hashtable_string = NEW(java_objectheader); + lock_hashtable_string = NEW(java_object_t); LOCK_INIT_OBJECT_LOCK(lock_hashtable_string); #endif @@ -155,12 +155,12 @@ void stringtable_update(void) *******************************************************************************/ -static java_objectheader *javastring_new_from_utf_buffer(const char *buffer, +static java_handle_t *javastring_new_from_utf_buffer(const char *buffer, u4 blength) { const char *utf_ptr; /* current utf character in utf string */ u4 utflength; /* length of utf-string if uncompressed */ - java_objectheader *o; + java_handle_t *o; java_lang_String *s; /* result-string */ java_chararray *a; u4 i; @@ -211,11 +211,11 @@ static java_objectheader *javastring_new_from_utf_buffer(const char *buffer, *******************************************************************************/ -java_objectheader *javastring_safe_new_from_utf8(const char *text) +java_handle_t *javastring_safe_new_from_utf8(const char *text) { - java_objectheader *o; - java_chararray *a; - java_lang_String *s; + java_handle_t *o; + java_chararray *a; + java_lang_String *s; s4 nbytes; s4 len; @@ -271,7 +271,7 @@ java_objectheader *javastring_safe_new_from_utf8(const char *text) *******************************************************************************/ -java_objectheader *javastring_new_from_utf_string(const char *utfstr) +java_handle_t *javastring_new_from_utf_string(const char *utfstr) { assert(utfstr); @@ -288,13 +288,13 @@ java_objectheader *javastring_new_from_utf_string(const char *utfstr) *******************************************************************************/ -java_objectheader *javastring_new(utf *u) +java_handle_t *javastring_new(utf *u) { char *utf_ptr; /* current utf character in utf string */ u4 utflength; /* length of utf-string if uncompressed */ - java_objectheader *o; - java_chararray *a; - java_lang_String *s; + java_handle_t *o; + java_chararray *a; + java_lang_String *s; s4 i; if (u == NULL) { @@ -339,13 +339,13 @@ java_objectheader *javastring_new(utf *u) *******************************************************************************/ -java_objectheader *javastring_new_slash_to_dot(utf *u) +java_handle_t *javastring_new_slash_to_dot(utf *u) { char *utf_ptr; /* current utf character in utf string */ u4 utflength; /* length of utf-string if uncompressed */ - java_objectheader *o; - java_chararray *a; - java_lang_String *s; + java_handle_t *o; + java_chararray *a; + java_lang_String *s; s4 i; u2 ch; @@ -399,13 +399,13 @@ java_objectheader *javastring_new_slash_to_dot(utf *u) *******************************************************************************/ -java_objectheader *javastring_new_from_ascii(const char *text) +java_handle_t *javastring_new_from_ascii(const char *text) { s4 i; s4 len; /* length of the string */ - java_objectheader *o; - java_lang_String *s; - java_chararray *a; + java_handle_t *o; + java_lang_String *s; + java_chararray *a; if (text == NULL) { exceptions_throw_nullpointerexception(); @@ -449,7 +449,7 @@ java_objectheader *javastring_new_from_ascii(const char *text) *******************************************************************************/ -char *javastring_tochar(java_objectheader *so) +char *javastring_tochar(java_handle_t *so) { java_lang_String *s = (java_lang_String *) so; java_chararray *a; @@ -481,7 +481,7 @@ char *javastring_tochar(java_objectheader *so) *******************************************************************************/ -utf *javastring_toutf(java_objectheader *string, bool isclassname) +utf *javastring_toutf(java_handle_t *string, bool isclassname) { java_lang_String *s; @@ -503,7 +503,7 @@ utf *javastring_toutf(java_objectheader *string, bool isclassname) *******************************************************************************/ -java_objectheader *literalstring_u2(java_chararray *a, u4 length, u4 offset, +java_object_t *literalstring_u2(java_chararray *a, u4 length, u4 offset, bool copymode) { literalstring *s; /* hashtable element */ @@ -538,7 +538,7 @@ java_objectheader *literalstring_u2(java_chararray *a, u4 length, u4 offset, LOCK_MONITOR_EXIT(lock_hashtable_string); - return (java_objectheader *) js; + return (java_object_t *) js; } nomatch: @@ -595,7 +595,7 @@ java_objectheader *literalstring_u2(java_chararray *a, u4 length, u4 offset, #endif s->hashlink = hashtable_string.ptr[slot]; - s->string = (java_objectheader *) js; + s->string = (java_object_t *) js; hashtable_string.ptr[slot] = s; /* update number of hashtable entries */ @@ -645,7 +645,7 @@ java_objectheader *literalstring_u2(java_chararray *a, u4 length, u4 offset, LOCK_MONITOR_EXIT(lock_hashtable_string); - return (java_objectheader *) js; + return (java_object_t *) js; } @@ -656,7 +656,7 @@ java_objectheader *literalstring_u2(java_chararray *a, u4 length, u4 offset, *******************************************************************************/ -java_objectheader *literalstring_new(utf *u) +java_object_t *literalstring_new(utf *u) { char *utf_ptr; /* pointer to current unicode character */ /* utf string */ @@ -684,7 +684,7 @@ java_objectheader *literalstring_new(utf *u) *******************************************************************************/ -void literalstring_free(java_objectheader* string) +void literalstring_free(java_object_t* string) { java_lang_String *s; java_chararray *a; diff --git a/src/vm/stringlocal.h b/src/vm/stringlocal.h index c1ad5b62c..88b09d74d 100644 --- a/src/vm/stringlocal.h +++ b/src/vm/stringlocal.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: stringlocal.h 7967 2007-05-25 15:03:46Z twisti $ + $Id: stringlocal.h 8295 2007-08-11 17:57:24Z michi $ */ @@ -47,7 +47,7 @@ typedef struct literalstring literalstring; struct literalstring { literalstring *hashlink; /* link for external hash chain */ - java_objectheader *string; + java_object_t *string; }; @@ -63,35 +63,35 @@ bool string_init(void); void stringtable_update(void); /* creates a new object of type java/lang/String from a utf-text */ -java_objectheader *javastring_new(utf *text); +java_handle_t *javastring_new(utf *text); /* creates a new object of type java/lang/String from a utf-text, changes slashes to dots */ -java_objectheader *javastring_new_slash_to_dot(utf *text); +java_handle_t *javastring_new_slash_to_dot(utf *text); /* creates a new object of type java/lang/String from an ASCII c-string */ -java_objectheader *javastring_new_from_ascii(const char *text); +java_handle_t *javastring_new_from_ascii(const char *text); /* creates a new object of type java/lang/String from UTF-8 */ -java_objectheader *javastring_new_from_utf_string(const char *utfstr); +java_handle_t *javastring_new_from_utf_string(const char *utfstr); /* creates a new object of type java/lang/String from (possibly invalid) UTF-8 */ -java_objectheader *javastring_safe_new_from_utf8(const char *text); +java_handle_t *javastring_safe_new_from_utf8(const char *text); /* make c-string from a javastring (debugging) */ -char *javastring_tochar(java_objectheader *string); +char *javastring_tochar(java_handle_t *string); /* make utf symbol from javastring */ -utf *javastring_toutf(java_objectheader *string, bool isclassname); +utf *javastring_toutf(java_handle_t *string, bool isclassname); /* creates a new javastring with the text of the u2-array */ -java_objectheader *literalstring_u2(java_chararray *a, u4 length, u4 offset, +java_object_t *literalstring_u2(java_chararray *a, u4 length, u4 offset, bool copymode); /* creates a new javastring with the text of the utf-symbol */ -java_objectheader *literalstring_new(utf *u); +java_object_t *literalstring_new(utf *u); /* dispose a javastring */ -void literalstring_free(java_objectheader*); +void literalstring_free(java_object_t*); #endif /* _STRINGLOCAL_H */ diff --git a/src/vm/vm.c b/src/vm/vm.c index 682700555..c6131b7cb 100644 --- a/src/vm/vm.c +++ b/src/vm/vm.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: vm.c 8292 2007-08-11 12:39:28Z twisti $ + $Id: vm.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -1810,12 +1810,12 @@ void vm_run(JavaVM *vm, JavaVMInitArgs *vm_args) { utf *mainutf; classinfo *mainclass; - java_objectheader *e; + java_handle_t *e; methodinfo *m; java_objectarray *oa; s4 oalength; utf *u; - java_objectheader *s; + java_handle_t *s; s4 status; s4 i; @@ -2153,10 +2153,10 @@ void vm_abort(const char *text, ...) static char *vm_get_mainclass_from_jar(char *mainstring) { - classinfo *c; - java_objectheader *o; - methodinfo *m; - java_objectheader *s; + classinfo *c; + java_handle_t *o; + methodinfo *m; + java_handle_t *s; c = load_class_from_sysloader(utf_new_char("java/util/jar/JarFile")); @@ -2558,7 +2558,7 @@ static void vm_array_store_adr(uint64_t *array, paramdesc *pd, void *value) *******************************************************************************/ -uint64_t *vm_array_from_valist(methodinfo *m, java_objectheader *o, va_list ap) +uint64_t *vm_array_from_valist(methodinfo *m, java_object_t *o, va_list ap) { methoddesc *md; paramdesc *pd; @@ -2636,7 +2636,7 @@ uint64_t *vm_array_from_valist(methodinfo *m, java_objectheader *o, va_list ap) *******************************************************************************/ -static uint64_t *vm_array_from_jvalue(methodinfo *m, java_objectheader *o, +static uint64_t *vm_array_from_jvalue(methodinfo *m, java_object_t *o, const jvalue *args) { methoddesc *md; @@ -2707,18 +2707,18 @@ static uint64_t *vm_array_from_jvalue(methodinfo *m, java_objectheader *o, *******************************************************************************/ -uint64_t *vm_array_from_objectarray(methodinfo *m, java_objectheader *o, +uint64_t *vm_array_from_objectarray(methodinfo *m, java_object_t *o, java_objectarray *params) { - methoddesc *md; - paramdesc *pd; - typedesc *td; - uint64_t *array; - java_objectheader *param; - classinfo *c; - int32_t i; - int32_t j; - imm_union value; + methoddesc *md; + paramdesc *pd; + typedesc *td; + uint64_t *array; + java_object_t *param; + classinfo *c; + int32_t i; + int32_t j; + imm_union value; /* get the descriptors */ @@ -2919,7 +2919,7 @@ illegal_arg: *******************************************************************************/ #define VM_CALL_METHOD(name, type) \ -type vm_call_method##name(methodinfo *m, java_objectheader *o, ...) \ +type vm_call_method##name(methodinfo *m, java_handle_t *o, ...) \ { \ va_list ap; \ type value; \ @@ -2931,7 +2931,7 @@ type vm_call_method##name(methodinfo *m, java_objectheader *o, ...) \ return value; \ } -VM_CALL_METHOD(, java_objectheader *) +VM_CALL_METHOD(, java_handle_t *) VM_CALL_METHOD(_int, int32_t) VM_CALL_METHOD(_long, int64_t) VM_CALL_METHOD(_float, float) @@ -2946,7 +2946,7 @@ VM_CALL_METHOD(_double, double) *******************************************************************************/ #define VM_CALL_METHOD_VALIST(name, type) \ -type vm_call_method##name##_valist(methodinfo *m, java_objectheader *o, \ +type vm_call_method##name##_valist(methodinfo *m, java_handle_t *o, \ va_list ap) \ { \ int32_t dumpsize; \ @@ -2961,7 +2961,7 @@ type vm_call_method##name##_valist(methodinfo *m, java_objectheader *o, \ return value; \ } -VM_CALL_METHOD_VALIST(, java_objectheader *) +VM_CALL_METHOD_VALIST(, java_handle_t *) VM_CALL_METHOD_VALIST(_int, int32_t) VM_CALL_METHOD_VALIST(_long, int64_t) VM_CALL_METHOD_VALIST(_float, float) @@ -2976,7 +2976,7 @@ VM_CALL_METHOD_VALIST(_double, double) *******************************************************************************/ #define VM_CALL_METHOD_JVALUE(name, type) \ -type vm_call_method##name##_jvalue(methodinfo *m, java_objectheader *o, \ +type vm_call_method##name##_jvalue(methodinfo *m, java_handle_t *o, \ const jvalue *args) \ { \ int32_t dumpsize; \ @@ -2991,7 +2991,7 @@ type vm_call_method##name##_jvalue(methodinfo *m, java_objectheader *o, \ return value; \ } -VM_CALL_METHOD_JVALUE(, java_objectheader *) +VM_CALL_METHOD_JVALUE(, java_handle_t *) VM_CALL_METHOD_JVALUE(_int, int32_t) VM_CALL_METHOD_JVALUE(_long, int64_t) VM_CALL_METHOD_JVALUE(_float, float) @@ -3027,7 +3027,7 @@ type vm_call##name##_array(methodinfo *m, uint64_t *array) \ return value; \ } -VM_CALL_ARRAY(, java_objectheader *) +VM_CALL_ARRAY(, java_handle_t *) VM_CALL_ARRAY(_int, int32_t) VM_CALL_ARRAY(_long, int64_t) VM_CALL_ARRAY(_float, float) diff --git a/src/vm/vm.h b/src/vm/vm.h index 4bf996240..1c78bd6df 100644 --- a/src/vm/vm.h +++ b/src/vm/vm.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: vm.h 8293 2007-08-11 12:40:22Z twisti $ + $Id: vm.h 8295 2007-08-11 17:57:24Z michi $ */ @@ -86,36 +86,36 @@ void vm_abort(const char *text, ...); /* Java method calling functions */ -uint64_t *vm_array_from_objectarray(methodinfo *m, java_objectheader *o, +uint64_t *vm_array_from_objectarray(methodinfo *m, java_handle_t *o, java_objectarray *params); -java_objectheader *vm_call_method(methodinfo *m, java_objectheader *o, ...); -java_objectheader *vm_call_method_valist(methodinfo *m, java_objectheader *o, +java_handle_t *vm_call_method(methodinfo *m, java_handle_t *o, ...); +java_handle_t *vm_call_method_valist(methodinfo *m, java_handle_t *o, va_list ap); -java_objectheader *vm_call_method_jvalue(methodinfo *m, java_objectheader *o, +java_handle_t *vm_call_method_jvalue(methodinfo *m, java_handle_t *o, const jvalue *args); -java_objectheader *vm_call_array(methodinfo *m, uint64_t *array); +java_handle_t *vm_call_array(methodinfo *m, uint64_t *array); int32_t vm_call_int_array(methodinfo *m, uint64_t *array); int64_t vm_call_long_array(methodinfo *m, uint64_t *array); float vm_call_float_array(methodinfo *m, uint64_t *array); double vm_call_double_array(methodinfo *m, uint64_t *array); -int32_t vm_call_method_int(methodinfo *m, java_objectheader *o, ...); -int32_t vm_call_method_int_valist(methodinfo *m, java_objectheader *o, va_list ap); -int32_t vm_call_method_int_jvalue(methodinfo *m, java_objectheader *o, const jvalue *args); +int32_t vm_call_method_int(methodinfo *m, java_handle_t *o, ...); +int32_t vm_call_method_int_valist(methodinfo *m, java_handle_t *o, va_list ap); +int32_t vm_call_method_int_jvalue(methodinfo *m, java_handle_t *o, const jvalue *args); -int64_t vm_call_method_long(methodinfo *m, java_objectheader *o, ...); -int64_t vm_call_method_long_valist(methodinfo *m, java_objectheader *o, va_list ap); -int64_t vm_call_method_long_jvalue(methodinfo *m, java_objectheader *o, const jvalue *args); +int64_t vm_call_method_long(methodinfo *m, java_handle_t *o, ...); +int64_t vm_call_method_long_valist(methodinfo *m, java_handle_t *o, va_list ap); +int64_t vm_call_method_long_jvalue(methodinfo *m, java_handle_t *o, const jvalue *args); -float vm_call_method_float(methodinfo *m, java_objectheader *o, ...); -float vm_call_method_float_valist(methodinfo *m, java_objectheader *o, va_list ap); -float vm_call_method_float_jvalue(methodinfo *m, java_objectheader *o, const jvalue *args); +float vm_call_method_float(methodinfo *m, java_handle_t *o, ...); +float vm_call_method_float_valist(methodinfo *m, java_handle_t *o, va_list ap); +float vm_call_method_float_jvalue(methodinfo *m, java_handle_t *o, const jvalue *args); -double vm_call_method_double(methodinfo *m, java_objectheader *o, ...); -double vm_call_method_double_valist(methodinfo *m, java_objectheader *o, va_list ap); -double vm_call_method_double_jvalue(methodinfo *m, java_objectheader *o, const jvalue *args); +double vm_call_method_double(methodinfo *m, java_handle_t *o, ...); +double vm_call_method_double_valist(methodinfo *m, java_handle_t *o, va_list ap); +double vm_call_method_double_jvalue(methodinfo *m, java_handle_t *o, const jvalue *args); #endif /* _VM_H */ diff --git a/src/vmcore/class.c b/src/vmcore/class.c index 2f71a7180..2833926c0 100644 --- a/src/vmcore/class.c +++ b/src/vmcore/class.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: class.c 8277 2007-08-08 16:42:11Z michi $ + $Id: class.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -290,7 +290,7 @@ void class_postset_header_vftbl(void) *******************************************************************************/ -classinfo *class_define(utf *name, java_objectheader *cl, int32_t length, const uint8_t *data) +classinfo *class_define(utf *name, classloader *cl, int32_t length, const uint8_t *data) { classinfo *c; classinfo *r; @@ -822,8 +822,8 @@ void class_free(classinfo *c) *******************************************************************************/ -static classinfo *get_array_class(utf *name,java_objectheader *initloader, - java_objectheader *defloader,bool link) +static classinfo *get_array_class(utf *name,classloader *initloader, + classloader *defloader,bool link) { classinfo *c; @@ -863,7 +863,7 @@ static classinfo *get_array_class(utf *name,java_objectheader *initloader, classinfo *class_array_of(classinfo *component, bool link) { - java_objectheader *cl; + classloader *cl; s4 namelen; char *namebuf; utf *u; diff --git a/src/vmcore/class.h b/src/vmcore/class.h index d159945f9..10e04b104 100644 --- a/src/vmcore/class.h +++ b/src/vmcore/class.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: class.h 8249 2007-07-31 12:59:03Z panzi $ + $Id: class.h 8295 2007-08-11 17:57:24Z michi $ */ @@ -85,7 +85,7 @@ typedef struct castinfo castinfo; runtime in vm_create. */ typedef struct { - java_objectheader header; + java_object_t header; #if defined(WITH_CLASSPATH_GNU) intptr_t padding[4]; #elif defined(WITH_CLASSPATH_SUN) @@ -157,7 +157,7 @@ struct classinfo { /* class structure */ annotation_bytearrays_t *field_annotations; #endif #endif - java_objectheader *classloader; /* NULL for bootstrap classloader */ + classloader *classloader; /* NULL for bootstrap classloader */ }; @@ -304,7 +304,7 @@ extern classinfo *pseudo_class_New; classinfo *class_create_classinfo(utf *u); void class_postset_header_vftbl(void); -classinfo *class_define(utf *name, java_objectheader *cl, int32_t length, const uint8_t *data); +classinfo *class_define(utf *name, classloader *cl, int32_t length, const uint8_t *data); void class_set_packagename(classinfo *c); bool class_load_attributes(classbuffer *cb); diff --git a/src/vmcore/classcache.c b/src/vmcore/classcache.c index 93107b50b..27013ef2f 100644 --- a/src/vmcore/classcache.c +++ b/src/vmcore/classcache.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: classcache.c 7813 2007-04-25 19:20:13Z twisti $ + $Id: classcache.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -227,7 +227,7 @@ void classcache_print_statistics(FILE *file) { hashtable hashtable_classcache; #if defined(ENABLE_THREADS) -static java_objectheader *lock_hashtable_classcache; +static java_object_t *lock_hashtable_classcache; #endif @@ -262,7 +262,7 @@ bool classcache_init(void) #if defined(ENABLE_THREADS) /* create utf hashtable lock object */ - lock_hashtable_classcache = NEW(java_objectheader); + lock_hashtable_classcache = NEW(java_object_t); LOCK_INIT_OBJECT_LOCK(lock_hashtable_classcache); #endif diff --git a/src/vmcore/classcache.h b/src/vmcore/classcache.h index 4fcb86801..dc520b94a 100644 --- a/src/vmcore/classcache.h +++ b/src/vmcore/classcache.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: classcache.h 7246 2007-01-29 18:49:05Z twisti $ + $Id: classcache.h 8295 2007-08-11 17:57:24Z michi $ */ @@ -53,8 +53,6 @@ typedef struct classcache_name_entry classcache_name_entry; typedef struct classcache_class_entry classcache_class_entry; typedef struct classcache_loader_entry classcache_loader_entry; -typedef java_objectheader classloader; - /* global variables ***********************************************************/ extern hashtable hashtable_classcache; diff --git a/src/vmcore/linker.c b/src/vmcore/linker.c index 8438109c7..3b7b25626 100644 --- a/src/vmcore/linker.c +++ b/src/vmcore/linker.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: linker.c 8288 2007-08-10 15:12:00Z twisti $ + $Id: linker.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -75,7 +75,7 @@ classinfo *resolve_classref_or_classinfo_eager(classref_or_classinfo cls, bool c static s4 interfaceindex; /* sequential numbering of interfaces */ static s4 classvalue; -java_objectheader *linker_classrenumber_lock; +java_object_t *linker_classrenumber_lock; /* private functions **********************************************************/ @@ -140,7 +140,7 @@ bool linker_init(void) #if defined(ENABLE_THREADS) /* create the global lock object */ - linker_classrenumber_lock = NEW(java_objectheader); + linker_classrenumber_lock = NEW(java_object_t); LOCK_INIT_OBJECT_LOCK(linker_classrenumber_lock); #endif @@ -574,7 +574,7 @@ static classinfo *link_class_intern(classinfo *c) if (c->super.any == NULL) { /* class java.lang.Object */ c->index = 0; - c->instancesize = sizeof(java_objectheader); + c->instancesize = sizeof(java_object_t); vftbllength = supervftbllength = 0; diff --git a/src/vmcore/linker.h b/src/vmcore/linker.h index 44ba317be..864851366 100644 --- a/src/vmcore/linker.h +++ b/src/vmcore/linker.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: linker.h 8123 2007-06-20 23:50:55Z michi $ + $Id: linker.h 8295 2007-08-11 17:57:24Z michi $ */ @@ -139,7 +139,7 @@ struct arraydescriptor { /* This lock must be taken while renumbering classes or while atomically */ /* accessing classes. */ -extern java_objectheader *linker_classrenumber_lock; +extern java_object_t *linker_classrenumber_lock; /* function prototypes ********************************************************/ diff --git a/src/vmcore/loader.c b/src/vmcore/loader.c index f2762b05e..5e910a435 100644 --- a/src/vmcore/loader.c +++ b/src/vmcore/loader.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: loader.c 8288 2007-08-10 15:12:00Z twisti $ + $Id: loader.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -845,9 +845,9 @@ bool loader_load_attribute_signature(classbuffer *cb, utf **signature) classinfo *load_class_from_sysloader(utf *name) { - methodinfo *m; - java_objectheader *cl; - classinfo *c; + methodinfo *m; + classloader *cl; + classinfo *c; assert(class_java_lang_Object); assert(class_java_lang_ClassLoader); @@ -887,12 +887,12 @@ classinfo *load_class_from_sysloader(utf *name) *******************************************************************************/ -classinfo *load_class_from_classloader(utf *name, java_objectheader *cl) +classinfo *load_class_from_classloader(utf *name, classloader *cl) { - java_objectheader *o; - classinfo *c; - classinfo *tmpc; - java_objectheader *string; + java_handle_t *o; + classinfo *c; + classinfo *tmpc; + java_handle_t *string; #if defined(ENABLE_RT_TIMING) struct timespec time_start, time_lookup, time_prepare, time_java, time_cache; @@ -1780,7 +1780,7 @@ return_exception: *******************************************************************************/ -classinfo *load_newly_created_array(classinfo *c, java_objectheader *loader) +classinfo *load_newly_created_array(classinfo *c, classloader *loader) { classinfo *comp = NULL; methodinfo *clone; diff --git a/src/vmcore/loader.h b/src/vmcore/loader.h index 779018bd7..231e78a3d 100644 --- a/src/vmcore/loader.h +++ b/src/vmcore/loader.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: loader.h 7246 2007-01-29 18:49:05Z twisti $ + $Id: loader.h 8295 2007-08-11 17:57:24Z michi $ */ @@ -109,6 +109,11 @@ struct classbuffer { }; +/* classloader ****************************************************************/ + +typedef java_object_t classloader; + + /* function prototypes ********************************************************/ /* initialize loader, load important systemclasses */ @@ -127,12 +132,12 @@ void loader_close(void); /* class loading functions */ classinfo *load_class_from_sysloader(utf *name); -classinfo *load_class_from_classloader(utf *name, java_objectheader *cl); +classinfo *load_class_from_classloader(utf *name, classloader *cl); classinfo *load_class_bootstrap(utf *name); /* (don't use the following directly) */ classinfo *load_class_from_classbuffer(classbuffer *cb); -classinfo *load_newly_created_array(classinfo *c,java_objectheader *loader); +classinfo *load_newly_created_array(classinfo *c, classloader *loader); #endif /* _LOADER_H */ diff --git a/src/vmcore/method.c b/src/vmcore/method.c index 4615d12b6..87715ad96 100644 --- a/src/vmcore/method.c +++ b/src/vmcore/method.c @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: method.c 8262 2007-08-06 12:44:01Z panzi $ + $Id: method.c 8295 2007-08-11 17:57:24Z michi $ */ @@ -664,7 +664,7 @@ java_objectarray *method_get_parametertypearray(methodinfo *m) if (!resolve_class_from_typedesc(¶mtypes[i], true, false, &c)) return NULL; - oa->data[i] = (java_objectheader *) c; + oa->data[i] = c; } return oa; @@ -698,7 +698,7 @@ java_objectarray *method_get_exceptionarray(methodinfo *m) if (c == NULL) return NULL; - oa->data[i] = (java_objectheader *) c; + oa->data[i] = c; } return oa; diff --git a/src/vmcore/method.h b/src/vmcore/method.h index 9c2b3e811..af9930d54 100644 --- a/src/vmcore/method.h +++ b/src/vmcore/method.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: method.h 8262 2007-08-06 12:44:01Z panzi $ + $Id: method.h 8295 2007-08-11 17:57:24Z michi $ */ @@ -64,7 +64,7 @@ typedef struct codeinfo codeinfo; /* methodinfo *****************************************************************/ struct methodinfo { /* method structure */ - java_objectheader header; /* we need this in jit's monitorenter */ + java_object_t header; /* we need this in jit's monitorenter */ s4 flags; /* ACC flags */ utf *name; /* name of method */ utf *descriptor; /* JavaVM descriptor string of method */ diff --git a/src/vmcore/suck.h b/src/vmcore/suck.h index 1913e5f7f..63543f411 100644 --- a/src/vmcore/suck.h +++ b/src/vmcore/suck.h @@ -22,7 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. - $Id: suck.h 7783 2007-04-20 13:28:27Z twisti $ + $Id: suck.h 8295 2007-08-11 17:57:24Z michi $ */ @@ -53,7 +53,7 @@ typedef struct list_classpath_entry list_classpath_entry; struct list_classpath_entry { #if defined(ENABLE_THREADS) - java_objectheader header; /* monitor locking on zip/jar files */ + java_object_t header; /* monitor locking on zip/jar files */ #endif s4 type; char *path;