< prev index next >
src/hotspot/share/oops/valueKlass.cpp
Print this page
@@ -44,25 +44,25 @@
#include "runtime/sharedRuntime.hpp"
#include "runtime/signature.hpp"
#include "runtime/thread.inline.hpp"
#include "utilities/copy.hpp"
-int ValueKlass::first_field_offset_old() const {
+int ValueKlass::first_field_offset_old() {
#ifdef ASSERT
int first_offset = INT_MAX;
- for (JavaFieldStream fs(this); !fs.done(); fs.next()) {
+ for (AllFieldStream fs(this); !fs.done(); fs.next()) {
if (fs.offset() < first_offset) first_offset= fs.offset();
}
#endif
int base_offset = instanceOopDesc::base_offset_in_bytes();
// The first field of value types is aligned on a long boundary
base_offset = align_up(base_offset, BytesPerLong);
assert(base_offset == first_offset, "inconsistent offsets");
return base_offset;
}
-int ValueKlass::raw_value_byte_size() const {
+int ValueKlass::raw_value_byte_size() {
int heapOopAlignedSize = nonstatic_field_size() << LogBytesPerHeapOop;
// If bigger than 64 bits or needs oop alignment, then use jlong aligned
// which for values should be jlong aligned, asserts in raw_field_copy otherwise
if (heapOopAlignedSize >= longSize || contains_oops()) {
return heapOopAlignedSize;
@@ -73,15 +73,15 @@
// 2 byte = 2
// 3 byte = 4, because pow2 needed for element stores
int first_offset = first_field_offset();
int last_offset = 0; // find the last offset, add basic type size
int last_tsz = 0;
- for (JavaFieldStream fs(this); !fs.done(); fs.next()) {
+ for (AllFieldStream fs(this); !fs.done(); fs.next()) {
if (fs.access_flags().is_static()) {
continue;
} else if (fs.offset() > last_offset) {
- BasicType type = fs.field_descriptor().field_type();
+ BasicType type = char2type(fs.signature()->char_at(0));
if (is_java_primitive(type)) {
last_tsz = type2aelembytes(type);
} else if (type == T_VALUETYPE) {
// Not just primitives. Layout aligns embedded value, so use jlong aligned it is
return heapOopAlignedSize;
@@ -327,14 +327,14 @@
// generate the list of basic types from the interpreter point of view
// (value types passed as reference: iterate on the list until a
// T_VALUETYPE, drop everything until and including the closing
// T_VOID) or the compiler point of view (each field of the value
// types is an argument: drop all T_VALUETYPE/T_VOID from the list).
-int ValueKlass::collect_fields(GrowableArray<SigEntry>* sig, int base_off) const {
+int ValueKlass::collect_fields(GrowableArray<SigEntry>* sig, int base_off) {
int count = 0;
SigEntry::add_entry(sig, T_VALUETYPE, base_off);
- for (JavaFieldStream fs(this); !fs.done(); fs.next()) {
+ for (AllFieldStream fs(this); !fs.done(); fs.next()) {
if (fs.access_flags().is_static()) continue;
int offset = base_off + fs.offset() - (base_off > 0 ? first_field_offset() : 0);
if (fs.is_flattened()) {
// Resolve klass of flattened value type field and recursively collect fields
Klass* vk = get_value_field_klass(fs.index());
< prev index next >