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/07 06:59:52 UTC
svn commit: r634547 [1/2] - in /harmony/enhanced/drlvm/trunk/vm: em/src/
include/open/ interpreter/src/ jitrino/src/codegenerator/ia32/
jitrino/src/codegenerator/ipf/ jitrino/src/jet/ jitrino/src/shared/
jitrino/src/vm/ vmcore/build/ vmcore/src/class_s...
Author: varlax
Date: Thu Mar 6 21:59:46 2008
New Revision: 634547
URL: http://svn.apache.org/viewvc?rev=634547&view=rev
Log:
Moved Jitrino.OPT to dynamic runtime-binded interfaces.
Added:
harmony/enhanced/drlvm/trunk/vm/include/open/vm_interface.h (with props)
Modified:
harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.cpp
harmony/enhanced/drlvm/trunk/vm/include/open/ee_em_intf.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_class_support.h
harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_exports.cpp
harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalProfiler.cpp
harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32LightJNI.cpp
harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfOpndManager.cpp
harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_fld_arr.cpp
harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_ia32.cpp
harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_obj.cpp
harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_regs.cpp
harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.h
harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jet.cpp
harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/magics.cpp
harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/mib.h
harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt.cpp
harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt.h
harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt_ia32.cpp
harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/trace.h
harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Type.cpp
harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Type.h
harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/JITInterface.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/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_init.cpp
Modified: harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.cpp?rev=634547&r1=634546&r2=634547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.cpp Thu Mar 6 21:59:46 2008
@@ -378,8 +378,10 @@
LECHO(2, "EM: Not a JIT shared lib: '{0}'" << libName.c_str());
return false;
}
- void (*_init)(JIT_Handle, const char*) = (void (*)(JIT_Handle, const char*)) fn;
- _init(step.jit, step.jitName.c_str());
+
+ void (*_init)(JIT_Handle, const char*, vm_adaptor_t) =
+ (void (*)(JIT_Handle, const char*, vm_adaptor_t)) fn;
+ _init(step.jit, step.jitName.c_str(), get_vm_interface);
bool pcEnabled = false;
if (apr_dso_sym(&fn, libHandle, "JIT_set_profile_access_interface") == APR_SUCCESS) {
Modified: harmony/enhanced/drlvm/trunk/vm/include/open/ee_em_intf.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/ee_em_intf.h?rev=634547&r1=634546&r2=634547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/ee_em_intf.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/ee_em_intf.h Thu Mar 6 21:59:46 2008
@@ -35,6 +35,8 @@
extern "C" {
#endif
+typedef void* (*vm_adaptor_t)(const char * name);
+
/**
* Initializes JIT.
*
@@ -45,7 +47,7 @@
* @param[in] name - the persistent JIT name that the compiler uses to separate
* its configuration settings from the ones of other JITs
*/
-JITEXPORT void JIT_init(JIT_Handle jit, const char* name);
+JITEXPORT void JIT_init(JIT_Handle jit, const char* name, vm_adaptor_t adaptor);
/**
* De-initializes JIT.
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=634547&r1=634546&r2=634547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/types.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/types.h Thu Mar 6 21:59:46 2008
@@ -114,10 +114,11 @@
typedef void *GC_Enumeration_Handle;
-/**
- * For disable warnings in release version.
- * warning type: warning: unused variable <type_of variable> <variable>
- */
+//tmp location
+typedef enum {
+ VM_PROPERTIES = 0,
+ JAVA_PROPERTIES = 1
+ } PropertyTable;
#endif //!_VM_TYPES_H_
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=634547&r1=634546&r2=634547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/vm.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/vm.h Thu Mar 6 21:59:46 2008
@@ -62,6 +62,11 @@
/**
+ * Dynamic interface adaptor, should return specific API by its name.
+ */
+VMEXPORT void* get_vm_interface(const char*);
+
+/**
* Begin class-related functions.
*/
@@ -946,7 +951,6 @@
* Assume that the elements are boxed. Byte offset.
*/
VMEXPORT int vector_first_element_offset_class_handle(Class_Handle element_type);
-VMEXPORT int vector_first_element_offset_vtable_handle(VTable_Handle element_type);
/**
* Deprecated. Please use <code>vector_first_element_offset_class_handle</code> instead.
@@ -1044,13 +1048,6 @@
* Free a string buffer returned by <code>method_sig_get_string</code>.
*/
VMEXPORT void free_string_buffer(char *buffer);
-
-
-
-typedef enum {
- VM_PROPERTIES = 0,
- JAVA_PROPERTIES = 1
-} PropertyTable;
/**
* Sets the property for <code>table_number</code> property table. <code>NULL</code> value is supported.
Modified: harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_support.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_support.h?rev=634547&r1=634546&r2=634547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_support.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_support.h Thu Mar 6 21:59:46 2008
@@ -297,12 +297,6 @@
/**
* Return the offset to the first element of the vector of the given type.
- * Assume that the elements are boxed. Byte offset.
- */
-int vector_first_element_offset_vtable_handle(VTable_Handle element_type);
-
-/**
- * Return the offset to the first element of the vector of the given type.
* This function is provided for the cases when the class handle of the
* element is not available.
*/
Added: 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=634547&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/vm_interface.h (added)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/vm_interface.h Thu Mar 6 21:59:46 2008
@@ -0,0 +1,287 @@
+/*
+ * 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.
+ */
+
+#ifndef _VM_INTERFACE_H
+#define _VM_INTERFACE_H
+
+#include "open/hycomp.h"
+#include "open/types.h"
+#include "open/rt_types.h"
+#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
+
+#define GET_INTERFACE(get_adapter, func_name) \
+ (func_name##_t)get_adapter(#func_name)
+
+
+PROTOTYPE_WITH_NAME(void*, get_vm_interface, (const char* func_name));
+
+
+// Allocation Handle
+PROTOTYPE_WITH_NAME(Class_Handle, allocation_handle_get_class, (Allocation_Handle ah));
+
+//Class
+PROTOTYPE_WITH_NAME(Class_Handle, class_get_array_element_class, (Class_Handle cl));
+PROTOTYPE_WITH_NAME(unsigned , class_get_array_element_size, (Class_Handle ch));
+PROTOTYPE_WITH_NAME(Class_Handle, class_get_array_of_class, (Class_Handle cl));
+PROTOTYPE_WITH_NAME(Type_Info_Handle, class_get_element_type_info, (Class_Handle ch));
+PROTOTYPE_WITH_NAME(const char* , class_get_name, (Class_Handle cl));
+PROTOTYPE_WITH_NAME(Class_Handle, class_get_super_class, (Class_Handle cl));
+PROTOTYPE_WITH_NAME(int , class_get_depth, (Class_Handle cl));
+PROTOTYPE_WITH_NAME(VTable_Handle, class_get_vtable, (Class_Handle cl));
+PROTOTYPE_WITH_NAME(Allocation_Handle, class_get_allocation_handle, (Class_Handle ch));
+PROTOTYPE_WITH_NAME(unsigned , class_get_boxed_data_size, (Class_Handle ch));
+PROTOTYPE_WITH_NAME(uint32 , class_get_num_array_dimensions, (Class_Handle cl, unsigned short cpIndex));
+PROTOTYPE_WITH_NAME(Class_Handle, class_get_class_of_primitive_type, (VM_Data_Type typ));
+PROTOTYPE_WITH_NAME(void* , class_get_const_string_intern_addr, (Class_Handle cl, unsigned index));
+PROTOTYPE_WITH_NAME(VM_Data_Type, class_get_const_type, (Class_Handle cl, unsigned index));
+PROTOTYPE_WITH_NAME(const void* , class_get_const_addr, (Class_Handle cl, unsigned index));
+PROTOTYPE_WITH_NAME(Method_Handle, class_get_method_by_name, (Class_Handle ch, const char* name));
+PROTOTYPE_WITH_NAME(Field_Handle, class_get_field_by_name, (Class_Handle ch, const char* name));
+PROTOTYPE_WITH_NAME(ClassLoaderHandle, class_get_class_loader, (Class_Handle ch));
+
+PROTOTYPE_WITH_NAME(Boolean , class_is_array, (Class_Handle cl));
+PROTOTYPE_WITH_NAME(Boolean , class_is_enum, (Class_Handle ch));
+PROTOTYPE_WITH_NAME(Boolean , class_is_final, (Class_Handle cl)); //class_property_is_final
+PROTOTYPE_WITH_NAME(Boolean , class_is_throwable, (Class_Handle ch)); //class_hint_is_exceptiontype
+PROTOTYPE_WITH_NAME(Boolean , class_is_interface, (Class_Handle cl)); //class_property_is_interface2
+PROTOTYPE_WITH_NAME(Boolean , class_is_abstract, (Class_Handle cl)); //class_property_is_abstract
+PROTOTYPE_WITH_NAME(Boolean , class_is_initialized, (Class_Handle ch)); //class_needs_initialization && class_is_initialized()
+PROTOTYPE_WITH_NAME(Boolean , class_is_finalizable, (Class_Handle ch));
+PROTOTYPE_WITH_NAME(Boolean , class_is_instanceof, (Class_Handle s, Class_Handle t));
+PROTOTYPE_WITH_NAME(Boolean , class_is_support_fast_instanceof, (Class_Handle cl));// class_get_fast_instanceof_flag
+PROTOTYPE_WITH_NAME(bool , class_is_primitive, (Class_Handle vmTypeHandle));
+
+PROTOTYPE_WITH_NAME(Class_Handle, class_lookup_class_by_name_using_bootstrap_class_loader, (const char *name));
+PROTOTYPE_WITH_NAME(Method_Handle, class_lookup_method_recursively,
+ (Class_Handle clss,
+ const char *name,
+ const char *descr));
+
+// Const Pool
+PROTOTYPE_WITH_NAME(VM_Data_Type, class_cp_get_field_type, (Class_Handle src_class, unsigned short cp_index));// VM_Data_Type class_get_cp_field_type(Class_Handle src_class, unsigned short cp_index);
+PROTOTYPE_WITH_NAME(const char* , class_cp_get_entry_signature, (Class_Handle src_class, unsigned short cp_index));//const char* class_get_cp_entry_signature(Class_Handle src_class, unsigned short index); ? const char* const_pool_get_field_descriptor(Class_Handle cl, unsigned index);
+PROTOTYPE_WITH_NAME(bool , class_cp_is_entry_resolved, (Compile_Handle ch, Class_Handle clazz, unsigned short cp_index));//bool class_is_cp_entry_resolved(Compile_Handle ch, Class_Handle clazz, unsigned cp_index);
+PROTOTYPE_WITH_NAME(const char* , class_cp_get_class_name, (Class_Handle cl, unsigned short cp_index));//const char* const_pool_get_class_name(Class_Handle cl, unsigned index);
+PROTOTYPE_WITH_NAME(const char* , class_cp_get_method_class_name,(Class_Handle cl, unsigned index));//const char *const_pool_get_method_class_name(Class_Handle cl, unsigned index);
+PROTOTYPE_WITH_NAME(const char* , class_cp_get_method_name, (Class_Handle cl, unsigned index));//const char* const_pool_get_method_name(Class_Handle cl, unsigned index);
+
+
+//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(bool , field_is_final, (Field_Handle fh));
+PROTOTYPE_WITH_NAME(bool , field_is_magic, (Field_Handle fh)); //Boolean field_is_magic(Field_Handle fh);
+PROTOTYPE_WITH_NAME(bool , field_is_private, (Field_Handle fh));
+PROTOTYPE_WITH_NAME(bool , field_is_static, (Field_Handle fh));
+PROTOTYPE_WITH_NAME(bool , 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
+PROTOTYPE_WITH_NAME(Byte* , method_get_info_block_jit, (Method_Handle m, JIT_Handle j));
+PROTOTYPE_WITH_NAME(unsigned , method_get_info_block_size_jit, (Method_Handle m, JIT_Handle j));
+PROTOTYPE_WITH_NAME(const char* , method_get_name, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(const char* , method_get_descriptor, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(const Byte* , method_get_byte_code_addr, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(uint32 , method_get_byte_code_size, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(uint16 , method_get_max_stack, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(uint32 , method_get_num_handlers, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(uint32 , method_get_offset, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(void* , method_get_indirect_address, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(void* , method_get_native_func_addr, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(uint32 , method_vars_get_number, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(unsigned , method_args_get_number, (Method_Signature_Handle mh));
+PROTOTYPE_WITH_NAME(Type_Info_Handle, method_args_get_type_info, (Method_Signature_Handle msh, unsigned idx));
+PROTOTYPE_WITH_NAME(Type_Info_Handle, method_ret_type_get_type_info, (Method_Signature_Handle msh));
+PROTOTYPE_WITH_NAME(Method_Signature_Handle, method_get_signature, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(Class_Handle, method_get_class, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(void , method_get_handler_info,
+ (Method_Handle mh,
+ unsigned handler_id, unsigned *begin_offset,
+ unsigned *end_offset, unsigned *handler_offset,
+ unsigned *handler_cpindex));
+PROTOTYPE_WITH_NAME(Byte* , method_get_code_block_addr_jit_new,
+ (Method_Handle mh,
+ JIT_Handle j,
+ int id));
+PROTOTYPE_WITH_NAME(unsigned , method_get_code_block_size_jit_new,
+ (Method_Handle nh,
+ JIT_Handle j,
+ int id));
+PROTOTYPE_WITH_NAME(Method_Side_Effects, method_get_side_effects, (Method_Handle mh));
+
+PROTOTYPE_WITH_NAME(bool , method_has_annotation, (Method_Handle mh, Class_Handle antn_type));
+PROTOTYPE_WITH_NAME(bool , method_is_private, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(bool , method_is_static, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(bool , method_is_native, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(bool , method_is_synchronized, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(bool , method_is_final, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(bool , method_is_abstract, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(bool , method_is_strict, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(bool , method_is_overridden, (Method_Handle mh));
+PROTOTYPE_WITH_NAME(bool , method_is_no_inlining, (Method_Handle mh));
+
+
+PROTOTYPE_WITH_NAME(void , method_set_side_effects, (Method_Handle mh, Method_Side_Effects mse));
+PROTOTYPE_WITH_NAME(void , method_set_num_target_handlers,
+ (Method_Handle mh,
+ JIT_Handle j,
+ unsigned num_handlers));
+PROTOTYPE_WITH_NAME(void , method_set_target_handler_info,
+ (Method_Handle mh,
+ JIT_Handle j,
+ unsigned eh_number,
+ void *start_ip,
+ void *end_ip,
+ void *handler_ip,
+ Class_Handle catch_cl,
+ bool exc_obj_is_dead));
+
+
+PROTOTYPE_WITH_NAME(void , method_lock, (Method_Handle m));
+PROTOTYPE_WITH_NAME(void , method_unlock, (Method_Handle m));
+
+PROTOTYPE_WITH_NAME(Byte* , method_allocate_code_block,
+ (Method_Handle m,
+ JIT_Handle j,
+ size_t size,
+ size_t alignment,
+ CodeBlockHeat heat,
+ int id,
+ Code_Allocation_Action action));
+PROTOTYPE_WITH_NAME(Byte* , method_allocate_data_block, (Method_Handle m, JIT_Handle j, size_t size, size_t alignment));
+PROTOTYPE_WITH_NAME(Byte* , method_allocate_info_block, (Method_Handle m, JIT_Handle j, size_t size));
+PROTOTYPE_WITH_NAME(Byte* , method_allocate_jit_data_block, (Method_Handle m, JIT_Handle j, size_t size, size_t alignment));
+
+
+//Object
+PROTOTYPE_WITH_NAME(int , object_get_vtable_offset, ());
+
+
+//Resolve
+PROTOTYPE_WITH_NAME(Class_Handle, resolve_class, (Compile_Handle h, Class_Handle c, unsigned index));
+PROTOTYPE_WITH_NAME(Class_Handle, resolve_class_new, (Compile_Handle h, Class_Handle c, unsigned index));
+PROTOTYPE_WITH_NAME(Method_Handle, resolve_special_method, (Compile_Handle h, Class_Handle c, unsigned index));
+PROTOTYPE_WITH_NAME(Method_Handle, resolve_interface_method, (Compile_Handle h, Class_Handle c, unsigned index));
+PROTOTYPE_WITH_NAME(Method_Handle, resolve_static_method, (Compile_Handle h, Class_Handle c, unsigned index));
+PROTOTYPE_WITH_NAME(Method_Handle, resolve_virtual_method, (Compile_Handle h, Class_Handle c, unsigned index));
+PROTOTYPE_WITH_NAME(Field_Handle, resolve_nonstatic_field,
+ (Compile_Handle h,
+ Class_Handle c,
+ unsigned index,
+ unsigned putfield));
+PROTOTYPE_WITH_NAME(Field_Handle, resolve_static_field,
+ (Compile_Handle h,
+ Class_Handle c,
+ unsigned index,
+ unsigned putfield));
+
+//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
+
+//Vm
+PROTOTYPE_WITH_NAME(IDATA , vm_tls_alloc, (UDATA* key)); //IDATA VMCALL hythread_tls_alloc(hythread_tls_key_t *handle)
+PROTOTYPE_WITH_NAME(UDATA , vm_tls_get_offset, (UDATA key)); //UDATA VMCALL hythread_tls_get_offset(hythread_tls_key_t key)
+PROTOTYPE_WITH_NAME(UDATA , vm_tls_get_request_offset, ()); //DATA VMCALL hythread_tls_get_request_offset
+PROTOTYPE_WITH_NAME(UDATA , vm_tls_is_fast, (void));//UDATA VMCALL hythread_uses_fast_tls
+PROTOTYPE_WITH_NAME(IDATA , vm_get_tls_offset_in_segment, (void));//IDATA VMCALL hythread_get_hythread_offset_in_tls(void)
+
+
+PROTOTYPE_WITH_NAME(void , vm_properties_destroy_keys, (char** keys));//void destroy_properties_keys(char** keys)
+PROTOTYPE_WITH_NAME(void , vm_properties_destroy_value, (char* value));//void destroy_property_value(char* value)
+PROTOTYPE_WITH_NAME(char** , vm_properties_get_keys, (PropertyTable table_number));//char** get_properties_keys(PropertyTable table_number);
+PROTOTYPE_WITH_NAME(char** , vm_properties_get_keys_starting_with, (const char* prefix, PropertyTable table_number));//get_properties_keys_staring_with
+PROTOTYPE_WITH_NAME(char* , vm_properties_get_value, (const char* key, PropertyTable table_number));//char* get_property(const char* key, PropertyTable table_number)
+
+
+PROTOTYPE_WITH_NAME(Class_Handle, vm_get_system_object_class, ()); // get_system_object_class
+PROTOTYPE_WITH_NAME(Class_Handle, vm_get_system_class_class, ()); // get_system_class_class
+PROTOTYPE_WITH_NAME(Class_Handle, vm_get_system_string_class, ()); // get_system_string_class
+PROTOTYPE_WITH_NAME(void* , vm_get_vtable_base, ()); //POINTER_SIZE_INT vm_get_vtable_base()
+PROTOTYPE_WITH_NAME(void* , vm_get_heap_base_address, ()); //vm_heap_base_address
+PROTOTYPE_WITH_NAME(void* , vm_get_heap_ceiling_address, ()); //vm_heap_ceiling_address
+PROTOTYPE_WITH_NAME(Boolean , vm_is_heap_compressed, ());//vm_references_are_compressed();
+PROTOTYPE_WITH_NAME(Boolean , vm_is_vtable_compressed, ());//vm_vtable_pointers_are_compressed();
+PROTOTYPE_WITH_NAME(void , vm_patch_code_block, (Byte *code_block, Byte *new_code, size_t size));
+PROTOTYPE_WITH_NAME(JIT_Result , vm_compile_method, (JIT_Handle jit, Method_Handle method));
+PROTOTYPE_WITH_NAME(void , vm_register_jit_extended_class_callback,
+ (JIT_Handle jit,
+ Class_Handle clss,
+ void* callback_data));
+PROTOTYPE_WITH_NAME(void , vm_register_jit_overridden_method_callback,
+ (JIT_Handle jit,
+ Method_Handle method,
+ void* callback_data));
+PROTOTYPE_WITH_NAME(void , vm_register_jit_recompiled_method_callback,
+ (JIT_Handle jit,
+ Method_Handle method,
+ void *callback_data));
+PROTOTYPE_WITH_NAME(void , vm_compiled_method_load,
+ (Method_Handle method, uint32 codeSize,
+ void* codeAddr,
+ uint32 mapLength,
+ AddrLocation* addrLocationMap,
+ void* compileInfo,
+ Method_Handle outer_method));//compiled_method_load
+
+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));
+
+//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
Propchange: harmony/enhanced/drlvm/trunk/vm/include/open/vm_interface.h
------------------------------------------------------------------------------
svn:eol-style = native
Modified: harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_exports.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_exports.cpp?rev=634547&r1=634546&r2=634547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_exports.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_exports.cpp Thu Mar 6 21:59:46 2008
@@ -35,7 +35,7 @@
#endif
extern "C" {
- extern void EXPORT JIT_init(JIT_Handle h, const char* name);
+ extern void EXPORT JIT_init(JIT_Handle h, const char* name, vm_adaptor_t adaptor);
EXPORT extern void JIT_deinit(JIT_Handle h);
EXPORT extern void JIT_unwind_stack_frame(JIT_Handle, Method_Handle, JitFrameContext *);
EXPORT extern void JIT_get_root_set_from_stack_frame(JIT_Handle, Method_Handle, GC_Enumeration_Handle, JitFrameContext *);
@@ -90,7 +90,7 @@
extern uint8* interpreter_get_frame_bytecode_ptr(FrameHandle* frame);
extern bool is_frame_in_native_frame(FrameHandle* frame, void* begin, void* end);
-void EXPORT JIT_init(JIT_Handle UNREF h, const char* UNREF name) {
+void EXPORT JIT_init(JIT_Handle UNREF h, const char* UNREF name, vm_adaptor_t adaptor) {
Interpreter *interpreter = interpreter_table();
interpreter->interpreter_st_get_frame = &interpreter_st_get_frame;
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalProfiler.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalProfiler.cpp?rev=634547&r1=634546&r2=634547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalProfiler.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalProfiler.cpp Thu Mar 6 21:59:46 2008
@@ -105,13 +105,12 @@
FilterAttr<bool> isClassInitializer;
FilterAttr<bool> isInstanceInitializer;
FilterAttr<bool> isStrict;
- FilterAttr<bool> isRequireSecObject;
FilterAttr<bool> isInitLocals;
FilterAttr<bool> isOverridden;
StlMap<int, OpndFilter> operandFilters;
- Filter() : isInitialized(false), isNegative(false), isOR(false), mnemonic(Mnemonic_NULL), operandNumber(-1), rtKind(Opnd::RuntimeInfo::Kind_Null), rtHelperID(VM_RT_UNKNOWN), rtIntHelperName("none"), isNative(false), isStatic(false), isSynchronized(false), isNoInlining(false), isInstance(false), isFinal(false), isVirtual(false), isAbstract(false), isClassInitializer(false), isInstanceInitializer(false), isStrict(false), isRequireSecObject(false), isInitLocals(false), isOverridden(false), operandFilters(Jitrino::getGlobalMM()) {}
+ Filter() : isInitialized(false), isNegative(false), isOR(false), mnemonic(Mnemonic_NULL), operandNumber(-1), rtKind(Opnd::RuntimeInfo::Kind_Null), rtHelperID(VM_RT_UNKNOWN), rtIntHelperName("none"), isNative(false), isStatic(false), isSynchronized(false), isNoInlining(false), isInstance(false), isFinal(false), isVirtual(false), isAbstract(false), isClassInitializer(false), isInstanceInitializer(false), isStrict(false), isInitLocals(false), isOverridden(false), operandFilters(Jitrino::getGlobalMM()) {}
Filter& operator=(const Filter& c) {
Filter& f = *this;
@@ -134,7 +133,6 @@
f.isClassInitializer = c.isClassInitializer;
f.isInstanceInitializer = c.isInstanceInitializer;
f.isStrict = c.isStrict;
- f.isRequireSecObject = c.isRequireSecObject;
f.isInitLocals = c.isInitLocals;
f.isOverridden = c.isOverridden;
@@ -497,15 +495,6 @@
config->counters[num].filter.isStrict.value=(std::string(val) == "true")? true : false;
config->counters[num].filter.isStrict.isInitialized=true;
}
- } else if ((int)line.find(".isRequireSecObject") != -1) {
- char * val = (char *)std::strstr(line.c_str(),"=")+1;
- if ((std::string(val) == "true") && (std::strstr(line.c_str(), "IsNegative"))) {
- config->counters[num].filter.isRequireSecObject.isNegative=true;
- } else {
- config->counters[num].filter.isInitialized=true;
- config->counters[num].filter.isRequireSecObject.value=(std::string(val) == "true")? true : false;
- config->counters[num].filter.isRequireSecObject.isInitialized=true;
- }
} else if ((int)line.find(".isInitLocals") != -1) {
char * val = (char *)std::strstr(line.c_str(),"=")+1;
if ((std::string(val) == "true") && (std::strstr(line.c_str(), "IsNegative"))) {
@@ -952,18 +941,6 @@
return false;
res = filter.isStrict.value == ((MethodDesc *)rt->getValue(0))->isStrict();
if(filter.isStrict.isNegative)
- res = !res;
-
- if(filter.isOR && res)
- return true;
- if(!(filter.isOR || res))
- return false;
- }
- if(filter.isRequireSecObject.isInitialized) {
- if(!rt || ((rt->getKind() != Opnd::RuntimeInfo::Kind_MethodDirectAddr) && (rt->getKind() != Opnd::RuntimeInfo::Kind_MethodDirectAddr)))
- return false;
- res = filter.isRequireSecObject.value == ((MethodDesc *)rt->getValue(0))->isRequireSecObject();
- if(filter.isRequireSecObject.isNegative)
res = !res;
if(filter.isOR && res)
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32LightJNI.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32LightJNI.cpp?rev=634547&r1=634546&r2=634547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32LightJNI.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32LightJNI.cpp Thu Mar 6 21:59:46 2008
@@ -209,7 +209,7 @@
// printf("optimize %s::%s %s\n", md->getParentType()->getName(), md->getName(), md->getSignatureString());
- void* tmpPoint = method_get_native_func_addr(md->getMethodHandle());
+ void* tmpPoint = md->getNativeAddress();
Opnd* tmpZero = lirm->newImmOpnd(lirm->getTypeManager().getIntPtrType(), 0);
uint32 tmpNumArgs = callInst->getOpndCount();
CallInst* newCallInst = NULL;
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfOpndManager.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfOpndManager.cpp?rev=634547&r1=634546&r2=634547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfOpndManager.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ipf/IpfOpndManager.cpp Thu Mar 6 21:59:46 2008
@@ -249,7 +249,7 @@
containCall = false;
refsCompressed = VMInterface::areReferencesCompressed();
- vtablePtrsCompressed = VMInterface::areVTablePtrsCompressed();
+ vtablePtrsCompressed = VMInterface::isVTableCompressed();
heapBase = NULL;
heapBaseImm = NULL;
vtableBase = NULL;
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=634547&r1=634546&r2=634547&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 6 21:59:46 2008
@@ -26,6 +26,8 @@
#include "cg.h"
#include <open/vm.h>
+#include <jit_intf.h>
+
#include "trace.h"
#include "VMMagic.h"
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_ia32.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_ia32.cpp?rev=634547&r1=634546&r2=634547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_ia32.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_ia32.cpp Thu Mar 6 21:59:46 2008
@@ -28,7 +28,6 @@
#include <assert.h>
#include <stdlib.h>
-#include <jit_import.h>
#include "enc_ia32.h"
/**
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_obj.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_obj.cpp?rev=634547&r1=634546&r2=634547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_obj.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_obj.cpp Thu Mar 6 21:59:46 2008
@@ -28,7 +28,8 @@
#include <assert.h>
#include <stdlib.h>
-#include <jit_import.h>
+#include "jit_import.h"
+#include "jit_intf.h"
/**
* @file
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=634547&r1=634546&r2=634547&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 6 21:59:46 2008
@@ -22,7 +22,6 @@
#include <open/vm.h>
#include "trace.h"
-#include "jit_intf.h"
/**
* @file
* @brief Registers manipulation routines and operand stack mimics.
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.h?rev=634547&r1=634546&r2=634547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.h Thu Mar 6 21:59:46 2008
@@ -31,7 +31,7 @@
#include "rt.h"
#include "cg.h"
-#include <jit_export.h>
+#include "open/rt_types.h"
#include <assert.h>
#include <vector>
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jet.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jet.cpp?rev=634547&r1=634546&r2=634547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jet.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jet.cpp Thu Mar 6 21:59:46 2008
@@ -746,7 +746,7 @@
* @see setup
*/
extern "C" JITEXPORT
-void JIT_init(JIT_Handle jit, const char* name)
+void JIT_init(JIT_Handle jit, const char* name, vm_adaptor_t adaptor)
{
JITInstanceContext* jic =
new(g_mm) JITInstanceContext(g_mm, jit, name);
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/magics.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/magics.cpp?rev=634547&r1=634546&r2=634547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/magics.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/magics.cpp Thu Mar 6 21:59:46 2008
@@ -28,7 +28,6 @@
#include "enc.h"
#include "open/vm.h"
-#include "jit_import.h"
#include "jit_intf.h"
#include "VMMagic.h"
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/mib.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/mib.h?rev=634547&r1=634546&r2=634547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/mib.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/mib.h Thu Mar 6 21:59:46 2008
@@ -28,7 +28,7 @@
#define __MIB_H_INCLUDED__
#include "enc.h"
-#include "jit_export.h"
+#include "open/rt_types.h"
namespace Jitrino {
namespace Jet {
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt.cpp?rev=634547&r1=634546&r2=634547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt.cpp Thu Mar 6 21:59:46 2008
@@ -28,7 +28,6 @@
#include "jet.h"
-#include "jit_import.h"
#include "jit_intf.h"
#include "port_threadunsafe.h"
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt.h?rev=634547&r1=634546&r2=634547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt.h Thu Mar 6 21:59:46 2008
@@ -27,7 +27,7 @@
#define __RT_H_INCLUDED__
#include "enc.h"
-#include "jit_export_rt.h" // for JitFrameContext
+#include "open/rt_types.h"
namespace Jitrino {
namespace Jet {
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt_ia32.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt_ia32.cpp?rev=634547&r1=634546&r2=634547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt_ia32.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt_ia32.cpp Thu Mar 6 21:59:46 2008
@@ -19,7 +19,7 @@
* @version $Revision$
*/
#include "enc_ia32.h"
-#include "jit_export_rt.h"
+#include "open/rt_types.h"
/**
* @file
* @brief Implementation of runtime support routines specific for IA-32
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/trace.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/trace.h?rev=634547&r1=634546&r2=634547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/trace.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/trace.h Thu Mar 6 21:59:46 2008
@@ -28,7 +28,7 @@
#define __TRACE_H_INCLUDED__
#include "mib.h"
-#include "jit_export_rt.h" // for JitFrameContext
+#include "open/rt_types.h"
#include <string>
using std::string;
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Type.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Type.cpp?rev=634547&r1=634546&r2=634547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Type.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Type.cpp Thu Mar 6 21:59:46 2008
@@ -680,10 +680,6 @@
return VMInterface::isFinalizable(vmTypeHandle);
}
-bool
-NamedType::isBeforeFieldInit() {
- return VMInterface::isBeforeFieldInit(vmTypeHandle);
-}
bool
NamedType::isLikelyExceptionType() {
@@ -821,14 +817,6 @@
return VMInterface::getTypeName(vmTypeHandle);
}
-const char*
-ObjectType::getNameQualifier() {
- if (isUnresolvedObject()) {
- return ""; //package name
- }
- return VMInterface::getTypeNameQualifier(vmTypeHandle);
-}
-
bool
ObjectType::getFastInstanceOfFlag() {
if (isUnresolvedType()) {
@@ -902,11 +890,6 @@
const char*
UserValueType::getName() {
return VMInterface::getTypeName(vmTypeHandle);
-}
-
-const char*
-UserValueType::getNameQualifier() {
- return VMInterface::getTypeNameQualifier(vmTypeHandle);
}
//-----------------------------------------------------------------------------
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Type.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Type.h?rev=634547&r1=634546&r2=634547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Type.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/shared/Type.h Thu Mar 6 21:59:46 2008
@@ -224,7 +224,6 @@
virtual Type* getNonValueSupertype() {return this;}
virtual const char* getName();
- virtual const char* getNameQualifier() {return "";}
const char* getPrintString() {return getPrintString(tag);}
static bool isTau(Tag tag) {
@@ -505,7 +504,6 @@
NamedType* asNamedType() { return this; }
bool needsInitialization();
bool isFinalizable();
- bool isBeforeFieldInit();
bool isLikelyExceptionType();
bool isNamedType() {return true;}
//
@@ -533,7 +531,7 @@
virtual ~UserValueType() {}
virtual const char* getName();
- virtual const char* getNameQualifier();
+
//
// returns size & alignment of the un-boxed value
//
@@ -571,7 +569,7 @@
virtual bool isSealed() {return isFinalClass();}
ObjectType* getSuperType();
const char* getName();
- const char* getNameQualifier();
+
bool getFastInstanceOfFlag();
int getClassDepth();
virtual bool isUnresolvedType() {return isUnresolvedObject() || isUnresolvedArray();}
Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/JITInterface.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/JITInterface.cpp?rev=634547&r1=634546&r2=634547&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/JITInterface.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/JITInterface.cpp Thu Mar 6 21:59:46 2008
@@ -76,7 +76,7 @@
// Called once at the end of the constructor.
extern "C"
JITEXPORT void
-JIT_init(JIT_Handle jit, const char* name)
+JIT_init(JIT_Handle jit, const char* name, vm_adaptor_t adaptor)
{
std::string initMessage = std::string("Initializing Jitrino.") + name + " -> ";
std::string mode = "OPT";
@@ -85,6 +85,9 @@
#endif
initMessage = initMessage + mode + " compiler mode";
INFO(initMessage.c_str());
+
+ VMInterface::setVmAdapter(adaptor);
+
Jitrino::Init(jit, name);
#ifdef USE_FAST_PATH