harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From var...@apache.org
Subject svn commit: r649083 [1/3] - in /harmony/enhanced/drlvm/trunk/vm: em/src/ gc_gen/src/common/ gc_gen/src/jni/ include/ include/open/ interpreter/src/ jitrino/src/codegenerator/ia32/ jitrino/src/jet/ jitrino/src/optimizer/ jitrino/src/vm/ vmcore/build/ vm...
Date Thu, 17 Apr 2008 13:10:32 GMT
Author: varlax
Date: Thu Apr 17 06:10:05 2008
New Revision: 649083

URL: http://svn.apache.org/viewvc?rev=649083&view=rev
Log:
HARMONY-5593, next step to improve general structure of OPEN interfaces: 
- cleans a bunch of outdated/unused APIs; 
- makes more consistent naming of APIs and unifies primitive types in signatures; 
- adds open/vm_ee.h intended to replace old jit_intf.h and jit_import.h; 

Tested on Win32, linux32, linux64

Added:
    harmony/enhanced/drlvm/trunk/vm/include/open/vm_ee.h   (with props)
Modified:
    harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.cpp
    harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.h
    harmony/enhanced/drlvm/trunk/vm/em/src/MTable.cpp
    harmony/enhanced/drlvm/trunk/vm/em/src/NValueProfileCollector.cpp
    harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_class.cpp
    harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_vm.cpp
    harmony/enhanced/drlvm/trunk/vm/gc_gen/src/jni/java_support.cpp
    harmony/enhanced/drlvm/trunk/vm/include/jit_import.h
    harmony/enhanced/drlvm/trunk/vm/include/jit_intf.h
    harmony/enhanced/drlvm/trunk/vm/include/open/rt_helpers.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_info.h
    harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_loading.h
    harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_manipulation.h
    harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_support.h
    harmony/enhanced/drlvm/trunk/vm/include/open/vm_interface.h
    harmony/enhanced/drlvm/trunk/vm/include/open/vm_properties.h
    harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_vm_helpers.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/codegenerator/ia32/Ia32InternalProfiler.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/bcproc.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_fld_arr.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_instr.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_meth.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_obj.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jet.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/trace.cpp
    harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/escanalyzer.cpp
    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/include/Class.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/class_interface.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/class_member.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/dll_jit_intf.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/jit_export_rt.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/jit_intf_cpp.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/object_layout.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/C_Interface.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Class.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Environment.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Initialize.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Prepare.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Resolve.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/classloader.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/method.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/exception/exceptions.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/exception/exceptions_impl.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/exception/exceptions_jit.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/gc/root_set_enum_common.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/gc/stop_the_world_root_set_enum.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/finalize.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/init/vm_init.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/compile.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/dll_jit.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/native_overrides.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_heap.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_object.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/java_lang_VMClassRegistry.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/kernel_classes/native/org_apache_harmony_drlvm_VMHelper.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/ncai/ncai_step.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/object/object_handles.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/object/vm_arrays.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/reflection/reflection.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/stack/stack_trace.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/thread/thread_manager.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/em64t/base/jit_lock_rt_support_em64t.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/jit_lock_rt_support_ia32.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/jit_runtime_support_ia32.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/optimize_ia32.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/compile_ipf.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/ini_ipf.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/jit_runtime_support_ipf.cpp
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/vm_stats.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=649083&r1=649082&r2=649083&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.cpp Thu Apr 17 06:10:05 2008
@@ -25,7 +25,8 @@
 #include "NValueProfileCollector.h"
 
 #include "open/vm_properties.h"
-#include "jit_import.h"
+#include "open/vm_ee.h"
+#include "open/ee_em_intf.h"
 #include "em_intf.h"
 #include "open/vm.h"
 #include "open/vm_method_access.h"
@@ -383,7 +384,7 @@
 
     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);
