hotspot/src/share/vm/ci/ciCPCache.hpp
changeset 5882 6b2aecc4f7d8
parent 5547 f4b087cbb361
child 7397 5b173b4ca846
equal deleted inserted replaced
5708:e92b3d8118f1 5882:6b2aecc4f7d8
    27 // This class represents a constant pool cache.
    27 // This class represents a constant pool cache.
    28 //
    28 //
    29 // Note: This class is called ciCPCache as ciConstantPoolCache is used
    29 // Note: This class is called ciCPCache as ciConstantPoolCache is used
    30 // for something different.
    30 // for something different.
    31 class ciCPCache : public ciObject {
    31 class ciCPCache : public ciObject {
       
    32 private:
       
    33   constantPoolCacheOop get_cpCacheOop() {   // must be called inside a VM_ENTRY_MARK
       
    34     return (constantPoolCacheOop) get_oop();
       
    35   }
       
    36 
       
    37   ConstantPoolCacheEntry* entry_at(int i) {
       
    38     int raw_index = i;
       
    39     if (constantPoolCacheOopDesc::is_secondary_index(i))
       
    40       raw_index = constantPoolCacheOopDesc::decode_secondary_index(i);
       
    41     return get_cpCacheOop()->entry_at(raw_index);
       
    42   }
       
    43 
    32 public:
    44 public:
    33   ciCPCache(constantPoolCacheHandle cpcache) : ciObject(cpcache) {}
    45   ciCPCache(constantPoolCacheHandle cpcache) : ciObject(cpcache) {}
    34 
    46 
    35   // What kind of ciObject is this?
    47   // What kind of ciObject is this?
    36   bool is_cpcache() const { return true; }
    48   bool is_cpcache() const { return true; }
    39   // requested entry.
    51   // requested entry.
    40   size_t get_f1_offset(int index);
    52   size_t get_f1_offset(int index);
    41 
    53 
    42   bool is_f1_null_at(int index);
    54   bool is_f1_null_at(int index);
    43 
    55 
       
    56   int get_pool_index(int index);
       
    57 
    44   void print();
    58   void print();
    45 };
    59 };