< prev index next >
src/hotspot/share/ci/ciInstanceKlass.hpp
Print this page
@@ -65,12 +65,15 @@
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.
+ 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.
// Itself: more than one implementor.
ciInstanceKlass* _implementor;
@@ -78,11 +81,11 @@
void compute_injected_fields();
bool compute_injected_fields_helper();
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());
}
@@ -102,12 +105,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);
+ 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();
@@ -187,18 +190,21 @@
}
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() {
if (_has_injected_fields == -1) {
compute_injected_fields();
}
@@ -215,11 +221,11 @@
ciInstanceKlass* unique_concrete_subklass();
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
// this klass. This instance is used for locking of
// synchronized static methods of this klass.
@@ -236,10 +242,11 @@
// Note: To find a method from name and type strings, use ciSymbol::make,
// but consider adding to vmSymbols.hpp instead.
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;
bool is_java_lang_Object() const;
< prev index next >