public class FrameMapBuilderImpl extends Object implements FrameMapBuilderTool
| Modifier and Type | Field and Description |
|---|---|
private List<CallingConvention> |
calls |
private CodeCacheProvider |
codeCache |
private FrameMap |
frameMap |
private int |
numStackSlots |
private RegisterConfig |
registerConfig |
private List<VirtualStackSlot> |
stackSlots |
| Constructor and Description |
|---|
FrameMapBuilderImpl(FrameMap frameMap,
CodeCacheProvider codeCache,
RegisterConfig registerConfig) |
| Modifier and Type | Method and Description |
|---|---|
VirtualStackSlot |
allocateSpillSlot(LIRKind kind)
Reserves a spill slot in the frame of the method being compiled.
|
VirtualStackSlot |
allocateStackSlots(int slots,
BitSet objects,
List<VirtualStackSlot> outObjectStackSlots)
Reserves a number of contiguous slots in the frame of the method being compiled.
|
FrameMap |
buildFrameMap(LIRGenerationResult res,
StackSlotAllocator allocator)
Creates a FrameMap based on the information collected by this
FrameMapBuilder.
|
void |
callsMethod(CallingConvention cc)
Informs the frame map that the compiled code calls a particular method, which may need stack
space for outgoing arguments.
|
CodeCacheProvider |
getCodeCache() |
FrameMap |
getFrameMap() |
int |
getNumberOfStackSlots()
Returns the number of
VirtualStackSlots created by this FrameMapBuilder. |
RegisterConfig |
getRegisterConfig() |
List<VirtualStackSlot> |
getStackSlots() |
private static void |
verifyStackSlotAllocation(LIRGenerationResult res) |
private final RegisterConfig registerConfig
private final CodeCacheProvider codeCache
private final List<VirtualStackSlot> stackSlots
private final List<CallingConvention> calls
private int numStackSlots
public FrameMapBuilderImpl(FrameMap frameMap, CodeCacheProvider codeCache, RegisterConfig registerConfig)
public VirtualStackSlot allocateSpillSlot(LIRKind kind)
FrameMapBuilderallocateSpillSlot in interface FrameMapBuilderkind - The kind of the spill slot to be reserved.public VirtualStackSlot allocateStackSlots(int slots, BitSet objects, List<VirtualStackSlot> outObjectStackSlots)
FrameMapBuildernull.allocateStackSlots in interface FrameMapBuilderslots - the number of slots to reserveobjects - specifies the indexes of the object pointer slots. The caller is responsible
for guaranteeing that each such object pointer slot is initialized before any
instruction that uses a reference map. Without this guarantee, the garbage
collector could see garbage object values.outObjectStackSlots - if non-null, the object pointer slots allocated are added to this
listpublic RegisterConfig getRegisterConfig()
getRegisterConfig in interface FrameMapBuilderpublic CodeCacheProvider getCodeCache()
getCodeCache in interface FrameMapBuilderpublic FrameMap getFrameMap()
getFrameMap in interface FrameMapBuilderToolpublic int getNumberOfStackSlots()
FrameMapBuilderToolVirtualStackSlots created by this FrameMapBuilder. Can
be used as an upper bound for an array indexed by VirtualStackSlot.getId().getNumberOfStackSlots in interface FrameMapBuilderToolpublic void callsMethod(CallingConvention cc)
FrameMapBuildercallsMethod in interface FrameMapBuildercc - The calling convention for the called method.public FrameMap buildFrameMap(LIRGenerationResult res, StackSlotAllocator allocator)
FrameMapBuilderbuildFrameMap in interface FrameMapBuilderprivate static void verifyStackSlotAllocation(LIRGenerationResult res)
public List<VirtualStackSlot> getStackSlots()
getStackSlots in interface FrameMapBuilderTool