* src/vm/properties.c (properties_system_add): Use LLNI macros.
authormichi <none@none>
Tue, 21 Aug 2007 12:43:00 +0000 (12:43 +0000)
committermichi <none@none>
Tue, 21 Aug 2007 12:43:00 +0000 (12:43 +0000)
(properties_system_add_all): Likewise.

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

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

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

--HG--
branch : exact-gc

src/native/vm/gnu/java_lang_reflect_Constructor.c
src/native/vm/java_lang_Thread.c
src/vm/primitive.c
src/vm/properties.c

index b7a2400c903e6b7c6c2665070ff0f333e1a58f53..94eb25d662dfdb6dbf71d17f0d46a9c7faf66f35 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_reflect_Constructor.c 8343 2007-08-17 21:39:32Z michi $
+   $Id: java_lang_reflect_Constructor.c 8380 2007-08-21 12:43:00Z michi $
 
 */
 
@@ -99,7 +99,7 @@ JNIEXPORT java_lang_Object* JNICALL Java_java_lang_reflect_Constructor_construct
 {
        /* just to be sure */
 
-       assert(LLNI_field_direct(this, clazz) == declaringClass);
+       assert(LLNI_field_direct(this, clazz) == LLNI_DIRECT(declaringClass));
        assert(LLNI_field_direct(this, slot)  == slot);
 
        return _Jv_java_lang_reflect_Constructor_newInstance(env, this, args);
index 0e33fc253d45eeb2230a307bcbc42f79eaa30440..c235fb63f662abfb6c20b587092225d384996dbd 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: java_lang_Thread.c 8295 2007-08-11 17:57:24Z michi $
+   $Id: java_lang_Thread.c 8380 2007-08-21 12:43:00Z michi $
 
 */
 
@@ -109,7 +109,7 @@ void _Jv_java_lang_Thread_interrupt(java_lang_Thread *this)
        threadobject *thread;
 
 #if defined(WITH_CLASSPATH_GNU)
-       thread = (threadobject *) LLNI_field_direct(LLNI_field_direct(this, vmThread), vmdata);
+       thread = (threadobject *) LLNI_field_direct(this, vmThread)->vmdata;
 #elif defined(WITH_CLASSPATH_CLDC1_1)
        thread = (threadobject *) this->vm_thread;
 #endif
@@ -131,7 +131,7 @@ s4 _Jv_java_lang_Thread_isAlive(java_lang_Thread *this)
 
 # if defined(WITH_CLASSPATH_GNU)
 
-       t = (threadobject *) LLNI_field_direct(LLNI_field_direct(this, vmThread), vmdata);
+       t = (threadobject *) LLNI_field_direct(this, vmThread)->vmdata;
 
 # elif defined(WITH_CLASSPATH_SUN)
 
@@ -179,7 +179,7 @@ s4 _Jv_java_lang_Thread_isInterrupted(java_lang_Thread *this)
        threadobject *t;
 
 # if defined(WITH_CLASSPATH_GNU)
-       t = (threadobject *) LLNI_field_direct(LLNI_field_direct(this, vmThread), vmdata);
+       t = (threadobject *) LLNI_field_direct(this, vmThread)->vmdata;
 # elif defined(WITH_CLASSPATH_SUN)
        /* XXX this is just a quick hack */
 
@@ -235,7 +235,7 @@ void _Jv_java_lang_Thread_setPriority(java_lang_Thread *this, s4 priority)
        threadobject *t;
 
 # if defined(WITH_CLASSPATH_GNU)
-       t = (threadobject *) LLNI_field_direct(LLNI_field_direct(this, vmThread), vmdata);
+       t = (threadobject *) LLNI_field_direct(this, vmThread)->vmdata;
 # elif defined(WITH_CLASSPATH_SUN)
        /* XXX this is just a quick hack */
 
@@ -293,7 +293,7 @@ java_lang_Thread *_Jv_java_lang_Thread_currentThread(void)
 #if defined(ENABLE_THREADS)
        thread = THREADOBJECT;
 
-       t = thread->object;
+       t = LLNI_WRAP(thread->object);
 
        if (t == NULL)
                log_text("t ptr is NULL\n");
@@ -385,7 +385,7 @@ java_lang_String *_Jv_java_lang_Thread_getState(java_lang_Thread *this)
        java_handle_t *o;
 
 # if defined(WITH_CLASSPATH_GNU)
-       thread = (threadobject *) LLNI_field_direct(LLNI_field_direct(this, vmThread), vmdata);
+       thread = (threadobject *) LLNI_field_direct(this, vmThread)->vmdata;
 # elif defined(WITH_CLASSPATH_CLDC1_1)
        thread = (threadobject *) this->vm_thread;
 # endif
index 81a0d34fcce5f6406d8312d222c70e0f0f0b54bb..d5f5ad48c536f5f19c480bb6b433ec29338cc2e4 100644 (file)
@@ -245,7 +245,7 @@ imm_union primitive_unbox(java_handle_t *o)
        int        type;
        imm_union  value;
 
-       c = o->vftbl->class;
+       LLNI_class_get(o, c);
 
        type = primitive_type_get_by_wrapperclass(c);
 
index 1b2e4df819c9caa3be87d682d3329ca04598e1c8..49b3f424e3b463872457a9f71bebd1c8ec29f591 100644 (file)
@@ -22,7 +22,7 @@
    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
    02110-1301, USA.
 
-   $Id: properties.c 8299 2007-08-13 08:41:18Z michi $
+   $Id: properties.c 8380 2007-08-21 12:43:00Z michi $
 
 */
 
@@ -39,6 +39,7 @@
 #include "mm/memory.h"
 
 #include "native/jni.h"
+#include "native/llni.h"
 
 #include "vm/global.h"                      /* required by java_lang_String.h */
 #include "native/include/java_lang_String.h"
@@ -52,6 +53,7 @@
 
 #include "vm/jit/asmpart.h"
 
+#include "vmcore/class.h"
 #include "vmcore/method.h"
 #include "vmcore/options.h"
 
@@ -392,13 +394,16 @@ char *properties_get(char *key)
 
 void properties_system_add(java_handle_t *p, char *key, char *value)
 {
+       classinfo     *c;
        methodinfo    *m;
        java_handle_t *k;
        java_handle_t *v;
 
        /* search for method to add properties */
 
-       m = class_resolveclassmethod(p->vftbl->class,
+       LLNI_class_get(p, c);
+
+       m = class_resolveclassmethod(c,
                                                                 utf_put,
                                                                 utf_new_char("(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"),
                                                                 NULL,
@@ -430,13 +435,16 @@ void properties_system_add(java_handle_t *p, char *key, char *value)
 void properties_system_add_all(java_handle_t *p)
 {
        list_properties_entry *pe;
+       classinfo             *c;
        methodinfo            *m;
        java_handle_t         *key;
        java_handle_t         *value;
 
        /* search for method to add properties */
 
-       m = class_resolveclassmethod(p->vftbl->class,
+       LLNI_class_get(p, c);
+
+       m = class_resolveclassmethod(c,
                                                                 utf_put,
                                                                 utf_new_char("(Ljava/lang/Object;Ljava/lang/Object;)Ljava/lang/Object;"),
                                                                 NULL,