You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by va...@apache.org on 2008/03/13 12:18:59 UTC

svn commit: r636714 - in /harmony/enhanced/drlvm/trunk/vm: include/ include/open/ jitrino/src/codegenerator/ia32/ jitrino/src/codegenerator/ipf/ jitrino/src/jet/ jitrino/src/vm/ port/src/misc/win/ port/src/modules/win/ port/src/vmem/win/ vmcore/include...

Author: varlax
Date: Thu Mar 13 04:18:43 2008
New Revision: 636714

URL: http://svn.apache.org/viewvc?rev=636714&view=rev
Log:
Initial step for making public interfaces consistent:
- use DECLARE_OPEN macro to allow choosing static/dynamic model w/o duplicated declarations;
- use portable types provided by hycomp.h (copied from classlib);
- got rid of few outdated APIs like LIL inlining stubs

Added:
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/type_access.cpp   (with props)
Modified:
    harmony/enhanced/drlvm/trunk/vm/include/jit_import.h
    harmony/enhanced/drlvm/trunk/vm/include/jit_import_rt.h
    harmony/enhanced/drlvm/trunk/vm/include/jit_runtime_support.h
    harmony/enhanced/drlvm/trunk/vm/include/open/common.h
    harmony/enhanced/drlvm/trunk/vm/include/open/hycomp.h
    harmony/enhanced/drlvm/trunk/vm/include/open/platform_types.h
    harmony/enhanced/drlvm/trunk/vm/include/open/types.h
    harmony/enhanced/drlvm/trunk/vm/include/open/vm.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/jitrino/src/codegenerator/ia32/Ia32GCMap.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfRuntimeInterface.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_regs.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.h
    harmony/enhanced/drlvm/trunk/vm/port/src/misc/win/dso.c
    harmony/enhanced/drlvm/trunk/vm/port/src/misc/win/sysinfo.c
    harmony/enhanced/drlvm/trunk/vm/port/src/misc/win/timer.c
    harmony/enhanced/drlvm/trunk/vm/port/src/misc/win/timezone.c
    harmony/enhanced/drlvm/trunk/vm/port/src/misc/win/user.c
    harmony/enhanced/drlvm/trunk/vm/port/src/modules/win/native_modules_os.c
    harmony/enhanced/drlvm/trunk/vm/port/src/vmem/win/port_vmem.c
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/init.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/inline_info.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/internal_jit_intf.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/jit_runtime_support_common.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/nogc.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/gc/root_set_enum_common.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/bit_vector.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/compile.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/rt_helper_info.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/lil/lil.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/lil/lil_code_generator.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/reflection/annotations.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/reflection/reflection.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_dump.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/compile_em64t.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/jit_runtime_support_em64t.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/compile_IA32.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/jit_runtime_support_ia32.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/include/jit_import.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/jit_import.h?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/jit_import.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/jit_import.h Thu Mar 13 04:18:43 2008
@@ -287,17 +287,6 @@
 
 
 /**
- * The following values should be used as the "heat" argument for 
- * calls like  
- * <code>malloc_fixed_code_for_jit()</code>.
- * FIXME merge with CodeBlockHeat enumeration
- */
-
-#define CODE_BLOCK_HEAT_COLD 0
-#define CODE_BLOCK_HEAT_DEFAULT 1
-#define CODE_BLOCK_HEAT_MAX 20
-
-/**
  * This function allows allocation of multiple chunks of code with different
  * heat values. The JIT is responsible for specifying ids that are unique
  * within the same method.

Modified: harmony/enhanced/drlvm/trunk/vm/include/jit_import_rt.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/jit_import_rt.h?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/jit_import_rt.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/jit_import_rt.h Thu Mar 13 04:18:43 2008
@@ -23,13 +23,12 @@
 #ifndef _JIT_IMPORT_RT_H
 #define _JIT_IMPORT_RT_H
 
-//#include <stdlib.h>
-
 #include "open/types.h"
 
 #ifdef __cplusplus
 extern "C" {
 #endif
+
 /**
  * Begin root set enumeration functions.
  *
@@ -38,52 +37,35 @@
  * this location if the object pointed to has been moved during
  * collection.
  */
-VMEXPORT void vm_enumerate_root_reference(Managed_Object_Handle *ref, Boolean is_pinned);
+DECLARE_OPEN(void, vm_enumerate_root_reference, (Managed_Object_Handle *ref, BOOLEAN is_pinned));
 
 // Enumerate a weak root entry.  The argument is a pointer to the memory
 // location that contains a managed reference.  The GC may update
 // this location if the object pointed to has been moved during
 // collection.
-VMEXPORT void vm_enumerate_weak_root_reference(Managed_Object_Handle *ref, Boolean is_pinned);
+DECLARE_OPEN(void, vm_enumerate_weak_root_reference, (Managed_Object_Handle *ref, BOOLEAN is_pinned));
 
 /**
  * Resembles vm_enumerate_root_reference(), but is passed the 
  * address of a slot containing a compressed reference.
  */
-VMEXPORT void vm_enumerate_compressed_root_reference(uint32 *ref, Boolean is_pinned);
+DECLARE_OPEN(void, vm_enumerate_compressed_root_reference, (U_32 *ref, BOOLEAN is_pinned));
 
 /** 
  * Like vm_enumerate_root_reference(), but the first argument 
  * points to a location that contains a pointer to an inside of an object.
  */
-VMEXPORT void vm_enumerate_root_interior_pointer(void **slot, int offset, Boolean is_pinned);
-
-/** 
- * The JIT enumerates a managed pointer. The pointer can be declared as
- * pinned.  The pointer can point to the managed heap or any other area
- * where data can be stored: stack or static fields. It is the responsibility
- * of the runtime system to ignore pointers that are not in the managed heap.
- */
-VMEXPORT void vm_enumerate_root_pointer(void **ptr, Boolean is_pinned);
-
-
-/** 
- * End root set enumeration functions.
- */
+DECLARE_OPEN(void, vm_enumerate_root_interior_pointer, (void **slot, size_t offset, BOOLEAN is_pinned));
 
 /** 
  * Enumerates alive references for owned monitor calculation.
  */
-
-VMEXPORT void vm_check_if_monitor(void  **reference,
+DECLARE_OPEN(void, vm_check_if_monitor, (void  **reference,
                                        void  **base_reference,
-                                       uint32 *compressed_reference, 
-                                       int     slotOffset, 
-                                       Boolean pinned,
-                                       int     type);
-
-
-
+                                       U_32 *  compressed_reference, 
+                                       size_t  slotOffset, 
+                                       BOOLEAN pinned,
+                                       U_32    type));
 
 #ifdef __cplusplus
 }

Modified: harmony/enhanced/drlvm/trunk/vm/include/jit_runtime_support.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/jit_runtime_support.h?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/jit_runtime_support.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/jit_runtime_support.h Thu Mar 13 04:18:43 2008
@@ -29,12 +29,10 @@
 
 #ifdef __cplusplus
 extern "C" {
-#endif // __cplusplus
-
+#endif
 
-NativeCodePtr rth_get_lil_helper(VM_RT_SUPPORT f);
 
-VMEXPORT void *vm_get_rt_support_addr(VM_RT_SUPPORT f);
+DECLARE_OPEN(void *, vm_get_rt_support_addr, (VM_RT_SUPPORT f));
 
 
 /**
@@ -42,52 +40,38 @@
  * same as <code>vm_get_rt_support_addr</code>, but tries to optimize the stubs it creates,
  * by specializing them.
  */
-VMEXPORT void *vm_get_rt_support_addr_optimized(VM_RT_SUPPORT f, Class_Handle c);
-
-/**
- * Instead of returning a stub address, this support function returns
- * parsed LIL code.
- */
- typedef struct LilCodeStub LilCodeStub;
-VMEXPORT LilCodeStub *vm_get_rt_support_stub(VM_RT_SUPPORT f, Class_Handle c);
-
+DECLARE_OPEN(void *, vm_get_rt_support_addr_optimized, (VM_RT_SUPPORT f, Class_Handle c));
 
 /**
  *  Checks if helper is a suspension point
  */
-VMEXPORT HELPER_INTERRUPTIBILITY_KIND vm_helper_get_interruptibility_kind(VM_RT_SUPPORT f);
+DECLARE_OPEN(HELPER_INTERRUPTIBILITY_KIND, vm_helper_get_interruptibility_kind, (VM_RT_SUPPORT f));
 
-VMEXPORT HELPER_CALLING_CONVENTION vm_helper_get_calling_convention(VM_RT_SUPPORT f);
-VMEXPORT const char* vm_helper_get_name(VM_RT_SUPPORT id);
+DECLARE_OPEN(HELPER_CALLING_CONVENTION, vm_helper_get_calling_convention, (VM_RT_SUPPORT f));
+DECLARE_OPEN(const char*, vm_helper_get_name, (VM_RT_SUPPORT id));
 
 /**
  * Returns number of helper arguments.
  * Intended primarily for debugging.
  */
-VMEXPORT int vm_helper_get_numargs(VM_RT_SUPPORT id);
+DECLARE_OPEN(U_32, vm_helper_get_numargs, (VM_RT_SUPPORT id));
 
 /**
 * Returns Id of runtime helper by its string representation. 
 * Name comparison is case-insensitive.
 * If the helperName is unknown, then VM_RT_UNKNOWN is returned.
 */
-VMEXPORT VM_RT_SUPPORT vm_helper_get_by_name(const char* name);
+DECLARE_OPEN(VM_RT_SUPPORT, vm_helper_get_by_name, (const char* name));
 
-#ifndef Global_Env
-struct Global_Env;
-#endif
 
-jint helper_magic_init(Global_Env * vm_env);
-
-VMEXPORT jint vm_helper_register_magic_helper(VM_RT_SUPPORT id, 
+DECLARE_OPEN(jint, vm_helper_register_magic_helper, (VM_RT_SUPPORT id, 
                                    const char* class_name, 
-                                   const char* method_name);
+                                   const char* method_name));
 
-VMEXPORT Method_Handle vm_helper_get_magic_helper(VM_RT_SUPPORT id);
+DECLARE_OPEN(Method_Handle, vm_helper_get_magic_helper, (VM_RT_SUPPORT id));
 
 #ifdef __cplusplus
 }
 #endif // __cplusplus