+    _init(step.jit, step.jitName.c_str(), vm_get_interface);
 
     bool pcEnabled = false;
     if (apr_dso_sym(&fn, libHandle, "JIT_set_profile_access_interface") == APR_SUCCESS) {

Modified: harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.h?rev=649083&r1=649082&r2=649083&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/em/src/DrlEMImpl.h Thu Apr 17 06:10:05 2008
@@ -26,7 +26,7 @@
 #include "DrlProfileCollectionFramework.h"
 #include "method_lookup.h"
 #include "open/em.h"
-#include "open/vm_util.h"
+#include "open/hythread_ext.h"
 #include "open/em_profile_access.h"
 
 #include <jni.h>

Modified: harmony/enhanced/drlvm/trunk/vm/em/src/MTable.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/em/src/MTable.cpp?rev=649083&r1=649082&r2=649083&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/em/src/MTable.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/em/src/MTable.cpp Thu Apr 17 06:10:05 2008
@@ -24,7 +24,6 @@
 #include <algorithm>
 #include "open/vm_method_access.h"
 #include "open/vm_class_manipulation.h"
-//#include "jit_import.h"
 
 MTable::~MTable() {
     for (FiltersQueue::const_iterator it = methodFilters.begin(), end = methodFilters.end(); it!=end; ++it) {

Modified: harmony/enhanced/drlvm/trunk/vm/em/src/NValueProfileCollector.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/em/src/NValueProfileCollector.cpp?rev=649083&r1=649082&r2=649083&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/em/src/NValueProfileCollector.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/em/src/NValueProfileCollector.cpp Thu Apr 17 06:10:05 2008
@@ -28,6 +28,8 @@
 #include <assert.h>
 #include "cxxlog.h"
 #include <sstream>
+#include "open/vm_class_info.h"
+#include "open/vm_ee.h"
 
 #include "port_threadunsafe.h"
 #include "port_atomic.h"

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_class.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_class.cpp?rev=649083&r1=649082&r2=649083&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_class.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_class.cpp Thu Apr 17 06:10:05 2008
@@ -177,7 +177,7 @@
   WeakReferenceType type = class_is_reference(ch);
   gc_set_prop_reference(gcvt, type);
   
-  unsigned int size = class_get_boxed_data_size(ch);
+  unsigned int size = class_get_object_size(ch);
   gcvt->gc_allocated_size = size;
   
   gcvt->gc_class_name = class_get_name(ch);

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_vm.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_vm.cpp?rev=649083&r1=649082&r2=649083&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_vm.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/common/gc_for_vm.cpp Thu Apr 17 06:10:05 2008
@@ -87,8 +87,8 @@
 
 /* VT pointer compression is a compile-time option, reference compression and vtable compression are orthogonal */
 #ifdef COMPRESS_VTABLE
-  assert(vm_vtable_pointers_are_compressed());
-  vtable_base = vm_get_vtable_base();
+  assert(vm_is_vtable_compressed());
+  vtable_base = (POINTER_SIZE_INT)vm_get_vtable_base_address();
 #endif
 
   gc_tls_init();
@@ -437,6 +437,7 @@
 {
   return address_belongs_to_gc_heap(p_obj, p_global_gc);  
 }
+
 
 
 

Modified: harmony/enhanced/drlvm/trunk/vm/gc_gen/src/jni/java_support.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/gc_gen/src/jni/java_support.cpp?rev=649083&r1=649082&r2=649083&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/gc_gen/src/jni/java_support.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/gc_gen/src/jni/java_support.cpp Thu Apr 17 06:10:05 2008
@@ -22,7 +22,7 @@
 #include <string.h>
 #include <jni.h>
 #include "open/vm_field_access.h"
-#include "jit_intf.h"
+#include "open/vm_class_info.h"
 #include "java_support.h"
 
 Class_Handle GCHelper_clss;

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=649083&r1=649082&r2=649083&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/jit_import.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/jit_import.h Thu Apr 17 06:10:05 2008
@@ -1,273 +0,0 @@
-/*
- *  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.
- */
-
-/**
- * These are the functions that a JIT built as a DLL may call.
- */
-
-#ifndef _JIT_IMPORT_H
-#define _JIT_IMPORT_H
-
-#include <stdlib.h>
-
-#include "jit_export.h"
-#include "open/types.h"
-#include "open/vm.h"
-#include "jit_import_rt.h"
-#include "vm_core_types.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-typedef void *Method_Iterator;
-
-/** 
- * @name Direct call-related functions
- */
-//@{
-
-/**
- * These functions allow a JIT to be notified whenever a VM data structure changes that 
- * would require code patching or recompilation. 
- *
- * Called by a JIT in order to be notified whenever the given class (or any of 
- * its subclasses?) is extended. The <code>callback_data</code> pointer will 
- * be passed back to the JIT during the callback. The callback function is 
- * <code>JIT_extended_class_callback</code>.
- */
-VMEXPORT void vm_register_jit_extended_class_callback(JIT_Handle jit, Class_Handle clss, 
-                                                        void *callback_data);
-
-/**
- * Called by a JIT in order to be notified whenever the given method is 
- * overridden by a newly loaded class. The <code>callback_data</code> pointer 
- * will be passed back to the JIT during the callback. The callback function is 
- * <code>JIT_overridden_method_callback</code>.
- */
-VMEXPORT void vm_register_jit_overridden_method_callback(JIT_Handle jit, Method_Handle method,
-                                                           void *callback_data);
-
-/**
- * Called by a JIT in order to be notified whenever the vtable entries for the 
- * given method are changed. This could happen, e.g., when a method is first 
- * compiled, or when it is recompiled. The <code>callback_data</code> pointer 
- * will be passed back to the JIT during the callback. The callback method is 
- * <code>JIT_recompiled_method_callback</code>.
- */
-VMEXPORT void vm_register_jit_recompiled_method_callback(JIT_Handle jit, Method_Handle method,
-                                                           void *callback_data);
-
-/**
- * Called by a JIT to have the VM replace a section of executable code in a 
- * thread-safe fashion. This function does not synchronize the I- or D-caches. 
- * It may be a lot cheaper to batch up the patch requests, so we may need to 
- * extend this interface.
- */
-VMEXPORT void vm_patch_code_block(Byte *code_block, Byte *new_code, size_t size);
-
-/**
- * Called by a JIT to have the VM recompile a method using the specified JIT. After 
- * recompilation, the corresponding vtable entries will be updated, and the necessary 
- * callbacks to <code>JIT_recompiled_method_callback</code> will be made. It is a 
- * requirement that the method has not already been compiled by the given JIT; 
- * this means that multiple instances of a JIT may need to be active at the same time. 
- */
-
-VMEXPORT void vm_recompile_method(JIT_Handle jit, Method_Handle method);
-
-/** 
- * Called by a JIT to have VM synchronously (in the same thread) compile a method
- * It is a requirement that JIT calls this routine only during compilation of 
- * other method, not during run-time.
- */
-
-VMEXPORT JIT_Result vm_compile_method(JIT_Handle jit, Method_Handle method);
-
-//@}
-
-///////////////////////////////////////////////////////
-// begin method memory allocation-related functions.
-/////////////////////////////////
-
-/**
- * Retrieve the memory block allocated earlier by
- * method_allocate_code_block().
- * A triple <code><method, jit, id></code> uniquely identifies a 
- * code block.
- */
-
-VMEXPORT Byte *method_get_code_block_addr_jit_new(Method_Handle method,
-                                                   JIT_Handle j,
-                                                   int id);
-
-/**
- * Get the size of the memory block allocated earlier by
- * method_allocate_code_block().
- * A triple <code><method, jit, id></code> uniquely identifies a 
- * code block.
- */
-
-VMEXPORT unsigned method_get_code_block_size_jit_new(Method_Handle method,
-                                                      JIT_Handle j,
-                                                      int id);
-
-//////////////////////////////
-// end method-related functions.
-///////////////////////////////////////////////////////
-
-/** 
- * @name Resolution-related functions
- */
-//@{
-
-/**
- * Resolve a class.
- *
- * The <code>idx</code> parameter is interpreted as a constant pool index for JVM.
- */
-
-VMEXPORT Class_Handle 
-vm_resolve_class(Compile_Handle h, Class_Handle ch, unsigned idx);
-
-/**
- * Resolve a class and provide error checking if the class cannot have an
- * instance, i.e. it is abstract (or is an interface class).
- * The <code>idx</code> parameter is interpreted as a constant pool index for JVM.
- */
-
-VMEXPORT Class_Handle 
-vm_resolve_class_new(Compile_Handle h, Class_Handle c, unsigned index);
-
-/**
- * Resolve a reference to a non-static field.
- * The <code>idx</code> parameter is interpreted as a constant pool index for JVM.
- * Used for getfield and putfield in JVM.
- */
-
-VMEXPORT Field_Handle 
-resolve_nonstatic_field(Compile_Handle h, Class_Handle ch, unsigned idx, unsigned putfield);
-
-/**
- * Resolve constant pool reference to a static field.
- * The <code>idx</code> parameter is interpreted as a constant pool index for JVM.
- * Used for getstatic and putstatic in JVM.
- */
-
-VMEXPORT Field_Handle
-resolve_static_field(Compile_Handle h, Class_Handle ch, unsigned idx, unsigned putfield);
-
-/**
- * Resolve a method. Same as resolve_method() but the VM checks 
- * that the method can be used for a virtual dispatch.
- * The <code>idx</code> parameter is interpreted as a constant pool index for JVM.
- */
-
-VMEXPORT Method_Handle 
-resolve_virtual_method(Compile_Handle h, Class_Handle c, unsigned index);
-
-/**
- * Resolve a method. Same as resolve_method() but the VM checks 
- * that the method is static (i.e. it is not an instance method).
- * The <code>idx</code> parameter is interpreted as a constant pool index for 
- * JVM.
- */
-
-VMEXPORT Method_Handle 
-resolve_static_method(Compile_Handle h, Class_Handle c, unsigned index);
-
-/** 
- * Resolve a method. Same as resolve_method() but the VM checks 
- * that the method is declared in an interface type.
- * The <code>idx</code> parameter is interpreted as a constant pool index for JVM.
- */
-
-VMEXPORT Method_Handle 
-resolve_interface_method(Compile_Handle h, Class_Handle c, unsigned index);
-
-//@}
-/** @name Miscellaneous functions
- */
-//@{
-
-/**
- * @return The JIT handle for a the current compilation. 
- *
- * The VM keeps track of the JIT that was invoked for and can return this value at 
- * any point during the compilation.
- * (? 20030314) Does the <code>method_</code> prefix really make sense here? 
- * Perhaps we should rename this function?
- */
-
-VMEXPORT JIT_Handle method_get_JIT_id(Compile_Handle h);
-
-//@}
-/** @name Experimental functions
- */
-//@{
-
-/**
- * These functions are currently not part of the official interface,
- * although they may be promoted in some form in the future.
- *
- * @return <code>TRUE</code> if the VM's functionality for monitorenter 
- *         and monitorexit may be inlined by the JIT; otherwise, <code>FALSE</code>.
- *         
- * If <code>TRUE</code> is returned, then the output arguments will be 
- * filled in with the synchronization parameters.
- *
- * @param thread_id_register  - the register number that holds the thread ID which
- *                              is used to identify the locking thread
- * @param sync_header_offset  - the offset in bytes of the synchronization header
- *                              from the start of the object
- * @param sync_header_width   - the width in bytes of the synchronization header
- * @param lock_owner_offset   - the offset in bytes of the lock owner field from
- *                              the start of the object
- * @param lock_owner_width    - the width in bytes of the lock owner field in the
- *                              synchronization header
- * @param jit_clears_ccv      - <code>TRUE</code> if the JIT-generated code needs 
- *                              to clear the <code>ar.ccv</code> register, 
- *                              <code>FALSE</code> if the VM ensures it is 
- *                              already cleared
- *
- * @note This is useful only for <code>monitorenter/monitorexit</code>, but not
- *       <code>monitorenter_static/monitorexit_static</code>, since the JIT doesn't 
- *       know how to map the <code>class_handle</code> to an object.
- */
-VMEXPORT Boolean jit_may_inline_object_synchronization(unsigned *thread_id_register,
-                                                        unsigned *sync_header_offset,
-                                                        unsigned *sync_header_width,
-                                                        unsigned *lock_owner_offset,
-                                                        unsigned *lock_owner_width,
-                                                        Boolean  *jit_clears_ccv);
-
-typedef enum CallingConvention {
-    CC_Vm,
-    CC_Jrockit,
-    CC_Rotor,
-    CC_Stdcall,
-    CC_Cdecl
-} CallingConvention;
-
-VMEXPORT CallingConvention vm_managed_calling_convention();
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif // _JIT_IMPORT_H

Modified: harmony/enhanced/drlvm/trunk/vm/include/jit_intf.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/jit_intf.h?rev=649083&r1=649082&r2=649083&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/jit_intf.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/jit_intf.h Thu Apr 17 06:10:05 2008
@@ -1,172 +0,0 @@
-/*
- *  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 _JIT_INTF_H_
-#define _JIT_INTF_H_
-
-
-#include "open/types.h"
-#include "open/vm.h"
-#include "jit_export.h"
-#include "jit_import.h"
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-
-//////////////// begin C interface
-//
-// calls from Compiler to VM
-//
-//-----------------------------------------------------------------------------
-// Constant pool resolution
-//-----------------------------------------------------------------------------
-//
-// The following byte codes reference constant pool entries:
-//
-//  field
-//      getstatic           static field
-//      putstatic           static field
-//      getfield            non-static field
-//      putfield            non-static field
-//
-//  method
-//      invokevirtual       virtual method
-//      invokespecial       special method
-//      invokestatic        static method
-//      invokeinterface     interface method
-//
-//  class
-//      new                 class
-//      anewarray           class
-//      checkcast           class
-//      instanceof          class
-//      multianewarray      class
-//
-
-//
-// For the method invocation byte codes, certain linkage exceptions are thrown 
-// at run-time:
-//
-//  (1) invocation of a native methods throws the UnsatisfiedLinkError if the 
-//      code that implements the method cannot be loaded or linked.
-//  (2) invocation of an interface method throws 
-//          - IncompatibleClassChangeError if the object does not implement 
-//            the called method, or the method is implemented as static
-//          - IllegalAccessError if the implemented method is not public
-//          - AbstractMethodError if the implemented method is abstract
-//
-
-VMEXPORT Field_Handle
-resolve_field(Compile_Handle h, Class_Handle c, unsigned index);
-
-//
-// resolve constant pool reference to a virtual method
-// used for invokevirtual and invoke special.
-//
-// DEPRECATED
-//
-VMEXPORT Method_Handle 
-resolve_nonstatic_method(Compile_Handle h, Class_Handle c, unsigned index);
-
-//
-// resolve constant pool reference to a virtual method
-// used for invokespecial
-//
-VMEXPORT Method_Handle 
-resolve_special_method(Compile_Handle h, Class_Handle c, unsigned index);
-
-//
-// resolve constant pool reference to a class
-// used for
-//      (1) new 
-//              - InstantiationError exception if resolved class is abstract
-//      (2) anewarray
-//      (3) multianewarray
-//
-// resolve_class_new is used for resolving references to class entries by the
-// the new byte code.
-//
-VMEXPORT Class_Handle 
-resolve_class_new(Compile_Handle h, Class_Handle c, unsigned index);
-
-//
-// resolve_class is used by all the other byte codes that reference classes,
-// as well as exception handlers.
-//
-VMEXPORT Class_Handle 
-resolve_class(Compile_Handle h, Class_Handle c, unsigned index);
-
-VMEXPORT unsigned     class_number_fields(Class_Handle ch);
-VMEXPORT Field_Handle class_get_field(Class_Handle ch, unsigned idx);
-VMEXPORT int          class_get_super_offset();
-
-VMEXPORT Field_Handle   class_get_field_by_name(Class_Handle ch, const char* name);
-VMEXPORT Method_Handle  class_get_method_by_name(Class_Handle ch, const char* name);
-
-VMEXPORT int          class_get_depth(Class_Handle cl);
-VMEXPORT const char  *class_get_source_file_name(Class_Handle cl);
-
-VMEXPORT ClassLoaderHandle class_get_class_loader(Class_Handle c);
-
-VMEXPORT Class_Handle
-class_load_class_by_name(const char *name,
-                         Class_Handle c);
-
-VMEXPORT Class_Handle
-class_load_class_by_descriptor(const char *descr,
-                               Class_Handle c);
-
-VMEXPORT Method_Handle
-class_lookup_method_recursively(Class_Handle clss,
-                                const char *name,
-                                const char *descr);
-
-// This function is for native library support
-// It takes a class name with .s not /s.
-VMEXPORT Class_Handle class_find_loaded(ClassLoaderHandle, const char*);
-
-// This function is for native library support
-// It takes a class name with .s not /s.
-VMEXPORT Class_Handle class_find_class_from_loader(ClassLoaderHandle, const char*, Boolean init);
-
-
-
-/**
- * Adds information about inlined method.
- * @param[in] method - method which is inlined
- * @param[in] codeSize - size of inlined code block
- * @param[in] codeAddr - size of inlined code block
- * @param[in] mapLength - number of AddrLocation elements in addrLocationMap
- * @param[in] addrLocationMap - native addresses to bytecode locations
- *       correspondence table
- * @param[in] compileInfo - VM specific information.
- * @param[in] outer_method - target method to which inlining was made
- */
-DECLARE_OPEN(void, compiled_method_load, (Method_Handle method, U_32 codeSize, 
-                                  void* codeAddr, U_32 mapLength, 
-                                  AddrLocation* addrLocationMap, 
-                                  void* compileInfo, Method_Handle outer_method));
-
-//////////////// end C interface
-
-#ifdef __cplusplus
-}
-#endif
-
-#endif

Modified: harmony/enhanced/drlvm/trunk/vm/include/open/rt_helpers.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/rt_helpers.h?rev=649083&r1=649082&r2=649083&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/rt_helpers.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/rt_helpers.h Thu Apr 17 06:10:05 2008
@@ -50,7 +50,7 @@
  *
  * Like <code>VM_RT_NEW_VECTOR_USING_VTABLE</code>, allocates a new object of 
  * a class, but also takes a size argument. The size can be obtained using 
- * class_get_boxed_data_size(Class_Handle).
+ * class_get_object_size(Class_Handle).
  * This function should be used for classes which inherit the finalize method 
  * of <code>java.lang.Object</code>.
  */

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=649083&r1=649082&r2=649083&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/types.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/types.h Thu Apr 17 06:10:05 2008
@@ -95,7 +95,7 @@
 /**
  * Used for opaques accesses to managed arrays. This handle points
  * to an array in the managed heap, so handling must be careful to account
- * for the possiblity of a moving GC.
+ * for the possibility of a moving GC.
  */
 typedef void *Vector_Handle;
 

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=649083&r1=649082&r2=649083&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/vm.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/vm.h Thu Apr 17 06:10:05 2008
@@ -42,69 +42,10 @@
 #endif
 
 /**
- * This structure is meant to be opaque. External modules should not
- * attempt to directly access any of its fields.
- */ 
-typedef struct ChaClassIterator {
-    Class_Handle _root_class;
-    Class_Handle _current;
-    Boolean _is_valid;
-} ChaClassIterator;
-
-
-/**
- * This structure is meant to be opaque. External modules should not
- * attempt to directly access any of its fields.
- */
-typedef struct ChaMethodIterator {
-    Method_Handle _method;
-    Method_Handle _current;
-    ChaClassIterator _class_iter;
-} ChaMethodIterator;
-
-
-/**
- * Dynamic interface adaptor, should return specific API by its name.
- */
-VMEXPORT void* get_vm_interface(const char*);
-
-/**
- * Begin class-related functions.
- */
-
-/**
- * @return <code>TRUE</code> if the class is a value type.
- */
- VMEXPORT Boolean class_is_valuetype(Class_Handle ch);
-
-/**
- * This function can only be called if (<code>class_is_enum(ch)</code> == <code>TRUE</code>)
- * The returned value is the type of the underlying int type.
+ * Dynamic interface adapter, returns specific API by its name.
  */
-VMEXPORT VM_Data_Type class_get_enum_int_type(Class_Handle ch);
+DECLARE_OPEN(void *, vm_get_interface, (const char*));
 
-/**
- * The super class of the current class. 
- * @return <code>NULL</code> for the system object class, i.e.
- *         <code>class_get_super_class</code>(vm_get_system_object_class()) == NULL
- */
-VMEXPORT Class_Handle class_get_super_class(Class_Handle ch);
-
-/**
- * @return The allocation handle to be used for the object allocation
- *         routines, given a class handle.
- */
-VMEXPORT Allocation_Handle class_get_allocation_handle(Class_Handle ch);
-
-/**
- * @return The class handle corresponding to a given allocation handle.
- */
-VMEXPORT Class_Handle allocation_handle_get_class(Allocation_Handle ah);
-
-/**
- * For Java returns <code>FALSE</code>.
- */
- VMEXPORT Boolean class_is_before_field_init(Class_Handle ch);
 
 /**
  * Number of instance fields defined in a class. That doesn't include
@@ -145,9 +86,6 @@
  */
  VMEXPORT unsigned class_get_number_methods(Class_Handle ch);
 
-/// Check if fast_instanceof is applicable for the class
-VMEXPORT Boolean class_get_fast_instanceof_flag(Class_Handle cl);
-
 /**
  * @return <code>TRUE</code> if all instances of this class are pinned.
  */
@@ -159,15 +97,14 @@
  */
  VMEXPORT unsigned class_get_alignment(Class_Handle ch);
 
-/**
- * Get the alignment of the class when it's unboxed.
- */
- VMEXPORT unsigned class_get_alignment_unboxed(Class_Handle ch);
-
-/**
- * @return The size in bytes of an instance in the heap.
+ /**
+ * Returns the size of an instance in the heap, in bytes.
+ * 
+ * @param klass - the class handle
+ *
+ * @return The size of an instance in the heap.
  */
- VMEXPORT unsigned class_get_boxed_data_size(Class_Handle ch);
+ DECLARE_OPEN(size_t, class_get_object_size, (Class_Handle ch));
 
 /**
  * @return The offset to the start of user data form the start of a boxed
@@ -183,12 +120,6 @@
  */
  VMEXPORT Class_Handle class_get_array_element_class(Class_Handle ch);
 
-/**
- * @return The offset from the start of the vtable at which the
- *         superclass hierarchy is stored. This is for use with fast type
- *         checking.
- */ 
- VMEXPORT int vtable_get_super_array_offset();
 
 /**
  * @return Class handle given object's <code>VTable_Handle</code>.
@@ -226,10 +157,6 @@
 ///
 
 ////
-// end class-related functions.
-////
-
-////
 // begin field-related functions.
 ////
 
@@ -264,10 +191,6 @@
  */
 VMEXPORT int vector_length_offset();
 
-/**
- * Deprecated. Please use <code>vector_length_offset</code> instead.
- */
-VMEXPORT int array_length_offset();
 
 /**
  * Return the offset to the first element of the vector of the given type.
@@ -276,11 +199,6 @@
  */
 VMEXPORT int vector_first_element_offset(VM_Data_Type element_type);
 
-/**
- * Deprecated. Please use <code>vector_first_element_offset</code> instead.
- */ 
-VMEXPORT int array_first_element_offset(VM_Data_Type element_type);
-
 
 /**
  * Return the offset to the first element of the vector of the given type.
@@ -289,11 +207,6 @@
 VMEXPORT int vector_first_element_offset_class_handle(Class_Handle element_type);
 
 /**
- * Deprecated. Please use <code>vector_first_element_offset_class_handle</code> instead.
- */
-VMEXPORT int array_first_element_offset_class_handle(Class_Handle element_type);
-
-/**
  * Return the offset to the first element of the vector of the given type.
  * If the class is a value type, assume that elements are unboxed.
  * If the class is not a value type, assume that elements are references.
@@ -301,11 +214,6 @@
 VMEXPORT int vector_first_element_offset_unboxed(Class_Handle element_type);
 
 /**
- * Deprecated. Please use <code>vector_first_element_offset_unboxed</code> instead.
- */
-VMEXPORT int array_first_element_offset_unboxed(Class_Handle element_type);
-
-/**
  * Return the length of a vector. The caller must ensure that GC will not
  * move or deallocate the vector while vector_get_length() is active.
  */
@@ -329,68 +237,34 @@
 // end vector layout functions.
 ////
 
-////
-// begin miscellaneous functions.
-////
 
 /**
  * @return <code>TRUE</code> if references within objects and vector elements are
  *          to be treated as offsets rather than raw pointers.
  */
-VMEXPORT Boolean vm_references_are_compressed();
+DECLARE_OPEN(BOOLEAN, vm_is_heap_compressed, ());
 
 /**
  * @return The starting address of the GC heap.
  */
-VMEXPORT void *vm_heap_base_address();
+DECLARE_OPEN(void *, vm_get_heap_base_address, ());
 
 /**
  * @return The ending address of the GC heap.
  */
-VMEXPORT void *vm_heap_ceiling_address();
+DECLARE_OPEN(void *, vm_get_heap_ceiling_address, ());
 
 /**
  * @return <code>TRUE</code> if vtable pointers within objects are to be treated
  *         as offsets rather than raw pointers.
  */
-VMEXPORT Boolean vm_vtable_pointers_are_compressed();
-
-/**
- * @return The offset to the vtable pointer in an object.
- */ 
-VMEXPORT int object_get_vtable_offset();
+DECLARE_OPEN(BOOLEAN, vm_is_vtable_compressed, ());
 
 /**
  * @return The base address of the vtable memory area. This value will
  *         never change and can be cached at startup.
  */
-VMEXPORT POINTER_SIZE_INT vm_get_vtable_base();
-
-/**
- * @return The width in bytes (e.g. 4 or 8) of the vtable type
- *         information in each object's header. This is typically used
- *         by the JIT for generating type-checking code, e.g. for inlined
- *         type checks or for inlining of virtual methods.
- */
-VMEXPORT unsigned vm_get_vtable_ptr_size();
-
-/**
- * Returns the address of the global flag that specifies whether
- * MethodEntry event is enabled. JIT should call this function in case
- * a method is compiled with exe_notify_method_entry flag set.
- */
-VMEXPORT char *get_method_entry_flag_address();
-
-/**
- * Returns the address of the global flag that specifies whether
- * MethodExit event is enabled. JIT should call this function in case
- * a method is compiled with exe_notify_method_exit flag set.
- */
-VMEXPORT char *get_method_exit_flag_address();
-
-////
-// end miscellaneous functions.
-////
+DECLARE_OPEN(void *, vm_get_vtable_base_address, ());
 
 #ifdef __cplusplus
 }

Modified: harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_info.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_info.h?rev=649083&r1=649082&r2=649083&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_info.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_info.h Thu Apr 17 06:10:05 2008
@@ -52,7 +52,83 @@
 */
 DECLARE_OPEN(VM_Data_Type, class_cp_get_field_type, (Class_Handle src_class, U_16 idx));
 
-/// Returns 'TRUE' if the entry by the given cp_index is resolved.
+
+DECLARE_OPEN(Method_Handle, class_lookup_method_recursively,
+                    (Class_Handle clss,
+                    const char *name,
+                    const char *descr));
+
+DECLARE_OPEN(U_16, class_number_fields, (Class_Handle ch));
+DECLARE_OPEN(Field_Handle, class_get_field, (Class_Handle ch, U_16 idx));
+
+DECLARE_OPEN(Field_Handle, class_get_field_by_name, (Class_Handle ch, const char* name));
+DECLARE_OPEN(Method_Handle, class_get_method_by_name, (Class_Handle ch, const char* name));
+
+DECLARE_OPEN(const char *, class_get_source_file_name, (Class_Handle cl));
+
+/**
+* @return The name of the class.
+*/
+DECLARE_OPEN(const char *, class_get_name, (Class_Handle ch));
+
+/**
+* @return The name of the package containing the class.
+*/
+DECLARE_OPEN(const char *, class_get_package_name, (Class_Handle ch));
+
+/**
+* The super class of the current class. 
+* @return <code>NULL</code> for the system object class, i.e.
+*         <code>class_get_super_class</code>(vm_get_java_lang_object_class()) == NULL
+*/
+DECLARE_OPEN(Class_Handle, class_get_super_class, (Class_Handle ch));
+
+/** 
+* @return <code>TRUE</code> if class <code>s</code> is assignment 
+* compatible with class <code>t</code>.
+*/ 
+DECLARE_OPEN(BOOLEAN, class_is_instanceof, (Class_Handle s, Class_Handle t));
+
+/**
+* @return <code>TRUE</code> if the class is already fully initialized.
+*/
+DECLARE_OPEN(BOOLEAN, class_is_initialized, (Class_Handle ch));
+
+/**
+* @return <code>TRUE</code> if the class represents an enum. 
+*         For Java 1.4 always returns <code>FALSE</code>.
+*/
+DECLARE_OPEN(BOOLEAN, class_is_enum, (Class_Handle ch));
+
+/**
+* @return <code>TRUE</code> if the class represents a primitive type (int, float, etc.)
+*/
+DECLARE_OPEN(BOOLEAN, class_is_primitive, (Class_Handle ch));
+
+/** 
+* @return <code>TRUE</code> is the class is an array.
+*/
+DECLARE_OPEN(BOOLEAN, class_is_array, (Class_Handle ch));
+
+/**
+* @return <code>TRUE</code> if this is an array of primitives.
+*/
+DECLARE_OPEN(BOOLEAN, class_is_non_ref_array, (Class_Handle ch));
+
+DECLARE_OPEN(BOOLEAN, class_is_final, (Class_Handle ch));
+DECLARE_OPEN(BOOLEAN, class_is_abstract, (Class_Handle ch));
+DECLARE_OPEN(BOOLEAN, class_is_interface, (Class_Handle ch));
+
+/**
+* @return <code>TRUE</code> if the class is likely to be used as an exception object.
+*         This is a hint only. If the result is <code>FALSE</code>, the class may still
+*         be used for exceptions but it is less likely.
+*/
+DECLARE_OPEN(BOOLEAN, class_is_throwable, (Class_Handle ch));
+/**
+* @return <code>TRUE</code> if the class has a non-trivial finalizer.
+*/
+DECLARE_OPEN(BOOLEAN, class_is_finalizable, (Class_Handle ch));
 
 #ifdef __cplusplus
 }

