changeset 2272:4a1bc9de9c19

Better?
author Gary Benson <gbenson@redhat.com>
date Fri, 11 Mar 2011 11:04:08 +0000
parents a5cc6fde5927
children 887b37920ad5
files src/cpu/zero/vm/cppInterpreter_zero.cpp
diffstat 1 files changed, 9 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/cpu/zero/vm/cppInterpreter_zero.cpp	Fri Mar 11 10:25:46 2011 +0000
+++ b/src/cpu/zero/vm/cppInterpreter_zero.cpp	Fri Mar 11 11:04:08 2011 +0000
@@ -656,15 +656,20 @@
     // NB the x86 code for this (in methodHandles_x86.cpp, search for
     // "genericInvoker") is really really odd.  I'm hoping it's trying
     // to accomodate odd VM/class library combinations I can ignore.
-    oop /* XXX? */ method_handle =
-      java_dyn_MethodTypeForm::genericInvoker(methodtype_form);
+    method_handle = java_dyn_MethodTypeForm::genericInvoker(methodtype_form);
 
-    // Make room on the stack for a new pointer
+    // Make room on the stack for another pointer
     insert_vmslots(num_vmslots, 1, CHECK_0); // XXX unwind!
     vmslots = stack->sp();
     num_vmslots++;
 
-    // Insert the adapter at the end of the vmslots
+    // Generic invokers are shared among form-families of method-type.
+    // The type being called is passed as a trusted first argument so
+    // that the adapter knows the actual types of its arguments and
+    // return values.
+    SET_VMSLOTS_OBJECT(method_type, num_vmslots);
+
+    // The invoker's second argument is the new method handle
     SET_VMSLOTS_OBJECT(method_handle, num_vmslots - 1);
   }