org.objectweb.jac.core.translators
Class VMStack
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--java.util.Vector
|
+--java.util.Stack
|
+--org.objectweb.jac.util.Stack
|
+--org.objectweb.jac.core.translators.VMStack
- All Implemented Interfaces:
- Cloneable, Collection, List, RandomAccess, Serializable
- public class VMStack
- extends Stack
Represents the VM stack
- See Also:
- Serialized Form
Methods inherited from class java.util.Vector |
add, add, addAll, addAll, addElement, capacity, clear, clone, contains, containsAll, copyInto, elementAt, elements, ensureCapacity, equals, firstElement, get, hashCode, indexOf, indexOf, insertElementAt, isEmpty, lastElement, lastIndexOf, lastIndexOf, remove, remove, removeAll, removeAllElements, removeElement, removeElementAt, removeRange, retainAll, set, setElementAt, setSize, size, subList, toArray, toArray, toString, trimToSize |
thisPointer
public static final VMStack.ThisPointer thisPointer
dontCare
public static final VMStack.DontCare dontCare
PRODUCE_STACK
public static final int[] PRODUCE_STACK
VMStack
public VMStack(ConstantPoolGen cp,
Code code,
int nbArgs,
boolean isStatic)
preExecute
public void preExecute(InstructionHandle ih)
execute
public void execute(Instruction i,
InstructionHandle ih)
invokedObject
public Object invokedObject(InvokeInstruction i)
- Returns the stack element corresponding to the object on which
the InvokeInstruction is applied.
consume
public void consume(Instruction i)
- Consume values from the stack for the given instruction
produce
public void produce(Instruction i)
getConsumed
public static int getConsumed(Instruction i,
ConstantPoolGen cp)
- Returns the number of elements from the stack consumed by an
instruction
getProduced
public static int getProduced(Instruction i,
ConstantPoolGen cp)
- Returns the number of elements produced on the stack by an instruction
getSubstance
public Object getSubstance(InvokeInstruction invoke)
- Gets the value on which a method is invoked
- Parameters:
invoke
- the invoke instruction