harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mcfi...@apache.org
Subject svn commit: r639267 - in /harmony/enhanced/drlvm/trunk/vm: gc_gen/src/common/ gc_gen/src/jni/ include/ include/open/ interpreter/src/ jitrino/src/jet/ jitrino/src/vm/ vmcore/build/ vmcore/src/class_support/ vmcore/src/init/ vmcore/src/jvmti/ vmcore/src...
Date Thu, 20 Mar 2008 12:41:54 GMT
Author: mcfirst
Date: Thu Mar 20 05:41:52 2008
New Revision: 639267

URL: http://svn.apache.org/viewvc?rev=639267&view=rev
Log:
Changing VM-JIT interfaces to become run-time linkable: field access section addressed

Modified:
    harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_class.cpp
    harmony/enhanced/drlvm/trunk/vm/gc_gen/src/jni/java_support.cpp
    harmony/enhanced/drlvm/trunk/vm/include/jit_intf.h
    harmony/enhanced/drlvm/trunk/vm/include/open/vm.h
    harmony/enhanced/drlvm/trunk/vm/include/open/vm_field_access.h
    harmony/enhanced/drlvm/trunk/vm/include/open/vm_interface.h
    harmony/enhanced/drlvm/trunk/vm/include/open/vm_type_access.h
    harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp
    harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter_ti.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_fld_arr.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_instr.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/build/vmcore.exp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_event.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_trace.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/java_lang_reflect_VMReflection.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/reflection/reflection.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/compile_ipf.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_class.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_class.cpp?rev=639267&r1=639266&r2=639267&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_class.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_class.cpp Thu Mar 20 05:41:52
2008
@@ -20,6 +20,7 @@
  */
 
 #include "gc_common.h"
+#include "open/vm_field_access.h"
 #include "../finalizer_weakref/finalizer_weakref.h"
 
 /* Setter functions for the gc class property field. */

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/jni/java_support.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/jni/java_support.cpp?rev=639267&r1=639266&r2=639267&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/jni/java_support.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/jni/java_support.cpp Thu Mar 20 05:41:52 2008
@@ -21,6 +21,7 @@
 
 #include <string.h>
 #include <jni.h>
+#include "open/vm_field_access.h"
 #include "jit_intf.h"
 #include "java_support.h"
 

Modified: harmony/enhanced/drlvm/trunk/vm/include/jit_intf.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/jit_intf.h?rev=639267&r1=639266&r2=639267&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/jit_intf.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/jit_intf.h Thu Mar 20 05:41:52 2008
@@ -112,11 +112,6 @@
 VMEXPORT Class_Handle 
 resolve_class(Compile_Handle h, Class_Handle c, unsigned index);
 
-//
-// Field
-//
-VMEXPORT Boolean      field_is_public(Field_Handle f);
-VMEXPORT Boolean      field_is_injected(Field_Handle f);
 VMEXPORT Boolean      method_is_public(Method_Handle m);
 VMEXPORT unsigned     method_get_max_locals(Method_Handle m);
 VMEXPORT Boolean      method_is_fake(Method_Handle m);

Modified: harmony/enhanced/drlvm/trunk/vm/include/open/vm.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/vm.h?rev=639267&r1=639266&r2=639267&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/vm.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/vm.h Thu Mar 20 05:41:52 2008
@@ -426,120 +426,11 @@
 ////
 
 /**
- * @return <code>TRUE</code> is the field is static.
- */ 
- VMEXPORT Boolean field_is_static(Field_Handle fh);
-
-/**
- * @return The type info that represents the type of the field.
- */
- VMEXPORT Type_Info_Handle field_get_type_info_of_field_value(Field_Handle fh);
-
-/**
- * @return The class that represents the type of the field.
- */ 
- VMEXPORT Class_Handle field_get_class_of_field_value(Field_Handle fh);
-
-/**
- * @return The class that defined that field.
- */ 
- VMEXPORT Class_Handle field_get_class(Field_Handle fh);
-
-
-/**
- * @return <code>TRUE</code> if the field is of reference type
- *
- * This function doesn't cause resolution of the class of the field.
- */
- VMEXPORT Boolean field_is_reference(Field_Handle fh);
-
-/**
- * @return <code>TRUE</code> if the field is a magic type field
- *
- * This function doesn't cause resolution of the class of the field.
- */
- VMEXPORT Boolean field_is_magic(Field_Handle fh);
-
-/**
  * @return <code>TRUE</code> if the field must be enumerated by GC
  *
  * This function doesn't cause resolution of the class of the field.
  */
  VMEXPORT Boolean field_is_enumerable_reference(Field_Handle fh);
