Package org.jboss.classfilewriter.code
Class StackFrame
java.lang.Object
org.jboss.classfilewriter.code.StackFrame
Represents a stack frame in the virtual machine. Holds the state of the local variable array and the stack
- Author:
- Stuart Douglas
-
Constructor Summary
ConstructorsConstructorDescriptionStackFrame
(ClassMethod method) Creates the initial stack frameStackFrame
(StackState stackState, LocalVariableState localVariableState, StackFrameType type) -
Method Summary
Modifier and TypeMethodDescriptionpushes a null type onto the stackconstructorCall
(int initializedValueStackPosition) marks the value in potition initializedValueStackPosition as initialized.dup()
dup2()
dup2X1()
dup2X2()
dupX1()
dupX2()
getType()
mergeLocals
(int pos, StackEntry frame) mergeStack
(int pos, StackEntry frame) pop()
pops an operand from the stackpop
(int no) pop2()
pops 2 operands from the stackremote the top two operands and replace them with an different operandpop3()
pops 3 operands from the stackpop4()
pops 4 operands from the stackremote the top two operands and replace them with an different operandpush an operand of the given type onto the stackpush
(StackEntry entry) push an operand of the given type onto the stack.replace the operand at the top of the stack with the given operandstore
(int no) Store the variable on top of the stack into a local variable, poping the variable from the stack.swap()
toString()
-
Constructor Details
-
StackFrame
Creates the initial stack frame -
StackFrame
public StackFrame(StackState stackState, LocalVariableState localVariableState, StackFrameType type)
-
-
Method Details
-
getStackState
-
getLocalVariableState
-
push
push an operand of the given type onto the stackIf the entry is wide then a corresponding TOP type will be created
-
push
push an operand of the given type onto the stack.If the entry is wide then a corresponding TOP type will be created
-
aconstNull
pushes a null type onto the stack- Returns:
-
pop
-
pop
pops an operand from the stack -
pop2
pops 2 operands from the stack -
pop3
pops 3 operands from the stack -
pop4
pops 4 operands from the stack -
replace
replace the operand at the top of the stack with the given operand -
dup
-
dupX1
-
dupX2
-
dup2
-
dup2X1
-
dup2X2
-
store
Store the variable on top of the stack into a local variable, poping the variable from the stack. Wide types are handled automatically -
pop2push1
remote the top two operands and replace them with an different operand -
pop4push1
remote the top two operands and replace them with an different operand -
toString
-
constructorCall
marks the value in potition initializedValueStackPosition as initialized. This also pops this value and everything above it -
swap
-
mergeStack
-
mergeLocals
-
getType
-
createFull
-