< prev index next >

src/hotspot/share/ci/ciInstanceKlass.hpp

Print this page
*** 67,10 ***
--- 67,11 ---
    ciInstanceKlass*       _super;
    ciInstance*            _java_mirror;
  
    ciConstantPoolCache*   _field_cache;  // cached map index->field
    GrowableArray<ciField*>* _nonstatic_fields;
+ 
    int                    _has_injected_fields; // any non static injected fields? lazily initialized.
  
    // The possible values of the _implementor fall into following three cases:
    //   NULL: no implementor.
    //   A ciInstanceKlass that's not itself: one implementor.

*** 80,11 ***
    void compute_injected_fields();
    bool compute_injected_fields_helper();
  
  protected:
    ciInstanceKlass(Klass* k);
!   ciInstanceKlass(ciSymbol* name, jobject loader, jobject protection_domain);
  
    InstanceKlass* get_instanceKlass() const {
      return InstanceKlass::cast(get_Klass());
    }
  
--- 81,11 ---
    void compute_injected_fields();
    bool compute_injected_fields_helper();
  
  protected:
    ciInstanceKlass(Klass* k);
!   ciInstanceKlass(ciSymbol* name, jobject loader, jobject protection_domain, BasicType bt = T_OBJECT); // for unloaded klasses
  
    InstanceKlass* get_instanceKlass() const {
      return InstanceKlass::cast(get_Klass());
    }
  

*** 104,12 ***
  
    bool is_shared() { return _is_shared; }
  
    void compute_shared_init_state();
    bool compute_shared_has_subklass();
!   int  compute_nonstatic_fields();
!   GrowableArray<ciField*>* compute_nonstatic_fields_impl(GrowableArray<ciField*>* super_fields);
  
    // Update the init_state for shared klasses
    void update_if_shared(InstanceKlass::ClassState expected) {
      if (_is_shared && _init_state != expected) {
        if (is_loaded()) compute_shared_init_state();
--- 105,12 ---
  
    bool is_shared() { return _is_shared; }
  
    void compute_shared_init_state();
    bool compute_shared_has_subklass();
!   virtual int compute_nonstatic_fields();
!   GrowableArray<ciField*>* compute_nonstatic_fields_impl(GrowableArray<ciField*>* super_fields, bool flatten = true);
  
    // Update the init_state for shared klasses
    void update_if_shared(InstanceKlass::ClassState expected) {
      if (_is_shared && _init_state != expected) {
        if (is_loaded()) compute_shared_init_state();

*** 208,17 ***
    }
  
    ciInstanceKlass* get_canonical_holder(int offset);
    ciField* get_field_by_offset(int field_offset, bool is_static);
    ciField* get_field_by_name(ciSymbol* name, ciSymbol* signature, bool is_static);
  
    // total number of nonstatic fields (including inherited):
    int nof_nonstatic_fields() {
!     if (_nonstatic_fields == NULL)
        return compute_nonstatic_fields();
!     else
        return _nonstatic_fields->length();
    }
  
    bool has_injected_fields() {
      if (_has_injected_fields == -1) {
        compute_injected_fields();
--- 209,20 ---
    }
  
    ciInstanceKlass* get_canonical_holder(int offset);
    ciField* get_field_by_offset(int field_offset, bool is_static);
    ciField* get_field_by_name(ciSymbol* name, ciSymbol* signature, bool is_static);
+   // get field descriptor at field_offset ignoring flattening
+   ciField* get_non_flattened_field_by_offset(int field_offset);
  
    // total number of nonstatic fields (including inherited):
    int nof_nonstatic_fields() {
!     if (_nonstatic_fields == NULL) {
        return compute_nonstatic_fields();
!     } else {
        return _nonstatic_fields->length();
+     }
    }
  
    bool has_injected_fields() {
      if (_has_injected_fields == -1) {
        compute_injected_fields();

*** 262,10 ***
--- 266,12 ---
      assert(is_loaded(), "must be loaded");
      ciInstanceKlass* impl = implementor();
      return (impl != this ? impl : NULL);
    }
  
+   virtual bool can_be_inline_klass(bool is_exact = false);
+ 
    // Is the defining class loader of this class the default loader?
    bool uses_default_loader() const;
  
    bool is_java_lang_Object() const;
  
< prev index next >