src/share/vm/ci/ciInstanceKlass.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hotspot Cdiff src/share/vm/ci/ciInstanceKlass.hpp

src/share/vm/ci/ciInstanceKlass.hpp

Print this page
rev 7200 : 6700100: optimize inline_native_clone() for small objects with exact klass
Summary: optimize small instance clones as loads/stores
Reviewed-by:

*** 62,78 **** --- 62,82 ---- 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. // Itsef: more than one implementors. ciInstanceKlass* _implementor; + bool compute_injected_fields(); + void compute_injected_fields_helper(); + protected: ciInstanceKlass(KlassHandle h_k); ciInstanceKlass(ciSymbol* name, jobject loader, jobject protection_domain); InstanceKlass* get_instanceKlass() const {
*** 184,193 **** --- 188,205 ---- if (_nonstatic_fields == NULL) return compute_nonstatic_fields(); else return _nonstatic_fields->length(); } + + bool has_injected_fields() { + if (_has_injected_fields == -1) { + return compute_injected_fields(); + } + return _has_injected_fields > 0 ? true : false; + } + // nth nonstatic field (presented by ascending address) ciField* nonstatic_field_at(int i) { assert(_nonstatic_fields != NULL, ""); return _nonstatic_fields->at(i); }
src/share/vm/ci/ciInstanceKlass.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File