(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
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 $
*/
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");
/* builtin ********************************************************************/
-java_objectheader *builtin_clone(void *env, java_objectheader *o)
+java_handle_t *builtin_clone(void *env, java_handle_t *o)
{
abort();
return 0;
}
-java_objectheader *builtin_new(classinfo *c)
+java_handle_t *builtin_new(classinfo *c)
{
abort();
/* 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;
}
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;
}
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!");
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 $
*/
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, "*");
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;
}
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 $
*/
/* 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;
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);
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 $
*/
#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 *****************************************************************
#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
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 $
*/
/* 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;
*******************************************************************************/
-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());
*******************************************************************************/
-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());
*******************************************************************************/
-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;
*******************************************************************************/
-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;
*******************************************************************************/
-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;
*******************************************************************************/
-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;
*******************************************************************************/
-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;
*******************************************************************************/
-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;
*******************************************************************************/
-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;
*******************************************************************************/
-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;
*******************************************************************************/
-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;
*******************************************************************************/
-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;
*******************************************************************************/
-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) {
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);
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);
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());
jthrowable _Jv_JNI_ExceptionOccurred(JNIEnv *env)
{
- java_objectheader *o;
+ java_handle_t *o;
STATISTICS(jniinvokation());
void _Jv_JNI_ExceptionDescribe(JNIEnv *env)
{
- java_objectheader *o;
- methodinfo *m;
+ java_handle_t *o;
+ methodinfo *m;
STATISTICS(jniinvokation());
/* clear all reference entries */
- MSET(&lrt->refs[0], 0, java_objectheader*, lrt->capacity);
+ MSET(&lrt->refs[0], 0, void*, lrt->capacity);
lrt->prev = NULL;
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) */
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;
jobject _Jv_JNI_AllocObject(JNIEnv *env, jclass clazz)
{
- classinfo *c;
- java_objectheader *o;
+ classinfo *c;
+ java_handle_t *o;
STATISTICS(jniinvokation());
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());
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());
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());
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;
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;
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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);
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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;
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);
}
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;
}
{
STATISTICS(jniinvokation());
- SET_FIELD(obj, java_objectheader*, fieldID, value);
+#warning this needs to be fixed
+ SET_FIELD(obj, java_handle_t*, fieldID, value);
}
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;
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;
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;
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;
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();
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());
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();
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);
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);
jboolean _Jv_JNI_ExceptionCheck(JNIEnv *env)
{
- java_objectheader *o;
+ java_handle_t *o;
STATISTICS(jniinvokation());
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;
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;
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 $
*/
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)
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 */
};
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 */
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 $
*/
*******************************************************************************/
#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 */
#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 */
functionptr native_resolve_function(methodinfo *m)
{
- java_objectheader *cl;
+ classloader *cl;
utf *name;
utf *newname;
functionptr f;
#endif
#if defined(WITH_CLASSPATH_SUN)
methodinfo *method_findNative;
- java_objectheader *s;
+ java_handle_t *s;
#endif
cl = m->class->classloader;
*******************************************************************************/
-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");
}
-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");
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 $
*/
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 */
};
# 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 */
/* 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);
}
}
*/
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;
*/
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;
*/
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;
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 */
*/
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);
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 $
*/
*/
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();
*/
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();
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 $
*/
*/
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();
*/
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();
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;
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 $
*/
/* 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 */
*/
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 */
/* 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;
/* 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 */
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 $
*/
*/
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);
*/
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 */
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 $
*/
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;
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 $
*/
*/
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();
*/
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
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 $
*/
return NULL;
}
- if (builtin_instanceof((java_objectheader *) o, c))
+ if (builtin_instanceof((java_handle_t *) o, c))
return (void *) (((intptr_t) o) + f->offset);
}
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);
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. */
/* 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;
*/
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 */
*/
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();
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 $
*/
*/
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);
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();
*/
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();
*/
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
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 $
*/
#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 */
/* 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) */
*/
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))
for (i = 0; i < c->interfacescount; i++) {
ic = c->interfaces[i].cls;
- oa->data[i] = (java_objectheader *) ic;
+ oa->data[i] = ic;
}
return oa;
if (!link_class(inner))
return NULL;
- oa->data[pos++] = (java_objectheader *) inner;
+ oa->data[pos++] = inner;
}
}
/* store object into array */
- oa->data[pos++] = (java_objectheader *) rf;
+ oa->data[pos++] = rf;
}
}
/* store object into array */
- oa->data[pos++] = (java_objectheader *) rm;
+ oa->data[pos++] = rm;
}
}
/* store object into array */
- oa->data[pos++] = (java_objectheader *) rc;
+ oa->data[pos++] = rc;
}
}
*/
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);
}
*/
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;
*/
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 */
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;
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
*/
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;
}
*/
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);
* 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)
return 0;
}
- name = javastring_toutf((java_objectheader *) libname, false);
+ name = javastring_toutf((java_handle_t *) libname, false);
/* is the library already loaded? */
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)
*/
java_lang_String *_Jv_java_lang_String_intern(java_lang_String *s)
{
- java_objectheader *o;
+ java_handle_t *o;
if (s == NULL)
return NULL;
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 $
*/
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();
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);
*/
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);
*/
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);
/* 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);
}
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 $
*/
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;
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;
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;
*******************************************************************************/
java_objectarray* reflect_get_parameterannotations(
- java_objectheader *parameterAnnotations,
+ java_handle_t *parameterAnnotations,
int32_t slot,
java_lang_Class *declaringClass,
classinfo *referer)
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 $
*/
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
/*
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 $
*/
#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);
}
#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);
}
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;
#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);
}
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;
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) {
/* 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);
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);
#if PRINTJVM
log_println("JVM_RawMonitorDestroy: mon=%p", mon);
#endif
- FREE(mon, java_objectheader);
+ FREE(mon, java_object_t);
}
#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;
}
#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);
}
*/
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 */
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;
*/
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);
}
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 */
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 $
*/
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;
*******************************************************************************/
-static void lock_hashtable_remove(java_objectheader *o)
+static void lock_hashtable_remove(java_object_t *o)
{
ptrint lockword;
lock_record_t *lr;
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 */
*******************************************************************************/
-void lock_init_object_lock(java_objectheader *o)
+void lock_init_object_lock(java_object_t *o)
{
assert(o);
*******************************************************************************/
-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;
*******************************************************************************/
-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! */
*******************************************************************************/
-bool lock_monitor_exit(java_objectheader *o)
+bool lock_monitor_exit(java_object_t *o)
{
threadobject *t;
ptrint lockword;
*******************************************************************************/
-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;
*******************************************************************************/
-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;
*******************************************************************************/
-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;
*******************************************************************************/
-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;
*******************************************************************************/
-void lock_notify_object(java_objectheader *o)
+void lock_notify_object(java_object_t *o)
{
threadobject *thread;
*******************************************************************************/
-void lock_notify_all_object(java_objectheader *o)
+void lock_notify_all_object(java_object_t *o)
{
threadobject *thread;
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 $
*/
*******************************************************************************/
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 */
/* 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 */
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 $
*/
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;
LLNI_field_set_val(vmt, vmdata, (java_lang_Object *) mainthread);
/* call java.lang.Thread.<init>(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);
/* call public Thread(String name) */
- o = (java_objectheader *) t;
+ o = (java_handle_t *) t;
(void) vm_call_method(method_thread_init, o, threadname);
#else
class_java_lang_ThreadGroup,
true);
- o = (java_objectheader *) threadgroup;
+ o = (java_handle_t *) threadgroup;
(void) vm_call_method(m, o, t);
sem_t *psem;
classinfo *c;
methodinfo *m;
- java_objectheader *o;
+ java_handle_t *o;
functionptr function;
#if defined(ENABLE_INTRP)
/* 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
{
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)
/* 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,
class_java_lang_ThreadGroup,
true);
- o = (java_objectheader *) group;
+ o = (java_handle_t *) group;
(void) vm_call_method(m, o, t);
java_lang_ThreadGroup *group;
classinfo *c;
methodinfo *m;
- java_objectheader *o;
+ java_handle_t *o;
java_lang_Thread *t;
#endif
if (m == NULL)
return false;
- o = (java_objectheader *) group;
+ o = (java_handle_t *) group;
t = thread->object;
(void) vm_call_method(m, o, t);
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 $
*/
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 */
/* exception pointer **********************************************************/
-extern java_objectheader *_no_threads_exceptionptr;
+extern java_object_t *_no_threads_exceptionptr;
#define exceptionptr (&_no_threads_exceptionptr)
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 $
*/
/* 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; */
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 $
*/
#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
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 $
*/
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 */
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 $
*/
/* 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
/* 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
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 $
*/
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 */
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 $
*/
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;
Changes:
- $Id: util.c 5252 2006-08-18 13:07:21Z twisti $
+ $Id: util.c 8295 2007-08-11 17:57:24Z michi $
*/
#include "vm/types.h"
#include "mm/memory.h"
-#include "vm/exceptions.h"
-#include "vm/stringlocal.h"
#include "vm/vm.h"
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 $
*/
*******************************************************************************/
-s4 builtin_instanceof(java_objectheader *o, classinfo *class)
+s4 builtin_instanceof(java_handle_t *o, classinfo *class)
{
if (o == NULL)
return 0;
*******************************************************************************/
-s4 builtin_checkcast(java_objectheader *o, classinfo *class)
+s4 builtin_checkcast(java_handle_t *o, classinfo *class)
{
if (o == NULL)
return 1;
*******************************************************************************/
-s4 builtin_arraycheckcast(java_objectheader *o, classinfo *targetclass)
+s4 builtin_arraycheckcast(java_handle_t *o, classinfo *targetclass)
{
arraydescriptor *desc;
}
-s4 builtin_arrayinstanceof(java_objectheader *o, classinfo *targetclass)
+s4 builtin_arrayinstanceof(java_handle_t *o, classinfo *targetclass)
{
if (o == NULL)
return 0;
*******************************************************************************/
-void *builtin_throw_exception(java_objectheader *xptr)
+void *builtin_throw_exception(java_handle_t *xptr)
{
#if !defined(NDEBUG)
java_lang_Throwable *t;
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);
*******************************************************************************/
-s4 builtin_canstore(java_objectarray *oa, java_objectheader *o)
+s4 builtin_canstore(java_objectarray *oa, java_handle_t *o)
{
arraydescriptor *desc;
arraydescriptor *valuedesc;
/* 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;
/* 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;
*******************************************************************************/
-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
if (!ea)
return NULL;
- ((java_objectarray *) a)->data[i] = (java_objectheader *) ea;
+ ((java_objectarray *) a)->data[i] = (java_object_t *) ea;
}
return a;
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;
typedesc *paramtype, s8 value)
{
imm_union imu;
- java_objectheader *o;
+ java_handle_t *o;
classinfo *c;
utf *u;
u4 len;
/* 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 */
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;
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;
*******************************************************************************/
-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 */
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 $
*/
* 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);
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)
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,
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 $
*/
/* for raising exceptions from native methods *********************************/
#if !defined(ENABLE_THREADS)
-java_objectheader *_no_threads_exceptionptr = NULL;
+java_object_t *_no_threads_exceptionptr = NULL;
#endif
*******************************************************************************/
-java_objectheader *exceptions_get_exception(void)
+java_handle_t *exceptions_get_exception(void)
{
/* return the exception */
*******************************************************************************/
-void exceptions_set_exception(java_objectheader *o)
+void exceptions_set_exception(java_handle_t *o)
{
/* set the exception */
*******************************************************************************/
-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 */
*******************************************************************************/
-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);
*******************************************************************************/
-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);
static void exceptions_throw_class(classinfo *c)
{
- java_objectheader *o;
+ java_handle_t *o;
o = exceptions_new_class(c);
*******************************************************************************/
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;
*******************************************************************************/
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);
*******************************************************************************/
-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;
*******************************************************************************/
-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);
*******************************************************************************/
-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);
*******************************************************************************/
-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);
static void exceptions_throw_class_utf(classinfo *c, utf *message)
{
- java_objectheader *o;
+ java_handle_t *o;
o = exceptions_new_class_utf(c, 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);
*******************************************************************************/
-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);
*******************************************************************************/
#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);
*******************************************************************************/
-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) */
*******************************************************************************/
-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);
*******************************************************************************/
-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);
}
*******************************************************************************/
-void exceptions_throw_exceptionininitializererror(java_objectheader *cause)
+void exceptions_throw_exceptionininitializererror(java_handle_t *cause)
{
exceptions_throw_utf_throwable(utf_java_lang_ExceptionInInitializerError,
cause);
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 */
*******************************************************************************/
-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);
*******************************************************************************/
-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 */
*******************************************************************************/
-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;
*******************************************************************************/
-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);
*******************************************************************************/
-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);
*******************************************************************************/
-void exceptions_throw_privilegedactionexception(java_objectheader *exception)
+void exceptions_throw_privilegedactionexception(java_handle_t *exception)
{
exceptions_throw_utf_exception(utf_java_security_PrivilegedActionException,
exception);
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;
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 */
*******************************************************************************/
-java_objectheader *exceptions_fillinstacktrace(void)
+java_handle_t *exceptions_fillinstacktrace(void)
{
- java_objectheader *o;
- methodinfo *m;
+ java_handle_t *o;
+ methodinfo *m;
/* get exception */
*******************************************************************************/
#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;
classref_or_classinfo cr;
classinfo *c;
#if defined(ENABLE_THREADS)
- java_objectheader *o;
+ java_object_t *o;
#endif
#ifdef __S390__
# 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);
*******************************************************************************/
-void exceptions_print_exception(java_objectheader *xptr)
+void exceptions_print_exception(java_handle_t *xptr)
{
java_lang_Throwable *t;
#if defined(ENABLE_JAVASE)
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);
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);
void exceptions_print_current_exception(void)
{
- java_objectheader *o;
+ java_handle_t *o;
o = exceptions_get_exception();
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 */
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 $
*/
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.
/* 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);
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);
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);
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 $
*/
/* global variables ***********************************************************/
#if defined(ENABLE_THREADS)
-static java_objectheader *lock_thread_finalizer;
+static java_object_t *lock_thread_finalizer;
#endif
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
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 */
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 $
*/
/* forward typedefs ***********************************************************/
-typedef struct java_objectheader java_objectheader;
+typedef struct java_object_t java_object_t;
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.
#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;
};
+#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
*/
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;
use the same machine code */
struct java_objectarray {
- java_arrayheader header;
- java_objectheader *data[1];
+ java_arrayheader header;
+ java_object_t *data[1];
};
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 $
*/
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 */
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 $
*/
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 */
}
/* 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);
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);
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;
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);
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;
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 $
*/
/* 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 */
/* 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);
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 */
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);
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;
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));
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;
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 $
*/
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);
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 $
*/
/* 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
*******************************************************************************/
-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 */
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;
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 $
*/
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);
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 $
*/
}
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;
}
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);
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,
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,
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,
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,
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 $
*/
*******************************************************************************/
-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 */
/* 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 */
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 $
*/
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;
/* 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);
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);
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);
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;
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 */
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;
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 $
*/
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 */
}
/* 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);
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);
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;
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);
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;
/* 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 **************************************************************
{
/* 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);
# define TRACE_PATCHER_INDENT for (i=0; i<patcher_depth; i++) printf("\t")
#endif
-java_objectheader *patcher_handler(u1 *pc)
+java_handle_t *patcher_handler(u1 *pc)
{
- codeinfo *code;
- patchref_t *pr;
- bool result;
- java_objectheader *e;
+ codeinfo *code;
+ patchref_t *pr;
+ bool result;
+ java_handle_t *e;
#ifdef TRACE_PATCHER
- int i;
+ int i;
#endif
/* define the patcher function */
void patcher_add_patch_ref(jitdata *jd, functionptr patcher, voidptr ref,
s4 disp);
-java_objectheader *patcher_handler(u1 *pc);
+java_handle_t *patcher_handler(u1 *pc);
/* patcher prototypes and macros **********************************************/
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: patcher.h 8264 2007-08-06 16:02:28Z twisti $
+ $Id: patcher.h 8295 2007-08-11 17:57:24Z michi $
*/
/* function prototypes ********************************************************/
-java_objectheader *patcher_wrapper(u1 *sp, u1 *pv, u1 *ra);
+java_object_t *patcher_wrapper(u1 *sp, u1 *pv, u1 *ra);
#define PATCHER_wrapper (functionptr) patcher_wrapper
bool patcher_resolve_class(u1 *sp);
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301, USA.
- $Id: codegen.c 8270 2007-08-08 13:57:12Z twisti $
+ $Id: codegen.c 8295 2007-08-11 17:57:24Z michi $
*/
}
/* 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 */
}
/* 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);
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));
M_ILD(REG_ITMP3, REG_ITMP2, OFFSET(vftbl_t, interfacetablelength));
M_LDATST(REG_ITMP3, REG_ITMP3, -superindex);
emit_classcast_check(cd, iptr, BRANCH_LE, REG_ITMP3, s1);
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));
CODEGEN_CRITICAL_SECTION_START;
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));
M_ILD(REG_ITMP3, REG_ITMP1, OFFSET(vftbl_t, interfacetablelength));
M_LDATST(REG_ITMP3, REG_ITMP3, -superindex);
M_BLE(4);
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));
M_ALD(REG_ITMP2, REG_PV, disp);
CODEGEN_CRITICAL_SECTION_START;
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 $
*/
}
/* 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 */
}
/* 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);
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));
M_ILD(REG_ITMP3, REG_ITMP2, OFFSET(vftbl_t, interfacetablelength));
M_LDATST(REG_ITMP3, REG_ITMP3, -superindex);
emit_classcast_check(cd, iptr, BRANCH_LE, REG_ITMP3, s1);
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));
CODEGEN_CRITICAL_SECTION_START;
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));
M_ILD(REG_ITMP3, REG_ITMP1, OFFSET(vftbl_t, interfacetablelength));
M_LDATST(REG_ITMP3, REG_ITMP3, -superindex);
M_BLE(4);
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));
M_ALD(REG_ITMP2, REG_PV, disp);
CODEGEN_CRITICAL_SECTION_START;
sourceframe_t *callerframe,
sourceframe_t *calleeframe)
{
- u1 *patchpos;
- methodptr entrypoint;
- methodptr oldentrypoint;
- bool atentry;
- stackframeinfo sfi;
- codeinfo *calleecode;
- methodinfo *calleem;
- java_objectheader *obj;
- vftbl_t *vftbl;
+ u1 *patchpos;
+ methodptr entrypoint;
+ methodptr oldentrypoint;
+ bool atentry;
+ stackframeinfo sfi;
+ codeinfo *calleecode;
+ methodinfo *calleem;
+ java_object_t *obj;
+ vftbl_t *vftbl;
assert(ra);
assert(callerframe->down == calleeframe);
#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);
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;
};
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 $
*/
/* 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;
}
/* 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);
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);
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;
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);
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;
/* global variables ***********************************************************/
#if defined(ENABLE_THREADS) && !defined(NDEBUG)
-static java_objectheader *show_global_lock;
+static java_object_t *show_global_lock;
#endif
#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
if (stage >= SHOW_PARSE) { \
putchar('"'); \
utf_display_printable_ascii( \
- javastring_toutf((java_objectheader *)(val), false)); \
+ javastring_toutf((java_handle_t *)(val), false)); \
printf("\" "); \
} \
else { \
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 */
}
/* 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);
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);
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;
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);
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;
*******************************************************************************/
-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
#endif
functionptr f;
bool result;
- java_objectheader *e;
+ java_handle_t *e;
/* define the patcher function */
/* 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 */
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 $
*/
continue;
}
- oa->data[i] = (java_objectheader *) ste->method->class;
+ oa->data[i] = (java_object_t *) ste->method->class;
}
/* release dump memory */
java_objectarray *classes;
java_objectarray *methodnames;
classinfo *c;
- java_objectheader *string;
+ java_handle_t *string;
s4 i;
s4 dumpsize;
CYCLES_STATS_DECLARE_AND_START
/* 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);
*******************************************************************************/
-void stacktrace_print_trace(java_objectheader *xptr)
+void stacktrace_print_trace(java_handle_t *xptr)
{
java_lang_Throwable *t;
#if defined(WITH_CLASSPATH_GNU)
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 $
*/
#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) */
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 $
*/
}
/* 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;
}
/* 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);
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,
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,
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,
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,
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 $
*/
*******************************************************************************/
-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 */
/* 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 */
*******************************************************************************/
-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:
*******************************************************************************/
-imm_union primitive_unbox(int type, java_objectheader *o)
+imm_union primitive_unbox(int type, java_handle_t *o)
{
imm_union value;
*******************************************************************************/
#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); \
*******************************************************************************/
#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; \
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 */
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 $
*/
*******************************************************************************/
-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 */
*******************************************************************************/
#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 */
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) */
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 $
*/
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 */
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 $
*/
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:
break;
case EXCEPTION_HARDWARE_CLASSCAST:
- o = (java_objectheader *) val;
+ o = (java_object_t *) val;
p = exceptions_new_classcastexception(o);
break;
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 $
*/
hashtable hashtable_string; /* hashtable for javastrings */
#if defined(ENABLE_THREADS)
-static java_objectheader *lock_hashtable_string;
+static java_object_t *lock_hashtable_string;
#endif
#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
*******************************************************************************/
-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;
*******************************************************************************/
-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;
*******************************************************************************/
-java_objectheader *javastring_new_from_utf_string(const char *utfstr)
+java_handle_t *javastring_new_from_utf_string(const char *utfstr)
{
assert(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) {
*******************************************************************************/
-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;
*******************************************************************************/
-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();
*******************************************************************************/
-char *javastring_tochar(java_objectheader *so)
+char *javastring_tochar(java_handle_t *so)
{
java_lang_String *s = (java_lang_String *) so;
java_chararray *a;
*******************************************************************************/
-utf *javastring_toutf(java_objectheader *string, bool isclassname)
+utf *javastring_toutf(java_handle_t *string, bool isclassname)
{
java_lang_String *s;
*******************************************************************************/
-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 */
LOCK_MONITOR_EXIT(lock_hashtable_string);
- return (java_objectheader *) js;
+ return (java_object_t *) js;
}
nomatch:
#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 */
LOCK_MONITOR_EXIT(lock_hashtable_string);
- return (java_objectheader *) js;
+ return (java_object_t *) js;
}
*******************************************************************************/
-java_objectheader *literalstring_new(utf *u)
+java_object_t *literalstring_new(utf *u)
{
char *utf_ptr; /* pointer to current unicode character */
/* utf string */
*******************************************************************************/
-void literalstring_free(java_objectheader* string)
+void literalstring_free(java_object_t* string)
{
java_lang_String *s;
java_chararray *a;
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 $
*/
struct literalstring {
literalstring *hashlink; /* link for external hash chain */
- java_objectheader *string;
+ java_object_t *string;
};
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 */
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 $
*/
{
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;
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"));
*******************************************************************************/
-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;
*******************************************************************************/
-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;
*******************************************************************************/
-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 */
*******************************************************************************/
#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; \
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)
*******************************************************************************/
#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; \
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)
*******************************************************************************/
#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; \
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)
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)
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 $
*/
/* 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 */
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 $
*/
*******************************************************************************/
-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;
*******************************************************************************/
-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;
classinfo *class_array_of(classinfo *component, bool link)
{
- java_objectheader *cl;
+ classloader *cl;
s4 namelen;
char *namebuf;
utf *u;
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 $
*/
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)
annotation_bytearrays_t *field_annotations;
#endif
#endif
- java_objectheader *classloader; /* NULL for bootstrap classloader */
+ classloader *classloader; /* NULL for bootstrap classloader */
};
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);
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 $
*/
hashtable hashtable_classcache;
#if defined(ENABLE_THREADS)
-static java_objectheader *lock_hashtable_classcache;
+static java_object_t *lock_hashtable_classcache;
#endif
#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
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 $
*/
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;
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 $
*/
static s4 interfaceindex; /* sequential numbering of interfaces */
static s4 classvalue;
-java_objectheader *linker_classrenumber_lock;
+java_object_t *linker_classrenumber_lock;
/* private functions **********************************************************/
#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
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;
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 $
*/
/* 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 ********************************************************/
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 $
*/
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);
*******************************************************************************/
-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;
*******************************************************************************/
-classinfo *load_newly_created_array(classinfo *c, java_objectheader *loader)
+classinfo *load_newly_created_array(classinfo *c, classloader *loader)
{
classinfo *comp = NULL;
methodinfo *clone;
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 $
*/
};
+/* classloader ****************************************************************/
+
+typedef java_object_t classloader;
+
+
/* function prototypes ********************************************************/
/* initialize loader, load important systemclasses */
/* 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 */
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 $
*/
if (!resolve_class_from_typedesc(¶mtypes[i], true, false, &c))
return NULL;
- oa->data[i] = (java_objectheader *) c;
+ oa->data[i] = c;
}
return oa;
if (c == NULL)
return NULL;
- oa->data[i] = (java_objectheader *) c;
+ oa->data[i] = c;
}
return oa;
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 $
*/
/* 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 */
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 $
*/
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;