public final class TIB extends Object implements RuntimeTable<Object>
TIBLayoutConstants
Modifier and Type | Field and Description |
---|---|
private int |
alignData
Alignment encoded data for this TIB - only used at build time
|
private Object[] |
data
The backing data used during boot image writing.
|
Modifier | Constructor and Description |
---|---|
private |
TIB(int size) |
Modifier and Type | Method and Description |
---|---|
static TIB |
allocate(int size,
int alignData)
Create a new TIB of the specified size.
|
static int |
computeSize(int numVirtualMethods)
Calculates the size of a TIB.
|
Object |
get(int index)
Get a TIB entry.
|
int |
getAlignData() |
Object[] |
getBacking()
Only called at boot image write time.
|
int[] |
getDoesImplement() |
IMT |
getImt() |
ITableArray |
getITableArray() |
short[] |
getSuperclassIds() |
RVMType |
getType() |
CodeArray |
getVirtualMethod(int virtualMethodIndex)
Gets a virtual method from this TIB.
|
CodeArray |
getVirtualMethod(Offset virtualMethodOffset) |
static int |
getVirtualMethodIndex(int slot)
Calculate the virtual method index for the given raw slot index.
|
static int |
getVirtualMethodIndex(Offset virtualMethodOffset)
Calculate the virtual method index for the given offset.
|
static Offset |
getVirtualMethodOffset(int virtualMethodIndex)
Calculate the virtual method offset for the given index.
|
void |
initializeInternalLazyCompilationTrampoline()
Initialize the lazy method invoker trampoline for this tib.
|
boolean |
isInternalLazyCompilationTrampoline(int virtualMethodIndex) |
int |
lazyMethodInvokerTrampolineIndex()
Calculate the address that is the call target for the lazy method invoker trampoline.
|
static int |
lazyMethodInvokerTrampolineWords() |
int |
length()
Get the table length.
|
int |
numVirtualMethods() |
void |
set(int index,
Object value)
Set a TIB entry.
|
void |
setAlignData(int alignData) |
void |
setArrayElementTib(TIB arrayElementTIB) |
void |
setDoesImplement(int[] doesImplement) |
void |
setImt(IMT imt) |
void |
setITableArray(ITableArray iTableArray) |
void |
setSpecializedMethod(int specializedMethodIndex,
CodeArray code) |
void |
setSuperclassIds(short[] superclassIds) |
void |
setType(RVMType type) |
void |
setVirtualMethod(int virtualMethodIndex,
CodeArray code)
Set a virtual method in this TIB.
|
void |
setVirtualMethod(Offset virtualMethodOffset,
CodeArray code) |
boolean |
slotContainsCode(int slot)
Does this slot in the TIB hold code?
|
boolean |
slotContainsTib(int slot)
Does this slot in the TIB hold a TIB entry?
|
private int alignData
private TIB(int size)
public static int lazyMethodInvokerTrampolineWords()
public static int computeSize(int numVirtualMethods)
numVirtualMethods
- the number of virtual methods in the TIBpublic static Offset getVirtualMethodOffset(int virtualMethodIndex)
virtualMethodIndex
- The index to calculate the offset forpublic static int getVirtualMethodIndex(Offset virtualMethodOffset)
virtualMethodOffset
- The offset to calculate the index forpublic static int getVirtualMethodIndex(int slot)
slot
- The raw slot to find the virtual method index for.public Object[] getBacking()
RuntimeTable
getBacking
in interface RuntimeTable<Object>
public static TIB allocate(int size, int alignData)
size
- The size of the TIBalignData
- Alignment-encoded data for this TIB,
AlignmentEncoding.ALIGN_CODE_NONE for no alignment encoding.public Object get(int index)
get
in interface RuntimeTable<Object>
index
- The index of the entry to getpublic void set(int index, Object value)
set
in interface RuntimeTable<Object>
index
- The index of the entry to setvalue
- The value to set the entry to.public int length()
RuntimeTable
length
in interface RuntimeTable<Object>
public short[] getSuperclassIds()
public void setSuperclassIds(short[] superclassIds)
public ITableArray getITableArray()
public void setITableArray(ITableArray iTableArray)
public int[] getDoesImplement()
public void setDoesImplement(int[] doesImplement)
public void setArrayElementTib(TIB arrayElementTIB)
public CodeArray getVirtualMethod(int virtualMethodIndex)
virtualMethodIndex
- the index of the virtual methodpublic boolean isInternalLazyCompilationTrampoline(int virtualMethodIndex)
virtualMethodIndex
- the index of the virtual methodpublic CodeArray getVirtualMethod(Offset virtualMethodOffset)
public void setVirtualMethod(int virtualMethodIndex, CodeArray code)
virtualMethodIndex
- the index of the virtual methocode
- the code for the virtual methodpublic void setVirtualMethod(Offset virtualMethodOffset, CodeArray code)
public int lazyMethodInvokerTrampolineIndex()
public void initializeInternalLazyCompilationTrampoline()
public void setSpecializedMethod(int specializedMethodIndex, CodeArray code)
public int numVirtualMethods()
public boolean slotContainsTib(int slot)
slot
- the TIB slottrue
if this the array element TIBpublic boolean slotContainsCode(int slot)
slot
- the TIB slottrue
if slot is one that holds a code array referencepublic void setAlignData(int alignData)
public int getAlignData()