| java.lang.Object gnu.bytecode.Label
All known Subclasses: gnu.bytecode.CodeFragment,
Label | public class Label (Code) | | A Label represents a location in a Code attribute.
|
Method Summary | |
public void | define(CodeAttr code) Define the value of a label as having the current location. | final public boolean | defined() | public void | emit(CodeAttr code) Emit a reference to the current label. | void | emit_spring(CodeAttr code) Emit goto_w as target for far-away gotos in large methods. | public void | emit_wide(CodeAttr code, int start_pc) Emit a wide reference to the current label. | public boolean | hasFixups() Return true if there are references to this Label.
We assume !defined(). | final static void | relocate_wide(CodeAttr code, int pos, int target) |
spring_position | int spring_position(Code) | | |
wide_fixups | int[] wide_fixups(Code) | | |
define | public void define(CodeAttr code)(Code) | | Define the value of a label as having the current location.
Parameters: code - the "Code" attribute of the current method |
defined | final public boolean defined()(Code) | | |
emit | public void emit(CodeAttr code)(Code) | | Emit a reference to the current label.
Parameters: method - the current methodEmit the reference as a 2-byte difference relative to PC-1. |
emit_spring | void emit_spring(CodeAttr code)(Code) | | Emit goto_w as target for far-away gotos in large methods.
Needs to be invoked if the earliest still-pending fixup
is at the limit of a 2-byte relative jump.
To solve the problem, we emit a goto_w for the label,
and change all pending (short) fixups to point here.
We also have to jump past this goto.
|
emit_wide | public void emit_wide(CodeAttr code, int start_pc)(Code) | | Emit a wide reference to the current label.
Parameters: code - the current method Parameters: start_pc - the PC at the start of this instructionEmit the reference as a 4-byte difference relative to PC-offset. |
hasFixups | public boolean hasFixups()(Code) | | Return true if there are references to this Label.
We assume !defined().
|
relocate_wide | final static void relocate_wide(CodeAttr code, int pos, int target)(Code) | | |
|
|