|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jikesrvm.objectmodel.FieldLayout
public abstract class FieldLayout
This abstract class defines the interface for schemes that layout fields in an object. Not header fields, (scalar) object fields.
The field layout object encapsulates layout state.
Field Summary | |
---|---|
private boolean |
clusterReferenceFields
Lay out reference fields in a block |
protected static boolean |
DEBUG
Enable debugging |
private boolean |
largeFieldsFirst
Whether to lay out 8byte values first in order to avoid some holes |
Constructor Summary | |
---|---|
FieldLayout(boolean largeFieldsFirst,
boolean clusterReferenceFields)
|
Method Summary | |
---|---|
protected abstract FieldLayoutContext |
getLayoutContext(RVMClass klass)
Return the appropriate layout context object for the given class. |
protected void |
layoutField(FieldLayoutContext layout,
RVMClass klass,
RVMField field,
int fieldSize)
Lay out a given field. |
void |
layoutInstanceFields(RVMClass klass)
This is where a class gets laid out. |
protected static int |
log2(int x)
Log base 2 of an integer |
protected static int |
max(int x,
int y)
Maximum of two integers |
protected void |
setOffset(RVMClass klass,
RVMField field,
int offset)
Update a field to set its offset within the object. |
protected void |
updateClass(RVMClass klass,
FieldLayoutContext fieldLayout)
Update the RVMClass with context info. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static final boolean DEBUG
private final boolean largeFieldsFirst
private final boolean clusterReferenceFields
Constructor Detail |
---|
public FieldLayout(boolean largeFieldsFirst, boolean clusterReferenceFields)
Method Detail |
---|
protected static int max(int x, int y)
protected static int log2(int x)
protected abstract FieldLayoutContext getLayoutContext(RVMClass klass)
klass
- The class
public void layoutInstanceFields(RVMClass klass)
klass
- The class to lay out.protected void updateClass(RVMClass klass, FieldLayoutContext fieldLayout)
klass
- fieldLayout
- protected void setOffset(RVMClass klass, RVMField field, int offset)
klass
- field
- offset
- protected void layoutField(FieldLayoutContext layout, RVMClass klass, RVMField field, int fieldSize)
layout
- State for the layout processklass
- The class whose fields we're laying out.field
- The field we are laying out.fieldSize
- The size of the field.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |