< prev index next > src/hotspot/share/oops/arrayOop.hpp
Print this page
#ifndef SHARE_OOPS_ARRAYOOP_HPP
#define SHARE_OOPS_ARRAYOOP_HPP
#include "oops/oop.hpp"
+ #include "runtime/globals.hpp"
#include "utilities/align.hpp"
#include "utilities/globalDefinitions.hpp"
// arrayOopDesc is the abstract baseclass for all arrays. It doesn't
// declare pure virtual to enforce this because that would allocate a vtbl
return reinterpret_cast<int*>(ptr + length_offset_in_bytes());
}
// Given a type, return true if elements of that type must be aligned to 64-bit.
static bool element_type_should_be_aligned(BasicType type) {
+ if (EnableValhalla && type == T_PRIMITIVE_OBJECT) {
+ return true; //CMH: tighten the alignment when removing T_PRIMITIVE_OBJECT
+ }
#ifdef _LP64
if (type == T_OBJECT || type == T_ARRAY) {
return !UseCompressedOops;
}
#endif
< prev index next >