-
 
 #endif // !_JIT_RUNTIME_SUPPORT_H_

Modified: harmony/enhanced/drlvm/trunk/vm/include/open/common.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/common.h?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/common.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/common.h Thu Mar 13 04:18:43 2008
@@ -15,6 +15,17 @@
  *  limitations under the License.
  */
 
+#if defined(DYNAMIC_OPEN)
+#   define DECLARE_OPEN(return_type, func_name, prototype) \
+    typedef return_type (*func_name##_t)prototype
+#   define GET_INTERFACE(get_adapter, func_name) \
+    (func_name##_t)get_adapter(#func_name)
+#else
+#   define DECLARE_OPEN(return_type, func_name, prototype) \
+    VMEXPORT return_type func_name prototype
+#endif
+
+
 // excluding remarks: 
 #if defined (__INTEL_COMPILER)
 #pragma warning (disable:1684) // conversion from pointer to same-sized integral type (potential portability problem)

Modified: harmony/enhanced/drlvm/trunk/vm/include/open/hycomp.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/hycomp.h?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/hycomp.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/hycomp.h Thu Mar 13 04:18:43 2008
@@ -156,7 +156,15 @@
 #define PVMCALL VMCALL *
 
 #if defined(LINUX) || defined(FREEBSD)
-#define BOOLEAN UDATA
+    typedef U_32 BOOLEAN;
+#elif defined(_WIN32)
+#   if _MSC_VER >= 1300 || __INTEL_COMPILER
+// <winsock2.h> must be included before <windows.h> to avoid 
+// compile-time errors with winsock.h. For more details, see:
+// http://www.microsoft.com/msdownload/platformsdk/sdkupdate/2600.2180.7/contents.htm
+#       include <winsock2.h>
+#   endif
+#   include <windows.h>
 #endif
 
 #if !defined(HYCONST64)

Modified: harmony/enhanced/drlvm/trunk/vm/include/open/platform_types.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/platform_types.h?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/platform_types.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/platform_types.h Thu Mar 13 04:18:43 2008
@@ -19,6 +19,7 @@
 #define _PLATFORM_TYPES_H_
 
 #include "common.h"
+#include "hycomp.h"
 
 #define MAX_UINT32 0xffffffff
 /**

Modified: harmony/enhanced/drlvm/trunk/vm/include/open/types.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/types.h?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/types.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/types.h Thu Mar 13 04:18:43 2008
@@ -87,8 +87,8 @@
 typedef struct Method *Method_Handle;
 typedef struct Method_Signature *Method_Signature_Handle;
 typedef struct TypeDesc *Type_Info_Handle;
-typedef POINTER_SIZE_INT Allocation_Handle;
-typedef POINTER_SIZE_INT Runtime_Type_Handle;
+typedef UDATA Allocation_Handle;
+typedef UDATA Runtime_Type_Handle;
 typedef void* NativeCodePtr;
 typedef struct ClassLoader* ClassLoaderHandle;
 typedef struct ManagedObject* ManagedPointer;

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=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/vm.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/vm.h Thu Mar 13 04:18:43 2008
@@ -354,7 +354,7 @@
 /**
  * @return Class handle given object's <code>VTable_Handle</code>.
  */ 
- VMEXPORT Class_Handle vtable_get_class(VTable_Handle vh);
+ DECLARE_OPEN(Class_Handle, vtable_get_class, (VTable_Handle vh));
 
 /**
  * @return The number of superclass hierarchy elements that are
@@ -782,132 +782,6 @@
 
 ////
 // end method-related functions.
-////
-
-////
-// begin type info-related functions.
-////
-
-/**
- * Array shapes and custom modifiers are not implemented yet.
- *
- * If type info is a reference, <code>type_info_get_class</code> 
- * will return the class of the reference.
- */
-VMEXPORT Boolean type_info_is_reference(Type_Info_Handle tih);
-
-/**
- * If type info is unboxed, <code>type_info_get_class</code> 
- * will return the class of the unboxed type and <code>class_is_primitive<code>
- * will return its <code>VM_Data_Type</code>.
- */ 
-VMEXPORT Boolean type_info_is_unboxed(Type_Info_Handle tih);
-
-/**
- * @return <code>TRUE</code> if the type is a primitive type. 
- *         <code>type_info_is_primitive</code> does
- *         not cause resolution in contrast to the otherwise equivalentcall sequence
- *         suggested in the description of <code>type_info_is_unboxed</code> 
- *        (i.e. <code>type_info_is_unboxed-->type_info_get_class-->class_is_primitive</code>).
- */
-VMEXPORT Boolean type_info_is_primitive(Type_Info_Handle tih);
-
-/**
- * If <code>TRUE</code>, then <code>type_info_get_type_info</code>
- * returns the type info that the pointer points to.
- */
-VMEXPORT Boolean type_info_is_unmanaged_pointer(Type_Info_Handle tih);
-
-/**
- * For a return value a type can be void when it is not an unmanaged pointer.
- * In all other contexts, if <code>type_info_is_void</code> is <code>TRUE</code> then
- * <code>type_info_is_unmanaged_pointer</code> is <code>TRUE</code> too.
- */ 
-VMEXPORT Boolean type_info_is_void(Type_Info_Handle tih);
-
-/**
- * If <code>TRUE</code>, use <code>type_info_get_method_sig</code> to 
- * retrieve the method signature.
- */
-VMEXPORT Boolean type_info_is_method_pointer(Type_Info_Handle tih);
-
-/**
- * Is it a vector, i.e., a one-dimensional, zero-based array.
- */ 
-VMEXPORT Boolean type_info_is_vector(Type_Info_Handle tih);
-
-/**
- * Is it a general array, i.e., either multidimensional or non zero-based.
- *
- * @return <code>FALSE</code> for vectors. Always <code>FALSE</code> for Java.
- */ 
-VMEXPORT Boolean type_info_is_general_array(Type_Info_Handle tih);
-
-/**
-* Get the name of the class referenced by this type info handle
-*/
-VMEXPORT const char* type_info_get_type_name(Type_Info_Handle tih);
-
-/**
- * Get the class if <code>type_info_is_reference</code> or 
- * <code>type_info_is_unboxed</code> returned <code>TRUE</code>. 
- * If the type info is a vector or a general array, return the
- * class handle for the array type (not the element type).
- */
-VMEXPORT Class_Handle type_info_get_class(Type_Info_Handle tih);
-
-
-/**
-* Gets Type_Info_Handle from the given type name.
-* Does'n resolve type if not resolved
-*/
-
-VMEXPORT Type_Info_Handle type_info_create_from_java_descriptor(ClassLoaderHandle cl, const char* typeName);
-
-/**
- * Get the class if <code>type_info_is_reference</code> or 
- * <code>type_info_is_unboxed</code> returned <code>TRUE</code>. 
- * If the type info is a vector or a general array, return the
- * class handle for the array type (not the element type).
- * Invokes class loader with no exception but preserves previously
- * raised exception.
- */
-VMEXPORT Class_Handle type_info_get_class_no_exn(Type_Info_Handle tih);
-
-/**
- * Get the method signature if <code>type_info_is_method_pointer</code> 
- * returned <code>TRUE</code>.
- */
-VMEXPORT Method_Signature_Handle type_info_get_method_sig(Type_Info_Handle tih);
-
-/**
- * Get recursively type info if <code>type_info_is_unmanaged_pointer</code>,
- * <code>type_info_is_vector</code> or <code>type_info_is_general_array</code>
- * returned <code>TRUE</code>.
- */
-VMEXPORT Type_Info_Handle type_info_get_type_info(Type_Info_Handle tih);
-
-/**
- * Return an <code>VM_Data_Type</code> corresponding to a type info.
- * This function is provided for convenience as it can be implemented in terms
- * of other functions provided in this interface.
- */
-VMEXPORT VM_Data_Type type_info_get_type(Type_Info_Handle tih);
-
-
-/**
-* Checks if a type referenced by the given type info handle is resolved
-*/
-VMEXPORT Boolean type_info_is_resolved(Type_Info_Handle tih);
-
-/**
-* Returns number of array dimension of a type referenced by the 
-* given type info handle.
-*/
-VMEXPORT uint32 type_info_get_num_array_dimensions(Type_Info_Handle tih);
-
-////
-// end type info-related functions.
 ////
 
 ////

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=636714&r1=636713&r2=636714&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 13 04:18:43 2008
@@ -24,12 +24,6 @@
 #include "open/rt_helpers.h"
 #include "open/em.h"
 
-/*
-#define PROTOTYPE_WITH_NAME(return_type, func_name, prototype) \
-        typedef return_type (*func_name##_t)prototype;\
-        const char* func_name##_s = #func_name
-*/
-
 #define PROTOTYPE_WITH_NAME(return_type, func_name, prototype) \
     typedef return_type (*func_name##_t)prototype
 
@@ -207,20 +201,6 @@
 
 //Type Info
 
-PROTOTYPE_WITH_NAME(Type_Info_Handle, type_info_create_from_java_descriptor, (ClassLoaderHandle cl, const char* typeName));
-
-PROTOTYPE_WITH_NAME(const char* , type_info_get_type_name, (Type_Info_Handle tih));
-PROTOTYPE_WITH_NAME(Class_Handle, type_info_get_class, (Type_Info_Handle tih));
-PROTOTYPE_WITH_NAME(Class_Handle, type_info_get_class_no_exn, (Type_Info_Handle tih));
-PROTOTYPE_WITH_NAME(uint32      , type_info_get_num_array_dimensions, (Type_Info_Handle tih));
-PROTOTYPE_WITH_NAME(Type_Info_Handle, type_info_get_type_info, (Type_Info_Handle tih));
-
-PROTOTYPE_WITH_NAME(bool        , type_info_is_void, (Type_Info_Handle tih));
-PROTOTYPE_WITH_NAME(bool        , type_info_is_reference, (Type_Info_Handle tih));
-PROTOTYPE_WITH_NAME(bool        , type_info_is_resolved, (Type_Info_Handle tih));
-PROTOTYPE_WITH_NAME(bool        , type_info_is_primitive, (Type_Info_Handle tih));
-PROTOTYPE_WITH_NAME(bool        , type_info_is_vector, (Type_Info_Handle tih));
-
 //Vector
 PROTOTYPE_WITH_NAME(int         , vector_get_first_element_offset, (Class_Handle element_type)); //vector_first_element_offset_class_handle
 PROTOTYPE_WITH_NAME(int         , vector_get_length_offset, ()); //vector_length_offset
@@ -272,18 +252,13 @@
 
 PROTOTYPE_WITH_NAME(void *      , vm_helper_get_addr, (VM_RT_SUPPORT id));//void * vm_get_rt_support_addr(VM_RT_SUPPORT id)
 PROTOTYPE_WITH_NAME(void *      , vm_helper_get_addr_optimized, (VM_RT_SUPPORT id, Class_Handle ch));//void * vm_get_rt_support_addr_optimized(VM_RT_SUPPORT id, Class_Handle ch)
-PROTOTYPE_WITH_NAME(VM_RT_SUPPORT, vm_helper_get_by_name,(const char* name));
-PROTOTYPE_WITH_NAME(HELPER_CALLING_CONVENTION, vm_helper_get_calling_convention,(VM_RT_SUPPORT id));
-PROTOTYPE_WITH_NAME(HELPER_INTERRUPTIBILITY_KIND, vm_helper_get_interruptibility_kind, (VM_RT_SUPPORT id));
-PROTOTYPE_WITH_NAME(Method_Handle, vm_helper_get_magic_helper, (VM_RT_SUPPORT id));
-PROTOTYPE_WITH_NAME(const char* , vm_helper_get_name, (VM_RT_SUPPORT id));
 
+
+
+/////////////////////////// temporary ///////////////////////////
 //VTable
 PROTOTYPE_WITH_NAME(Class_Handle , vtable_get_class, (VTable_Handle vh));
 
 
-PROTOTYPE_WITH_NAME(void, vm_enumerate_root_reference, (Managed_Object_Handle *ref, Boolean is_pinned));
-PROTOTYPE_WITH_NAME(void, vm_enumerate_compressed_root_reference, (uint32 *ref, Boolean is_pinned));
-PROTOTYPE_WITH_NAME(void, vm_enumerate_root_interior_pointer,(void **slot, int offset, Boolean is_pinned));
 
 #endif // _VM_INTERFACE_H

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=636714&r1=636713&r2=636714&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 13 04:18:43 2008
@@ -14,70 +14,154 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-/**
- * @author Intel, Pavel Pervov
- * @version $Revision: 1.4 $
- */
 #ifndef _VM_TYPE_ACCESS_H
 #define _VM_TYPE_ACCESS_H
 
+#include "types.h"
 /**
  * @file
  * Part of Class Support interface related to accessing generalized
  * types' properties.
  */
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 /**
- * Checks whether type information contains the reference type. 
- *
- * @param typeinfo - the type information handle
- *
- * @return <code>TRUE</code> if type information contains reference description; otherwise, <code>FALSE</code>.
- */
-Boolean
-type_info_is_reference(Type_Info_Handle typeinfo);
+* If type info is unboxed, <code>type_info_get_class</code> 
+* will return the class of the unboxed type and <code>class_is_primitive<code>
+* will return its <code>VM_Data_Type</code>.
+* FIXME not used
+*/ 
+DECLARE_OPEN(BOOLEAN, type_info_is_unboxed, (Type_Info_Handle tih));
 
 /**
- * Checks whether type information contains the void type. 
- *
- * @param typeinfo - the type information handle
- *
- * @return <code>TRUE</code> if type information contains void type; otherwise, <code>FALSE</code>.
- */
-Boolean
-type_info_is_void(Type_Info_Handle tih);
+* If <code>TRUE</code>, then <code>type_info_get_type_info</code>
+* returns the type info that the pointer points to.
+* FIXME not used
+*/
+DECLARE_OPEN(BOOLEAN, type_info_is_unmanaged_pointer, (Type_Info_Handle tih));
 
 /**
- * Checks whether  type information describes the one-dimensional array. 
- *
- * @param typeinfo - the type information handle
- *
- * @return <code>TRUE</code> if type information describes the one-dimensional array; otherwise, <code>FALSE</code>.
- */
-Boolean
-type_info_is_vector(Type_Info_Handle tih);
+* If <code>TRUE</code>, then <code>type_info_get_type_info</code>
+* returns the type info that the pointer points to.
+* FIXME???
+*/
+DECLARE_OPEN(BOOLEAN, type_info_is_managed_pointer, (Type_Info_Handle tih));
 
 /**
- * Returns the C++ class structure for the given type information. 
- *
- * @param typeinfo - the type information handle
- * @param exc         - the variable to return the exception "code"
- *
- * @return The handle of the C++ class structure for the specified type information.
- *
- * @note Reference to the internal type <i>Loader_Exception</i>.
- */
-Class_Handle
-type_info_get_class(Type_Info_Handle typeinfo, Loader_Exception* exc);
+* If <code>TRUE</code>, use <code>type_info_get_method_sig</code> to 
+* retrieve the method signature.
+* FIXME not used
+*/
+DECLARE_OPEN(BOOLEAN, type_info_is_method_pointer, (Type_Info_Handle tih));
 
 /**
- * Returns recursive type information for the given type information. 
- *
- * @param typeinfo - type information to query
- *
- * @return Recursive type information if available; otherwise, <code>NULL</code>.
- */
-Type_Info_Handle
-type_info_get_type_info(Type_Info_Handle typeinfo);
+* Is it a general array, i.e., either multidimensional or non zero-based.
+*
+* @return <code>FALSE</code> for vectors. Always <code>FALSE</code> for Java.
+* FIXME not used
+*/ 
+DECLARE_OPEN(BOOLEAN, type_info_is_general_array, (Type_Info_Handle tih));;
+
+/**
+* Get the method signature if <code>type_info_is_method_pointer</code> 
+* returned <code>TRUE</code>.
+* FIXME not used
+*/
+DECLARE_OPEN(Method_Signature_Handle, type_info_get_method_sig, (Type_Info_Handle tih));
+
+
+/**
+* Return an <code>VM_Data_Type</code> corresponding to a type info.
+* This function is provided for convenience as it can be implemented in terms
+* of other functions provided in this interface.
+*/
+DECLARE_OPEN(VM_Data_Type, type_info_get_type, (Type_Info_Handle tih));
+
+
+
+/**
+* Gets Type_Info_Handle from the given type name.
+* Does'n resolve type if not resolved
+*/
+DECLARE_OPEN(Type_Info_Handle, type_info_create_from_java_descriptor, (ClassLoaderHandle cl, const char* typeName));
+
+/**
+* Get the name of the class referenced by this type info handle
+*/
+DECLARE_OPEN(const char* , type_info_get_type_name, (Type_Info_Handle tih));
+
+/**
+* Get the class if <code>type_info_is_reference</code> or 
+* <code>type_info_is_unboxed</code> returned <code>TRUE</code>. 
+* If the type info is a vector or a general array, return the
+* class handle for the array type (not the element type).
+*/
+DECLARE_OPEN(Class_Handle, type_info_get_class, (Type_Info_Handle tih));
+
+/**
+* Get the class if <code>type_info_is_reference</code> or 
+* <code>type_info_is_unboxed</code> returned <code>TRUE</code>. 
+* If the type info is a vector or a general array, return the
+* class handle for the array type (not the element type).
+* Invokes class loader with no exception but preserves previously
+* raised exception.
+*/
+DECLARE_OPEN(Class_Handle, type_info_get_class_no_exn, (Type_Info_Handle tih));
+
+/**
+* Returns number of array dimension of a type referenced by the 
+* given type info handle.
+*/
+DECLARE_OPEN(U_32, type_info_get_num_array_dimensions, (Type_Info_Handle tih));
+
+/**
+* Get recursively type info if <code>type_info_is_unmanaged_pointer</code>,
+* <code>type_info_is_vector</code> or <code>type_info_is_general_array</code>
+* returned <code>TRUE</code>.
+*/
+DECLARE_OPEN(Type_Info_Handle, type_info_get_type_info, (Type_Info_Handle tih));
+
+/**
+* For a return value a type can be void when it is not an unmanaged pointer.
+* In all other contexts, if <code>type_info_is_void</code> is <code>TRUE</code> then
+* <code>type_info_is_unmanaged_pointer</code> is <code>TRUE</code> too.
+* FIXME???
+*/ 
+DECLARE_OPEN(BOOLEAN, type_info_is_void, (Type_Info_Handle tih));
+
+/**
+* Array shapes and custom modifiers are not implemented yet.
+*
+* If type info is a reference, <code>type_info_get_class</code> 
+* will return the class of the reference.
+*/
+DECLARE_OPEN(BOOLEAN, type_info_is_reference, (Type_Info_Handle tih));
+
+/**
+* Checks if a type referenced by the given type info handle is resolved
+*/
+DECLARE_OPEN(BOOLEAN, type_info_is_resolved, (Type_Info_Handle tih));
+
+/**
+* @return <code>TRUE</code> if the type is a primitive type. 
+*         <code>type_info_is_primitive</code> does
+*         not cause resolution in contrast to the otherwise equivalentcall sequence
+*         suggested in the description of <code>type_info_is_unboxed</code> 
+*        (i.e. <code>type_info_is_unboxed-->type_info_get_class-->class_is_primitive</code>).
+*/
+DECLARE_OPEN(BOOLEAN, type_info_is_primitive, (Type_Info_Handle tih));
+
+/**
+* Is it a vector, i.e., a one-dimensional, zero-based array.
+* FIXME? In Java all arrays are vectors
+*/ 
+DECLARE_OPEN(BOOLEAN, type_info_is_vector, (Type_Info_Handle tih));
+
+#ifdef __cplusplus
+}
+#endif
 
 #endif // _VM_TYPE_ACCESS_H

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.cpp?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32GCMap.cpp Thu Mar 13 04:18:43 2008
@@ -474,7 +474,7 @@
             char* mptrAddr = *(char**)valPtrAddr;
             GCMap::checkObject(tm, mptrAddr - offset);
 #endif
-            gcInterface->enumerateRootManagedReference((void**)valPtrAddr, offset);
+            gcInterface->enumerateRootManagedReference((void**)valPtrAddr, (size_t)offset);
         }
     }
 }

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfRuntimeInterface.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfRuntimeInterface.cpp?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfRuntimeInterface.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfRuntimeInterface.cpp Thu Mar 13 04:18:43 2008
@@ -278,7 +278,8 @@
 
     uint64 *u1    = (uint64 *)basePtr;
     uint64 *u2    = (uint64 *)mptrPtr;