-
- /**
- * @return <code>TRUE</code> if the field is literal. In Java, it means that
the
- *          field had the ConstantValue attribute set (JVMS2, Section  4.7.2).
- */
- VMEXPORT Boolean field_is_literal(Field_Handle fh);
-
-/**
- * For Java always <code>FALSE</code>.
- */
- VMEXPORT Boolean field_is_unmanaged_static(Field_Handle fh);
-
-/**
- * @return The offset to an instance field.
- */
- VMEXPORT unsigned field_get_offset(Field_Handle fh);
-
-/**
- * @return An address of a static field.
- */
- VMEXPORT void *field_get_address(Field_Handle fh);
-
-/**
- * @return A name of the field.
- */ 
- VMEXPORT const char *field_get_name(Field_Handle fh);
-
-/**
- * @return The field descriptor. The descriptor is a string representation
- *         of the field types as defined by the JVM spec.
- */
- VMEXPORT const char *field_get_descriptor(Field_Handle fh);
-
-/**
- * @return <code>TRUE</code> if the field is final.
- */
- VMEXPORT Boolean field_is_final(Field_Handle fh);
-
-/**
- * @return <code>TRUE</code> if the field is volatile.
- */ 
- VMEXPORT Boolean field_is_volatile(Field_Handle fh);
-
-/**
- * @return <code>TRUE</code> if the field is private.
- */ 
- VMEXPORT Boolean field_is_private(Field_Handle fh);
-
-/**
- * @return The address and bit mask, for the flag which determine whether field
- *         access event should be sent. JIT may use the following expression to
- *         determine if specified field access should be tracked:
- *         ( **address & *mask != 0 )
- *
- * @param field         - handle of the field
- * @param[out] address  - pointer to the address of the byte which contains the flag
- * @param[out] mask     - pointer to the bit mask of the flag
- */
-VMEXPORT void
-field_get_track_access_flag(Field_Handle field, char** address, char* mask);
-
-/**
- * @return the address and bit mask, for the flag which determine whether field
- *         modification event should be sent. JIT may use the following expression to
- *         determine if specified field modification should be tracked:
- *         ( **address & *mask != 0 )
- *
- * @param field         - handle of the field
- * @param[out] address  - pointer to the address of the byte which contains the flag
- * @param[out] mask     - pointer to the bit mask of the flag
- */
-VMEXPORT void
-field_get_track_modification_flag(Field_Handle field, char** address,
-                                  char* mask);
 
 ////
 // end field-related functions.

Modified: harmony/enhanced/drlvm/trunk/vm/include/open/vm_field_access.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/vm_field_access.h?rev=639267&r1=639266&r2=639267&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/vm_field_access.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/vm_field_access.h Thu Mar 20 05:41:52 2008
@@ -21,6 +21,14 @@
 #ifndef _VM_FIELD_ACCESS_H
 #define _VM_FIELD_ACCESS_H
 
+#include "common.h"
+#include "hycomp.h"
+#include "types.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
  * @file
  * Part of Class Support interface related to retrieving different
@@ -34,8 +42,7 @@
  *
  * @return The name of the field.
  */
-const char*
-field_get_name(Open_Field_Handle field);
+DECLARE_OPEN(const char*, field_get_name, (Field_Handle field));
 
 /**
  * Returns the field <i>descriptor</i>.
@@ -47,8 +54,7 @@
  *
  * @return The field descriptor.
  */
