|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--nz.net.juju.jaune.CodeSection
A CodeSection is the smallest emittable block, and can contain such things as all of the code for a method, a class header, a constant string definiton etc. Everything in the section must exist in the same area (data, bss, code). Includes support for tracking in-method labels. RETARGET: The area definitions need to be pulled out.
Field Summary | |
static java.lang.String |
BSS
Section for all variable un-inited data, such as static fields. |
static java.lang.String |
CLINIT
Section for static initialiser data |
static java.lang.String |
CODE
Section for all code data, such as methods or classes |
static java.lang.String |
CONST
Section for all constant data, such as strings. |
Constructor Summary | |
CodeSection(java.lang.String area)
|
Method Summary | |
void |
add(java.lang.String op)
Add a normal line |
void |
addDebug(java.lang.String msg)
Add a debug line |
void |
addLabel(Label label)
Add a explicit label |
void |
addLabel(java.lang.String label)
|
java.lang.String |
getArea()
|
Label |
getLabelForPC(int pc)
Returns the Label that can be used to reference the given PC within the method. |
void |
markPC(int pc)
Marks that the following lines related to the given PC. |
void |
markTarget(int abs)
Mark the given PC as being referenced, so that when the section is emitted a label will be included at that PC. |
void |
print(java.io.PrintStream out,
PeepholeOptimiser opt)
Print this section to the given output, running the given peephole rules if supplied. |
void |
setLabel(java.lang.String label)
Set the label to emmit at the start of this section. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final java.lang.String CONST
public static final java.lang.String CLINIT
public static final java.lang.String CODE
public static final java.lang.String BSS
Constructor Detail |
public CodeSection(java.lang.String area)
Method Detail |
public java.lang.String getArea()
public void markPC(int pc)
public void markTarget(int abs)
public Label getLabelForPC(int pc)
public void add(java.lang.String op)
public void addDebug(java.lang.String msg)
public void addLabel(Label label)
public void addLabel(java.lang.String label)
public void setLabel(java.lang.String label)
public void print(java.io.PrintStream out, PeepholeOptimiser opt)
rules
- May be null.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |