@@ -761,34 +761,29 @@ Method* ciEnv::lookup_method(ciInstanceKlass* accessor,
761
761
Symbol* sig,
762
762
Bytecodes::Code bc,
763
763
constantTag tag) {
764
- // Accessibility checks are performed in ciEnv::get_method_by_index_impl.
765
- assert (check_klass_accessibility (accessor, holder->get_Klass ()), " holder not accessible" );
766
-
767
764
InstanceKlass* accessor_klass = accessor->get_instanceKlass ();
768
765
Klass* holder_klass = holder->get_Klass ();
769
- Method* dest_method;
770
- LinkInfo link_info (holder_klass, name, sig, accessor_klass, LinkInfo::AccessCheck::required, LinkInfo::LoaderConstraintCheck::required, tag);
766
+
767
+ // Accessibility checks are performed in ciEnv::get_method_by_index_impl.
768
+ assert (check_klass_accessibility (accessor, holder_klass), " holder not accessible" );
769
+
770
+ LinkInfo link_info (holder_klass, name, sig, accessor_klass,
771
+ LinkInfo::AccessCheck::required,
772
+ LinkInfo::LoaderConstraintCheck::required,
773
+ tag);
771
774
switch (bc) {
772
- case Bytecodes::_invokestatic:
773
- dest_method =
774
- LinkResolver::resolve_static_call_or_null (link_info);
775
- break ;
776
- case Bytecodes::_invokespecial:
777
- dest_method =
778
- LinkResolver::resolve_special_call_or_null (link_info);
779
- break ;
780
- case Bytecodes::_invokeinterface:
781
- dest_method =
782
- LinkResolver::linktime_resolve_interface_method_or_null (link_info);
783
- break ;
784
- case Bytecodes::_invokevirtual:
785
- dest_method =
786
- LinkResolver::linktime_resolve_virtual_method_or_null (link_info);
787
- break ;
788
- default : ShouldNotReachHere ();
775
+ case Bytecodes::_invokestatic:
776
+ return LinkResolver::resolve_static_call_or_null (link_info);
777
+ case Bytecodes::_invokespecial:
778
+ return LinkResolver::resolve_special_call_or_null (link_info);
779
+ case Bytecodes::_invokeinterface:
780
+ return LinkResolver::linktime_resolve_interface_method_or_null (link_info);
781
+ case Bytecodes::_invokevirtual:
782
+ return LinkResolver::linktime_resolve_virtual_method_or_null (link_info);
783
+ default :
784
+ fatal (" Unhandled bytecode: %s" , Bytecodes::name (bc));
785
+ return NULL ; // silence compiler warnings
789
786
}
790
-
791
- return dest_method;
792
787
}
793
788
794
789
0 commit comments