-const char*
-field_get_descriptor(Open_Field_Handle field);
+DECLARE_OPEN(const char*, field_get_descriptor, (Field_Handle field));
 
 /**
  * Returns the class that defined the given field.
@@ -57,8 +63,7 @@
  *
  * @return The class that defined the field.
  */
-Open_Class_Handle
-field_get_class(Open_Field_Handle field);
+DECLARE_OPEN(Class_Handle, field_get_class, (Field_Handle field));
 
 /**
  * Returns the address of the given static field.
@@ -67,8 +72,7 @@
  *
  * @return The address of the static field.
  */
-void*
-field_get_address(Open_Field_Handle field);
+DECLARE_OPEN(void*, field_get_address, (Field_Handle field));
 
 /**
  * Returns the offset to the given instance field.
@@ -77,8 +81,7 @@
  *
  * @return The offset to the instance field.
  */
-unsigned
-field_get_offset(Open_Field_Handle field);
+DECLARE_OPEN(unsigned, field_get_offset, (Field_Handle field));
 
 /**
  * Returns the type info that represents the type of the field.
@@ -86,11 +89,8 @@
  * @param field - the field handle
  *
  * @return Type information.
- *
- * @note Replaces field_get_type_info_of_field_value. 
  */
-Open_Type_Info_Handle
-field_get_type_info_of_field_type(Open_Field_Handle field);
+DECLARE_OPEN(Type_Info_Handle, field_get_type_info, (Field_Handle field));
 
 /**
  * Returns the class that represents the type of the field.
@@ -98,11 +98,8 @@
  * @param field - the field handle
  *
  * @return the class that represents the type of the field.
- *
- * @note Replaces field_get_class_of_field_value.
  */
-Open_Class_Handle
-field_get_class_of_field_type(Open_Field_Handle field);
+DECLARE_OPEN(Class_Handle, field_get_class_of_field_type, (Field_Handle field));
 
 /**
  *  Checks whether the field is final.
@@ -113,8 +110,7 @@
  *
  * #note Extended
  */
-Boolean
-field_is_final(Open_Field_Handle field);
+DECLARE_OPEN(BOOLEAN, field_is_final, (Field_Handle field));
 
 /**
  *  Checks whether the field is static.
@@ -125,8 +121,7 @@
  *
  * @ingroup Extended 
  */
-Boolean
-field_is_static(Open_Field_Handle field);
+DECLARE_OPEN(BOOLEAN, field_is_static, (Field_Handle field));
 
 /**
  *  Checks whether the field is private.
@@ -137,8 +132,7 @@
  *
  * @ingroup Extended 
  */
-Boolean
-field_is_private(Open_Field_Handle field);
+DECLARE_OPEN(BOOLEAN, field_is_private, (Field_Handle field));
 
 /**
  *  Checks whether the field is public.
@@ -149,8 +143,7 @@
  *
  * @ingroup Extended 
  */
-Boolean
-field_is_public(Open_Field_Handle field);
+DECLARE_OPEN(BOOLEAN, field_is_public, (Field_Handle field));
 
 /**
  *  Checks whether the field is volatile.
@@ -161,8 +154,18 @@
  *
  * @ingroup Extended 
  */
-Boolean
-field_is_volatile(Open_Field_Handle field);
+DECLARE_OPEN(BOOLEAN, field_is_volatile, (Field_Handle field));
+
+/**
+ *  Checks whether the field is reference field.
+ *
+ * @param field - the field handle
+ *
+ * @return <code>TRUE</code> if the field is reference.
+ *
+ * #note Extended
+ */
+DECLARE_OPEN(BOOLEAN, field_is_reference, (Field_Handle field));
 
 /**
  *  Checks whether the field is literal.
@@ -171,8 +174,7 @@
  *
  * @return <code>TRUE</code> if the field is literal.
  */
-Boolean
-field_is_literal(Open_Field_Handle field);
+DECLARE_OPEN(BOOLEAN, field_is_literal, (Field_Handle field));
 
 /**
  *  Checks whether the field is injected.
@@ -181,7 +183,39 @@
  *
  * @return <code>TRUE</code> if the field is injected; otherwise, <code>FALSE</code>.

  */