Modified: harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_loading.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_loading.h?rev=649083&r1=649082&r2=649083&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_loading.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_loading.h Thu Apr 17 06:10:05 2008
@@ -14,10 +14,6 @@
  *  See the License for the specific language governing permissions and
  *  limitations under the License.
  */
-/** 
- * @author Intel, Pavel Pervov
- * @version $Revision: 1.6 $
- */  
 #ifndef _VM_CLASS_LOADING_H
 #define _VM_CLASS_LOADING_H
 
@@ -35,6 +31,27 @@
 extern "C" {
 #endif
 
+DECLARE_OPEN(ClassLoaderHandle, class_get_class_loader, (Class_Handle ch));
+
+/**
+* @return A class corresponding to a primitive type. For all primitive types t
+*         t == <code>class_get_primitive_type_of_class(class_get_class_of_primitive_type(t))</code>
+*/
+DECLARE_OPEN(Class_Handle, class_get_class_of_primitive_type, (VM_Data_Type typ));
+
+
+/**
+* @return An <code>VM_Data_Type</code> value for a given class.
+*/
+DECLARE_OPEN(VM_Data_Type, class_get_primitive_type_of_class, (Class_Handle ch));
+
+/**
+* Given a class handle <code>cl</code> construct a class handle of the type
+* representing array of <code>cl</code>. If class cl is value type, assume
+* that the element is a reference to a boxed instance of that type.
+*/
+DECLARE_OPEN(Class_Handle, class_get_array_of_class, (Class_Handle ch));
+
 /** 
  * @defgroup Extended VM Class Loading Extended Interface
  * The extended functionality is implemented on the basis of basic interfaces
@@ -66,8 +83,6 @@
  * @param name           - the name of the class to load
  *
  * @return The handle for the C++ class representation, if loaded successfully; otherwise, <code>NULL</code>.
- *
- * @note Replaces cl_load_class. 
  */
 DECLARE_OPEN(Class_Handle, class_loader_load_class,
     (ClassLoaderHandle classloader, const char* name));
@@ -92,8 +107,6 @@
  * @param exc   - the exception code for a class loading failure
  *
  * @result The handle for the C++ class representation, if loaded successfully; otherwise, <code>NULL</code>.
- *
- * @note Replaces class_load_class_by_name_using_system_class_loader. 
  */
 DECLARE_OPEN(Class_Handle, vm_load_class_with_bootstrap, (const char* name));
 
@@ -145,8 +158,6 @@
  * @param classloader - the handle to class loader to retrieve verifier pointer from
  * 
  * @return The pointer to the verifier data
- *
- * @note Replaces cl_get_verify_data_ptr.
  */
 DECLARE_OPEN(void*, class_loader_get_verifier_data_ptr, (ClassLoaderHandle classloader));
 
@@ -154,8 +165,6 @@
  * Acquires the lock on a given class loader. 
  *
  * @param classloader - the handle to the C++ class loader structure to acquire lock on.
- * 
- * @note Replaces cl_acquire_lock.
  */
 DECLARE_OPEN(void, class_loader_lock, (ClassLoaderHandle classloader));
 
@@ -163,8 +172,6 @@
  * Releases the lock on a given class loader. 
  *
  * @param classloader - the handle to the C++ class loader structure to release lock on. 
- * 
- * @note Replaces cl_acquire_lock.
  */
 DECLARE_OPEN(void, class_loader_unlock, (ClassLoaderHandle classloader));
 

Modified: harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_manipulation.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_manipulation.h?rev=649083&r1=649082&r2=649083&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_manipulation.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/vm_class_manipulation.h Thu Apr 17 06:10:05 2008
@@ -260,18 +260,6 @@
 DECLARE_OPEN(Class_Handle, class_get_class_of_primitive_type, (VM_Data_Type type));
 
 /**
- * Returns the size of an instance in the heap, in bytes.
- * 
- * @param klass - the class handle
- *
- * @return The size of an instance in the heap.
- *
- * @note Replaces class_get_boxed_data_size function.
- */
-unsigned
-class_get_instance_size(Class_Handle klass);
-
-/**
  * For given a class handle <i>klass</i> constructs a class of
  * the type representing on-dimentional array of <i>klass</i>.
  * For example, given the class of Ljava/lang/String; this function

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=649083&r1=649082&r2=649083&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 Apr 17 06:10:05 2008
@@ -81,11 +81,6 @@
  */
 void vm_recompile_method(JIT_Handle jit, Method_Handle method);
 
-/// FIXME - This isn't method interface function!
-// Replaces method_get_JIT_id
-JIT_Handle
-compilation_get_JIT_id(Compile_Handle compile_handle);
-
 /**
  * Returns the class handle corresponding to a given allocation handle.
  */
@@ -94,7 +89,7 @@
 /**
  * Returns the offset to the vtable pointer in an object.
  */
-int object_get_vtable_offset();
+size_t object_get_vtable_offset();
 
 /**
  * Returns the offset from the start of the vtable at which the
@@ -107,7 +102,7 @@
  * Returns TRUE if vtable pointers within objects are to be treated
  * as offsets rather than raw pointers.
  */
-Boolean vm_vtable_pointers_are_compressed();
+BOOLEAN vm_is_vtable_compressed();
 
 /**
  * @return the number of bytes allocated by VM in VTable
@@ -119,7 +114,7 @@
  * Returns the base address of the vtable memory area.  This value will
  * never change and can be cached at startup.
  */
-POINTER_SIZE_INT vm_get_vtable_base();
+void* vm_get_vtable_base_address();
 
 /**
  * Returns the width in bytes (e.g. 4 or 8) of the vtable type

Added: harmony/enhanced/drlvm/trunk/vm/include/open/vm_ee.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/vm_ee.h?rev=649083&view=auto
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/vm_ee.h (added)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/vm_ee.h Thu Apr 17 06:10:05 2008
@@ -0,0 +1,470 @@
+/*
+ *  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_EE_H_
+#define _VM_EE_H_
+
+/**
+ * @file
+ * 
+ *
+ */
+#include "open/types.h"
+#include "open/rt_types.h"
+#include "open/em.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/*
+* Acquires lock associated with method
+*/
+DECLARE_OPEN(void, method_lock, (Method_Handle mh));
+
+/*
+* Releases lock associated with method
+*/
+DECLARE_OPEN(void, method_unlock, (Method_Handle mh));
+
+/**
+* Looks for a method in native libraries of a class loader.
+*
+* @param[in] method - a searching native-method structure
+* @return The pointer to found a native function.
+* @note The function raises <code>UnsatisfiedLinkError</code> with a method name
+*       in an exception message, if the specified method is not found.*/
+DECLARE_OPEN(void *, method_get_native_func_addr, (Method_Handle method));
+
+/**
+* Address of the memory location containing the address of the code.
+* Used for static and special methods which have been resolved but not jitted. (FIXME??)
+* The call would be:
+*      call dword ptr [addr]
+*
+* @return The address where the code pointer for a given method is.
+* 
+* A simple JIT that doesn't support recompilation (see e.g. 
+* <code>vm_register_jit_recompiled_method_callback</code>) can only 
+* generate code with indirect branches through the address provided 
+* by method_get_indirect_address().
+*/
+DECLARE_OPEN(void *, method_get_indirect_address, (Method_Handle method));
+
+/**
+* @return The offset in bytes from the start of the vtable to the entry for
+*         a given method.
+*/
+DECLARE_OPEN(size_t, method_get_vtable_offset, (Method_Handle method));
+
+/**
+* Allocate the "read-write" data block for this method. This memory block
+* cannot be retrieved later. The intention is to use the data block for data
+* that may be needed during the program execution (e.g. tables for
+* switch statements).
+*
+* Separation of data allocated by method_allocate_data_block() and
+* method_allocate_info_block() may help improve locality of 
+* references to data accessed during execution of compiled code and data 
+* accessed during stack uwinding.
+*
+* @sa method_allocate_info_block
+*/
+DECLARE_OPEN(Byte *, method_allocate_data_block, (Method_Handle method,
+                                          JIT_Handle j,
+                                          size_t size,
+                                          size_t alignment));
+
+/**
+* Allocated a "read-only" data block.
+*
+* (? 20030314) This function is deprecated. In all new code, use
+* method_allocate_data_block() only. At some point, we 
+* will revisit this interface to have more control over the layout 
+* of various memory blocks allocated by the VM.
+*/
+
+DECLARE_OPEN(Byte *, method_allocate_jit_data_block, (Method_Handle method,
+                                              JIT_Handle j,
+                                              size_t size,
+                                              size_t alignment));
+
+
+/**
+* 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.
+* The first instruction of the chunk with <code>id=0</code> is the entry point 
+* of the method.
+* 
+* Deprecated.
+*
+* @return If the <code>CAA_Allocate</code> argument is specified, memory is 
+*         allocated and a pointer to it is returned. If the 
+*         <code>CAA_Simulate</code> argument is specified, no memory is
+*         allocated - the same as pass parameter size = 0 - function returns 
+*         only current address for allocation in pool but no memory is allocated.  
+*/
+DECLARE_OPEN(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));
+
+
+/**
+* Allocate an info block for this method. An info block can be later
+* retrieved by the JIT. The JIT may for instance store GC maps for
+* root set enumeration and stack unwinding in the onfo block.
+*
+* @sa method_allocate_data_block
+*/
+DECLARE_OPEN(Byte *, method_allocate_info_block, (Method_Handle method,
+                                          JIT_Handle j,
+                                          size_t size));
+
+
+/**
+* Retrieve the memory block allocated earlier by 
+* method_allocate_code_block().
+* A pair <code><method, jit></code> uniquely identifies a code block.
+*/
+DECLARE_OPEN(Byte *, method_get_code_block_addr_jit, (Method_Handle method,
+                                              JIT_Handle j));
+
+/**
+* Get the size of the memory block allocated earlier by
+* method_allocate_code_block().
+*/
+DECLARE_OPEN(unsigned, method_get_code_block_size_jit, (Method_Handle method,
+                                                 JIT_Handle j));
+
+/**
+* Retrieve the memory block allocated earlier by
+* method_allocate_code_block().
+* A triple <code><method, jit, id></code> uniquely identifies a 
+* code block.
+*/
+DECLARE_OPEN(Byte *, method_get_code_block_addr_jit_new, (Method_Handle method,
+                                                  JIT_Handle j,
+                                                  int id));
+
+/**
+* Get the size of the memory block allocated earlier by
+* method_allocate_code_block().
+* A triple <code><method, jit, id></code> uniquely identifies a 
+* code block.
+*/
+DECLARE_OPEN(unsigned, method_get_code_block_size_jit_new, (Method_Handle method,
+                                                     JIT_Handle j,
+                                                     int id));
+
+/**
+* Retrieve the memory block allocated earlier by 
+* method_allocate_info_block().
+* A pair <code><method, jit></code> uniquely identifies a JIT info block.
+*/ 
+DECLARE_OPEN(Byte *, method_get_info_block_jit, (Method_Handle method,
+                                         JIT_Handle j));
+
+/**
+* Get the size of the memory block allocated earlier by
+* method_allocate_info_block().
+*/
+
+DECLARE_OPEN(unsigned, method_get_info_block_size_jit, (Method_Handle method,
+                                                 JIT_Handle j));
+
+/**
+ * Called by a JIT in order to be notified whenever the vtable entries for the 
+ * given method are changed. This could happen, e.g., when a method is first 
+ * compiled, or when it is recompiled. The <code>callback_data</code> pointer 
+ * will be passed back to the JIT during the callback. The callback method is 
+ * <code>JIT_recompiled_method_callback</code>.
+ */
+DECLARE_OPEN(void, vm_register_jit_recompiled_method_callback, (JIT_Handle jit, Method_Handle method,
+                                                           void *callback_data));
+
+/**
+ * Called by a JIT to have the VM replace a section of executable code in a 
+ * thread-safe fashion. This function does not synchronize the I- or D-caches. 
+ * It may be a lot cheaper to batch up the patch requests, so we may need to 
+ * extend this interface.
+ */
+DECLARE_OPEN(void, vm_patch_code_block, (Byte *code_block, Byte *new_code, size_t size));
+
+/** 
+ * Called by a JIT to have VM synchronously (in the same thread) compile a method
+ * It is a requirement that JIT calls this routine only during compilation of 
+ * other method, not during run-time.
+ */
+DECLARE_OPEN(JIT_Result, vm_compile_method, (JIT_Handle jit, Method_Handle method));
+
+
+/**
+* Adds information about inlined method.
+* @param[in] method - method which is inlined
+* @param[in] codeSize - size of inlined code block
+* @param[in] codeAddr - size of inlined code block
+* @param[in] mapLength - number of AddrLocation elements in addrLocationMap
+* @param[in] addrLocationMap - native addresses to bytecode locations
+*       correspondence table
+* @param[in] compileInfo - VM specific information.
+* @param[in] outer_method - target method to which inlining was made
+*/
+DECLARE_OPEN(void, vm_compiled_method_load, (Method_Handle method, U_32 codeSize, 
+                                            void* codeAddr, U_32 mapLength, 
+                                            AddrLocation* addrLocationMap, 
+                                            void* compileInfo, Method_Handle outer_method));
+
+
+DECLARE_OPEN(Method_Side_Effects, method_get_side_effects, (Method_Handle mh));
+DECLARE_OPEN(void, method_set_side_effects, (Method_Handle mh, Method_Side_Effects mse));
+
+//Has side effect: initiates classloading of classes annotating the method, if any.
+DECLARE_OPEN(BOOLEAN, method_has_annotation, (Method_Handle target, Class_Handle antn_type));
+/**
+* Set the number of exception handlers in the code generated by the JIT 
+* <code>j</code> for a given method. The JIT must then 
+* call method_set_target_handler_info()
+* for each of the num_handlers exception handlers.
+*/
+DECLARE_OPEN(void, method_set_num_target_handlers, (Method_Handle method,
+                                             JIT_Handle j,
+                                             unsigned num_handlers));
+
+/**
+* Set the information about an exception handler in the code generated by
+* the JIT.
+*/
+DECLARE_OPEN(void, method_set_target_handler_info, (Method_Handle method,
+                                             JIT_Handle j,
+                                             unsigned      eh_number,
+                                             void         *start_ip,
+                                             void         *end_ip,
+                                             void         *handler_ip,
+                                             Class_Handle  catch_cl,
+                                             Boolean       exc_obj_is_dead));
+
+//-----------------------------------------------------------------------------
+// Constant pool resolution
+//-----------------------------------------------------------------------------
+//
+// The following byte codes reference constant pool entries:
+//
+//  field
+//      getstatic           static field
+//      putstatic           static field
+//      getfield            non-static field
+//      putfield            non-static field
+//
+//  method
+//      invokevirtual       virtual method
+//      invokespecial       special method
+//      invokestatic        static method
+//      invokeinterface     interface method
+//
+//  class
+//      new                 class
+//      anewarray           class
+//      checkcast           class
+//      instanceof          class
+//      multianewarray      class
+//
+
+//
+// For the method invocation byte codes, certain linkage exceptions are thrown 
+// at run-time:
+//
+//  (1) invocation of a native methods throws the UnsatisfiedLinkError if the 
+//      code that implements the method cannot be loaded or linked.
+//  (2) invocation of an interface method throws 
+//          - IncompatibleClassChangeError if the object does not implement 
+//            the called method, or the method is implemented as static
+//          - IllegalAccessError if the implemented method is not public
+//          - AbstractMethodError if the implemented method is abstract
+//
+
+/** 
+* @name Resolution-related functions
+*/
+//@{
+
+/**
+* Resolve a reference to a non-static field.
+* The <code>idx</code> parameter is interpreted as a constant pool index for JVM.
+* Used for getfield and putfield in JVM.
+*/
+DECLARE_OPEN(Field_Handle, 
+resolve_nonstatic_field, (Compile_Handle h, Class_Handle ch, unsigned idx, unsigned putfield));
+
+/**
+* Resolve constant pool reference to a static field.
+* The <code>idx</code> parameter is interpreted as a constant pool index for JVM.
+* Used for getstatic and putstatic in JVM.
+*/
+DECLARE_OPEN(Field_Handle,
+resolve_static_field, (Compile_Handle h, Class_Handle ch, unsigned idx, unsigned putfield));
+
+/**
+* Resolve a method.
+* The <code>idx</code> parameter is interpreted as a constant pool index for JVM.
+*/ 
+DECLARE_OPEN(Method_Handle, 
+resolve_method, (Compile_Handle h, Class_Handle ch, unsigned idx));
+
+
+/**
+* Resolve a method. Same as resolve_method() but the VM checks 
+* that the method can be used for a virtual dispatch.
+* The <code>idx</code> parameter is interpreted as a constant pool index for JVM.
+*/
+DECLARE_OPEN(Method_Handle,
+resolve_virtual_method, (Compile_Handle h, Class_Handle c, unsigned index));
+
+/**
+* Resolve a method. Same as resolve_method() but the VM checks 
+* that the method is static (i.e. it is not an instance method).
+* The <code>idx</code> parameter is interpreted as a constant pool index for 
+* JVM.
+*/
+DECLARE_OPEN(Method_Handle, 
+resolve_static_method, (Compile_Handle h, Class_Handle c, unsigned index));
+
+/** 
+* Resolve a method. Same as resolve_method() but the VM checks 
+* that the method is declared in an interface type.
+* The <code>idx</code> parameter is interpreted as a constant pool index for JVM.
+*/
+DECLARE_OPEN(Method_Handle, 
+resolve_interface_method, (Compile_Handle h, Class_Handle c, unsigned index));
+
+//
+// resolve constant pool reference to a virtual method
+// used for invokespecial
+//
+DECLARE_OPEN(Method_Handle, 
+resolve_special_method, (Compile_Handle h, Class_Handle c, unsigned index));
+
+//@}
+
+//
+// resolve constant pool reference to a class
+// used for
+//      (1) new 
+//              - InstantiationError exception if resolved class is abstract
+//      (2) anewarray
+//      (3) multianewarray
+//
+// resolve_class_new is used for resolving references to class entries by the
+// the new byte code.
+//
+/**
+* Resolve a class and provide error checking if the class cannot have an
+* instance, i.e. it is abstract (or is an interface class).
+* The <code>idx</code> parameter is interpreted as a constant pool index for JVM.
+*/
+DECLARE_OPEN(Class_Handle, resolve_class_new, (Compile_Handle h, Class_Handle c, unsigned index));
+
+//
+// resolve_class is used by all the other byte codes that reference classes,
+// as well as exception handlers.
+//
+DECLARE_OPEN(Class_Handle, resolve_class, (Compile_Handle h, Class_Handle c, unsigned index));
+
+DECLARE_OPEN(U_32, class_get_depth, (Class_Handle cl));
+/// Check if fast_instanceof is applicable for the class
+DECLARE_OPEN(BOOLEAN, class_is_support_fast_instanceof, (Class_Handle cl));
+
+/**
+* @return The offset to the vtable pointer in an object.
+*/ 
+DECLARE_OPEN(size_t, object_get_vtable_offset, ());
+
+/**
+* @return The vtable handle of the given class.
+*/
+DECLARE_OPEN(VTable_Handle, class_get_vtable, (Class_Handle ch));
+
+/**
+* @return Class handle given object's <code>VTable_Handle</code>.
+*/ 
+DECLARE_OPEN(Class_Handle, vtable_get_class, (VTable_Handle vh));
+
+
+/**
+* @return The allocation handle to be used for the object allocation
+*         routines, given a class handle.
+*/
+DECLARE_OPEN(Allocation_Handle, class_get_allocation_handle, (Class_Handle ch));
+
+/**
+* @return The class handle corresponding to a given allocation handle.
+*/
+DECLARE_OPEN(Class_Handle, allocation_handle_get_class, (Allocation_Handle ah));
+
+
+/**
+* Returns the address of the global flag that specifies whether
+* MethodEntry event is enabled. JIT should call this function in case
+* a method is compiled with exe_notify_method_entry flag set.
+*/
+DECLARE_OPEN(char *, get_method_entry_flag_address, ());
+
+/**
+* Returns the address of the global flag that specifies whether
+* MethodExit event is enabled. JIT should call this function in case
+* a method is compiled with exe_notify_method_exit flag set.
+*/
+DECLARE_OPEN(char *, get_method_exit_flag_address, ());
+
+
+/**
+* @return The address and bit mask, for the flag which determine whether field
+*         access event should be sent. JIT may use the following expression to
+*         determine if specified field access should be tracked:
+*         ( **address & *mask != 0 )
+*
+* @param field         - handle of the field
+* @param[out] address  - pointer to the address of the byte which contains the flag
+* @param[out] mask     - pointer to the bit mask of the flag
+*/
+DECLARE_OPEN(void,
+field_get_track_access_flag, (Field_Handle field, char** address, char* mask));
+
+/**
+* @return the address and bit mask, for the flag which determine whether field
+*         modification event should be sent. JIT may use the following expression to
+*         determine if specified field modification should be tracked:
+*         ( **address & *mask != 0 )
+*
+* @param field         - handle of the field
+* @param[out] address  - pointer to the address of the byte which contains the flag
+* @param[out] mask     - pointer to the bit mask of the flag
+*/
+DECLARE_OPEN(void,
+field_get_track_modification_flag, (Field_Handle field, char** address,
+                                  char* mask));
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif

