1.1 --- a/src/share/vm/interpreter/bytecode.cpp Mon Apr 20 14:48:03 2009 -0700 1.2 +++ b/src/share/vm/interpreter/bytecode.cpp Tue Apr 21 23:21:04 2009 -0700 1.3 @@ -34,12 +34,6 @@ 1.4 } 1.5 1.6 1.7 -void Bytecode::set_fast_index(int i) { 1.8 - assert(0 <= i && i < 0x10000, "illegal index value"); 1.9 - Bytes::put_native_u2(addr_at(1), (jushort)i); 1.10 -} 1.11 - 1.12 - 1.13 bool Bytecode::check_must_rewrite() const { 1.14 assert(Bytecodes::can_rewrite(code()), "post-check only"); 1.15 1.16 @@ -118,7 +112,12 @@ 1.17 1.18 1.19 int Bytecode_invoke::index() const { 1.20 - return Bytes::get_Java_u2(bcp() + 1); 1.21 + // Note: Rewriter::rewrite changes the Java_u2 of an invokedynamic to a native_u4, 1.22 + // at the same time it allocates per-call-site CP cache entries. 1.23 + if (has_giant_index()) 1.24 + return Bytes::get_native_u4(bcp() + 1); 1.25 + else 1.26 + return Bytes::get_Java_u2(bcp() + 1); 1.27 } 1.28 1.29