private static class FieldLayoutPacked.LayoutContext extends FieldLayoutContext
Modifier and Type | Field and Description |
---|---|
private static int |
LOG_MAX_SLOT_SIZE |
private static int |
MAX_SLOT_SIZE |
private short |
slot0 |
private short |
slot1 |
private short |
slot2 |
OBJECT_SIZE_ALIGN
Constructor and Description |
---|
LayoutContext(byte alignment,
FieldLayoutPacked.LayoutContext superLayout)
Create a layout for an object, initializing offsets from its
superclass.
|
Modifier and Type | Method and Description |
---|---|
private short |
get(int logSize) |
(package private) int |
nextOffset(int size,
boolean isReference)
Return the next available offset for a given size
|
private void |
set(int logSize,
int value) |
adjustAlignment, ensureObjectSize, getAlignment, getObjectSize, setObjectSize
private static final int LOG_MAX_SLOT_SIZE
private static final int MAX_SLOT_SIZE
private short slot0
private short slot1
private short slot2
LayoutContext(byte alignment, FieldLayoutPacked.LayoutContext superLayout)
alignment
- Current alignment of first field.superLayout
- Superclass layout contextprivate short get(int logSize)
private void set(int logSize, int value)
int nextOffset(int size, boolean isReference)
nextOffset
in class FieldLayoutContext
size
- Size of the field to be laid out. Must be
a power of 2.isReference
- whether the field is a reference field