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 2007/02/06 07:45:52 UTC

svn commit: r504010 - in /harmony/enhanced/drlvm/trunk/vm/vmcore: include/Class.h src/util/ipf/base/jit_runtime_support_ipf.cpp

Author: varlax
Date: Mon Feb  5 22:45:51 2007
New Revision: 504010

URL: http://svn.apache.org/viewvc?view=rev&rev=504010
Log:
Dummy params cleaned, IPF compilation fixed.

Modified:
    harmony/enhanced/drlvm/trunk/vm/vmcore/include/Class.h
    harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/jit_runtime_support_ipf.cpp

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/include/Class.h
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/include/Class.h?view=diff&rev=504010&r1=504009&r2=504010
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/include/Class.h (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/include/Class.h Mon Feb  5 22:45:51 2007
@@ -1164,7 +1164,6 @@
     Class* get_next_sibling() const { return m_cha_next_sibling; }
 
     /** Gets offset of m_depth field in struct Class.
-     * @param dummy - dummy variable used to calculate field offset
      * @note Instanceof helpers use returned offset.*/
     static size_t get_offset_of_depth() {
         Class* dummy=NULL;
@@ -1172,7 +1171,6 @@
     }
 
     /** Gets offset of m_is_suitable_for_fast_instanceof field in struct Class.
-     * @param dummy - dummy variable used to calculate field offset
      * @note Instanceof helper uses returned offset.*/
     static size_t get_offset_of_fast_instanceof_flag() {
         Class* dummy=NULL;
@@ -1206,16 +1204,16 @@
     }
 
     /** Gets an offset of <code>m_num_class_init_checks</code> in the class.
-     * @param dummy - dummy variable used to calculate field offset
      * @note Class initialization helper on IPF uses returned offset.*/
-    static size_t get_offset_of_class_init_checks(Class* dummy) {
+    static size_t get_offset_of_class_init_checks() {
+        Class* dummy = NULL;
         return (size_t)((char*)(&dummy->m_num_class_init_checks) - (char*)dummy);
     }
 
     /** Gets an offset of <code>m_array_element_class</code> in the class.
-     * @param dummy - dummy variable used to calculate field offset
      * @note Class initialization helper on IPF uses returned offset.*/
-    static size_t get_offset_of_array_element_class(Class* dummy) {
+    static size_t get_offset_of_array_element_class() {
+        Class* dummy = NULL;
         assert(sizeof(dummy->m_array_element_class) == sizeof(void*));
         return (size_t)((char*)(&dummy->m_array_element_class) - (char*)dummy);
     }

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/jit_runtime_support_ipf.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/jit_runtime_support_ipf.cpp?view=diff&rev=504010&r1=504009&r2=504010
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/jit_runtime_support_ipf.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ipf/base/jit_runtime_support_ipf.cpp Mon Feb  5 22:45:51 2007
@@ -1086,8 +1086,6 @@
     emitter.disallow_instruction_exchange();
     emitter.memory_type_is_unknown();
 
-    Class *dummy = NULL;
-
 #ifdef VM_STATS
     increment_stats_counter(emitter, &VM_Statistics::get_vm_stats().num_is_class_initialized);
     // Update the per-class counter.
@@ -1095,7 +1093,7 @@
     // reg1 = [reg0]
     // reg1 = reg1 + 1
     // [reg0] = reg1
-    emitter.ipf_adds(SCRATCH_GENERAL_REG, (int)Class::get_offset_of_class_init_checks(dummy), IN_REG0);
+    emitter.ipf_adds(SCRATCH_GENERAL_REG, (int)Class::get_offset_of_class_init_checks(), IN_REG0);
     emitter.ipf_ld(int_mem_size_8, mem_ld_none, mem_none, SCRATCH_GENERAL_REG2, SCRATCH_GENERAL_REG);
     emitter.ipf_adds(SCRATCH_GENERAL_REG2, 1, SCRATCH_GENERAL_REG2);
     emitter.ipf_st(int_mem_size_8, mem_st_none, mem_none, SCRATCH_GENERAL_REG, SCRATCH_GENERAL_REG2);