1.1 --- a/src/share/vm/interpreter/rewriter.cpp Fri Oct 30 10:12:52 2009 -0700 1.2 +++ b/src/share/vm/interpreter/rewriter.cpp Fri Oct 30 16:22:59 2009 -0700 1.3 @@ -48,16 +48,6 @@ 1.4 } 1.5 1.6 1.7 -int Rewriter::add_extra_cp_cache_entry(int main_entry) { 1.8 - // Hack: We put it on the map as an encoded value. 1.9 - // The only place that consumes this is ConstantPoolCacheEntry::set_initial_state 1.10 - int encoded = constantPoolCacheOopDesc::encode_secondary_index(main_entry); 1.11 - int plain_secondary_index = _cp_cache_map.append(encoded); 1.12 - return constantPoolCacheOopDesc::encode_secondary_index(plain_secondary_index); 1.13 -} 1.14 - 1.15 - 1.16 - 1.17 // Creates a constant pool cache given a CPC map 1.18 // This creates the constant pool cache initially in a state 1.19 // that is unsafe for concurrent GC processing but sets it to 1.20 @@ -127,7 +117,7 @@ 1.21 assert(p[-1] == Bytecodes::_invokedynamic, ""); 1.22 int cp_index = Bytes::get_Java_u2(p); 1.23 int cpc = maybe_add_cp_cache_entry(cp_index); // add lazily 1.24 - int cpc2 = add_extra_cp_cache_entry(cpc); 1.25 + int cpc2 = add_secondary_cp_cache_entry(cpc); 1.26 1.27 // Replace the trailing four bytes with a CPC index for the dynamic 1.28 // call site. Unlike other CPC entries, there is one per bytecode, 1.29 @@ -137,7 +127,7 @@ 1.30 // all these entries. That is the main reason invokedynamic 1.31 // must have a five-byte instruction format. (Of course, other JVM 1.32 // implementations can use the bytes for other purposes.) 1.33 - Bytes::put_native_u4(p, cpc2); 1.34 + Bytes::put_native_u4(p, constantPoolCacheOopDesc::encode_secondary_index(cpc2)); 1.35 // Note: We use native_u4 format exclusively for 4-byte indexes. 1.36 } 1.37