1.1 --- a/src/cpu/zero/vm/cppInterpreter_zero.cpp Mon Jul 23 13:04:59 2012 -0700 1.2 +++ b/src/cpu/zero/vm/cppInterpreter_zero.cpp Tue Jul 24 10:51:00 2012 -0700 1.3 @@ -646,16 +646,15 @@ 1.4 oop method_type = (oop) p; 1.5 1.6 // The MethodHandle is in the slot after the arguments 1.7 - oop form = java_lang_invoke_MethodType::form(method_type); 1.8 - int num_vmslots = java_lang_invoke_MethodTypeForm::vmslots(form); 1.9 - assert(argument_slots == num_vmslots + 1, "should be"); 1.10 + int num_vmslots = argument_slots - 1; 1.11 oop method_handle = VMSLOTS_OBJECT(num_vmslots); 1.12 1.13 // InvokeGeneric requires some extra shuffling 1.14 oop mhtype = java_lang_invoke_MethodHandle::type(method_handle); 1.15 bool is_exact = mhtype == method_type; 1.16 if (!is_exact) { 1.17 - if (method->intrinsic_id() == vmIntrinsics::_invokeExact) { 1.18 + if (true || // FIXME 1.19 + method->intrinsic_id() == vmIntrinsics::_invokeExact) { 1.20 CALL_VM_NOCHECK_NOFIX( 1.21 SharedRuntime::throw_WrongMethodTypeException( 1.22 thread, method_type, mhtype)); 1.23 @@ -670,8 +669,8 @@ 1.24 // NB the x86 code for this (in methodHandles_x86.cpp, search for 1.25 // "genericInvoker") is really really odd. I'm hoping it's trying 1.26 // to accomodate odd VM/class library combinations I can ignore. 1.27 - oop adapter = java_lang_invoke_MethodTypeForm::genericInvoker(form); 1.28 - if (adapter == NULL) { 1.29 + oop adapter = NULL; //FIXME: load the adapter from the CP cache 1.30 + IF (adapter == NULL) { 1.31 CALL_VM_NOCHECK_NOFIX( 1.32 SharedRuntime::throw_WrongMethodTypeException( 1.33 thread, method_type, mhtype)); 1.34 @@ -761,7 +760,7 @@ 1.35 return; 1.36 } 1.37 if (entry_kind != MethodHandles::_invokespecial_mh) { 1.38 - int index = java_lang_invoke_DirectMethodHandle::vmindex(method_handle); 1.39 + intptr_t index = java_lang_invoke_DirectMethodHandle::vmindex(method_handle); 1.40 instanceKlass* rcvrKlass = 1.41 (instanceKlass *) receiver->klass()->klass_part(); 1.42 if (entry_kind == MethodHandles::_invokevirtual_mh) { 1.43 @@ -1179,8 +1178,7 @@ 1.44 intptr_t* CppInterpreter::calculate_unwind_sp(ZeroStack* stack, 1.45 oop method_handle) { 1.46 oop method_type = java_lang_invoke_MethodHandle::type(method_handle); 1.47 - oop form = java_lang_invoke_MethodType::form(method_type); 1.48 - int argument_slots = java_lang_invoke_MethodTypeForm::vmslots(form); 1.49 + int argument_slots = java_lang_invoke_MethodType::ptype_slot_count(method_type); 1.50 1.51 return stack->sp() + argument_slots; 1.52 }