|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.asm.tree.analysis.Frame
A symbolic execution stack frame. A stack frame contains a set of local variable slots, and an operand stack. Warning: long and double values are represented by two slots in local variables, and by one slot in the operand stack.
Constructor Summary | |
Frame(Frame src)
Constructs a new frame that is identical to the given frame. |
|
Frame(int nLocals,
int nStack)
Constructs a new frame with the given size. |
Method Summary | |
void |
clearStack()
Clears the operand stack of this frame. |
void |
execute(AbstractInsnNode insn,
Interpreter interpreter)
|
Value |
getLocal(int i)
Returns the value of the given local variable. |
int |
getLocals()
Returns the maximum number of local variables of this frame. |
Value |
getStack(int i)
Returns the value of the given operand stack slot. |
int |
getStackSize()
Returns the number of values in the operand stack of this frame. |
Frame |
init(Frame src)
Copies the state of the given frame into this frame. |
boolean |
merge(Frame frame)
Merges this frame with the given frame. |
boolean |
merge(Frame frame,
boolean[] access)
Merges this frame with the given frame (case of a RET instruction). |
Value |
pop()
Pops a value from the operand stack of this frame. |
void |
push(Value value)
Pushes a value into the operand stack of this frame. |
void |
setLocal(int i,
Value value)
Sets the value of the given local variable. |
String |
toString()
Returns a string representation of this frame. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Frame(int nLocals, int nStack)
nLocals
- the maximum number of local variables of the frame.nStack
- the maximum stack size of the frame.public Frame(Frame src)
src
- a frame.Method Detail |
public Frame init(Frame src)
src
- a frame.
public int getLocals()
public Value getLocal(int i)
i
- a local variable index.
public void setLocal(int i, Value value)
i
- a local variable index.value
- the new value of this local variable.public int getStackSize()
public Value getStack(int i)
i
- the index of an operand stack slot.
public void clearStack()
public Value pop()
public void push(Value value)
value
- the value that must be pushed into the stack.public void execute(AbstractInsnNode insn, Interpreter interpreter)
public boolean merge(Frame frame)
frame
- a frame.
public boolean merge(Frame frame, boolean[] access)
frame
- a frameaccess
- the local variables that have been accessed by the
subroutine to which the RET instruction corresponds.
public String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |