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
VirtualStackSlot s 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)
FrameMapBuilder
allocateSpillSlot
in interface FrameMapBuilder
kind
- The kind of the spill slot to be reserved.public VirtualStackSlot allocateStackSlots(int slots, BitSet objects, List<VirtualStackSlot> outObjectStackSlots)
FrameMapBuilder
null
.allocateStackSlots
in interface FrameMapBuilder
slots
- 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 FrameMapBuilder
public CodeCacheProvider getCodeCache()
getCodeCache
in interface FrameMapBuilder
public FrameMap getFrameMap()
getFrameMap
in interface FrameMapBuilderTool
public int getNumberOfStackSlots()
FrameMapBuilderTool
VirtualStackSlot
s created by this FrameMapBuilder
. Can
be used as an upper bound for an array indexed by VirtualStackSlot.getId()
.getNumberOfStackSlots
in interface FrameMapBuilderTool
public void callsMethod(CallingConvention cc)
FrameMapBuilder
callsMethod
in interface FrameMapBuilder
cc
- The calling convention for the called method.public FrameMap buildFrameMap(LIRGenerationResult res, StackSlotAllocator allocator)
FrameMapBuilder
buildFrameMap
in interface FrameMapBuilder
private static void verifyStackSlotAllocation(LIRGenerationResult res)
public List<VirtualStackSlot> getStackSlots()
getStackSlots
in interface FrameMapBuilderTool