-Boolean
-field_is_injected(Open_Field_Handle field);
+DECLARE_OPEN(BOOLEAN, field_is_injected, (Field_Handle field));
+
+/**
+ * @return <code>TRUE</code> if the field is a magic type field
+ *
+ * This function doesn't cause resolution of the class of the field.
+ */
+DECLARE_OPEN(BOOLEAN, field_is_magic, (Field_Handle fh));
+
+/**
+ * @return The address and bit mask, for the flag which determine whether field
+ *         access event should be sent. JIT may use the following expression to
+ *         determine if specified field access should be tracked:
+ *         ( **address & *mask != 0 )
+ *
+ * @param field         - handle of the field
+ * @param[out] address  - pointer to the address of the byte which contains the flag
+ * @param[out] mask     - pointer to the bit mask of the flag
+ */
+DECLARE_OPEN(void, field_get_track_access_flag, (Field_Handle field, char** address, char*
mask));
+
+/**
+ * @return the address and bit mask, for the flag which determine whether field
+ *         modification event should be sent. JIT may use the following expression to
+ *         determine if specified field modification should be tracked:
+ *         ( **address & *mask != 0 )
+ *
+ * @param field         - handle of the field
+ * @param[out] address  - pointer to the address of the byte which contains the flag
+ * @param[out] mask     - pointer to the bit mask of the flag
+ */
+DECLARE_OPEN(void, field_get_track_modification_flag, (Field_Handle field, char** address,
char* mask));
+
+}
 
 #endif // _VM_FIELD_ACCESS_H

Modified: harmony/enhanced/drlvm/trunk/vm/include/open/vm_interface.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/vm_interface.h?rev=639267&r1=639266&r2=639267&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/vm_interface.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/vm_interface.h Thu Mar 20 05:41:52 2008
@@ -72,21 +72,6 @@
                     const char *name,
                     const char *descr));
 
-
-//Field
-
-PROTOTYPE_WITH_NAME(void*       , field_get_address, (Field_Handle fh));
-PROTOTYPE_WITH_NAME(Class_Handle, field_get_class, (Field_Handle fh));
-PROTOTYPE_WITH_NAME(const char* , field_get_descriptor, (Field_Handle fh));
-PROTOTYPE_WITH_NAME(const char* , field_get_name, (Field_Handle fh));
-PROTOTYPE_WITH_NAME(unsigned    , field_get_offset, (Field_Handle fh));
-PROTOTYPE_WITH_NAME(Type_Info_Handle, field_get_type_info, (Field_Handle fh)); //field_get_type_info_of_field_value
-PROTOTYPE_WITH_NAME(Boolean     , field_is_final, (Field_Handle fh));
-PROTOTYPE_WITH_NAME(Boolean     , field_is_magic, (Field_Handle fh)); //Boolean field_is_magic(Field_Handle
fh);
-PROTOTYPE_WITH_NAME(Boolean     , field_is_private, (Field_Handle fh));
-PROTOTYPE_WITH_NAME(Boolean     , field_is_static, (Field_Handle fh));
-PROTOTYPE_WITH_NAME(Boolean     , field_is_volatile, (Field_Handle fh));
-
 //Method
 
 PROTOTYPE_WITH_NAME(Method_Handle, method_get_overridden_method, (Class_Handle ch, Method_Handle
mh));//method_find_overridden_method

Modified: harmony/enhanced/drlvm/trunk/vm/include/open/vm_type_access.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/vm_type_access.h?rev=639267&r1=639266&r2=639267&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/vm_type_access.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/vm_type_access.h Thu Mar 20 05:41:52 2008
@@ -17,6 +17,7 @@
 #ifndef _VM_TYPE_ACCESS_H
 #define _VM_TYPE_ACCESS_H
 
