diff src/share/vm/prims/methodComparator.cpp @ 1573:beb77f0d41b3

6957004: MethodComparator uses the wrong CP index accessor Summary: Change two uses of get_index_u2 to get_index_u2_cpcache; also tweak some debugging print functions Reviewed-by: kvn
author jrose
date Fri, 28 May 2010 16:23:51 -0700
parents ab102d5d923e
children 1eb493f33423
line wrap: on
line diff
--- a/src/share/vm/prims/methodComparator.cpp	Thu May 27 22:01:55 2010 -0700
+++ b/src/share/vm/prims/methodComparator.cpp	Fri May 28 16:23:51 2010 -0700
@@ -149,8 +149,8 @@
   case Bytecodes::_invokestatic    : // fall through
   case Bytecodes::_invokedynamic   : // fall through
   case Bytecodes::_invokeinterface : {
-    u2 cpci_old = _s_old->has_index_u4() ? _s_old->get_index_u4() : _s_old->get_index_u2();
-    u2 cpci_new = _s_new->has_index_u4() ? _s_new->get_index_u4() : _s_new->get_index_u2();
+    int cpci_old = _s_old->has_index_u4() ? _s_old->get_index_u4() : _s_old->get_index_u2_cpcache();
+    int cpci_new = _s_new->has_index_u4() ? _s_new->get_index_u4() : _s_new->get_index_u2_cpcache();
     // Check if the names of classes, field/method names and signatures at these indexes
     // are the same. Indices which are really into constantpool cache (rather than constant
     // pool itself) are accepted by the constantpool query routines below.