|
SandMark version 3.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--sandmark.obfuscate.boolsplitter.dtree.OperandStack
OperandStack is used to simulate the JVM stack. A stack of expressions is maintained. OperandStack has methods to push and pop (both wide and non-wide) expressions, replace an expression at a given depth in the stack, peek into the stack, etc.
Expr
,
Tree
Field Summary | |
(package private) int |
height
|
(package private) java.util.ArrayList |
stack
|
Constructor Summary | |
OperandStack()
Constructor. |
Method Summary | |
Expr |
get(int index)
Returns the expression at index from the bottom of the stack. |
int |
height()
|
boolean |
isEmpty()
|
Expr |
peek()
Returns the expression at the top of the stack, but does not modify the stack. |
Expr |
peek(int depth)
Get the expression that is depth expressions from the top of the stack, but do not modify the stack. |
Expr |
pop(EDU.purdue.cs.bloat.editor.Type type)
Pops an operand off the stack. |
Expr |
pop1()
Pops a non-wide expression off the stack. |
Expr[] |
pop2()
Pops a (possibly) wide expression off of the stack and returns the result as an array of Expr. |
void |
push(Expr expr)
Push an expression onto the stack. |
void |
replace(int depth,
Expr expr)
Replaces the expression that is depth expressions from the top of the stack. |
void |
set(int index,
Expr expr)
Sets the entry at a specified index from the bottom of the stack |
int |
size()
Returns the number of expressions on the stack. |
java.lang.String |
toString()
Returns a String represntation of this stack. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
java.util.ArrayList stack
int height
Constructor Detail |
public OperandStack()
Method Detail |
public boolean isEmpty()
public Expr pop(EDU.purdue.cs.bloat.editor.Type type)
type
- The expected Type of the top of the stack
public Expr peek()
public void set(int index, Expr expr)
index
- The position in the stack.expr
- The new value of the expression.public int height()
public void replace(int depth, Expr expr)
depth
- The number of expressions from the top of the stack.expr
- The new expressionpublic Expr peek(int depth)
depth
- Number of expressions deep to get.
public Expr pop1()
public Expr[] pop2()
public void push(Expr expr)
Type.stackHeight()
public int size()
public Expr get(int index)
public java.lang.String toString()
toString
in class java.lang.Object
|
SandMark version 3.0 Wed Jan 29 10:30:05 MST 2003 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |