hotspot/src/share/vm/interpreter/linkResolver.cpp
changeset 34238 60e87df08f1e
parent 34229 892795cc82fe
child 34666 1c7168ea0034
child 35086 bbf32241d851
--- a/hotspot/src/share/vm/interpreter/linkResolver.cpp	Wed Nov 18 22:00:09 2015 +0000
+++ b/hotspot/src/share/vm/interpreter/linkResolver.cpp	Thu Nov 19 10:34:11 2015 -0800
@@ -245,7 +245,6 @@
   // Get name, signature, and static klass
   _name          = pool->name_ref_at(index);
   _signature     = pool->signature_ref_at(index);
-  _tag           = pool->tag_ref_at(index);
   _current_klass = KlassHandle(THREAD, pool->pool_holder());
 
   // Coming from the constant pool always checks access
@@ -682,15 +681,6 @@
     THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), buf);
   }
 
-  // check tag at call is method
-  if (!link_info.tag().is_invalid() && !link_info.tag().is_method()) {
-    ResourceMark rm(THREAD);
-    char buf[200];
-    jio_snprintf(buf, sizeof(buf), "Resolving to non regular method %s", link_info.method_string());
-    THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), buf);
-  }
-
-
   // 2. lookup method in resolved klass and its super klasses
   methodHandle resolved_method = lookup_method_in_klasses(link_info, true, false, CHECK_NULL);
 
@@ -750,14 +740,6 @@
     THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), buf);
   }
 
-  // check tag at call is an interface method
-  if (!link_info.tag().is_invalid() && !link_info.tag().is_interface_method()) {
-    ResourceMark rm(THREAD);
-    char buf[200];
-    jio_snprintf(buf, sizeof(buf), "Resolving to non interface method %s", link_info.method_string());
-    THROW_MSG_NULL(vmSymbols::java_lang_IncompatibleClassChangeError(), buf);
-  }
-
   // lookup method in this interface or its super, java.lang.Object
   // JDK8: also look for static methods
   methodHandle resolved_method = lookup_method_in_klasses(link_info, false, true, CHECK_NULL);
@@ -935,8 +917,7 @@
     resolved_klass->initialize(CHECK);
     // Use updated LinkInfo (to reresolve with resolved_klass as method_holder?)
     LinkInfo new_info(resolved_klass, link_info.name(), link_info.signature(),
-                      link_info.current_klass(),
-                      link_info.check_access() ? LinkInfo::needs_access_check : LinkInfo::skip_access_check);
+                      link_info.current_klass(), link_info.check_access());
     resolved_method = linktime_resolve_static_method(new_info, CHECK);
   }