+#include "common.h"
 #include "types.h"
 /**
  * @file

Modified: harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp?rev=639267&r1=639266&r2=639267&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter.cpp Thu Mar 20 05:41:52 2008
@@ -18,6 +18,7 @@
 #include "interpreter_exports.h"
 #include "interpreter_imports.h"
 #include "open/vm_class_info.h"
+#include "open/vm_field_access.h"
 #include <math.h>
 
 #include "exceptions.h"

Modified: harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter_ti.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter_ti.cpp?rev=639267&r1=639266&r2=639267&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter_ti.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/interpreter/src/interpreter_ti.cpp Thu Mar 20 05:41:52
2008
@@ -23,6 +23,7 @@
 #include "interpreter_imports.h"
 #include "interp_defs.h"
 #include "interp_native.h"
+#include "open/vm_field_access.h"
 #include "port_malloc.h"
 
 #include "thread_generic.h"

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_fld_arr.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_fld_arr.cpp?rev=639267&r1=639266&r2=639267&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_fld_arr.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_fld_arr.cpp Thu Mar 20 05:41:52 2008
@@ -27,6 +27,7 @@
 #include "cg.h"
 #include <open/vm.h>
 #include <open/vm_class_info.h>
+#include <open/vm_field_access.h>
 #include <jit_intf.h>
 
 #include "trace.h"

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_instr.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_instr.cpp?rev=639267&r1=639266&r2=639267&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_instr.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_instr.cpp Thu Mar 20 05:41:52 2008
@@ -25,6 +25,7 @@
  
 #include "cg.h"
 #include "trace.h"
+#include "open/vm_field_access.h"
 #include "jit_runtime_support.h"
 #include "jit_intf.h"
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.cpp?rev=639267&r1=639266&r2=639267&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.cpp Thu Mar 20 05:41:52 2008
@@ -27,6 +27,7 @@
 #include "open/vm_class_info.h"
 #include "open/vm_interface.h"
 #include "open/vm_type_access.h"
+#include "open/vm_field_access.h"
 #include "jit_import_rt.h"
 #include "jit_runtime_support.h"
 
@@ -97,7 +98,7 @@
 static  field_get_descriptor_t field_get_descriptor = 0;
 static  field_get_name_t field_get_name = 0;
 static  field_get_offset_t  field_get_offset = 0;
-static  field_get_type_info_t  field_get_type_info = 0; //field_get_type_info_of_field_value
+static  field_get_type_info_t  field_get_type_info = 0;
 static  field_is_final_t  field_is_final = 0;
 static  field_is_magic_t  field_is_magic = 0; //Boolean field_is_magic(Field_Handle fh);
 static  field_is_private_t  field_is_private = 0;

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/build/vmcore.exp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/build/vmcore.exp?rev=639267&r1=639266&r2=639267&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/build/vmcore.exp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/build/vmcore.exp Thu Mar 20 05:41:52 2008
@@ -95,7 +95,7 @@
     destroy_property_value;
     field_get_address;
     field_get_class;
-    field_get_class_of_field_value;
+    field_get_class_of_field_type;
     field_get_descriptor;
     field_get_flags;
     field_get_name;
@@ -103,7 +103,7 @@
     field_get_track_access_flag;
     field_get_track_modification_flag;
     field_get_type;
-    field_get_type_info_of_field_value;
+    field_get_type_info;
     field_is_enumerable_reference;
     field_is_final;
     field_is_injected;

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp?rev=639267&r1=639266&r2=639267&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp Thu Mar 20 05:41:52
2008
@@ -39,6 +39,7 @@
 #include "Package.h"
 
 #include "open/vm_type_access.h"
+#include "open/vm_field_access.h"
 #include "open/vm_class_info.h"
 #include "jit_intf.h"
 
@@ -67,7 +68,7 @@
 static uint32 countLeadingChars(const char* str, char c) {
     uint32 n=0;
     while (str[n]==c) {
-        n++;                
+        n++;
     }
     return n;
 }
@@ -104,41 +105,41 @@
 
 
 
-Boolean field_is_static(Field_Handle f)
+BOOLEAN field_is_static(Field_Handle f)
 {
     assert(f);
-    return ((Field *)f)->is_static();
+    return f->is_static();
 }
 
 
 
-Boolean field_is_final(Field_Handle f)
+BOOLEAN field_is_final(Field_Handle f)
 {
     assert(f);
-    return ((Field *)f)->is_final();
+    return f->is_final();
 }
 
 
-Boolean field_is_volatile(Field_Handle f)
+BOOLEAN field_is_volatile(Field_Handle f)
 {
     assert(f);
-    return ((Field *)f)->is_volatile();
+    return f->is_volatile();
 }
 
 
 
-Boolean field_is_private(Field_Handle f)
+BOOLEAN field_is_private(Field_Handle f)
 {
     assert(f);
-    return ((Field *)f)->is_private();
+    return f->is_private();
 }
 
 
 
-Boolean field_is_public(Field_Handle f)
+BOOLEAN field_is_public(Field_Handle f)
 {
     assert(f);
-    return ((Field*)f)->is_public();
+    return f->is_public();
 }
 
 
@@ -146,8 +147,8 @@
 unsigned field_get_offset(Field_Handle f)
 {
     assert(f);
-    assert(!((Field *)f)->is_static());
-    return ((Field *)f)->get_offset();
+    assert(!f->is_static());
+    return f->get_offset();
 } //field_get_offset
 
 
@@ -164,7 +165,7 @@
 const char* field_get_name(Field_Handle f)
 {
     assert(f);
-    return ((Field *)f)->get_name()->bytes;
+    return f->get_name()->bytes;
 }
 
 
@@ -172,15 +173,15 @@
 const char* field_get_descriptor(Field_Handle f)
 {
     assert(f);
-    return ((Field *)f)->get_descriptor()->bytes;
+    return f->get_descriptor()->bytes;
 }
 
 
 
-Java_Type   field_get_type(Field_Handle f)
+Java_Type field_get_type(Field_Handle f)
 {
     assert(f);
-    return ((Field *)f)->get_java_type();
+    return f->get_java_type();
 } // field_get_type
 
 
@@ -188,7 +189,7 @@
 unsigned field_get_flags(Field_Handle f)
 {
     assert(f);
-    return ((Field *)f)->get_access_flags();
+    return f->get_access_flags();
 }
 
 
@@ -196,19 +197,19 @@
 Class_Handle field_get_class(Field_Handle f)
 {
     assert(f);
-    return ((Field *)f)->get_class();
+    return f->get_class();
 } //field_get_class
 
 void field_get_track_access_flag(Field_Handle f, char** address,
                                  char* mask)
 {
-    return ((Field *)f)->get_track_access_flag(address, mask);
+    return f->get_track_access_flag(address, mask);
 }
 
 void field_get_track_modification_flag(Field_Handle f, char** address,
                                  char* mask)
 {
-    return ((Field *)f)->get_track_modification_flag(address, mask);
+    return f->get_track_modification_flag(address, mask);
 }
 
 Boolean method_is_static(Method_Handle m)
@@ -225,8 +226,6 @@
 }
 
 
-
-
 Boolean method_is_synchronized(Method_Handle m)
 {
     assert(m);
@@ -234,13 +233,13 @@
 } //method_is_synchronized
 
 
-
 Boolean method_is_private(Method_Handle m)
 {
     assert(m);
     return ((Method *)m)->is_private();
 } //method_is_private
 
+
 Boolean method_is_public(Method_Handle m)
 {
     assert(m);
@@ -255,8 +254,6 @@
 } // method_is_strict
 
 
-
-
 Boolean method_is_native(Method_Handle m)
 {
     assert(m);
@@ -271,7 +268,6 @@
 } //method_allocate_info_block
 
 
-
 Byte *method_allocate_jit_data_block(Method_Handle m, JIT_Handle j, size_t size, size_t alignment)
 {
     assert(m);
@@ -279,8 +275,6 @@
 } //method_allocate_jit_data_block
 
 
-
-
 Byte *method_get_info_block_jit(Method_Handle m, JIT_Handle j)
 {
     assert(m);
@@ -897,6 +891,17 @@
 }
 
 
+Field* class_resolve_nonstatic_field(Class* clss, unsigned cp_index)
+{
+    Compilation_Handle ch;
+    ch.env = VM_Global_State::loader_env;
+    ch.jit = NULL;
+    Field_Handle fh = resolve_field(&ch, (Class_Handle)clss, cp_index);
+    if(!fh || field_is_static(fh))
+        return NULL;
+    return fh;
+} // class_resolve_nonstatic_field
+
 
 ClassLoaderHandle
 class_get_class_loader(Class_Handle ch)
@@ -1335,7 +1340,7 @@
 
 
 
-Boolean field_is_literal(Field_Handle fh)
+BOOLEAN field_is_literal(Field_Handle fh)
 {
     assert(fh);
     Field *f = (Field *)fh;
@@ -1479,16 +1484,6 @@
 } //class_get_array_of_unboxed
 
 
-
-
-Boolean field_is_unmanaged_static(Field_Handle fh)
-{
-    assert(fh);
-    return FALSE;
-} //field_is_unmanaged_static
-
-
-
 Boolean class_is_primitive(Class_Handle ch)
 {
     assert(ch);
@@ -1749,7 +1744,7 @@
 
 
 // -gc magic needs this to do the recursive load.
-Class_Handle field_get_class_of_field_value(Field_Handle fh)
+Class_Handle field_get_class_of_field_type(Field_Handle fh)
 {
     assert(hythread_is_suspend_enabled());
     assert(fh);
@@ -1760,17 +1755,17 @@
     if(!ch->prepare(VM_Global_State::loader_env))
         return NULL;
     return ch;
-} //field_get_class_of_field_value
+} // field_get_class_of_field_type
 
 
-Boolean field_is_reference(Field_Handle fh)
+BOOLEAN field_is_reference(Field_Handle fh)
 {
     assert((Field *)fh);
     Java_Type typ = fh->get_java_type();
     return (typ == JAVA_TYPE_CLASS || typ == JAVA_TYPE_ARRAY);
 } //field_is_reference
 
-Boolean field_is_magic(Field_Handle fh)
+BOOLEAN field_is_magic(Field_Handle fh)
 {
     assert((Field *)fh);
     
@@ -1785,7 +1780,7 @@
 } //field_is_enumerable_reference
 
 
-Boolean field_is_injected(Field_Handle f)
+BOOLEAN field_is_injected(Field_Handle f)
 {
     assert(f);
     return ((Field*)f)->is_injected();
@@ -1897,14 +1892,14 @@
 } //free_string_buffer
 
 
-Type_Info_Handle field_get_type_info_of_field_value(Field_Handle fh)
+Type_Info_Handle field_get_type_info(Field_Handle fh)
 {
     assert(fh);
     Field *field = (Field *)fh;
     TypeDesc* td = field->get_field_type_desc();
     assert(td);
     return td;
-} //field_get_type_info_of_field_value
+} // field_get_type_info
 
 
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm.cpp?rev=639267&r1=639266&r2=639267&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm.cpp Thu Mar 20 05:41:52 2008
@@ -25,25 +25,3 @@
 
 // tag pointer is not allocated by default, enabled by TI
 VMEXPORT bool ManagedObject::_tag_pointer = false;
-
-
-/////////////////////////////////////////////////////////////////
-// begin Class
-/////////////////////////////////////////////////////////////////
-
-
-Field* class_resolve_nonstatic_field(Class* clss, unsigned cp_index)
-{
-    Compilation_Handle ch;
-    ch.env = VM_Global_State::loader_env;
-    ch.jit = NULL;
-    Field_Handle fh = resolve_field(&ch, (Class_Handle)clss, cp_index);
-    if(!fh || field_is_static(fh))
-        return NULL;
-    return fh;
-} // class_resolve_nonstatic_field
-
-
-/////////////////////////////////////////////////////////////////
-// end Class
-/////////////////////////////////////////////////////////////////

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp?rev=639267&r1=639266&r2=639267&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp Thu Mar 20 05:41:52 2008
@@ -154,8 +154,6 @@
         return (void*)class_hint_is_exceptiontype;
     } else if (strcmp(func_name,"class_is_abstract") == 0) {
         return (void*)class_is_abstract;
-    } else if (strcmp(func_name,"field_get_type_info") == 0) {
-        return (void*)field_get_type_info_of_field_value;
     } else if (strcmp(func_name,"method_get_overridden_method") == 0) {
         return (void*)method_find_overridden_method;
     } else if (strcmp(func_name,"vector_get_first_element_offset") == 0) {

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_event.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_event.cpp?rev=639267&r1=639266&r2=639267&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_event.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_event.cpp Thu Mar 20 05:41:52 2008
@@ -1252,7 +1252,7 @@
     tmn_suspend_enable();
 
     // get field class
-    //Type_Info_Handle field_type = field_get_type_info_of_field_value(field);
+    //Type_Info_Handle field_type = field_get_type_info(field);
     //Class_Handle clss = type_info_get_class(field_type);
     //ASSERT(clss, "Can't get class handle for field type.");
     //jclass field_klass = struct_Class_to_java_lang_Class_Handle(clss);
@@ -1324,7 +1324,7 @@
     // get field class
     tmn_suspend_enable();
 
-    //Type_Info_Handle field_type = field_get_type_info_of_field_value(field);
+    //Type_Info_Handle field_type = field_get_type_info(field);
     //Class_Handle clss = type_info_get_class(field_type);
     //ASSERT(clss, "Can't get class handle for field type.");
     //jclass field_klass = struct_Class_to_java_lang_Class_Handle(clss);

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_trace.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_trace.cpp?rev=639267&r1=639266&r2=639267&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_trace.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_trace.cpp Thu Mar 20 05:41:52 2008
@@ -22,6 +22,7 @@
 #include "cxxlog.h"
 
 #include "open/gc.h"
+#include "open/vm_field_access.h"
 #include "slot.h"
 
 // VM internal headers

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/java_lang_reflect_VMReflection.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/java_lang_reflect_VMReflection.cpp?rev=639267&r1=639266&r2=639267&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/java_lang_reflect_VMReflection.cpp
(original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/java_lang_reflect_VMReflection.cpp
Thu Mar 20 05:41:52 2008
@@ -31,6 +31,7 @@
 #include "cxxlog.h"
 
 #include "reflection.h"
+#include "open/vm_field_access.h"
 #include "environment.h"
 #include "exceptions.h"
 #include "vm_strings.h"
@@ -91,7 +92,7 @@
   (JNIEnv *jenv, jclass, jlong member)
 {
     Field_Handle fh = (Field_Handle) ((POINTER_SIZE_INT) member);
-    Type_Info_Handle fti = field_get_type_info_of_field_value(fh);
+    Type_Info_Handle fti = field_get_type_info(fh);
     return descriptor_to_jclass(fti);
 }
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/reflection/reflection.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/reflection/reflection.cpp?rev=639267&r1=639266&r2=639267&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/reflection/reflection.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/reflection/reflection.cpp Thu Mar 20 05:41:52
2008
@@ -32,6 +32,7 @@
 #include "port_malloc.h"
 
 #include "open/vm_type_access.h"
+#include "open/vm_field_access.h"
 
 #include "exceptions.h"
 #include "heap.h"

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/compile_ipf.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/compile_ipf.cpp?rev=639267&r1=639266&r2=639267&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/compile_ipf.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/compile_ipf.cpp Thu Mar 20 05:41:52
2008
@@ -340,7 +340,7 @@
     unsigned num_fields = class_num_instance_fields_recursive(c);
     for(unsigned i=0; i<num_fields; i++) {
         Field_Handle f = class_get_instance_field_recursive(c, i);
-        Type_Info_Handle ftih = field_get_type_info_of_field_value(f);
+        Type_Info_Handle ftih = field_get_type_info(f);
         unsigned offset = 0;
         // field_get_offset_unboxed asserts 0 anyway
         switch (type_info_get_type(ftih)) {



Mime
View raw message