|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.objectmodel.FieldLayoutContext
public abstract class FieldLayoutContext
State for the field layout engine. Subtypes of this are closely tied to field layout schemes, and are generally defined in same.
A FieldLayoutContext deals in an abstract offset space, where there is no header, and fields are laid out relative to 0.
This abstract superclass looks after the total object size and alignment.
Field Summary | |
---|---|
private byte |
alignment
Alignment requirements. |
protected static int |
OBJECT_SIZE_ALIGN
|
private int |
objectSize
The size of the current object as laid out |
Constructor Summary | |
---|---|
protected |
FieldLayoutContext(byte alignment)
Constructor for a (the) top-level object. |
protected |
FieldLayoutContext(byte alignment,
FieldLayoutContext superLayout)
Constructor for an object with a superclass. |
Method Summary | |
---|---|
protected void |
adjustAlignment(int fieldSize)
Adjust alignment to the next highest value. |
protected void |
ensureObjectSize(int size)
Adjust the size of the object if necessary to accommodate a field. |
(package private) int |
getAlignment()
|
protected int |
getObjectSize()
|
(package private) abstract int |
nextOffset(int size,
boolean isReference)
Return the offset of a new field of the given size |
protected void |
setObjectSize(int size)
Set the current size of the object (excluding header) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final int OBJECT_SIZE_ALIGN
private byte alignment
private int objectSize
Constructor Detail |
---|
protected FieldLayoutContext(byte alignment)
alignment
- protected FieldLayoutContext(byte alignment, FieldLayoutContext superLayout)
alignment
- superLayout
- Method Detail |
---|
abstract int nextOffset(int size, boolean isReference)
protected void adjustAlignment(int fieldSize)
fieldSize
- int getAlignment()
protected int getObjectSize()
protected void setObjectSize(int size)
protected void ensureObjectSize(int size)
size
- The size occupied by data fields in the object.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |