public class Snippit
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
Snippit.Instructions |
Modifier and Type | Field and Description |
---|---|
java.util.Vector |
exVector |
static java.lang.String |
JbetLogFacility |
java.util.Vector |
lnVector |
java.util.Vector |
lvVector |
Modifier and Type | Method and Description |
---|---|
void |
addLinesAsPCs(jbet.ConstantPool cp) |
void |
append(Snippit snippit) |
void |
assemble(Lexer lexer,
Instruction place,
int state,
MethodInfo mi)
This assembles a snippit, and possibly some options for a methodinfo
Lexer is the input stream, place is where to put the assembled
instructions and state is INS_AT, INS_OVER, INS_AFTER, or INS_BEFORE.
|
void |
assemble(java.lang.String str) |
void |
comment(java.lang.String s) |
static Snippit.Instructions |
cString(java.lang.String s) |
void |
disassemble(LineWriter out,
java.lang.String prefix) |
boolean |
empty() |
ExceptionRec |
exAt(int i) |
Instruction |
first() |
void |
grabRecs(Snippit snippit) |
void |
insertAfter(Instruction instr,
Instruction newinst) |
void |
insertAfter(Instruction instr,
Snippit snippit) |
void |
insertAt(Instruction instr,
Snippit snippit) |
void |
insertBefore(Instruction instr,
Snippit snippit) |
void |
insertOver(Instruction instr,
Snippit snippit) |
InstrEnum |
instrs() |
Instruction |
last() |
jbet.LineNumRec |
lnAt(int i) |
jbet.LocalVarRec |
lvAt(int i) |
int |
maxcodesize() |
void |
moveDown(Type top,
Type[] ts) |
int |
numEx() |
Instruction |
pop_norec() |
Instruction |
pop() |
void |
prepend(Snippit snippit) |
void |
printCode(LineWriter out,
boolean lines) |
void |
printCode(LineWriter out,
boolean lines,
boolean counts) |
Snippit |
println(Snippit.Instructions[] strings) |
Snippit |
println(Snippit.Instructions a,
Snippit.Instructions b) |
Snippit |
println(java.lang.String s) |
Snippit |
println(Type t) |
void |
push(Instruction instr) |
void |
redirect(Instruction from,
Instruction to) |
void |
remove(Instruction instr) |
Snippit |
setDupX(Type t,
int x)
append useful instruction sequences
|
Snippit |
setPopX(Type t,
int x) |
Instruction |
shift_norec() |
Instruction |
shift() |
Snippit |
splitAt(Instruction last) |
void |
unshift(Instruction instr) |
public static java.lang.String JbetLogFacility
public java.util.Vector exVector
public java.util.Vector lvVector
public java.util.Vector lnVector
public Snippit(Snippit s)
public Snippit()
public InstrEnum instrs()
public void addLinesAsPCs(jbet.ConstantPool cp)
public ExceptionRec exAt(int i)
public int numEx()
public jbet.LineNumRec lnAt(int i)
public jbet.LocalVarRec lvAt(int i)
public Instruction first()
public Instruction last()
public boolean empty()
public void insertAt(Instruction instr, Snippit snippit)
public void insertOver(Instruction instr, Snippit snippit)
public void insertAfter(Instruction instr, Instruction newinst)
public void grabRecs(Snippit snippit)
public void insertAfter(Instruction instr, Snippit snippit)
public void insertBefore(Instruction instr, Snippit snippit)
public void redirect(Instruction from, Instruction to)
public void append(Snippit snippit)
public void prepend(Snippit snippit)
public void push(Instruction instr)
public void unshift(Instruction instr)
public void remove(Instruction instr)
public Snippit splitAt(Instruction last)
public Instruction pop() throws java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
public Instruction pop_norec() throws java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
public Instruction shift() throws java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
public Instruction shift_norec() throws java.lang.ArrayIndexOutOfBoundsException
java.lang.ArrayIndexOutOfBoundsException
public void comment(java.lang.String s)
public Snippit setDupX(Type t, int x)
t
- type of operandsx
- number to dup or poppublic Snippit println(java.lang.String s)
public static Snippit.Instructions cString(java.lang.String s)
public Snippit println(Snippit.Instructions[] strings)
public Snippit println(Snippit.Instructions a, Snippit.Instructions b)
public void printCode(LineWriter out, boolean lines)
public void printCode(LineWriter out, boolean lines, boolean counts)
public int maxcodesize()
public void disassemble(LineWriter out, java.lang.String prefix)
public void assemble(java.lang.String str) throws ClassFileException
ClassFileException
public void assemble(Lexer lexer, Instruction place, int state, MethodInfo mi) throws ClassFileException
ClassFileException