|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.saxonica.bytecode.util.GeneratedMethodInfo
public class GeneratedMethodInfo
Information about the current method whose bytecode is being generated
Nested Class Summary | |
---|---|
static class |
GeneratedMethodInfo.LocalSlotInfo
|
Field Summary | |
---|---|
Generator |
currentGenerator
|
boolean |
debug
|
Set<LabelInfo> |
labelMap
|
List<GeneratedMethodInfo.LocalSlotInfo> |
slotList
|
Constructor Summary | |
---|---|
GeneratedMethodInfo()
|
Method Summary | |
---|---|
int |
allocateLocal(Class theClass)
Allocate a local bytecode variable. |
void |
checkLabels()
Check (on completion of the method) that all labels that have been used have also been marked |
int |
getContextVariablePosition()
|
int |
getSequenceReceiverPosition()
|
LabelInfo |
getTailCallLabel()
Get the label to act as the target of a jump for a self-recursive tail call. |
Stack<LabelInfo> |
getXslIterateBreakLabelStack()
Get the stack of labels representing entry points to xsl:iterate instructions within this method |
Stack<LabelInfo> |
getXslIterateLoopLabelStack()
Get the stack of labels representing entry points to xsl:iterate instructions within this method |
boolean |
isContextVariableAnArgument()
|
LabelInfo |
newLabel(String name)
Allocate a new label within the method |
void |
placeLabel(LabelInfo labelInfo)
Place a label at the current position in the bytecode |
LabelInfo |
placeNewLabel(String name)
Place a new label at the current position in the bytecode |
void |
popContextVariableInfo()
|
void |
popSequenceReceiverInfo()
|
void |
pushContextVariableInfo(int position,
boolean isArgument)
|
void |
pushSequenceReceiverInfo(int position)
|
void |
releaseLocal(int slotNumber)
Return a local variable to the pool for reuse |
void |
setTailCallLabel(LabelInfo label)
Supply the label to act as the target of a jump for a self-recursive tail call. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public Generator currentGenerator
public boolean debug
public Set<LabelInfo> labelMap
public List<GeneratedMethodInfo.LocalSlotInfo> slotList
Constructor Detail |
---|
public GeneratedMethodInfo()
Method Detail |
---|
public void pushContextVariableInfo(int position, boolean isArgument)
public void pushSequenceReceiverInfo(int position)
public void popContextVariableInfo()
public void popSequenceReceiverInfo()
public int getContextVariablePosition()
public int getSequenceReceiverPosition()
public boolean isContextVariableAnArgument()
public LabelInfo newLabel(String name)
name
- a diagnostic name for the label, used if errors are reported
public void placeLabel(LabelInfo labelInfo)
labelInfo
- the label to be placed (marked)
AssertionError
- if the label has already been markedpublic LabelInfo placeNewLabel(String name)
name
- the name of the label
AssertionError
- if the label has already been markedpublic void checkLabels()
AssertionError
- if this is not the casepublic Stack<LabelInfo> getXslIterateLoopLabelStack()
public Stack<LabelInfo> getXslIterateBreakLabelStack()
public int allocateLocal(Class theClass)
theClass
- the class of value to be held in the local variable
public void releaseLocal(int slotNumber)
slotNumber
- the slot number to be released for reusepublic void setTailCallLabel(LabelInfo label)
label
- the target label for a tail call loop (or null if there is to be no tail call)public LabelInfo getTailCallLabel()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |