Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Constructor and description |
---|
OperandStack
(WriterController wc) |
Type | Name 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 |
String |
toString() |
ensure last marked parameter on the stack is a primitive boolean if mark==stack size, we assume an empty expression or statement. was used and we will use the value given in emptyDefault as boolean if mark==stack.size()-1 the top element will be cast to boolean using Groovy truth. In other cases we throw a GroovyBugError
do Groovy cast for top level element
duplicate top element
remove operand stack top element using bytecode pop
push operand on stack
load the constant on the operand stack.
Remove amount elements from the operand stack, without using pop. For example after a method invocation
replace top level element with new element of given type
replace n top level elements with new element of given type
swap two top level operands
Copyright © 2003-2015 The Apache Software Foundation. All rights reserved.