-    int    offset = *u2 - *u1;
+    assert(*u2 >= *u1);
+    size_t offset = *u2 - *u1;
 //    cout << "  report mptr: " << - (mptr+1) << flush; 
 //    cout << " " << u2 << flush;
 //    cout << " " << hex << *u2 << dec << flush;

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_regs.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_regs.cpp?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_regs.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_regs.cpp Thu Mar 13 04:18:43 2008
@@ -19,7 +19,7 @@
  * @version $Revision$
  */
 #include "compiler.h"
-#include <open/vm.h>
+//#include <open/vm.h>
 #include "trace.h"
 
 /**

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp Thu Mar 13 04:18:43 2008
@@ -31,6 +31,7 @@
 
 #include "open/vm.h"
 #include "open/hythread_ext.h"
+#include "open/vm_type_access.h"
 #include "jit_import.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=636714&r1=636713&r2=636714&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 13 04:18:43 2008
@@ -20,13 +20,22 @@
 #include <iostream>
 #include <assert.h>
 
-#include "Type.h"
+#include "mkernel.h"
+
+#define DYNAMIC_OPEN
 #include "VMInterface.h"
+#include "open/vm_interface.h"
+#include "open/vm_type_access.h"
+#include "jit_import_rt.h"
+#include "jit_runtime_support.h"
+
+#include "Type.h"
+
 #include "CompilationContext.h"
 #include "Log.h"
 #include "JITInstanceContext.h"
 #include "PlatformDependant.h"
-#include "mkernel.h"
+
 #include "VMMagic.h"
 
 namespace Jitrino {
@@ -1381,7 +1390,7 @@
     vm_enumerate_compressed_root_reference(reference, FALSE);
 }
 
-void GCInterface::enumerateRootManagedReference(void** slotReference, int slotOffset) {
+void GCInterface::enumerateRootManagedReference(void** slotReference, size_t slotOffset) {
     vm_enumerate_root_interior_pointer(slotReference, slotOffset, FALSE);
 }
 
@@ -1393,7 +1402,7 @@
     //vm_check_if_monitor(0, 0, reference, 0, FALSE, 2);
 }
 
-void ThreadDumpEnumerator::enumerateRootManagedReference(void** slotReference, int slotOffset) {
+void ThreadDumpEnumerator::enumerateRootManagedReference(void** slotReference, size_t slotOffset) {
     //vm_check_if_monitor(slotReference, 0, 0, slotOffset, FALSE, 3);
 }
 

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.h?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/VMInterface.h Thu Mar 13 04:18:43 2008
@@ -20,8 +20,10 @@
 
 #include <ostream>
 #include "open/types.h"
+#include "open/rt_types.h"
+#include "open/rt_helpers.h"
+#include "open/em.h"
 #include "open/ee_em_intf.h"
-#include "open/vm_interface.h"
 
 namespace Jitrino {
 
@@ -466,7 +468,7 @@
 
     virtual void enumerateCompressedRootReference(uint32* reference);
 
-    virtual void enumerateRootManagedReference(void** slotReference, int slotOffset);
+    virtual void enumerateRootManagedReference(void** slotReference, size_t slotOffset);
 
 private:
     GC_Enumeration_Handle gcHandle;
@@ -481,7 +483,7 @@
 
     virtual void enumerateCompressedRootReference(uint32* reference);
 
-    virtual void enumerateRootManagedReference(void** slotReference, int slotOffset);
+    virtual void enumerateRootManagedReference(void** slotReference, size_t slotOffset);
 };
 
 //

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/misc/win/dso.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/misc/win/dso.c?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/misc/win/dso.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/misc/win/dso.c Thu Mar 13 04:18:43 2008
@@ -19,6 +19,10 @@
 * @version $Revision: 1.1.2.1.4.3 $
 */  
 
