--- a/hotspot/src/share/vm/ci/ciCPCache.cpp Mon Jun 07 14:17:01 2010 -0700
+++ b/hotspot/src/share/vm/ci/ciCPCache.cpp Wed Jun 09 18:50:45 2010 -0700
@@ -44,13 +44,23 @@
// ciCPCache::is_f1_null_at
bool ciCPCache::is_f1_null_at(int index) {
VM_ENTRY_MARK;
- constantPoolCacheOop cpcache = (constantPoolCacheOop) get_oop();
- oop f1 = cpcache->secondary_entry_at(index)->f1();
+ oop f1 = entry_at(index)->f1();
return (f1 == NULL);
}
// ------------------------------------------------------------------
+// ciCPCache::get_pool_index
+int ciCPCache::get_pool_index(int index) {
+ VM_ENTRY_MARK;
+ ConstantPoolCacheEntry* e = entry_at(index);
+ if (e->is_secondary_entry())
+ e = entry_at(e->main_entry_index());
+ return e->constant_pool_index();
+}
+
+
+// ------------------------------------------------------------------
// ciCPCache::print
//
// Print debugging information about the cache.