< prev index next >
src/share/vm/ci/ciInstanceKlass.hpp
Print this page
@@ -63,12 +63,10 @@
ciInstanceKlass* _super;
ciInstance* _java_mirror;
ciConstantPoolCache* _field_cache; // cached map index->field
GrowableArray<ciField*>* _nonstatic_fields;
- int _nof_declared_nonstatic_fields; // Number of nonstatic fields declared in the bytecode
- // i.e., without value types flattened into the instance.
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.
@@ -105,12 +103,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();
@@ -193,22 +191,15 @@
ciType* get_field_type_by_offset(int field_offset);
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)
+ if (_nonstatic_fields == NULL) {
return compute_nonstatic_fields();
- else
+ } else {
return _nonstatic_fields->length();
}
-
- int nof_declared_nonstatic_fields() {
- if (_nonstatic_fields == NULL) {
- compute_nonstatic_fields();
- }
- assert(_nof_declared_nonstatic_fields >= 0, "after lazy initialization _nof_declared_nonstatic_fields must be at least 0");
- return _nof_declared_nonstatic_fields;
}
bool has_injected_fields() {
if (_has_injected_fields == -1) {
compute_injected_fields();
< prev index next >