* src/vmcore/field.c
authorMathias Panzenboeck <e0427417@student.tuwien.ac.at>
Mon, 27 Aug 2007 22:46:16 +0000 (00:46 +0200)
committerMathias Panzenboeck <e0427417@student.tuwien.ac.at>
Mon, 27 Aug 2007 22:46:16 +0000 (00:46 +0200)
(vm/array.h): Added include.
(mm/memory.h): Removed doubled include.
(field_get_annotations): Added cast for array_length_get()s parameter.

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

src/vmcore/field.c
src/vmcore/method.c

index f3b97712fb4ffd6d1282acf58d30a5940e3c065c..f1fb070081c3e85154ad371dc5b8b8a5ec0648eb 100644 (file)
@@ -35,8 +35,7 @@
 
 #include "vm/types.h"
 
-#include "mm/memory.h"
-
+#include "vm/array.h"
 #include "vm/builtin.h"
 #include "vm/exceptions.h"
 #include "vm/global.h"
@@ -396,13 +395,14 @@ java_handle_bytearray_t *field_get_annotations(fieldinfo *f)
        classinfo               *c;
        int                      slot;
        java_handle_bytearray_t *annotations;
+       java_handle_t           *a;
 
        c           = f->class;
        slot        = f - c->fields;
        annotations = NULL;
+       a           = (java_handle_t*)c->field_annotations;
        
-       if (c->field_annotations != NULL &&
-           array_length_get(c->field_annotations) > slot) {
+       if (c->field_annotations != NULL && array_length_get(a) > slot) {
                annotations = (java_handle_bytearray_t*)
                        array_objectarray_element_get(
                                c->field_annotations, slot);
index 949bce288cca72c8e796a0e5f0e13bf21f55d18e..8cd8c9a19e98691a000b6cf2d665ae163379b468 100644 (file)
@@ -39,6 +39,7 @@
 
 #include "threads/lock-common.h"
 
+#include "vm/array.h"
 #include "vm/builtin.h"
 #include "vm/exceptions.h"
 #include "vm/global.h"
@@ -786,12 +787,14 @@ java_handle_bytearray_t *method_get_annotations(methodinfo *m)
        classinfo               *c;
        int                      slot;
        java_handle_bytearray_t *annotations;
+       java_handle_t           *a;
 
        c           = m->class;
        slot        = m - c->methods;
        annotations = NULL;
+       a           = (java_handle_t*)c->method_annotations;
        
-       if (c->method_annotations != NULL && array_length_get(c->method_annotations) > slot) {
+       if (c->method_annotations != NULL && array_length_get(a) > slot) {
                annotations = (java_handle_bytearray_t*)array_objectarray_element_get(
                        c->method_annotations, slot);
        }
@@ -815,13 +818,14 @@ java_handle_bytearray_t *method_get_parameterannotations(methodinfo *m)
        classinfo               *c;
        int                      slot;
        java_handle_bytearray_t *parameterAnnotations;
+       java_handle_t           *a;
 
        c                    = m->class;
        slot                 = m - c->methods;
        parameterAnnotations = NULL;
+       a                    = (java_handle_t*)c->method_parameterannotations;
 
-       if (c->method_parameterannotations != NULL &&
-                       array_length_get(c->method_parameterannotations) > slot) {
+       if (c->method_parameterannotations != NULL && array_length_get(a) > slot) {
                parameterAnnotations =
                        (java_handle_bytearray_t*)array_objectarray_element_get(
                                c->method_parameterannotations, slot);
@@ -846,13 +850,14 @@ java_handle_bytearray_t *method_get_annotationdefault(methodinfo *m)
        classinfo               *c;
        int                      slot;
        java_handle_bytearray_t *annotationDefault;
+       java_handle_t           *a;
 
        c                 = m->class;
        slot              = m - c->methods;
        annotationDefault = NULL;
+       a                 = (java_handle_t*)c->method_annotationdefaults;
 
-       if (c->method_annotationdefaults != NULL &&
-                       array_length_get(c->method_annotationdefaults) > slot) {
+       if (c->method_annotationdefaults != NULL && array_length_get(a) > slot) {
                annotationDefault = 
                        (java_handle_bytearray_t*)array_objectarray_element_get(
                                c->method_annotationdefaults, slot);