public class OperandStack
extends java.lang.Object
Constructor and Description |
---|
OperandStack(WriterController wc) |
Modifier and Type | Method and Description |
---|---|
ClassNode |
box() |
void |
castToBool(int mark,
boolean emptyDefault)
ensure last marked parameter on the stack is a primitive boolean
if mark==stack size, we assume an empty expression or statement.
|
void |
doAsType(ClassNode targetType) |
void |
doGroovyCast(ClassNode targetType)
do Groovy cast for top level element
|
void |
doGroovyCast(Variable v) |
void |
dup()
duplicate top element
|
int |
getStackLength() |
ClassNode |
getTopOperand() |
org.objectweb.asm.Label |
jump(int ifIns) |
void |
jump(int ifIns,
org.objectweb.asm.Label label) |
void |
load(ClassNode type,
int idx) |
void |
loadOrStoreVariable(BytecodeVariable variable,
boolean useReferenceDirectly) |
void |
pop()
remove operand stack top element using bytecode pop
|
void |
popDownTo(int elements) |
void |
push(ClassNode type)
push operand on stack
|
void |
pushBool(boolean inclusive) |
void |
pushConstant(ConstantExpression expression)
load the constant on the operand stack.
|
void |
pushDynamicName(Expression name) |
void |
remove(int amount)
Remove amount elements from the operand stack, without using pop.
|
void |
replace(ClassNode type)
replace top level element with new element of given type
|
void |
replace(ClassNode type,
int n)
replace n top level elements with new element of given type
|
void |
storeVar(BytecodeVariable variable) |
void |
swap()
swap two top level operands
|
java.lang.String |
toString() |
public OperandStack(WriterController wc)
public int getStackLength()
public void popDownTo(int elements)
public void castToBool(int mark, boolean emptyDefault)
public void pop()
public org.objectweb.asm.Label jump(int ifIns)
public void jump(int ifIns, org.objectweb.asm.Label label)
public void dup()
public ClassNode box()
public void remove(int amount)
public void push(ClassNode type)
public void swap()
public void replace(ClassNode type)
public void replace(ClassNode type, int n)
public void doGroovyCast(ClassNode targetType)
public void doGroovyCast(Variable v)
public void doAsType(ClassNode targetType)
public void pushConstant(ConstantExpression expression)
public void pushDynamicName(Expression name)
public void loadOrStoreVariable(BytecodeVariable variable, boolean useReferenceDirectly)
public void storeVar(BytecodeVariable variable)
public void load(ClassNode type, int idx)
public void pushBool(boolean inclusive)
public java.lang.String toString()
toString
in class java.lang.Object
public ClassNode getTopOperand()