diff src/share/vm/oops/constantPool.cpp @ 12850:28ca974cc21a

8022592: assert at constantTag.cpp:57: ShouldNotReachHere() Summary: more missing cases for JVM_CONSTANT_Method{Handle,Type}InError Reviewed-by: hseigel, dcubed
author coleenp
date Fri, 11 Oct 2013 11:23:49 -0400
parents b4a4fdc1f464
children b8860472c377
line wrap: on
line diff
--- a/src/share/vm/oops/constantPool.cpp	Fri Oct 11 13:48:02 2013 +0200
+++ b/src/share/vm/oops/constantPool.cpp	Fri Oct 11 11:23:49 2013 -0400
@@ -864,32 +864,14 @@
 }
 
 
-jbyte normalize_error_tag(jbyte tag) {
-  switch (tag) {
-  case JVM_CONSTANT_UnresolvedClassInError:
-    return JVM_CONSTANT_UnresolvedClass;
-  case JVM_CONSTANT_MethodHandleInError:
-    return JVM_CONSTANT_MethodHandle;
-  case JVM_CONSTANT_MethodTypeInError:
-    return JVM_CONSTANT_MethodType;
-  default:
-    return tag;
-  }
-}
-
 // Compare this constant pool's entry at index1 to the constant pool
 // cp2's entry at index2.
 bool ConstantPool::compare_entry_to(int index1, constantPoolHandle cp2,
        int index2, TRAPS) {
 
-  jbyte t1 = tag_at(index1).value();
-  jbyte t2 = cp2->tag_at(index2).value();
-
-
-  // JVM_CONSTANT_UnresolvedClassInError tag is equal to JVM_CONSTANT_UnresolvedClass
-  // when comparing (and the other error tags)
-  t1 = normalize_error_tag(t1);
-  t2 = normalize_error_tag(t2);
+  // The error tags are equivalent to non-error tags when comparing
+  jbyte t1 = tag_at(index1).non_error_value();
+  jbyte t2 = cp2->tag_at(index2).non_error_value();
 
   if (t1 != t2) {
     // Not the same entry type so there is nothing else to check. Note