< 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.

*** 82,11 ***
    bool compute_injected_fields_helper();
    void compute_transitive_interfaces();
  
  protected:
    ciInstanceKlass(Klass* k);
!   ciInstanceKlass(ciSymbol* name, jobject loader, jobject protection_domain);
  
    InstanceKlass* get_instanceKlass() const {
      return InstanceKlass::cast(get_Klass());
    }
  
--- 83,11 ---
    bool compute_injected_fields_helper();
    void compute_transitive_interfaces();
  
  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());
    }
  

*** 106,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);
    bool compute_has_trusted_loader();
  
    // Update the init_state for shared klasses
    void update_if_shared(InstanceKlass::ClassState expected) {
      if (_is_shared && _init_state != expected) {
--- 107,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);
    bool compute_has_trusted_loader();
  
    // Update the init_state for shared klasses
    void update_if_shared(InstanceKlass::ClassState expected) {
      if (_is_shared && _init_state != expected) {

*** 205,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 == nullptr)
        return compute_nonstatic_fields();
!     else
        return _nonstatic_fields->length();
    }
  
    bool has_injected_fields() {
      if (_has_injected_fields == -1) {
        compute_injected_fields();
--- 206,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_flat_field_by_offset(int field_offset);
  
    // total number of nonstatic fields (including inherited):
    int nof_nonstatic_fields() {
!     if (_nonstatic_fields == nullptr) {
        return compute_nonstatic_fields();
!     } else {
        return _nonstatic_fields->length();
+     }
    }
  
    bool has_injected_fields() {
      if (_has_injected_fields == -1) {
        compute_injected_fields();

*** 242,11 ***
    ciInstance*            java_mirror();
  
    // Java access flags
    bool is_public      () { return flags().is_public(); }
    bool is_final       () { return flags().is_final(); }
-   bool is_super       () { return flags().is_super(); }
    bool is_interface   () { return flags().is_interface(); }
    bool is_abstract    () { return flags().is_abstract(); }
  
    ciMethod* find_method(ciSymbol* name, ciSymbol* signature);
    // Note:  To find a method from name and type strings, use ciSymbol::make,
--- 246,10 ---

*** 259,10 ***
--- 262,12 ---
      assert(is_loaded(), "must be loaded");
      ciInstanceKlass* impl = implementor();
      return (impl != this ? impl : nullptr);
    }
  
+   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 >