Method Summary |
|
public void | addHandler(int start_pc, int end_pc, int handler_pc, int catch_type) Add an exception handler. |
public void | addHandler(int start_pc, int end_pc, int handler_pc, ClassType catch_type, ConstantPool constants) Add an exception handler. |
public Variable | addLocal(Type type) Add a new local variable (in the current scope).
Parameters: type - type of the new Variable. |
public Variable | addLocal(Type type, String name) Add a new local variable (in the current scope).
Parameters: type - type of the new Variable. Parameters: name - name of the new Variable. |
public void | addParamLocals() Call addLocal for parameters (as implied by method type). |
public void | assignConstants(ClassType cl) |
public void | beginFragment(boolean isHandler) |
boolean | checkPostcondition() |
public void | disAssemble(ClassTypeWriter dst, int offset, int length) |
final public void | emitAdd(char sig) |
final public void | emitAdd(PrimType type) |
final public void | emitAdd() |
final public void | emitAnd() |
final public void | emitArrayLength() |
public void | emitArrayLoad(Type element_type) Load an element from an array. |
public void | emitArrayLoad() Load an element from an array. |
public void | emitArrayStore(Type element_type) Store into an element of an array. |
public void | emitCatchEnd() |
public void | emitCatchStart(Variable var) |
public void | emitCatchStart(ClassType type) |
public void | emitCheckcast(Type type) |
final public void | emitConvert(Type from, Type to) |
final public void | emitDiv() |
public void | emitDup() Emit code to duplicate the top element of the stack. |
public void | emitDup(int size, int offset) Compile code to duplicate with offset. |
public void | emitDup(int size) Compile code to duplicate the top 1 or 2 words. |
public void | emitDup(Type type) Duplicate the top element of the given type. |
public void | emitDupX() Emit code to duplicate the top element of the stack
and place the copy before the previous element. |
final public void | emitElse() Compile start of else clause. |
final public void | emitFi() Compile end of conditional. |
public void | emitFinallyEnd() |
public void | emitFinallyStart() |
final public void | emitGetField(Field field) Compile code to get a non-static field value. |
final public void | emitGetStatic(Field field) Compile code to get a static field value.
Stack: ... |
final public void | emitGoto(Label label, int opcode) Compile an unconditional branch (goto) or a jsr. |
final public void | emitGoto(Label label) Compile an unconditional branch (goto). |
final public void | emitGotoIfCompare1(Label label, int opcode) |
final public void | emitGotoIfCompare2(Label label, int logop) |
final public void | emitGotoIfEq(Label label, boolean invert) |
final public void | emitGotoIfEq(Label label) Compile a conditional transfer if 2 top stack elements are equal. |
final public void | emitGotoIfGe(Label label) |
final public void | emitGotoIfGt(Label label) |
final public void | emitGotoIfIntEqZero(Label label) |
final public void | emitGotoIfIntGeZero(Label label) |
final public void | emitGotoIfIntGtZero(Label label) |
final public void | emitGotoIfIntLeZero(Label label) |
final public void | emitGotoIfIntLtZero(Label label) |
final public void | emitGotoIfIntNeZero(Label label) |
final public void | emitGotoIfLe(Label label) |
final public void | emitGotoIfLt(Label label) |
final public void | emitGotoIfNE(Label label) Compile conditional transfer if 2 top stack elements are not equal. |
final public void | emitGotoIfNotNull(Label label) |
final public void | emitGotoIfNull(Label label) |
final public void | emitIOr() |
final public void | emitIfCompare1(int opcode) Compile start of a conditional: if (!(x OPCODE 0)) ...
The value of x must already have been pushed. |
final public void | emitIfEq() Compile start of a conditional: if (x == y) ...
The values of x and y must already have been pushed. |
final public void | emitIfGe() Compile start of a conditional: if (x >= y) ...
The values of x and y must already have been pushed. |
final public void | emitIfGt() Compile start of a conditional: if (x > y) ...
The values of x and y must already have been pushed. |
final public void | emitIfIntCompare(int opcode) Compile start of a conditional: if (!(x OPCODE y)) ...
The value of x and y must already have been pushed. |
final public void | emitIfIntLEqZero() |
final public void | emitIfIntLt() |
final public void | emitIfIntNotZero() Compile start of conditional: if (x != 0) ...
Also use this if you have pushed a boolean value: if (b) ... |
final public void | emitIfIntZero() Compile start of conditional: if (x == 0) ...
Also use this if you have pushed a boolean value: if (!b) ... |
final public void | emitIfLe() Compile start of a conditional: if (x <= y) ...
The values of x and y must already have been pushed. |
final public void | emitIfLt() Compile start of a conditional: if (x < y) ...
The values of x and y must already have been pushed. |
final public void | emitIfNEq() Compile start of a conditional: if (x != y) ...
The values of x and y must already have been pushed. |
final public void | emitIfNotNull() |
final public void | emitIfNull() |
final public void | emitIfRefCompare1(int opcode) Compile start of a conditional: if (!(x OPCODE null)) ...
The value of x must already have been pushed and must be of
reference type. |
final public void | emitIfThen() |
public void | emitInc(Variable var, short inc) |
public void | emitInstanceof(Type type) |
public void | emitInvoke(Method method) |
public void | emitInvokeInterface(Method method) |
public void | emitInvokeMethod(Method method, int opcode) |
public void | emitInvokeSpecial(Method method) |
public void | emitInvokeStatic(Method method) Compile a static method call. |
public void | emitInvokeVirtual(Method method) Compile a virtual method call. |
final public void | emitJsr(Label label) |
final public void | emitLoad(Variable var) Comple code to push the contents of a local variable onto the statck. |
void | emitMaybeWide(int opcode, int index) |
final public void | emitMonitorEnter() |
final public void | emitMonitorExit() |
final public void | emitMul() |
final public void | emitNeg() Unary numerical negation (-). |
public void | emitNew(ClassType type) Invoke new on a class type. |
void | emitNewArray(int type_code) |
public void | emitNewArray(Type element_type, int dims) Compile code to allocate a new array. |
public void | emitNewArray(Type element_type) |
public void | emitNop() |
final public void | emitNot(Type type) |
public void | emitPop(int nvalues) Compile code to pop values off the stack (and ignore them). |
public void | emitPrimop(int opcode, int arg_count, Type retType) |
final public void | emitPushBoolean(boolean b) |
final public void | emitPushConstant(int val, Type type) |
final public void | emitPushConstant(CpoolEntry cnst) |
public void | emitPushDouble(double x) |
public void | emitPushFloat(float x) |
final public void | emitPushInt(int i) |
public void | emitPushLong(long i) |
public void | emitPushNull() |
public void | emitPushNull(Type type) |
final public void | emitPushString(String str) |
final public void | emitPushThis() |
final public void | emitPutField(Field field) Compile code to put a non-static field value.
Stack: ..., objectref, value => ... |
final public void | emitPutStatic(Field field) Compile code to put a static field value.
Stack: ..., value => ... |
final public void | emitRem() |
public void | emitRet(Variable var) Emit a 'ret' instruction. |
final public void | emitReturn() Compile a method return. |
final public void | emitShl() |
final public void | emitShr() |
public void | emitStore(Variable var) |
final public void | emitSub(char sig) |
final public void | emitSub(PrimType type) |
final public void | emitSub() |
public void | emitSwap() |
public void | emitTailCall(boolean pop_args, Scope scope) Compile a tail-call to position 0 of the current procewure.
Parameters: pop_args - if true, copy argument registers (except this) from stack. Parameters: scope - Scope whose start we jump back to. |
final public void | emitThrow() |
final void | emitTransfer(Label label, int opcode) |
public void | emitTryCatchEnd() |
public void | emitTryEnd() |
public void | emitTryStart(boolean has_finally, Type result_type) |
final public void | emitUshr() |
final public void | emitXOr() |
public void | endFragment() |
public void | endPostcondition() |
public void | endPrecondition() |
public void | enterScope(Scope scope) |
public void | finalize_labels() |
public Variable | getArg(int index) Get the index'th parameter. |
final public Attribute | getAttributes() |
public byte[] | getCode() Get the code (instruction bytes) of this method.
Does not make a copy. |
public int | getCodeLength() Set the current lengthof the code (instruction bytes) of this method. |
final public ConstantPool | getConstants() |
public Scope | getCurrentScope() |
final public int | getLength() |
public int | getMaxLocals() Get the maximum number of local variable words in this method. |
public int | getMaxStack() Get the maximum number of words on the operand stack in this method. |
final public Method | getMethod() |
final public int | getPC() |
final public TryState | getTryStack() |
public void | ifAssertionsDisabledGoto(Field assertionEnabled, Label l) |
final public boolean | isInTry() |
public void | loadResult() |
public Variable | lookup(String name) |
public Scope | methodScope() Return the toplevel scope, corresponding to the current method. |
public Scope | popScope() |
final public Type | popType() |
public void | preparePostcondition(Field assertionEnabled, boolean hasPostCond) |
public void | print(ClassTypeWriter dst) |
public void | pushRetType() |
public Scope | pushScope() |
final public void | pushType(Type type) |
final public void | put1(int i) Write an 8-bit byte to the current code-stream. |
final public void | put2(int i) |
final public void | put4(int i) |
final public void | putIndex2(CpoolEntry cnst) |
final public void | putLineNumber(String file, int linenumber) |
public boolean | reachableHere() True if control could reach here. |
void | reorder_fixups() |
final public void | reserve(int bytes) |
public void | restoreStackTypeState(Type[] save) Restore a type state as saved by saveStackTypeState. |
public Type[] | saveStackTypeState(boolean clear) Return an object encapsulating the type state of the JVM stack. |
final public void | setAttributes(Attribute attributes) |
public void | setCode(byte[] code) Set the code (instruction bytes) of this method.
Parameters: code - the code bytes (which are not copied).Implicitly calls setCodeLength(code.length). |
public void | setCodeLength(int len) Set the length the the code (instruction bytes) of this method. |
public void | setMaxLocals(int n) Set the maximum number of local variable words in this method. |
public void | setMaxStack(int n) Set the maximum number of words on the operand stack in this method. |
final public void | setReachable(boolean val) |
final public void | setUnreachable() |
public void | startPostcondition() |
public void | startPrecondition() |
final public Type | topType() |
public void | write(DataOutputStream dstr) |