1.1 --- a/src/share/vm/prims/jvmtiClassFileReconstituter.cpp Mon Apr 20 14:48:03 2009 -0700 1.2 +++ b/src/share/vm/prims/jvmtiClassFileReconstituter.cpp Tue Apr 21 23:21:04 2009 -0700 1.3 @@ -659,15 +659,21 @@ 1.4 case Bytecodes::_invokevirtual : // fall through 1.5 case Bytecodes::_invokespecial : // fall through 1.6 case Bytecodes::_invokestatic : // fall through 1.7 + case Bytecodes::_invokedynamic : // fall through 1.8 case Bytecodes::_invokeinterface : 1.9 assert(len == 3 || (code == Bytecodes::_invokeinterface && len ==5), 1.10 "sanity check"); 1.11 + int cpci = Bytes::get_native_u2(bcp+1); 1.12 + bool is_invokedynamic = (EnableInvokeDynamic && code == Bytecodes::_invokedynamic); 1.13 + if (is_invokedynamic) 1.14 + cpci = Bytes::get_native_u4(bcp+1); 1.15 // cache cannot be pre-fetched since some classes won't have it yet 1.16 ConstantPoolCacheEntry* entry = 1.17 - mh->constants()->cache()->entry_at(Bytes::get_native_u2(bcp+1)); 1.18 + mh->constants()->cache()->main_entry_at(cpci); 1.19 int i = entry->constant_pool_index(); 1.20 assert(i < mh->constants()->length(), "sanity check"); 1.21 Bytes::put_Java_u2((address)(p+1), (u2)i); // java byte ordering 1.22 + if (is_invokedynamic) *(p+3) = *(p+4) = 0; 1.23 break; 1.24 } 1.25 }