sandmark.util.stacksimulator
Class Context
java.lang.Object
|
+--sandmark.util.stacksimulator.Context
- All Implemented Interfaces:
- java.lang.Cloneable
- public class Context
- extends java.lang.Object
- implements java.lang.Cloneable
Constructor Summary |
Context(int localVars)
|
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Context
public Context(int localVars)
clone
public java.lang.Object clone()
- Makes a deep(er than shallow) copy of this context. Copies the
runtime stack (shallow copy) only.
- Overrides:
clone
in class java.lang.Object
- Returns:
- a new context with the same information as this one
replaceVariable
void replaceVariable(StackData[] data,
int slot)
replaceVariable
void replaceVariable(StackData data,
int slot)
clearStack
void clearStack()
push
void push(StackData data)
push
void push(StackData[] data)
pushAt
void pushAt(int index,
StackData data)
pushAt
void pushAt(int index,
StackData[] data)
pop
void pop()
getStackSize
public int getStackSize()
getStackAt
public StackData[] getStackAt(int index)
- Gets an array of possible items that could be on the stack at the specified
depth.
- Parameters:
index
- the depth in the stack (0 is top)
- Returns:
- an array of the possible items that could be on the stack
getLocalVariableAt
public StackData[] getLocalVariableAt(int slotNo)
isSubcontextOf
boolean isSubcontextOf(Context c)
merge
Context merge(Context other)
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
undefinedVersion
Context undefinedVersion()