| java.lang.Object gov.nasa.jpf.jvm.StackFrame
StackFrame | public class StackFrame implements Constants(Code) | | Describes a stack frame.
implementation is based on the fact that each Java method has a fixed size
operand stack (overrun actually checked by a real VM), and the heuristics that
(a) stack / local operations are frequent
(b) stack / local sizes are typically small (both < 10)
hence a BitSet is not too useful
|
Constructor Summary | |
public | StackFrame(MethodInfo m, boolean isDirect, StackFrame caller) Creates a new stack frame for a given method.
'isDirect' specifies if this method was called directly by the VM, i.e. | public | StackFrame(MethodInfo m, boolean isDirect, int objRef) |
isLocalRef | boolean[] isLocalRef(Code) | | |
isOperandRef | boolean[] isOperandRef(Code) | | |
locals | int[] locals(Code) | | Local variables.
|
operandAttr | Object[] operandAttr(Code) | | This array can be used to store attributes (e.g. variable names) for
operands. We don't do anything with this except of preserving it (across
dups etc.), so it's pretty much up to the VM listeners what's stored
|
operands | int[] operands(Code) | | the operand stack (untyped, except of ref/no-ref)
|
thisRef | int thisRef(Code) | | since the 'this' local slot apparently can change during execution, we need to keep
track of it elsewhere
|
top | int top(Code) | | top index of the operand stack (NOT size)
|
StackFrame | public StackFrame(MethodInfo m, boolean isDirect, StackFrame caller)(Code) | | Creates a new stack frame for a given method.
'isDirect' specifies if this method was called directly by the VM, i.e. there is
no corresponding INVOKE insn in the underlying stack frame (for instance, that's
important to know for handling return values and computing the next pc)
'caller' is the calling stack frame (if any)
|
clearOperandStack | public void clearOperandStack()(Code) | | |
dup2_x1 | public void dup2_x1()(Code) | | |
dup2_x2 | public void dup2_x2()(Code) | | |
dup_x1 | public void dup_x1()(Code) | | |
dup_x2 | public void dup_x2()(Code) | | |
getCalleeThis | public int getCalleeThis(MethodInfo mi)(Code) | | return the object reference for an instance method to be called (we are still in the
caller's frame). This only makes sense after all params have been pushed, before the
INVOKEx insn is executed
|
getCalleeThis | public int getCalleeThis(int size)(Code) | | return reference of called object in the context of the caller
(i.e. we are in the caller frame)
|
getLine | public int getLine()(Code) | | |
getLocalVariable | public int getLocalVariable(int i)(Code) | | |
getLocalVariable | public int getLocalVariable(String name)(Code) | | |
getLocalVariableNames | public String[] getLocalVariableNames()(Code) | | |
getLocalVariables | public int[] getLocalVariables()(Code) | | |
getLongLocalVariable | public long getLongLocalVariable(int i)(Code) | | |
getLongLocalVariable | public long getLongLocalVariable(String name)(Code) | | |
getOperandAttr | public Object getOperandAttr(int offset)(Code) | | |
getThis | public int getThis()(Code) | | if this is an instance method, return the reference of the corresponding object
(note this only has to be in slot 0 upon entry)
|
hasAnyRef | public boolean hasAnyRef()(Code) | | |
hashCode | public int hashCode()(Code) | | |
isDirectCall | public boolean isDirectCall()(Code) | | |
isLocalVariableRef | public boolean isLocalVariableRef(int idx)(Code) | | |
isOperandRef | public boolean isOperandRef(int idx)(Code) | | |
isOperandRef | public boolean isOperandRef()(Code) | | |
log | public void log(int id)(Code) | | |
longPeek | long longPeek()(Code) | | |
longPeek | long longPeek(int n)(Code) | | |
longPush | void longPush(long v)(Code) | | |
markThreadRoots | public void markThreadRoots(int tid)(Code) | | mark all objects reachable from local or operand stack positions containing
references. Done during phase1 marking of threads (the stack is one of the
Thread gc roots)
|
printStackContent | public void printStackContent()(Code) | | |
printStackTrace | public void printStackTrace()(Code) | | |
push | void push(int v, boolean ref)(Code) | | |
setLocalVariable | public void setLocalVariable(int index, int v, boolean ref)(Code) | | |
setLongLocalVariable | public void setLongLocalVariable(int index, long v)(Code) | | |
|
|