+#include "port_malloc.h"
+#include "port_sysinfo.h"
+#include "port_dso.h"
+
 #include <windows.h>
 #include <string.h>
 
@@ -26,9 +30,6 @@
 #include <apr_strings.h>
 #include <apr_env.h>
 
-#include "port_malloc.h"
-#include "port_sysinfo.h"
-#include "port_dso.h"
 
 struct apr_dso_handle_t {
 	apr_pool_t *pool;

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/misc/win/sysinfo.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/misc/win/sysinfo.c?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/misc/win/sysinfo.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/misc/win/sysinfo.c Thu Mar 13 04:18:43 2008
@@ -15,11 +15,12 @@
  *  limitations under the License.
  */
 
+#include "port_malloc.h"
+#include "port_sysinfo.h"
+
 #include <stdio.h>
 #include <stdlib.h>
 #include <windows.h>
-#include "port_malloc.h"
-#include "port_sysinfo.h"
 
 APR_DECLARE(int) port_CPUs_number() {
 	SYSTEM_INFO sys_info;

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/misc/win/timer.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/misc/win/timer.c?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/misc/win/timer.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/misc/win/timer.c Thu Mar 13 04:18:43 2008
@@ -19,10 +19,11 @@
 * @version $Revision$
 */  
 
+#include "port_timer.h"
+
 #include <time.h>
 #include <windows.h>
 
-#include "port_timer.h"
 
 #undef LOG_DOMAIN
 #define LOG_DOMAIN "port.timer"

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/misc/win/timezone.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/misc/win/timezone.c?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/misc/win/timezone.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/misc/win/timezone.c Thu Mar 13 04:18:43 2008
@@ -19,9 +19,10 @@
 * @version $Revision: 1.1.2.1.4.4 $
 */
 
+#include "port_sysinfo.h"
+
 #include <windows.h>
 #include <apr_strings.h>
-#include "port_sysinfo.h"
 
 typedef struct {
 	const char* javaId;

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/misc/win/user.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/misc/win/user.c?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/misc/win/user.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/misc/win/user.c Thu Mar 13 04:18:43 2008
@@ -19,11 +19,12 @@
 * @version $Revision: 1.1.2.1.4.3 $
 */  
 
+#include "port_sysinfo.h"
+
 #include <stdio.h>
 #include <windows.h>
 #include <lmcons.h>
 #include <userenv.h>
-#include "port_sysinfo.h"
 
 APR_DECLARE(apr_status_t) port_user_name(char** account,
 							 apr_pool_t* pool){

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/modules/win/native_modules_os.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/modules/win/native_modules_os.c?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/modules/win/native_modules_os.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/modules/win/native_modules_os.c Thu Mar 13 04:18:43 2008
@@ -19,11 +19,12 @@
  * @version $Revision: 1.1.2.1 $
  */
 
+#include "port_malloc.h"
+#include "native_modules.h"
+
 #include <memory.h>
 #include <Windows.h>
 #include <Tlhelp32.h>
-#include "port_malloc.h"
-#include "native_modules.h"
 
 static native_module_t* fill_module(MODULEENTRY32 src);
 

Modified: harmony/enhanced/drlvm/trunk/vm/port/src/vmem/win/port_vmem.c
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/port/src/vmem/win/port_vmem.c?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/port/src/vmem/win/port_vmem.c (original)
+++ harmony/enhanced/drlvm/trunk/vm/port/src/vmem/win/port_vmem.c Thu Mar 13 04:18:43 2008
@@ -19,13 +19,14 @@
  * @version $Revision: 1.1.2.1.4.4 $
  */  
 
-#include <windows.h>
-#include <psapi.h>
 #include "port_vmem.h"
 
 #undef LOG_DOMAIN
 #define LOG_DOMAIN "port.vmem"
 #include "clog.h"
+
+#include <windows.h>
+#include <psapi.h>
 
 #ifdef __cplusplus
 extern "C" {

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/include/init.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/include/init.h?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/include/init.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/include/init.h Thu Mar 13 04:18:43 2008
@@ -49,5 +49,6 @@
 void parse_jit_arguments(JavaVMInitArgs* vm_arguments);
 void print_generic_help();
 jint initialize_properties(Global_Env *p_env);
+jint helper_magic_init(Global_Env * vm_env);
 
 #endif //_INIT_H

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/include/inline_info.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/include/inline_info.h?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/include/inline_info.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/include/inline_info.h Thu Mar 13 04:18:43 2008
@@ -20,7 +20,6 @@
 
 #include <vector>
 #include "open/types.h"
-#include "jit_intf.h"
 #include "lock_manager.h"
 
 struct Method;

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/include/internal_jit_intf.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/include/internal_jit_intf.h?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/include/internal_jit_intf.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/include/internal_jit_intf.h Thu Mar 13 04:18:43 2008
@@ -23,9 +23,11 @@
 
 #ifndef _INTERNAL_JIT_INTF_H_
 #define _INTERNAL_JIT_INTF_H_
-#include "open/types.h"
 
+#include "open/types.h"
+#include "open/rt_helpers.h"
 
+NativeCodePtr rth_get_lil_helper(VM_RT_SUPPORT f);
 VMEXPORT char *gen_setup_j2n_frame(char *s);
 VMEXPORT char *gen_pop_j2n_frame(char *s);
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/include/jit_runtime_support_common.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/include/jit_runtime_support_common.h?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/include/jit_runtime_support_common.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/include/jit_runtime_support_common.h Thu Mar 13 04:18:43 2008
@@ -85,17 +85,4 @@
  */
 LilCodeStub *gen_lil_typecheck_stub(bool is_checkcast);
  
-/**
- * Creates a <code>SPECIALIZED LIL</code> code stub for checkcast or instance of
- * it assumes that the class is suitable for fast instanceof checks.
- *
- * @return Different fast stub for every class. <code>will_inline</code>
- *         is set to <code>TRUE</code>, if this stub will be inlined in a JIT,
- *         and <code>FALSE</code>, if it will be passed to a code generator
- *         (this is due to the slightly different treatment of exceptions).
- */
-LilCodeStub *gen_lil_typecheck_stub_specialized(bool is_checkcast,
-                                                bool will_inline,
-                                                Class *superclass);
-
 #endif

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/include/nogc.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/include/nogc.h?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/include/nogc.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/include/nogc.h Thu Mar 13 04:18:43 2008
@@ -28,13 +28,21 @@
 #ifndef _NOGC_H_
 #define _NOGC_H_
 
-#include "jit_import.h" // for the definition of Code_Allocation_Action
+#include <stdlib.h>
+#include "open/rt_types.h" // for the definition of Code_Allocation_Action
 
 #ifdef _IPF_
 #define DEFAULT_CODE_ALIGNMENT 32
 #else // !_IPF_
 #define DEFAULT_CODE_ALIGNMENT 16
 #endif // !_IPF_
+
+/*
+* FIXME merge with CodeBlockHeat enumeration
+*/
+#define CODE_BLOCK_HEAT_COLD 0
+#define CODE_BLOCK_HEAT_DEFAULT 1
+#define CODE_BLOCK_HEAT_MAX 20
 
 void *malloc_fixed_code_for_jit(size_t size, size_t alignment, unsigned heat, Code_Allocation_Action action);
 

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=636714&r1=636713&r2=636714&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 13 04:18:43 2008
@@ -32,10 +32,13 @@
 #include "open/hythread_ext.h"
 #include "thread_manager.h"
 #include "cci.h"
+#include "nogc.h"
 
 #include "class_interface.h"
 #include "Package.h"
 
+#include "open/vm_type_access.h"
+
 Boolean class_property_is_final(Class_Handle cl) {
     assert(cl);
     return cl->is_final();
@@ -1914,15 +1917,6 @@
 
 
 
-Boolean type_info_is_managed_pointer(Type_Info_Handle tih)
-{
-    assert(tih);
-    TypeDesc* td = (TypeDesc*)tih;
-    assert(td);
-    return td->is_managed_pointer();
-} //type_info_is_managed_pointer
-
-
 Boolean method_vars_is_managed_pointer(Method_Handle mh, unsigned idx)
 {
     assert(mh);
@@ -1963,204 +1957,6 @@
 
 
 
-VM_Data_Type type_info_get_type(Type_Info_Handle tih)
-{
-    assert(tih);
-    TypeDesc* td = (TypeDesc*)tih;
-    switch (td->get_kind()) {
-    case K_S1:               return VM_DATA_TYPE_INT8;
-    case K_S2:               return VM_DATA_TYPE_INT16;
-    case K_S4:               return VM_DATA_TYPE_INT32;
-    case K_S8:               return VM_DATA_TYPE_INT64;
-    case K_Sp:               return VM_DATA_TYPE_INTPTR;
-    case K_U1:               return VM_DATA_TYPE_UINT8;
-    case K_U2:               return VM_DATA_TYPE_UINT16;
-    case K_U4:               return VM_DATA_TYPE_UINT32;
-    case K_U8:               return VM_DATA_TYPE_UINT64;
-    case K_Up:               return VM_DATA_TYPE_UINTPTR;
-    case K_F4:               return VM_DATA_TYPE_F4;
-    case K_F8:               return VM_DATA_TYPE_F8;
-    case K_Char:             return VM_DATA_TYPE_CHAR;
-    case K_Boolean:          return VM_DATA_TYPE_BOOLEAN;
-    case K_Void:             return VM_DATA_TYPE_VOID;
-    case K_Object:           return VM_DATA_TYPE_CLASS;
-    case K_Vector:           return VM_DATA_TYPE_ARRAY;
-    case K_UnboxedValue:     return VM_DATA_TYPE_VALUE;
-    case K_UnmanagedPointer: return VM_DATA_TYPE_UP;
-    case K_ManagedPointer:   return VM_DATA_TYPE_MP;
-    // The rest are not implemented in the VM_Data_Type scheme
-    case K_Array:
-    case K_MethodPointer:
-    case K_TypedRef:
-    default:
-        ABORT("Invalid vm data type");
-        return VM_DATA_TYPE_INVALID;
-    }
-} //type_info_get_type
-
-
-
-Boolean type_info_is_reference(Type_Info_Handle tih)
-{
-    TypeDesc* td = (TypeDesc*)tih;
-    assert(td);
-    return td->get_kind()==K_Object;
-} //type_info_is_reference
-
-
-
-Boolean type_info_is_unboxed(Type_Info_Handle tih)
-{
-    TypeDesc* td = (TypeDesc*)tih;
-    assert(td);
-    return td->is_unboxed_value();
-} //type_info_is_unboxed
-
-
-
-Boolean type_info_is_unmanaged_pointer(Type_Info_Handle tih)
-{
-    TypeDesc* td = (TypeDesc*)tih;
-    assert(td);
-    return td->is_unmanaged_pointer();
-} //type_info_is_unmanaged_pointer
-
-
-
-Boolean type_info_is_void(Type_Info_Handle tih)
-{
-    TypeDesc* td = (TypeDesc*)tih;
-    assert(td);
-    return td->get_kind()==K_Void;
-} //type_info_is_void
-
-
-
-Boolean type_info_is_method_pointer(Type_Info_Handle tih)
-{
-    TypeDesc* td = (TypeDesc*)tih;
-    assert(td);
-    return td->is_method_pointer();
-} //type_info_is_method_pointer
-
-
-
-Boolean type_info_is_vector(Type_Info_Handle tih)
-{
-    TypeDesc* td = (TypeDesc*)tih;
-    assert(td);
-    return td->is_vector();
-} //type_info_is_vector
-
-
-
-Boolean type_info_is_general_array(Type_Info_Handle tih)
-{
-    TypeDesc* td = (TypeDesc*)tih;
-    assert(td);
-    return td->is_array() && !td->is_vector();
-} //type_info_is_general_array
-
-
-
-Boolean type_info_is_primitive(Type_Info_Handle tih)
-{
-    TypeDesc* td = (TypeDesc*)tih;
-    assert(td);
-    return td->is_primitive();
-} //type_info_is_primitive
-
-
-const char* type_info_get_type_name(Type_Info_Handle tih) {
-    TypeDesc* td = (TypeDesc*)tih;
-    assert(td);
-    return td->get_type_name()->bytes;
-}
-
-Class_Handle type_info_get_class(Type_Info_Handle tih)
-{
-    TypeDesc* td = (TypeDesc*)tih;
-    assert(td);
-    Class* c = td->load_type_desc();
-    if(!c) return NULL;
-    if(!c->verify(VM_Global_State::loader_env)) return NULL;
-    if(!c->prepare(VM_Global_State::loader_env)) return NULL;
-    return c;
-} //type_info_get_class
-
-Class_Handle type_info_get_class_no_exn(Type_Info_Handle tih)
-{
-    // Store raised exception
-    jthrowable exc_object = exn_get();
-    // Workaround to let JIT invoke class loader even if exception is pending
-    exn_clear();
-    Class_Handle ch = type_info_get_class(tih);
-    // To clear exn_class if set
-    exn_clear();
-    // Restore saved exception
-    if (exc_object)
-        exn_raise_object(exc_object);
-
-    return ch;
-} // type_info_get_class_no_exn
-
-Method_Signature_Handle type_info_get_method_sig(Type_Info_Handle UNREF tih)
-{
-    ABORT("Not implemented");
-    return 0;
-} //type_info_get_method_sig
-
-
-
-Type_Info_Handle type_info_get_type_info(Type_Info_Handle tih)
-{
-    TypeDesc* td = (TypeDesc*)tih;
-    assert(td);
-    switch (td->get_kind()) {
-    case K_Vector:
-    case K_Array:
-        return td->get_element_type();
-    case K_ManagedPointer:
-    case K_UnmanagedPointer:
-        return td->get_pointed_to_type();
-    default:
-        ABORT("Unexpected kind");
-        return 0;
-    }
-} //type_info_get_type_info
-
-uint32 type_info_get_num_array_dimensions(Type_Info_Handle tih) {
-    TypeDesc* td = (TypeDesc*)tih;
-    if (td->get_kind() == K_Vector) {
-        const String* name = td->get_type_name();
-        uint32 res = 0;
-        if (name == NULL) {
-            res = 1 + type_info_get_num_array_dimensions(td->get_element_type());
-        } else {
-            res = countLeadingChars(name->bytes, '[');
-        }
-        assert(res<=255);
-        return res;
-    }
-    return 0;
-}
-
-Boolean type_info_is_resolved(Type_Info_Handle tih) {
-    TypeDesc* td = (TypeDesc*)tih;
-    switch (td->get_kind()) {
-        case K_Vector:
-            if (td->get_element_type()->is_primitive()) {
-                return true;
-            }
-            return type_info_is_resolved(td->get_element_type());
-        case K_Object:
-                return td->is_loaded();
-        default:
-            ABORT("Unexpected kind");
-            return 0;
-    }
-}
-
 
 void free_string_buffer(char *buffer)
 {
@@ -2186,12 +1982,6 @@
     assert(td);
     return td;
 } //class_get_element_type_info
-
-
-Type_Info_Handle type_info_create_from_java_descriptor(ClassLoaderHandle cl, const char* typeName) {
-    return type_desc_create_from_java_descriptor(typeName, cl);
-}
-
 
 /////////////////////////////////////////////////////
 // New GC stuff

Added: harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/type_access.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/type_access.cpp?rev=636714&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/type_access.cpp (added)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/type_access.cpp Thu Mar 13 04:18:43 2008
@@ -0,0 +1,238 @@
+/*
+ *  Licensed to the Apache Software Foundation (ASF) under one or more
+ *  contributor license agreements.  See the NOTICE file distributed with
+ *  this work for additional information regarding copyright ownership.
+ *  The ASF licenses this file to You under the Apache License, Version 2.0
+ *  (the "License"); you may not use this file except in compliance with
+ *  the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ *  Unless required by applicable law or agreed to in writing, software
+ *  distributed under the License is distributed on an "AS IS" BASIS,
+ *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ *  See the License for the specific language governing permissions and
+ *  limitations under the License.
+ */
+
+#define LOG_DOMAIN "vm.core.types"
+#include "cxxlog.h"
+
+#include "type.h"
+#include "Class.h"
+#include "exceptions.h"
+#include "open/vm_util.h"
+#include "open/vm_type_access.h"
+
+Type_Info_Handle type_info_create_from_java_descriptor(
+    ClassLoaderHandle cl, const char* typeName) {
+    return type_desc_create_from_java_descriptor(typeName, cl);
+}
+
+VM_Data_Type type_info_get_type(Type_Info_Handle tih)
+{
+    assert(tih);
+    TypeDesc* td = (TypeDesc*)tih;
+    switch (td->get_kind()) {
+    case K_S1:               return VM_DATA_TYPE_INT8;
+    case K_S2:               return VM_DATA_TYPE_INT16;
+    case K_S4:               return VM_DATA_TYPE_INT32;
+    case K_S8:               return VM_DATA_TYPE_INT64;
+    case K_Sp:               return VM_DATA_TYPE_INTPTR;
+    case K_U1:               return VM_DATA_TYPE_UINT8;
+    case K_U2:               return VM_DATA_TYPE_UINT16;
+    case K_U4:               return VM_DATA_TYPE_UINT32;
+    case K_U8:               return VM_DATA_TYPE_UINT64;
+    case K_Up:               return VM_DATA_TYPE_UINTPTR;
+    case K_F4:               return VM_DATA_TYPE_F4;
+    case K_F8:               return VM_DATA_TYPE_F8;
+    case K_Char:             return VM_DATA_TYPE_CHAR;
+    case K_Boolean:          return VM_DATA_TYPE_BOOLEAN;
+    case K_Void:             return VM_DATA_TYPE_VOID;
+    case K_Object:           return VM_DATA_TYPE_CLASS;
+    case K_Vector:           return VM_DATA_TYPE_ARRAY;
+    case K_UnboxedValue:     return VM_DATA_TYPE_VALUE;
+    case K_UnmanagedPointer: return VM_DATA_TYPE_UP;
+    case K_ManagedPointer:   return VM_DATA_TYPE_MP;
+    // The rest are not implemented in the VM_Data_Type scheme
+    case K_Array:
+    case K_MethodPointer:
+    case K_TypedRef:
+    default:
+        ABORT("Invalid vm data type");
+        return VM_DATA_TYPE_INVALID;
+    }
+} //type_info_get_type
+
+
+BOOLEAN type_info_is_reference(Type_Info_Handle tih)
+{
+    TypeDesc* td = (TypeDesc*)tih;
+    assert(td);
+    return td->get_kind()==K_Object;
+} //type_info_is_reference
+
+
+BOOLEAN type_info_is_unboxed(Type_Info_Handle tih)
+{
+    TypeDesc* td = (TypeDesc*)tih;
+    assert(td);
+    return td->is_unboxed_value();
+} //type_info_is_unboxed
+
+
+BOOLEAN type_info_is_unmanaged_pointer(Type_Info_Handle tih)
+{
+    TypeDesc* td = (TypeDesc*)tih;
+    assert(td);
+    return td->is_unmanaged_pointer();
+} //type_info_is_unmanaged_pointer
+
+
+BOOLEAN type_info_is_void(Type_Info_Handle tih)
+{
+    TypeDesc* td = (TypeDesc*)tih;
+    assert(td);
+    return td->get_kind()==K_Void;
+} //type_info_is_void
+
+
+BOOLEAN type_info_is_method_pointer(Type_Info_Handle tih)
+{
+    TypeDesc* td = (TypeDesc*)tih;
+    assert(td);
+    return td->is_method_pointer();
+} //type_info_is_method_pointer
+
+
+BOOLEAN type_info_is_vector(Type_Info_Handle tih)
+{
+    TypeDesc* td = (TypeDesc*)tih;
+    assert(td);
+    return td->is_vector();
+} //type_info_is_vector
+
+
+BOOLEAN type_info_is_general_array(Type_Info_Handle tih)
+{
+    TypeDesc* td = (TypeDesc*)tih;
+    assert(td);
+    return td->is_array() && !td->is_vector();
+} //type_info_is_general_array
+
+
+BOOLEAN type_info_is_primitive(Type_Info_Handle tih)
+{
+    TypeDesc* td = (TypeDesc*)tih;
+    assert(td);
+    return td->is_primitive();
+} //type_info_is_primitive
+
+
+const char* type_info_get_type_name(Type_Info_Handle tih) {
+    TypeDesc* td = (TypeDesc*)tih;
+    assert(td);
+    return td->get_type_name()->bytes;
+}
+
+Class_Handle type_info_get_class(Type_Info_Handle tih)
+{
+    TypeDesc* td = (TypeDesc*)tih;
+    assert(td);
+    Class* c = td->load_type_desc();
+    if(!c) return NULL;
+    if(!c->verify(VM_Global_State::loader_env)) return NULL;
+    if(!c->prepare(VM_Global_State::loader_env)) return NULL;
+    return c;
+} //type_info_get_class
+
+Class_Handle type_info_get_class_no_exn(Type_Info_Handle tih)
+{
+    // Store raised exception
+    jthrowable exc_object = exn_get();
+    // Workaround to let JIT invoke class loader even if exception is pending
+    exn_clear();
+    Class_Handle ch = type_info_get_class(tih);
+    // To clear exn_class if set
+    exn_clear();
+    // Restore saved exception
+    if (exc_object)
+        exn_raise_object(exc_object);
+
+    return ch;
+} // type_info_get_class_no_exn
+
+Method_Signature_Handle type_info_get_method_sig(Type_Info_Handle UNREF tih)
+{
+    ABORT("Not implemented");
+    return 0;
+} //type_info_get_method_sig
+
+
+
+Type_Info_Handle type_info_get_type_info(Type_Info_Handle tih)
+{
+    TypeDesc* td = (TypeDesc*)tih;
+    assert(td);
+    switch (td->get_kind()) {
+    case K_Vector:
+    case K_Array:
+        return td->get_element_type();
+    case K_ManagedPointer:
+    case K_UnmanagedPointer:
+        return td->get_pointed_to_type();
+    default:
+        ABORT("Unexpected kind");
+        return 0;
+    }
+} //type_info_get_type_info
+
+static U_32 countLeadingChars(const char* str, char c) {
+    U_32 n=0;
+    while (str[n]==c) {
+        n++;                
+    }
+    return n;
+}
+
+
+U_32 type_info_get_num_array_dimensions(Type_Info_Handle tih) {
+    TypeDesc* td = (TypeDesc*)tih;
+    if (td->get_kind() == K_Vector) {
+        const String* name = td->get_type_name();
+        U_32 res = 0;
+        if (name == NULL) {
+            res = 1 + type_info_get_num_array_dimensions(td->get_element_type());
+        } else {
+            res = countLeadingChars(name->bytes, '[');
+        }
+        assert(res<=255);
+        return res;
+    }
+    return 0;
+}
+
+BOOLEAN type_info_is_resolved(Type_Info_Handle tih) {
+    TypeDesc* td = (TypeDesc*)tih;
+    switch (td->get_kind()) {
+        case K_Vector:
+            if (td->get_element_type()->is_primitive()) {
+                return true;
+            }
+            return type_info_is_resolved(td->get_element_type());
+        case K_Object:
+                return td->is_loaded();
+        default:
+            ABORT("Unexpected kind");
+            return 0;
+    }
+}
+
+BOOLEAN type_info_is_managed_pointer(Type_Info_Handle tih)
+{
+    assert(tih);
+    TypeDesc* td = (TypeDesc*)tih;
+    assert(td);
+    return td->is_managed_pointer();
+} //type_info_is_managed_pointer
+

Propchange: harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/type_access.cpp
------------------------------------------------------------------------------
    svn:eol-style = native

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/gc/root_set_enum_common.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/gc/root_set_enum_common.cpp?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/gc/root_set_enum_common.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/gc/root_set_enum_common.cpp Thu Mar 13 04:18:43 2008
@@ -171,7 +171,7 @@
 #endif // _DEBUG
 
 void 
-vm_enumerate_root_reference(void **ref, Boolean is_pinned)
+vm_enumerate_root_reference(void **ref, BOOLEAN is_pinned)
 {
     TRACE2("vm.enum", "vm_enumerate_root_reference(" 
             << ref << " -> " << *ref << ")");
@@ -179,12 +179,12 @@
     check_ref(ref);
 #endif // _DEBUG
 
-    gc_add_root_set_entry((Managed_Object_Handle *)ref, is_pinned);
+    gc_add_root_set_entry((Managed_Object_Handle *)ref, (Boolean)is_pinned);
 } //vm_enumerate_root_reference
 
 
 void 
-vm_enumerate_weak_root_reference(void **ref, Boolean is_pinned)
+vm_enumerate_weak_root_reference(void **ref, BOOLEAN is_pinned)
 {
     TRACE2("vm.enum", "vm_enumerate_weak_root_reference(" 
             << ref << " -> " << *ref << ")");
@@ -192,12 +192,12 @@
     check_ref(ref);
 #endif // _DEBUG
 
-    gc_add_weak_root_set_entry((Managed_Object_Handle *)ref, is_pinned, FALSE);
+    gc_add_weak_root_set_entry((Managed_Object_Handle *)ref, (Boolean)is_pinned, FALSE);
 } //vm_enumerate_weak_root_reference
 
 
 // Resembles vm_enumerate_root_reference() but is passed the address of a uint32 slot containing a compressed reference.
-VMEXPORT void vm_enumerate_compressed_root_reference(uint32 *ref, Boolean is_pinned)
+VMEXPORT void vm_enumerate_compressed_root_reference(U_32 *ref, BOOLEAN is_pinned)
 {
     assert(REFS_IS_COMPRESSED_MODE);
 
@@ -213,7 +213,7 @@
 #endif // REFS_USE_UNCOMPRESSED
 #endif // _DEBUG
 
-    gc_add_compressed_root_set_entry(ref, is_pinned);
+    gc_add_compressed_root_set_entry(ref, (Boolean)is_pinned);
 } //vm_enumerate_compressed_root_reference
 
 
@@ -221,16 +221,11 @@
 // This is the main function used to enumerate interior pointers by the JITS.
 // It is part of the JIT-VM interface and is currently used only by IPF Java JITs.
 void 
-vm_enumerate_root_interior_pointer(void **slot, int offset, Boolean is_pinned)
+vm_enumerate_root_interior_pointer(void **slot, size_t offset, BOOLEAN is_pinned)
 {
-    gc_add_root_set_entry_interior_pointer(slot, offset, is_pinned);
+    assert(((IDATA)offset)>=0);
+    gc_add_root_set_entry_interior_pointer(slot, (int)offset, (Boolean)is_pinned);
 } //vm_enumerate_root_interior_pointer
-
-void vm_enumerate_root_interior_pointer_with_base(void **slot_root, void **slot_base, Boolean is_pinned)
-{
-    int offset = (int)(POINTER_SIZE_INT)(*((Byte**)slot_root)-*((Byte**)slot_base));
-    gc_add_root_set_entry_interior_pointer(slot_root, offset, is_pinned);
-}
 
 void 
 vm_enumerate_root_set_global_refs()

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/bit_vector.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/bit_vector.cpp?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/bit_vector.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/bit_vector.cpp Thu Mar 13 04:18:43 2008
@@ -27,7 +27,6 @@
 using namespace std;
 
 #include <stdio.h>
-#include "jit_intf.h"
 #include "bit_vector.h"
 
 /* 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/compile.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/compile.cpp?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/compile.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/compile.cpp Thu Mar 13 04:18:43 2008
@@ -22,6 +22,8 @@
 #include "cxxlog.h"
 #include "vm_log.h"
 
+#include "open/vm_type_access.h"
+
 #include "apr_strings.h"
 #include "lock_manager.h"
 #include "classloader.h"

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp Thu Mar 13 04:18:43 2008
@@ -3028,106 +3028,6 @@
 }  // gen_lil_typecheck_stub
 
 
-
-// creates a SPECIALIZED LIL code stub for checkcast or instanceof
-// it assumes that the class is suitable for fast instanceof checks.
-// The result is a different fast stub for every class.
-// will_inline should be set to TRUE if this stub will be inlined
-// in a JIT, and false if it will be passed to a code generator
-// (this is due to the slightly different treatment of exceptions)
-LilCodeStub *gen_lil_typecheck_stub_specialized(bool is_checkcast,
-                                                bool will_inline,
-                                                Class *superclass) {
-    LilCodeStub *cs = NULL;
-
-    // check if object address is NULL
-    if (is_checkcast) {
-        // args: ManagedObject *obj, Class *super; returns a ManagedObject*
-        cs = lil_parse_code_stub
-        ("entry 0:stdcall:ref,pint:ref;"
-         "jc i0!=%0i,nonnull;"
-         "r=i0;"  // return obj if obj==NULL
-         "ret;",
-         VM_Global_State::loader_env->managed_null);
-    }
-    else {
-        // args: ManagedObject *obj, Class *super; returns a boolean
-        cs = lil_parse_code_stub
-        ("entry 0:stdcall:ref,pint:g4;"
-         "jc i0!=%0i,nonnull;"
-         "r=0:g4;"  // return FALSE if obj==NULL
-         "ret;",
-         VM_Global_State::loader_env->managed_null);
-    }
-
-    /* fast case; check whether
-     *  (obj->vt()->superclasses[super->depth-1] == super)
-     * Here's how to do this, normally *OR* with compressed refs
-     *
-     * l0 = obj->vt_raw *OR* l0 = obj->vt_offset
-     * l1 = l0->superclasses[superclass->depth-1] *OR*
-     *     (l0+vtable_base)->superclasses[superclass->depth-1]
-     * check if l1 == superclass
-     */
-    cs = lil_parse_onto_end(cs,
-                            ":nonnull;"
-                            "locals 2;");
-    if (vm_vtable_pointers_are_compressed())
-    {
-        cs = lil_parse_onto_end
-            (cs,
-            "ld l0, [i0+%0i:g4];",
-            (POINTER_SIZE_INT)object_get_vtable_offset());
-    }
-    else
-    {
-        cs = lil_parse_onto_end
-            (cs,
-            "ld l0, [i0+%0i:ref];",
-            (POINTER_SIZE_INT)object_get_vtable_offset());
-    }
-
-    cs = lil_parse_onto_end
-        (cs,
-         "ld l1, [l0 + %0i: ref];"
-         "jc l1 != %1i, failed;",
-         OFFSET(VTable, superclasses) + (vm_vtable_pointers_are_compressed() ? vm_get_vtable_base() : 0)
-         + sizeof(Class*)*(superclass->get_depth()-1),
-         (POINTER_SIZE_INT) superclass);
-
-    if (is_checkcast) {
-        // return the object on success
-        cs = lil_parse_onto_end
-            (cs,
-             "r = i0;"
-             "ret;");
-        assert(cs != NULL);
-    }
-    else {
-        // instanceof; return 1 on success, 0 on failure
-        cs = lil_parse_onto_end
-            (cs,
-             "r=1:g4;"
-             "ret;"
-             ":failed;"
-             "r=0:g4;"
-             "ret;");
-        assert(cs != NULL);
-    }
-
-    if (is_checkcast) {
-        // if the check has failed, throw an exception
-        cs = lil_parse_onto_end(cs, ":failed;");
-        if (will_inline)
-            cs = gen_lil_throw_ClassCastException_for_inlining(cs);
-        else
-            cs = gen_lil_throw_ClassCastException(cs);
-    }
-
-    assert(lil_is_valid(cs));
-    return cs;
-}  // gen_lil_typecheck_stub_specialized
-
 /*
  * Functions that generate LIL stubs for checkcast and instanceof - END
  ***********************************************************************/

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/rt_helper_info.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/rt_helper_info.cpp?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/rt_helper_info.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/rt_helper_info.cpp Thu Mar 13 04:18:43 2008
@@ -21,6 +21,7 @@
 #include "Class.h"
 #include "environment.h"
 #include "exceptions.h"
+#include "init.h"
 #include <map>
 
 #ifndef _WIN32
@@ -32,7 +33,7 @@
     const char    *name;
     HELPER_INTERRUPTIBILITY_KIND i_kind;
     HELPER_CALLING_CONVENTION cc_kind;
-    int            number_of_args;
+    U_32           number_of_args;
     const char    *magic_class_name;
     const char    *magic_method_name;
     const char    *magic_method_descr;
@@ -335,8 +336,7 @@
     }
 }
 
-VMEXPORT 
-int vm_helper_get_numargs(VM_RT_SUPPORT id)
+U_32 vm_helper_get_numargs(VM_RT_SUPPORT id)
 {
     HelperInfoMap::const_iterator it = helper_map->find(id);
     if (helper_map->end() != it) {

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/lil/lil.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/lil/lil.cpp?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/lil/lil.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/lil/lil.cpp Thu Mar 13 04:18:43 2008
@@ -37,6 +37,7 @@
 #include "lil.h"
 #include "open/types.h"
 #include "open/vm.h"
+#include "open/vm_type_access.h"
 #include "nogc.h"
 
 // Forward decs of local functions
@@ -322,7 +323,6 @@
 
 static LilType type_info_to_lil_type(Type_Info_Handle tih, bool handles)
 {
-    extern Boolean type_info_is_managed_pointer(Type_Info_Handle tih);
     if (type_info_is_managed_pointer(tih)) {
         return LT_PInt;
     }

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/lil/lil_code_generator.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/lil/lil_code_generator.cpp?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/lil/lil_code_generator.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/lil/lil_code_generator.cpp Thu Mar 13 04:18:43 2008
@@ -25,7 +25,6 @@
 #include "environment.h"
 #include "compile.h"
 
-#include "jit_intf.h"
 #include "lil.h"
 #include "lil_code_generator.h"
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/reflection/annotations.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/reflection/annotations.cpp?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/reflection/annotations.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/reflection/annotations.cpp Thu Mar 13 04:18:43 2008
@@ -35,6 +35,7 @@
 #include "exceptions.h"
 #include "primitives_support.h"
 #include "vm_log.h"
+#include "open/vm_type_access.h"
 
 jobjectArray get_annotations(JNIEnv* jenv, AnnotationTable* table, AnnotationTable* inv_table, Class* clss) 
 {

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=636714&r1=636713&r2=636714&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 13 04:18:43 2008
@@ -31,6 +31,8 @@
 #include "reflection.h"
 #include "port_malloc.h"
 
+#include "open/vm_type_access.h"
+
 #include "exceptions.h"
 #include "heap.h"
 #include "primitives_support.h"

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_dump.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_dump.cpp?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_dump.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_dump.cpp Thu Mar 13 04:18:43 2008
@@ -56,8 +56,10 @@
 
 VMEXPORT void vm_check_if_monitor(void **reference,
                                   void **base_reference,
-                                  uint32 * compressed_reference,
-                                  int slotOffset, Boolean pinned, int type)
+                                  U_32 *compressed_reference, 
+                                  size_t  slotOffset, 
+                                  BOOLEAN pinned,
+                                  U_32    type)
 {
 }
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/compile_em64t.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/compile_em64t.cpp?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/compile_em64t.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/compile_em64t.cpp Thu Mar 13 04:18:43 2008
@@ -20,12 +20,14 @@
  */  
 
 #include "open/types.h"
+#include "open/vm_type_access.h"
 #include "open/vm_util.h"
 #include "environment.h"
 #include "encoder.h"
 #include "object_handles.h"
 #include "vm_threads.h"
 #include "compile.h"
+#include "internal_jit_intf.h"
 
 #include "nogc.h"
 #include "m2n.h"

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/jit_runtime_support_em64t.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/jit_runtime_support_em64t.cpp?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/jit_runtime_support_em64t.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/jit_runtime_support_em64t.cpp Thu Mar 13 04:18:43 2008
@@ -43,6 +43,7 @@
 #include "dump.h"
 #include "exceptions.h"
 #include "jit_runtime_support_common.h"
+#include "internal_jit_intf.h"
 
 /**
  * Generic allocation routine.

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/compile_IA32.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/compile_IA32.cpp?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/compile_IA32.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/compile_IA32.cpp Thu Mar 13 04:18:43 2008
@@ -33,6 +33,7 @@
 
 #include "lock_manager.h"
 #include "open/types.h"
+#include "open/vm_type_access.h"
 
 #include "Class.h"
 #include "type.h"

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/jit_runtime_support_ia32.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/jit_runtime_support_ia32.cpp?rev=636714&r1=636713&r2=636714&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/jit_runtime_support_ia32.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/jit_runtime_support_ia32.cpp Thu Mar 13 04:18:43 2008
@@ -1307,35 +1307,6 @@
     }
 }
 
-
-// instead of returning a stub address, this support function returns
-// parsed LIL code.
-// May return NULL if the stub requested should not be inlined
-VMEXPORT LilCodeStub *vm_get_rt_support_stub(VM_RT_SUPPORT f, Class_Handle c) {
-    Class *clss = (Class *) c;
-
-    switch (f) {
-    case VM_RT_CHECKCAST:
-    {
-        if (!clss->get_fast_instanceof_flag())
-            return NULL;
-
-        return gen_lil_typecheck_stub_specialized(true, true, clss);
-    }
-    case VM_RT_INSTANCEOF:
-    {
-        if (!clss->get_fast_instanceof_flag())
-            return NULL;
-
-        return gen_lil_typecheck_stub_specialized(false, true, clss);
-    }
-    default:
-        ABORT("Unexpected helper");
-        return NULL;
-    }
-}
-
-
 /*
  * LIL inlining code - end
  **************************************************/