diff src/share/vm/ci/ciStreams.cpp @ 1137:97125851f396

6829187: compiler optimizations required for JSR 292 Summary: C2 implementation for invokedynamic support. Reviewed-by: kvn, never
author twisti
date Tue, 05 Jan 2010 13:05:58 +0100
parents e66fd840cb6b
children dd57230ba8fe
line wrap: on
line diff
--- a/src/share/vm/ci/ciStreams.cpp	Mon Jan 04 15:21:09 2010 -0800
+++ b/src/share/vm/ci/ciStreams.cpp	Tue Jan 05 13:05:58 2010 +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();
+}