public final class FirstObjectTable extends Object
A first object table entry is initialized when an object is allocated that crosses on to the memory corresponding to a new entry. Implementation notes - Since the first object table is not a real object, the methods in this class are all static methods that take the base of the table as a first argument. - Table entries are bytes but converted to and from ints with bounds checks.
Entry Value Interpretation [-128..0] A memory offset in 8-byte units from the address corresponding to the start of this entry to the header of the object that crosses onto the memory corresponding to this entry. [1..63] A linear entry offset to the entry N entries to the left. [64..126] An exponential entry offset to the entry 2^(6+N-64) entries to the left. 127 An otherwise uninitialized entry.
Modifier and Type | Class and Description |
---|---|
static class |
FirstObjectTable.TestingBackDoor
Make some protected things public, for testing.
|
Modifier and Type | Method and Description |
---|---|
protected static org.graalvm.word.Pointer |
getImpreciseFirstObjectPointer(org.graalvm.word.Pointer tableStart,
org.graalvm.word.Pointer memoryStart,
org.graalvm.word.Pointer memoryLimit,
org.graalvm.word.UnsignedWord index)
Return a Pointer into a memory region indicated by the entry at a given index.
|
protected static org.graalvm.word.Pointer |
getPreciseFirstObjectPointer(org.graalvm.word.Pointer tableStart,
org.graalvm.word.Pointer memoryStart,
org.graalvm.word.Pointer memoryLimit,
org.graalvm.word.UnsignedWord index)
Return a Pointer to an object that could be precisely marked by this card.
|
protected static org.graalvm.word.UnsignedWord |
getTableSizeForMemoryPointers(org.graalvm.word.Pointer memoryStart,
org.graalvm.word.Pointer memoryLimit)
Given the bounds of a memory region, how big is the table to cover it?
|
protected static org.graalvm.word.Pointer |
initializeTableToPointer(org.graalvm.word.Pointer table,
org.graalvm.word.Pointer tableLimit)
Initialize a first object table from tableStart to tableLimit.
|
protected static boolean |
isUninitializedIndex(org.graalvm.word.Pointer table,
org.graalvm.word.UnsignedWord index) |
protected static void |
setTableForObject(org.graalvm.word.Pointer table,
org.graalvm.word.Pointer memory,
org.graalvm.word.Pointer start,
org.graalvm.word.Pointer end)
Initialize the first object table for a given object in memory.
|
protected static boolean |
verify(org.graalvm.word.Pointer tableStart,
org.graalvm.word.Pointer memoryStart,
org.graalvm.word.Pointer memoryLimit)
Verify a FirstObjectTable.
|
protected static org.graalvm.word.Pointer initializeTableToPointer(org.graalvm.word.Pointer table, org.graalvm.word.Pointer tableLimit)
table
- a Pointer to the start of the table.tableLimit
- a Pointer to just past the end of the table.protected static boolean isUninitializedIndex(org.graalvm.word.Pointer table, org.graalvm.word.UnsignedWord index)
protected static void setTableForObject(org.graalvm.word.Pointer table, org.graalvm.word.Pointer memory, org.graalvm.word.Pointer start, org.graalvm.word.Pointer end)
table
- A pointer to the first object table for this memory region.memory
- A pointer to the memory region for this first object table.start
- A pointer to the start of the object.end
- A pointer to just past the end of the object.protected static org.graalvm.word.Pointer getPreciseFirstObjectPointer(org.graalvm.word.Pointer tableStart, org.graalvm.word.Pointer memoryStart, org.graalvm.word.Pointer memoryLimit, org.graalvm.word.UnsignedWord index)
tableStart
- The start of the first object table.memoryStart
- The start of the memory region corresponding to the first object table.memoryLimit
- The end of the memory region corresponding to the first object table.index
- The index into the first object table.protected static org.graalvm.word.Pointer getImpreciseFirstObjectPointer(org.graalvm.word.Pointer tableStart, org.graalvm.word.Pointer memoryStart, org.graalvm.word.Pointer memoryLimit, org.graalvm.word.UnsignedWord index)
tableStart
- The start of the first object table.memoryStart
- The start of the memory region corresponding to the first object table.memoryLimit
- The end of the memory region corresponding to the first object table.index
- The index into the first object table.protected static boolean verify(org.graalvm.word.Pointer tableStart, org.graalvm.word.Pointer memoryStart, org.graalvm.word.Pointer memoryLimit)
protected static org.graalvm.word.UnsignedWord getTableSizeForMemoryPointers(org.graalvm.word.Pointer memoryStart, org.graalvm.word.Pointer memoryLimit)