src/hotspot/share/runtime/sharedRuntime.cpp
changeset 50449 acdfeede95ff
parent 50375 bfbe7d8369bb
child 50666 3e66d204af9b
equal deleted inserted replaced
50448:db8036093504 50449:acdfeede95ff
  1080   methodHandle caller(THREAD, vfst.method());
  1080   methodHandle caller(THREAD, vfst.method());
  1081   int          bci   = vfst.bci();
  1081   int          bci   = vfst.bci();
  1082 
  1082 
  1083   Bytecode_invoke bytecode(caller, bci);
  1083   Bytecode_invoke bytecode(caller, bci);
  1084   int bytecode_index = bytecode.index();
  1084   int bytecode_index = bytecode.index();
       
  1085   bc = bytecode.invoke_code();
  1085 
  1086 
  1086   methodHandle attached_method = extract_attached_method(vfst);
  1087   methodHandle attached_method = extract_attached_method(vfst);
  1087   if (attached_method.not_null()) {
  1088   if (attached_method.not_null()) {
  1088     methodHandle callee = bytecode.static_target(CHECK_NH);
  1089     methodHandle callee = bytecode.static_target(CHECK_NH);
  1089     vmIntrinsics::ID id = callee->intrinsic_id();
  1090     vmIntrinsics::ID id = callee->intrinsic_id();
  1093         MethodHandles::is_signature_polymorphic_intrinsic(id)) {
  1094         MethodHandles::is_signature_polymorphic_intrinsic(id)) {
  1094       bc = MethodHandles::signature_polymorphic_intrinsic_bytecode(id);
  1095       bc = MethodHandles::signature_polymorphic_intrinsic_bytecode(id);
  1095 
  1096 
  1096       // Adjust invocation mode according to the attached method.
  1097       // Adjust invocation mode according to the attached method.
  1097       switch (bc) {
  1098       switch (bc) {
       
  1099         case Bytecodes::_invokevirtual:
       
  1100           if (attached_method->method_holder()->is_interface()) {
       
  1101             bc = Bytecodes::_invokeinterface;
       
  1102           }
       
  1103           break;
  1098         case Bytecodes::_invokeinterface:
  1104         case Bytecodes::_invokeinterface:
  1099           if (!attached_method->method_holder()->is_interface()) {
  1105           if (!attached_method->method_holder()->is_interface()) {
  1100             bc = Bytecodes::_invokevirtual;
  1106             bc = Bytecodes::_invokevirtual;
  1101           }
  1107           }
  1102           break;
  1108           break;
  1108           break;
  1114           break;
  1109         default:
  1115         default:
  1110           break;
  1116           break;
  1111       }
  1117       }
  1112     }
  1118     }
  1113   } else {
  1119   }
  1114     bc = bytecode.invoke_code();
  1120 
  1115   }
  1121   assert(bc != Bytecodes::_illegal, "not initialized");
  1116 
  1122 
  1117   bool has_receiver = bc != Bytecodes::_invokestatic &&
  1123   bool has_receiver = bc != Bytecodes::_invokestatic &&
  1118                       bc != Bytecodes::_invokedynamic &&
  1124                       bc != Bytecodes::_invokedynamic &&
  1119                       bc != Bytecodes::_invokehandle;
  1125                       bc != Bytecodes::_invokehandle;
  1120 
  1126