|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.logicalcobwebs.asm.Label
public class Label
A label represents a position in the bytecode of a method. Labels are used for jump, goto, and switch instructions, and for try catch blocks.
| Field Summary | |
|---|---|
(package private) int |
beginStackSize
The stack size at the beginning of this basic block. |
(package private) int |
maxStackSize
The (relative) maximum stack size corresponding to this basic block. |
(package private) Label |
next
The next basic block in the basic block stack. |
(package private) CodeWriter |
owner
The code writer to which this label belongs, or null if unknown. |
(package private) int |
position
The position of this label in the code, if known. |
(package private) boolean |
pushed
true if this basic block has been pushed in the basic block stack. |
private int |
referenceCount
Number of forward references to this label, times two. |
(package private) boolean |
resolved
Indicates if the position of this label is known. |
private int[] |
srcAndRefPositions
Informations about forward references. |
(package private) Edge |
successors
The successors of this node in the control flow graph. |
| Constructor Summary | |
|---|---|
Label()
Constructs a new label. |
|
| Method Summary | |
|---|---|
private void |
addReference(int sourcePosition,
int referencePosition)
Adds a forward reference to this label. |
(package private) void |
put(CodeWriter owner,
ByteVector out,
int source,
boolean wideOffset)
Puts a reference to this label in the bytecode of a method. |
(package private) boolean |
resolve(CodeWriter owner,
int position,
byte[] data)
Resolves all forward references to this label. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
CodeWriter owner
boolean resolved
int position
private int referenceCount
private int[] srcAndRefPositions
int beginStackSize
visitMaxs).
int maxStackSize
beginStackSize + maxStackSize.
Edge successors
Edge objects, linked to each
other by their Edge.next field.
Label next
visitMaxs.
boolean pushed
visitMaxs.
| Constructor Detail |
|---|
public Label()
| Method Detail |
|---|
void put(CodeWriter owner,
ByteVector out,
int source,
boolean wideOffset)
owner - the code writer that calls this method.out - the bytecode of the method.source - the position of first byte of the bytecode instruction that
contains this label.wideOffset - true if the reference must be stored in 4 bytes,
or false if it must be stored with 2 bytes.
java.lang.IllegalArgumentException - if this label has not been created by the
given code writer.
private void addReference(int sourcePosition,
int referencePosition)
sourcePosition - the position of the referencing instruction. This
position will be used to compute the offset of this forward reference.referencePosition - the position where the offset for this forward
reference must be stored.
boolean resolve(CodeWriter owner,
int position,
byte[] data)
owner - the code writer that calls this method.position - the position of this label in the bytecode.data - the bytecode of the method.
CodeWriter.resizeInstructions(int[], int[], int).
java.lang.IllegalArgumentException - if this label has already been resolved,
or if it has not been created by the given code writer.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||