< prev index next > src/hotspot/share/oops/fieldInfo.inline.hpp
Print this page
#include "oops/fieldInfo.hpp"
#include "memory/metadataFactory.hpp"
#include "oops/constantPool.hpp"
+ #include "oops/instanceKlass.hpp"
#include "oops/symbol.hpp"
#include "runtime/atomic.hpp"
#include "utilities/checkedCast.hpp"
inline Symbol* FieldInfo::name(ConstantPool* cp) const {
_consumer->accept_uint(fi.generic_signature_index());
}
if (fi.field_flags().is_contended()) {
_consumer->accept_uint(fi.contention_group());
}
+ if (fi.field_flags().is_flat()) {
+ assert(fi.layout_kind() != LayoutKind::UNKNOWN, "Must be set");
+ _consumer->accept_uint(fi.layout_kind());
+ }
+ if (fi.field_flags().has_null_marker()) {
+ _consumer->accept_uint(fi.null_marker_offset());
+ }
} else {
assert(fi.initializer_index() == 0, "");
assert(fi.generic_signature_index() == 0, "");
assert(fi.contention_group() == 0, "");
+ assert(fi.null_marker_offset() == 0, "");
}
}
inline FieldInfoReader::FieldInfoReader(const Array<u1>* fi)
if (fi._field_flags.is_contended()) {
fi._contention_group = checked_cast<u2>(next_uint());
} else {
fi._contention_group = 0;
}
}
inline FieldInfoReader& FieldInfoReader::skip_field_info() {
_next_index++;
const int name_sig_af_off = 4; // four items
skip(name_sig_af_off);
FieldInfo::FieldFlags ff(next_uint());
if (ff.has_any_optionals()) {
const int init_gen_cont = (ff.is_initialized() +
ff.is_generic() +
! ff.is_contended());
skip(init_gen_cont); // up to three items
}
return *this;
}
if (fi._field_flags.is_contended()) {
fi._contention_group = checked_cast<u2>(next_uint());
} else {
fi._contention_group = 0;
}
+ if (fi._field_flags.is_flat()) {
+ fi._layout_kind = static_cast<LayoutKind>(next_uint());
+ }
+ if (fi._field_flags.has_null_marker()) {
+ fi._null_marker_offset = next_uint();
+ } else {
+ fi._null_marker_offset = 0;
+ }
}
inline FieldInfoReader& FieldInfoReader::skip_field_info() {
_next_index++;
const int name_sig_af_off = 4; // four items
skip(name_sig_af_off);
FieldInfo::FieldFlags ff(next_uint());
if (ff.has_any_optionals()) {
const int init_gen_cont = (ff.is_initialized() +
ff.is_generic() +
! ff.is_contended() +
+ ff.is_flat() +
+ ff.has_null_marker());
skip(init_gen_cont); // up to three items
}
return *this;
}
< prev index next >