Propchange: harmony/enhanced/drlvm/trunk/vm/include/open/vm_ee.h
------------------------------------------------------------------------------
    svn:eol-style = native

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=649083&r1=649082&r2=649083&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/vm_interface.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/vm_interface.h Thu Apr 17 06:10:05 2008
@@ -18,11 +18,10 @@
 #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"
+//#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
@@ -30,68 +29,9 @@
 #define GET_INTERFACE(get_adapter, func_name) \
     (func_name##_t)get_adapter(#func_name)
 
+DECLARE_OPEN(int, vector_get_first_element_offset, (Class_Handle element_type)); //vector_first_element_offset_class_handle
+DECLARE_OPEN(int, vector_get_length_offset, ()); //vector_length_offset
 
-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(Class_Handle, class_get_super_class, (Class_Handle cl));
-PROTOTYPE_WITH_NAME(int         , class_get_depth, (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(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_support_fast_instanceof, (Class_Handle cl));// class_get_fast_instanceof_flag
-
-PROTOTYPE_WITH_NAME(Method_Handle, class_lookup_method_recursively,
-                   (Class_Handle clss,
-                    const char *name,
-                    const char *descr));
-
-//Method
-
-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));
-
-//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
-
-//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) 
@@ -99,39 +39,5 @@
 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_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
-
-
-/////////////////////////// temporary ///////////////////////////
-//VTable
-PROTOTYPE_WITH_NAME(Class_Handle , vtable_get_class, (VTable_Handle vh));
-
-
 
 #endif // _VM_INTERFACE_H

Modified: harmony/enhanced/drlvm/trunk/vm/include/open/vm_properties.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/include/open/vm_properties.h?rev=649083&r1=649082&r2=649083&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/include/open/vm_properties.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/include/open/vm_properties.h Thu Apr 17 06:10:05 2008
@@ -46,12 +46,8 @@
 
 /**
  * Checks if the property is set. 
- *
- * @return -1 if <code>table_number</code> is incorrect.<BR>
- *          1 if property is set in <code>table_number</code> property table.<BR>
- *          0 otherwise.
  */
-DECLARE_OPEN(int, vm_property_is_set, (const char* key, PropertyTable table_number));
+DECLARE_OPEN(BOOLEAN, vm_property_is_set, (const char* key, PropertyTable table_number));
 
 /**
  * @return An array of keys from <code>table_number</code> properties table.

Modified: harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_vm_helpers.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_vm_helpers.cpp?rev=649083&r1=649082&r2=649083&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_vm_helpers.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/interpreter/src/interp_vm_helpers.cpp Thu Apr 17 06:10:05 2008
@@ -19,6 +19,8 @@
  * @version $Revision: 1.6.4.4.4.3 $
  */  
 #include "open/vm_class_manipulation.h"
+#include "open/vm_ee.h"
+
 #include "interp_vm_helpers.h"
 #include "interpreter_imports.h"
 #include "interp_native.h"

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=649083&r1=649082&r2=649083&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 Apr 17 06:10:05 2008
@@ -106,11 +106,10 @@
         FilterAttr<bool>                                    isInstanceInitializer;
         FilterAttr<bool>                                    isStrict;
         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), 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), operandFilters(Jitrino::getGlobalMM()) {}
 
         Filter& operator=(const Filter& c) {
             Filter& f = *this;
@@ -134,7 +133,6 @@
             f.isInstanceInitializer   =  c.isInstanceInitializer;     
             f.isStrict                =  c.isStrict;                  
             f.isInitLocals            =  c.isInitLocals;              
-            f.isOverridden            =  c.isOverridden;              
 
             for(StlMap<int, OpndFilter>::const_iterator it = c.operandFilters.begin(); it !=c.operandFilters.end(); it++) {
                 f.operandFilters[it->first] = it->second;
@@ -504,15 +502,6 @@
                             config->counters[num].filter.isInitLocals.value=(std::string(val) == "true")? true : false;
                             config->counters[num].filter.isInitLocals.isInitialized=true;
                         }
-                    } else if ((int)line.find(".isOverridden") != -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.isOverridden.isNegative=true;
-                        } else {
-                            config->counters[num].filter.isInitialized=true;
-                            config->counters[num].filter.isOverridden.value=(std::string(val) == "true")? true : false;
-                            config->counters[num].filter.isOverridden.isInitialized=true;
-                        }
                     }
                 } else if (std::strstr(c_line, "[begin]") == c_line) {
                 } else if (std::strstr(c_line, "[end]") == c_line) {
@@ -953,18 +942,6 @@
             return false;
         res = filter.isInitLocals.value == false;
         if(filter.isInitLocals.isNegative)
-            res = !res;
-
-        if(filter.isOR && res)
-            return true;
-        if(!(filter.isOR || res))
-            return false;
-    }
-    if(filter.isOverridden.isInitialized) {
-        if(!rt || ((rt->getKind() != Opnd::RuntimeInfo::Kind_MethodDirectAddr) && (rt->getKind() != Opnd::RuntimeInfo::Kind_MethodDirectAddr)))
-            return false;
-        res = filter.isOverridden.value == ((MethodDesc *)rt->getValue(0))->isOverridden();
-        if(filter.isOverridden.isNegative)
             res = !res;
 
         if(filter.isOR && res)

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/bcproc.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/bcproc.cpp?rev=649083&r1=649082&r2=649083&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/bcproc.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/bcproc.cpp Thu Apr 17 06:10:05 2008
@@ -23,8 +23,10 @@
 #include "stats.h"
 
 #include "open/vm_class_info.h"
+#include "open/vm_class_loading.h"
 #include "jit_import.h"
-#include "jit_intf.h"
+//#include "jit_intf.h"
+#include "open/vm_ee.h"
 
 /**
  * @file

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=649083&r1=649082&r2=649083&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 Apr 17 06:10:05 2008
@@ -28,7 +28,7 @@
 #include <open/vm.h>
 #include <open/vm_class_info.h>
 #include <open/vm_field_access.h>
-#include <jit_intf.h>
+#include <open/vm_ee.h>
 
 #include "trace.h"
 #include "VMMagic.h"

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_instr.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_instr.cpp?rev=649083&r1=649082&r2=649083&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_instr.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_instr.cpp Thu Apr 17 06:10:05 2008
@@ -27,7 +27,9 @@
 #include "trace.h"
 #include "open/vm_field_access.h"
 #include "jit_runtime_support.h"
-#include "jit_intf.h"
+#include "open/vm_class_loading.h"
+#include "open/vm_class_info.h"
+#include "open/vm_ee.h"
 
 namespace Jitrino {
 namespace Jet {
@@ -385,8 +387,7 @@
     static char* wbMethAddr = NULL;
 
     if (doGenWB4J && NULL == wbMethAddr) {
-        wbKlass = class_load_class_by_name(wbKlassName, m_klass);
-            //class_find_class_from_loader(NULL, wbKlassName, true);
+        wbKlass = vm_load_class_with_bootstrap(wbKlassName);
         if (wbKlass != NULL) {
             wbMeth = class_lookup_method_recursively(wbKlass, wbMethName, wbMethSig);
         }

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_meth.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_meth.cpp?rev=649083&r1=649082&r2=649083&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_meth.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/cg_meth.cpp Thu Apr 17 06:10:05 2008
@@ -29,7 +29,8 @@
 
 #include <open/vm.h>
 #include <jit_import.h>
-#include <jit_intf.h>
+//#include <jit_intf.h>
+#include "open/vm_ee.h"
 
 #if !defined(_IPF_)
     #include "enc_ia32.h"
@@ -863,7 +864,7 @@
         stackFix = gen_stack_to_args(true, cs, 0);
         vpark();
         gen_gc_stack(-1, true);
-        unsigned offset = method_get_offset(meth);
+        unsigned offset = method_get_vtable_offset(meth);
         //ld(jobj, gr_ret, m_base, voff(m_stack.scratch()));
         runlock(gr_ret);
         ld(jobj, gr_ret, gr_ret, offset);
@@ -871,7 +872,7 @@
     }
     else if (opcod == OPCODE_INVOKEVIRTUAL) {
         AR gr = valloc(jobj);
-        unsigned offset = method_get_offset(meth);
+        unsigned offset = method_get_vtable_offset(meth);
         Opnd ptr;
         if (g_vtbl_squeeze) {
             ld4(gr, thiz.reg(), rt_vtable_offset);

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=649083&r1=649082&r2=649083&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 Apr 17 06:10:05 2008
@@ -29,8 +29,9 @@
 #include <stdlib.h>
 
 #include "open/vm_class_info.h"
-#include "jit_import.h"
-#include "jit_intf.h"
+#include "open/vm_class_loading.h"
+#include "open/vm_ee.h"
+#include "open/vm.h"
 
 /**
  * @file
@@ -173,7 +174,7 @@
             if ( klass!=enclClass && !class_is_initialized(klass)) {
                 gen_call_vm(ci_helper_o, rt_helper_init_class, 0, klass);
             }
-            unsigned size = class_get_boxed_data_size(klass);
+            unsigned size = class_get_object_size(klass);
             Allocation_Handle ah = class_get_allocation_handle(klass);
             gen_call_vm(ci_new, rt_helper_new, 0, size, ah);
         }

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=649083&r1=649082&r2=649083&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/compiler.cpp Thu Apr 17 06:10:05 2008
@@ -29,12 +29,14 @@
 #include <stdlib.h>
 #endif
 
+#include "open/vm_class_loading.h"
 #include "open/vm.h"
 #include "open/vm_properties.h"
 #include "open/hythread_ext.h"
 #include "open/vm_class_info.h"
 #include "open/vm_type_access.h"
 #include "open/vm_method_access.h"
+#include "open/vm_ee.h"
 #include "jit_import.h"
 #include "jit_runtime_support.h"
 #include "jit_intf.h"
@@ -1474,10 +1476,10 @@
     rt_helper_new = 
      (char*)vm_helper_get_addr(VM_RT_NEW_RESOLVED_USING_VTABLE_AND_SIZE);
 
-    g_refs_squeeze = vm_references_are_compressed();
-    g_vtbl_squeeze = vm_vtable_pointers_are_compressed();
-    OBJ_BASE  = (const char*)vm_heap_base_address();
-    VTBL_BASE = (const char*)vm_get_vtable_base();
+    g_refs_squeeze = vm_is_heap_compressed();
+    g_vtbl_squeeze = vm_is_vtable_compressed();
+    OBJ_BASE  = (const char*)vm_get_heap_base_address();
+    VTBL_BASE = (const char*)vm_get_vtable_base_address();
     NULL_REF  = g_refs_squeeze ? OBJ_BASE : NULL;
 
     g_jvmtiMode = (bool)vm_property_get_boolean("vm.jvmti.enabled", false, VM_PROPERTIES);

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=649083&r1=649082&r2=649083&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jet.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/jet.cpp Thu Apr 17 06:10:05 2008
@@ -829,24 +829,6 @@
     return FALSE;
 }
 
-extern "C" JITEXPORT
-Boolean JIT_extended_class_callback(JIT_Handle jit,
-                                    Class_Handle extended_class,
-                                    Class_Handle new_class,
-                                    void *callback_data)
-{
-    return FALSE;
-}
-
-extern "C" JITEXPORT
-Boolean JIT_overridden_method_callback(JIT_Handle jit,
-                                       Method_Handle overridden_method,
-                                       Method_Handle new_method,
-                                       void *callback_data)
-{
-    return FALSE;
-}
-
 /**
  * @see rt_unwind
  */
@@ -996,4 +978,5 @@
 /// @} // ~ defgroup JITRINO_JET_STANDALONE
 
 #endif  // ~ifdef PROJECT_JET   // standalone interface
+
 

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=649083&r1=649082&r2=649083&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/rt.cpp Thu Apr 17 06:10:05 2008
@@ -29,7 +29,8 @@
 
 #include "jet.h"
 
-#include "jit_intf.h"
+#include "jit_import_rt.h"
+#include "open/vm_ee.h"
 
 #include "port_threadunsafe.h"
 #include "EMInterface.h"

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/trace.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/trace.cpp?rev=649083&r1=649082&r2=649083&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/trace.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/jet/trace.cpp Thu Apr 17 06:10:05 2008
@@ -28,6 +28,7 @@
 
 #include "../shared/mkernel.h"
 #include "open/vm_class_manipulation.h"
+#include "open/vm_ee.h"
 #include "jit_intf.h"
 
 #ifdef _WIN32

Modified: harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/escanalyzer.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/escanalyzer.cpp?rev=649083&r1=649082&r2=649083&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/escanalyzer.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/optimizer/escanalyzer.cpp Thu Apr 17 06:10:05 2008
@@ -5777,7 +5777,6 @@
     Log::out() << "    isVirtual: "  << mdesc->isVirtual() << std::endl;
     Log::out() << "    isAbstract: " << mdesc->isAbstract() << std::endl;
     Log::out() << "    isInstanceInitializer: "  << mdesc->isInstanceInitializer() << std::endl;
-    Log::out() << "    isOverridden: " << mdesc->isOverridden() << std::endl;
 }
 
 static bool isVMHelperCall(Inst* inst, VM_RT_SUPPORT id) {

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=649083&r1=649082&r2=649083&view=diff
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/JITInterface.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/jitrino/src/vm/JITInterface.cpp Thu Apr 17 06:10:05 2008
@@ -151,29 +151,6 @@
     } //opt does not support counters patching today.
 }
 
-// Called if JIT registered itself to be notified when the class is extended
-// Returns TRUE if any code was modified and FALSE otherwise.
-extern "C"
-JITEXPORT Boolean
-JIT_extended_class_callback(JIT_Handle jit, Class_Handle extended_class,
-                            Class_Handle new_class, void *callback_data)
-{
-    return FALSE;
-}
-
-// Called if JIT registered itself to be notified when the method is
-// overridden
-// Returns TRUE if any code was modified and FALSE otherwise
-extern "C"
-JITEXPORT Boolean
-JIT_overridden_method_callback(JIT_Handle jit,
-                               Method_Handle  overridden_method,
-                               Method_Handle  new_method,
-                               void *callback_data)
-{
-    return FALSE;
-}
-
 // Called if JIT registered itself to be notified when the method is
 // recompiled
 // Returns TRUE if any code was modified and FALSE otherwise
@@ -543,5 +520,6 @@
 }
 
 } //namespace Jitrino
+
 
 



Mime
View raw message