--- old/src/share/vm/ci/ciStreams.cpp 2009-12-02 17:37:47.473768262 +0100 +++ new/src/share/vm/ci/ciStreams.cpp 2009-12-02 17:37:47.351373063 +0100 @@ -321,7 +321,7 @@ // // If this is a method invocation bytecode, get the invoked method. ciMethod* ciBytecodeStream::get_method(bool& will_link) { - ciMethod* m = CURRENT_ENV->get_method_by_index(_holder, get_method_index(),cur_bc()); + ciMethod* m = CURRENT_ENV->get_method_by_index(_holder, get_method_index(), cur_bc()); will_link = m->is_loaded(); return m; } @@ -370,3 +370,14 @@ int name_and_type_index = cpool->name_and_type_ref_index_at(method_index); return cpool->signature_ref_index_at(name_and_type_index); } + +// ------------------------------------------------------------------ +// ciBytecodeStream::get_cpcache +ciCPCache* ciBytecodeStream::get_cpcache() { + VM_ENTRY_MARK; + // Get the constant pool. + constantPoolOop cpool = _holder->get_instanceKlass()->constants(); + constantPoolCacheOop cpcache = cpool->cache(); + + return CURRENT_ENV->get_object(cpcache)->as_cpcache(); +}