src/share/vm/ci/ciCPCache.hpp

changeset 1957
136b78722a08
parent 1907
c18cbe5936b8
child 2314
f95d63e2154a
     1.1 --- a/src/share/vm/ci/ciCPCache.hpp	Mon Jun 07 14:17:01 2010 -0700
     1.2 +++ b/src/share/vm/ci/ciCPCache.hpp	Wed Jun 09 18:50:45 2010 -0700
     1.3 @@ -29,6 +29,18 @@
     1.4  // Note: This class is called ciCPCache as ciConstantPoolCache is used
     1.5  // for something different.
     1.6  class ciCPCache : public ciObject {
     1.7 +private:
     1.8 +  constantPoolCacheOop get_cpCacheOop() {   // must be called inside a VM_ENTRY_MARK
     1.9 +    return (constantPoolCacheOop) get_oop();
    1.10 +  }
    1.11 +
    1.12 +  ConstantPoolCacheEntry* entry_at(int i) {
    1.13 +    int raw_index = i;
    1.14 +    if (constantPoolCacheOopDesc::is_secondary_index(i))
    1.15 +      raw_index = constantPoolCacheOopDesc::decode_secondary_index(i);
    1.16 +    return get_cpCacheOop()->entry_at(raw_index);
    1.17 +  }
    1.18 +
    1.19  public:
    1.20    ciCPCache(constantPoolCacheHandle cpcache) : ciObject(cpcache) {}
    1.21  
    1.22 @@ -41,5 +53,7 @@
    1.23  
    1.24    bool is_f1_null_at(int index);
    1.25  
    1.26 +  int get_pool_index(int index);
    1.27 +
    1.28    void print();
    1.29  };

mercurial