< prev index next > src/hotspot/share/ci/ciInstanceKlass.hpp
Print this page
// Lazy fields get filled in only upon request.
ciInstanceKlass* _super;
ciInstance* _java_mirror;
ciConstantPoolCache* _field_cache; // cached map index->field
+ public:
GrowableArray<ciField*>* _nonstatic_fields;
+ private:
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.
bool compute_injected_fields_helper();
void compute_transitive_interfaces();
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());
}
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);
+ 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) {
}
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)
+ if (_nonstatic_fields == nullptr) {
return compute_nonstatic_fields();
- else
+ } else {
return _nonstatic_fields->length();
+ }
}
bool has_injected_fields() {
if (_has_injected_fields == -1) {
compute_injected_fields();
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(); }
+ bool is_abstract_value_klass() { return is_abstract() && !flags().is_identity(); }
ciMethod* find_method(ciSymbol* name, ciSymbol* signature);
// Note: To find a method from name and type strings, use ciSymbol::make,
// but consider adding to vmSymbols.hpp instead.
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 >