hotspot/src/share/vm/interpreter/linkResolver.hpp
changeset 46727 6e4a84748e2c
parent 46505 fd4bc78630b1
equal deleted inserted replaced
46726:7801367e3cc9 46727:6e4a84748e2c
   150   enum AccessCheck {
   150   enum AccessCheck {
   151     needs_access_check,
   151     needs_access_check,
   152     skip_access_check
   152     skip_access_check
   153   };
   153   };
   154 
   154 
   155   LinkInfo(const constantPoolHandle& pool, int index, methodHandle current_method, TRAPS);
   155   LinkInfo(const constantPoolHandle& pool, int index, const methodHandle& current_method, TRAPS);
   156   LinkInfo(const constantPoolHandle& pool, int index, TRAPS);
   156   LinkInfo(const constantPoolHandle& pool, int index, TRAPS);
   157 
   157 
   158   // Condensed information from other call sites within the vm.
   158   // Condensed information from other call sites within the vm.
   159   LinkInfo(Klass* resolved_klass, Symbol* name, Symbol* signature, Klass* current_klass,
   159   LinkInfo(Klass* resolved_klass, Symbol* name, Symbol* signature, Klass* current_klass,
   160            AccessCheck check_access = needs_access_check,
   160            AccessCheck check_access = needs_access_check,
   161            constantTag tag = JVM_CONSTANT_Invalid) :
   161            constantTag tag = JVM_CONSTANT_Invalid) :
   162     _resolved_klass(resolved_klass),
   162     _resolved_klass(resolved_klass),
   163     _name(name), _signature(signature), _current_klass(current_klass), _current_method(methodHandle()),
   163     _name(name), _signature(signature), _current_klass(current_klass), _current_method(methodHandle()),
   164     _check_access(check_access == needs_access_check), _tag(tag) {}
   164     _check_access(check_access == needs_access_check), _tag(tag) {}
   165 
   165 
   166   LinkInfo(Klass* resolved_klass, Symbol* name, Symbol* signature, methodHandle current_method,
   166   LinkInfo(Klass* resolved_klass, Symbol* name, Symbol* signature, const methodHandle& current_method,
   167            AccessCheck check_access = needs_access_check,
   167            AccessCheck check_access = needs_access_check,
   168            constantTag tag = JVM_CONSTANT_Invalid) :
   168            constantTag tag = JVM_CONSTANT_Invalid) :
   169     _resolved_klass(resolved_klass),
   169     _resolved_klass(resolved_klass),
   170     _name(name), _signature(signature), _current_klass(current_method->method_holder()), _current_method(current_method),
   170     _name(name), _signature(signature), _current_klass(current_method->method_holder()), _current_method(current_method),
   171     _check_access(check_access == needs_access_check), _tag(tag) {}
   171     _check_access(check_access == needs_access_check), _tag(tag) {}
   199   friend class klassVtable;
   199   friend class klassVtable;
   200   friend class klassItable;
   200   friend class klassItable;
   201 
   201 
   202  private:
   202  private:
   203 
   203 
   204   static methodHandle lookup_method_in_klasses(const LinkInfo& link_info,
   204   static Method* lookup_method_in_klasses(const LinkInfo& link_info,
   205                                                bool checkpolymorphism,
   205                                           bool checkpolymorphism,
   206                                                bool in_imethod_resolve, TRAPS);
   206                                           bool in_imethod_resolve);
   207   static methodHandle lookup_method_in_interfaces(const LinkInfo& link_info, TRAPS);
   207   static Method* lookup_method_in_interfaces(const LinkInfo& link_info);
       
   208 
   208   static methodHandle lookup_polymorphic_method(const LinkInfo& link_info,
   209   static methodHandle lookup_polymorphic_method(const LinkInfo& link_info,
   209                                                 Handle *appendix_result_or_null,
   210                                                 Handle *appendix_result_or_null,
   210                                                 Handle *method_type_result, TRAPS);
   211                                                 Handle *method_type_result, TRAPS);
   211  JVMCI_ONLY(public:) // Needed for CompilerToVM.resolveMethod()
   212  JVMCI_ONLY(public:) // Needed for CompilerToVM.resolveMethod()
   212   // Not Linktime so doesn't take LinkInfo
   213   // Not Linktime so doesn't take LinkInfo