diff src/share/vm/ci/ciCPCache.hpp @ 1608:2389669474a6

Merge
author jrose
date Tue, 15 Jun 2010 15:57:36 -0700
parents 136b78722a08
children f95d63e2154a
line wrap: on
line diff
--- a/src/share/vm/ci/ciCPCache.hpp	Thu Jun 10 08:27:35 2010 -0700
+++ b/src/share/vm/ci/ciCPCache.hpp	Tue Jun 15 15:57:36 2010 -0700
@@ -29,6 +29,18 @@
 // Note: This class is called ciCPCache as ciConstantPoolCache is used
 // for something different.
 class ciCPCache : public ciObject {
+private:
+  constantPoolCacheOop get_cpCacheOop() {   // must be called inside a VM_ENTRY_MARK
+    return (constantPoolCacheOop) get_oop();
+  }
+
+  ConstantPoolCacheEntry* entry_at(int i) {
+    int raw_index = i;
+    if (constantPoolCacheOopDesc::is_secondary_index(i))
+      raw_index = constantPoolCacheOopDesc::decode_secondary_index(i);
+    return get_cpCacheOop()->entry_at(raw_index);
+  }
+
 public:
   ciCPCache(constantPoolCacheHandle cpcache) : ciObject(cpcache) {}
 
@@ -41,5 +53,7 @@
 
   bool is_f1_null_at(int index);
 
+  int get_pool_index(int index);
+
   void print();
 };