--- old/src/hotspot/share/ci/ciInstanceKlass.hpp 2019-03-11 14:25:22.302355762 +0100 +++ new/src/hotspot/share/ci/ciInstanceKlass.hpp 2019-03-11 14:25:22.082355765 +0100 @@ -67,8 +67,11 @@ ciConstantPoolCache* _field_cache; // cached map index->field GrowableArray* _nonstatic_fields; + int _has_injected_fields; // any non static injected fields? lazily initialized. + ciInstanceKlass* _vcc_klass; // points to the value-capable class corresponding to the current derived value type class. + // The possible values of the _implementor fall into following three cases: // NULL: no implementor. // A ciInstanceKlass that's not itself: one implementor. @@ -80,7 +83,7 @@ protected: ciInstanceKlass(Klass* k); - ciInstanceKlass(ciSymbol* name, jobject loader, jobject protection_domain); + 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,8 +107,8 @@ void compute_shared_init_state(); bool compute_shared_has_subklass(); - int compute_nonstatic_fields(); - GrowableArray* compute_nonstatic_fields_impl(GrowableArray* super_fields); + virtual int compute_nonstatic_fields(); + GrowableArray* compute_nonstatic_fields_impl(GrowableArray* super_fields, bool flatten = true); // Update the init_state for shared klasses void update_if_shared(InstanceKlass::ClassState expected) { @@ -189,13 +192,16 @@ 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) + if (_nonstatic_fields == NULL) { return compute_nonstatic_fields(); - else + } else { return _nonstatic_fields->length(); + } } bool has_injected_fields() { @@ -217,7 +223,7 @@ bool has_finalizable_subclass(); bool contains_field_offset(int offset) { - return instanceOopDesc::contains_field_offset(offset, nonstatic_field_size()); + return instanceOopDesc::contains_field_offset(offset, nonstatic_field_size(), is_valuetype()); } // Get the instance of java.lang.Class corresponding to @@ -238,6 +244,7 @@ bool is_leaf_type(); ciInstanceKlass* implementor(); + ciInstanceKlass* vcc_klass(); // Is the defining class loader of this class the default loader? bool uses_default_loader() const;