harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gshiman...@apache.org
Subject svn commit: r485644 [3/3] - in /harmony/enhanced/drlvm/trunk/vm: interpreter/src/ vmcore/include/ vmcore/src/class_support/ vmcore/src/exception/ vmcore/src/jit/ vmcore/src/jvmti/ vmcore/src/util/ia32/base/
Date Mon, 11 Dec 2006 12:27:37 GMT
Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Prepare.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Prepare.cpp?view=diff&rev=485644&r1=485643&r2=485644
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Prepare.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/Prepare.cpp Mon Dec 11 04:27:35
2006
@@ -630,7 +630,7 @@
                 fake_method->_access_flags = (ACC_PUBLIC | ACC_ABSTRACT);
                 // Setting its "_intf_method_for_fake_method" field marks the method as being
fake.
                 fake_method->_intf_method_for_fake_method = intf_method;
-                fake_method->_arguments_size = intf_method->_arguments_size;
+                fake_method->_arguments_slot_num = intf_method->_arguments_slot_num;
                 // The rest of the method's fields were zero'd above 
             }
         }

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/method.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/method.cpp?view=diff&rev=485644&r1=485643&r2=485644
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/method.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/class_support/method.cpp Mon Dec 11 04:27:35
2006
@@ -201,14 +201,13 @@
 } //Method::get_target_exception_handler_info
 
 
-void Method::calculate_arguments_size()
+void Method::calculate_arguments_slot_num() 
 {
-    // Use this old scheme until we can use the new JIT interface's methods
-    // to inspect the types of each method argument. This requires that these
-    // methods support Java, and that they work during VM's bootstrapping.
-    unsigned nb = 0;
+    //This method counts length of method parameters in slots.
+    //See 4.4.3 paragraph 5 in specification.
+    unsigned slot_num = 0;
     if (!is_static()) {
-        nb = 4;
+        slot_num = 1;
     }
     Arg_List_Iterator iter = get_argument_list();
     Java_Type typ;
@@ -216,18 +215,16 @@
         switch(typ) {
         case JAVA_TYPE_LONG:
         case JAVA_TYPE_DOUBLE:
-            nb += 8;
+            slot_num += 2;
             break;
         default:
-            nb += 4;
+            slot_num += 1;
             break;
         }
         iter = advance_arg_iterator(iter);
     }
-    _arguments_size = nb;
-} // Method::get_num_arg_bytes
-
-
+    _arguments_slot_num = slot_num;
+} // Method::calculate_arguments_slot_num
 
 unsigned Method::get_num_ref_args()
 {

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/exception/exceptions_jit.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/exception/exceptions_jit.cpp?view=diff&rev=485644&r1=485643&r2=485644
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/exception/exceptions_jit.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/exception/exceptions_jit.cpp Mon Dec 11 04:27:35
2006
@@ -575,7 +575,7 @@
     ABORT("Lazy exceptions are not supported on this platform");
 #else
     uint8 *args = (uint8 *) (m2n_get_args(m2n_get_last_frame()) + 1);   // +1 to skip constructor
-    args += exn_constr->get_num_arg_bytes() - 4;
+    args += exn_constr->get_num_arg_slots() * 4 - 4;
     exn_athrow(NULL, *(Class_Handle *) args, exn_constr, args);
 #endif
 }   //rth_throw_lazy

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp?view=diff&rev=485644&r1=485643&r2=485644
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jit/jit_runtime_support.cpp Mon Dec 11 04:27:35
2006
@@ -2093,7 +2093,7 @@
     }
 
     // Every argument is at least 4 bytes long
-    int num_args_estimate = constructor->get_num_arg_bytes() / 4;
+    int num_args_estimate = constructor->get_num_arg_slots();
     jvalue* args = (jvalue*)STD_MALLOC(num_args_estimate * sizeof(jvalue));
     args[0].l = (jobject)obj;
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_method.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_method.cpp?view=diff&rev=485644&r1=485643&r2=485644
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_method.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/jvmti/jvmti_method.cpp Mon Dec 11 04:27:35
2006
@@ -236,7 +236,7 @@
     if( !method ) return JVMTI_ERROR_NULL_POINTER;
     if( !size_ptr ) return JVMTI_ERROR_NULL_POINTER;
 
-    *size_ptr = reinterpret_cast<Method*>(method)->get_num_arg_bytes() / 4;
+    *size_ptr = reinterpret_cast<Method*>(method)->get_num_arg_slots();
 
     return JVMTI_ERROR_NONE;
 }

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/compile_IA32.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/compile_IA32.cpp?view=diff&rev=485644&r1=485643&r2=485644
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/compile_IA32.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/compile_IA32.cpp Mon Dec 11
04:27:35 2006
@@ -85,7 +85,7 @@
     assert(!hythread_is_suspend_enabled());
     Method_Signature_Handle msh = method_get_signature(method);
     unsigned num_args = method_args_get_number(msh);
-    unsigned num_arg_words = ((Method*)method)->get_num_arg_bytes()>>2;
+    unsigned num_arg_words = ((Method*)method)->get_num_arg_slots();
 
     unsigned cur_word = 0;
     for(unsigned i=0; i<num_args; i++) {

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/ini_iA32.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/ini_iA32.cpp?view=diff&rev=485644&r1=485643&r2=485644
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/ini_iA32.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/ini_iA32.cpp Mon Dec 11 04:27:35
2006
@@ -122,7 +122,7 @@
             << method->get_class()->get_name()->bytes << " "
             << method->get_name()->bytes << " "
             << method->get_descriptor()->bytes);
-    int sz = method->get_num_arg_bytes() >> 2;
+    int sz = method->get_num_arg_slots();
     void *meth_addr = method->get_code_addr();
     uint32 *arg_words = (uint32*) STD_ALLOCA(sz * sizeof(uint32));
 

Modified: harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/optimize_ia32.cpp
URL: http://svn.apache.org/viewvc/harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/optimize_ia32.cpp?view=diff&rev=485644&r1=485643&r2=485644
==============================================================================
--- harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/optimize_ia32.cpp (original)
+++ harmony/enhanced/drlvm/trunk/vm/vmcore/src/util/ia32/base/optimize_ia32.cpp Mon Dec 11
04:27:35 2006
@@ -453,7 +453,7 @@
     s = pop(s,  ebx_opnd);
     s = pop(s,  ebp_opnd);
 
-    s = ret(s,  Imm_Opnd(method->get_num_arg_bytes()));
+    s = ret(s,  Imm_Opnd(method->get_num_arg_slots() * 4));
 
     //Fill Patches
     for(; p_c>0 ; p_c--){



Mime
View raw message