|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.sleepycat.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 |
line
The line number corresponding to this label, if known. |
(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) 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. |
(package private) boolean |
resized
If the label position has been updated, after instruction resizing. |
(package private) boolean |
resolved
Indicates if the position of this label is known. |
(package private) Edge |
successors
The successors of this node in the control flow graph. |
| Constructor Summary | |
|---|---|
Label()
Constructs a new label. |
|
| Method Summary | |
|---|---|
int |
getOffset()
Returns the offset corresponding to this label. |
(package private) void |
put(MethodWriter owner,
ByteVector out,
int source,
boolean wideOffset)
Puts a reference to this label in the bytecode of a method. |
(package private) boolean |
resolve(MethodWriter owner,
int position,
byte[] data)
Resolves all forward references to this label. |
String |
toString()
Returns a string representation of this label. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
int line
boolean resolved
int position
boolean resized
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 |
|---|
public int getOffset()
Attribute sub classes, and is normally not needed by class
generators or adapters.
IllegalStateException - if this label is not resolved yet.
void put(MethodWriter 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.
IllegalArgumentException - if this label has not been created by
the given code writer.
boolean resolve(MethodWriter 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.
MethodWriter.resizeInstructions(int[], int[], int).
IllegalArgumentException - if this label has already been resolved,
or if it has not been created by the given code writer.public String toString()
toString in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||