| Modifier and Type | Field and Description |
|---|---|
| private boolean | |
| private Type[] | |
| private boolean | |
| private Type[] | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | Frame(int
the number of local variable table entries locals, int the maximum stack size stack)Create a new frame with the specified local variable table size, and max stack size |
| Modifier and Type | Method and Description |
|---|---|
| public void | |
| public Frame | Returns: the shallow copyMakes a shallow copy of this frame, i.e. the type instances will remain the same. |
| public Frame | Returns: the shallow copy of the stackMakes a shallow copy of the stack portion of this frame. |
| public Type | Returns: the type if one exists, or null if the position is emptythe position in the table index)Returns the local varaible table entry at index. |
| public Type | Returns: the type of the stack positionthe position on the stack index)Returns the type on the stack at the specified index. |
| public int | Returns: the position of the element at the top of the stackGets the index of the type sitting at the top of the stack. |
| pack-priv boolean | Returns: true if JSR state has been mergedWhether or not state from the source JSR instruction has been merged |
| pack-priv boolean | Returns: true if RET state has been mergedWhether or not state from the RET instruction, of the subroutine that was jumped to has been merged. |
| public int | Returns: the number of local variable table entriesReturns the number of local variable table entries, specified at construction. |
| public boolean | |
| public boolean | Returns: true if any changes where madethe frame to merge the stack from frame)Merges all types on the stack of this frame instance with that of the specified frame. |
| public Type | |
| public Type | Returns: the element popped from the stackAlters the stack to contain one less element and return it. |
| public void | |
| pack-priv void | setJsrMerged(boolean
true if merged, otherwise false jsrMerged)Sets whether of not the state from the source JSR instruction has been merged |
| public void | |
| pack-priv void | setRetMerged(boolean
true if RET state has been merged retMerged)Sets whether or not state from the RET instruction, of the subroutine that was jumped to has been merged. |
| public void | |
| public String |
| jsrMerged | back to summary |
|---|---|
| private boolean jsrMerged | |
| locals | back to summary |
|---|---|
| private Type[] locals | |
| retMerged | back to summary |
|---|---|
| private boolean retMerged | |
| stack | back to summary |
|---|---|
| private Type[] stack | |
| top | back to summary |
|---|---|
| private int top | |
| Frame | back to summary |
|---|---|
| public Frame(int locals, int stack) Create a new frame with the specified local variable table size, and max stack size
| |
| clearStack | back to summary |
|---|---|
| public void clearStack() Empties the stack | |
| copy | back to summary |
|---|---|
| public Frame copy() Makes a shallow copy of this frame, i.e. the type instances will remain the same.
| |
| copyStack | back to summary |
|---|---|
| public Frame copyStack() Makes a shallow copy of the stack portion of this frame. The local variable table size will be copied, but its contents will be empty.
| |
| getLocal | back to summary |
|---|---|
| public Type getLocal(int index) Returns the local varaible table entry at index.
| |
| getStack | back to summary |
|---|---|
| public Type getStack(int index) Returns the type on the stack at the specified index.
| |
| getTopIndex | back to summary |
|---|---|
| public int getTopIndex() Gets the index of the type sitting at the top of the stack. This is not to be confused with a length operation which would return the number of elements, not the position of the last element.
| |
| isJsrMerged | back to summary |
|---|---|
| pack-priv boolean isJsrMerged() Whether or not state from the source JSR instruction has been merged
| |
| isRetMerged | back to summary |
|---|---|
| pack-priv boolean isRetMerged() Whether or not state from the RET instruction, of the subroutine that was jumped to has been merged.
| |
| localsLength | back to summary |
|---|---|
| public int localsLength() Returns the number of local variable table entries, specified at construction.
| |
| merge | back to summary |
|---|---|
| public boolean merge(Frame frame) Merges all types on the stack and local variable table of this frame with that of the specified type.
| |
| mergeStack | back to summary |
|---|---|
| public boolean mergeStack(Frame frame) Merges all types on the stack of this frame instance with that of the specified frame. The local variable table is left untouched.
| |
| peek | back to summary |
|---|---|
| public Type peek() Gets the top of the stack without altering it
| |
| pop | back to summary |
|---|---|
| public Type pop() Alters the stack to contain one less element and return it.
| |
| push | back to summary |
|---|---|
| public void push(Type type) Alters the stack by placing the passed type on the top
| |
| setJsrMerged | back to summary |
|---|---|
| pack-priv void setJsrMerged(boolean jsrMerged) Sets whether of not the state from the source JSR instruction has been merged
| |
| setLocal | back to summary |
|---|---|
| public void setLocal(int index, Type type) Sets the local variable table entry at index to a type.
| |
| setRetMerged | back to summary |
|---|---|
| pack-priv void setRetMerged(boolean retMerged) Sets whether or not state from the RET instruction, of the subroutine that was jumped to has been merged.
| |
| setStack | back to summary |
|---|---|
| public void setStack(int index, Type type) Sets the type of the stack position
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |