1.1 --- a/src/share/vm/prims/methodHandleWalk.cpp Thu Jun 02 13:36:11 2011 -0700 1.2 +++ b/src/share/vm/prims/methodHandleWalk.cpp Fri Jun 03 22:31:43 2011 -0700 1.3 @@ -178,6 +178,12 @@ 1.4 return "unknown_op"; 1.5 } 1.6 1.7 +void MethodHandleChain::print(oopDesc* m) { 1.8 + HandleMark hm; 1.9 + ResourceMark rm; 1.10 + Handle mh(m); 1.11 + print(mh); 1.12 +} 1.13 1.14 void MethodHandleChain::print(Handle mh) { 1.15 EXCEPTION_MARK; 1.16 @@ -414,8 +420,7 @@ 1.17 assert(dest == T_OBJECT, ""); 1.18 ArgToken arg = _outgoing.at(arg_slot); 1.19 assert(dest == arg.basic_type(), ""); 1.20 - ArgToken new_arg = make_conversion(T_OBJECT, dest_klass, Bytecodes::_checkcast, arg, CHECK_(empty)); 1.21 - assert(!arg.has_index() || arg.index() == new_arg.index(), "should be the same index"); 1.22 + arg = make_conversion(T_OBJECT, dest_klass, Bytecodes::_checkcast, arg, CHECK_(empty)); 1.23 debug_only(dest_klass = (klassOop)badOop); 1.24 break; 1.25 } 1.26 @@ -1248,8 +1253,9 @@ 1.27 index = src.index(); 1.28 } 1.29 emit_bc(op, cpool_klass_put(tk)); 1.30 - if (index == -1) 1.31 - index = new_local_index(type); 1.32 + // Allocate a new local for the type so that we don't hide the 1.33 + // previous type from the verifier. 1.34 + index = new_local_index(type); 1.35 emit_store(srctype, index); 1.36 break; 1.37