< prev index next >

src/share/vm/interpreter/linkResolver.hpp

Print this page




 157 
 158 // Link information for getfield/putfield & getstatic/putstatic bytecodes
 159 // is represented using a fieldDescriptor.
 160 
 161 // The LinkResolver is used to resolve constant-pool references at run-time.
 162 // It does all necessary link-time checks & throws exceptions if necessary.
 163 
 164 class LinkResolver: AllStatic {
 165   friend class klassVtable;
 166   friend class klassItable;
 167 
 168  private:
 169 
 170   static methodHandle lookup_method_in_klasses(const LinkInfo& link_info,
 171                                                bool checkpolymorphism,
 172                                                bool in_imethod_resolve, TRAPS);
 173   static methodHandle lookup_method_in_interfaces(const LinkInfo& link_info, TRAPS);
 174   static methodHandle lookup_polymorphic_method(const LinkInfo& link_info,
 175                                                 Handle *appendix_result_or_null,
 176                                                 Handle *method_type_result, TRAPS);

 177   // Not Linktime so doesn't take LinkInfo
 178   static methodHandle lookup_instance_method_in_klasses (
 179                                        KlassHandle klass, Symbol* name, Symbol* signature, TRAPS);

 180 
 181   // Similar loader constraint checking functions that throw
 182   // LinkageError with descriptive message.
 183   static void check_method_loader_constraints(const LinkInfo& link_info,
 184                                               const methodHandle& resolved_method,
 185                                               const char* method_type, TRAPS);
 186   static void check_field_loader_constraints(Symbol* field, Symbol* sig,
 187                                              KlassHandle current_klass,
 188                                              KlassHandle sel_klass, TRAPS);
 189 
 190   static methodHandle resolve_interface_method(const LinkInfo& link_info, bool nostatics, TRAPS);
 191   static methodHandle resolve_method          (const LinkInfo& link_info, bool require_methodref, TRAPS);
 192 
 193   static methodHandle linktime_resolve_static_method    (const LinkInfo& link_info, TRAPS);
 194   static methodHandle linktime_resolve_special_method   (const LinkInfo& link_info, TRAPS);
 195   static methodHandle linktime_resolve_virtual_method   (const LinkInfo& link_info, TRAPS);
 196   static methodHandle linktime_resolve_interface_method (const LinkInfo& link_info, TRAPS);
 197 
 198   static void runtime_resolve_special_method    (CallInfo& result,
 199                                                  const methodHandle& resolved_method,




 157 
 158 // Link information for getfield/putfield & getstatic/putstatic bytecodes
 159 // is represented using a fieldDescriptor.
 160 
 161 // The LinkResolver is used to resolve constant-pool references at run-time.
 162 // It does all necessary link-time checks & throws exceptions if necessary.
 163 
 164 class LinkResolver: AllStatic {
 165   friend class klassVtable;
 166   friend class klassItable;
 167 
 168  private:
 169 
 170   static methodHandle lookup_method_in_klasses(const LinkInfo& link_info,
 171                                                bool checkpolymorphism,
 172                                                bool in_imethod_resolve, TRAPS);
 173   static methodHandle lookup_method_in_interfaces(const LinkInfo& link_info, TRAPS);
 174   static methodHandle lookup_polymorphic_method(const LinkInfo& link_info,
 175                                                 Handle *appendix_result_or_null,
 176                                                 Handle *method_type_result, TRAPS);
 177  JVMCI_ONLY(public:) // Needed for CompilerToVM.resolveMethod()
 178   // Not Linktime so doesn't take LinkInfo
 179   static methodHandle lookup_instance_method_in_klasses (
 180                                        KlassHandle klass, Symbol* name, Symbol* signature, TRAPS);
 181  JVMCI_ONLY(private:)
 182 
 183   // Similar loader constraint checking functions that throw
 184   // LinkageError with descriptive message.
 185   static void check_method_loader_constraints(const LinkInfo& link_info,
 186                                               const methodHandle& resolved_method,
 187                                               const char* method_type, TRAPS);
 188   static void check_field_loader_constraints(Symbol* field, Symbol* sig,
 189                                              KlassHandle current_klass,
 190                                              KlassHandle sel_klass, TRAPS);
 191 
 192   static methodHandle resolve_interface_method(const LinkInfo& link_info, bool nostatics, TRAPS);
 193   static methodHandle resolve_method          (const LinkInfo& link_info, bool require_methodref, TRAPS);
 194 
 195   static methodHandle linktime_resolve_static_method    (const LinkInfo& link_info, TRAPS);
 196   static methodHandle linktime_resolve_special_method   (const LinkInfo& link_info, TRAPS);
 197   static methodHandle linktime_resolve_virtual_method   (const LinkInfo& link_info, TRAPS);
 198   static methodHandle linktime_resolve_interface_method (const LinkInfo& link_info, TRAPS);
 199 
 200   static void runtime_resolve_special_method    (CallInfo& result,
 201                                                  const methodHandle& resolved_method,


< prev index next >