Package org.codehaus.groovy.classgen

Examples of org.codehaus.groovy.classgen.BytecodeExpression.visit()


            }
        }
        // single declaration
        else if (defineVariable) {
            VariableExpression var = (VariableExpression) leftExpression;
            rhsValueLoader.visit(acg);
            operandStack.doGroovyCast(var);
            compileStack.defineVariable(var, true);
            operandStack.remove(1);
        }
        // normal assignment
View Full Code Here


        }
        // normal assignment
        else {
            int mark = operandStack.getStackLength();
            // to leave a copy of the rightExpression value on the stack after the assignment.
            rhsValueLoader.visit(acg);
            leftExpression.visit(acg);
            operandStack.remove(operandStack.getStackLength()-mark);
        }
        compileStack.popLHS();
       
View Full Code Here

            operandStack.remove(operandStack.getStackLength()-mark);
        }
        compileStack.popLHS();
       
        // return value of assignment
        rhsValueLoader.visit(acg);
        compileStack.removeVar(rhsValueId);
    }

    private void loadInitValue(ClassNode type) {
        MethodVisitor mv = controller.getMethodVisitor();
View Full Code Here

                }
            }
        }
        // single declaration
        else if (defineVariable) {
            rhsValueLoader.visit(acg);
            operandStack.remove(1);
            compileStack.popLHS();
            return;
        }
        // normal assignment
View Full Code Here

        }
        // normal assignment
        else {
            int mark = operandStack.getStackLength();
            // to leave a copy of the rightExpression value on the stack after the assignment.
            rhsValueLoader.visit(acg);
            TypeChooser typeChooser = controller.getTypeChooser();
            ClassNode targetType = typeChooser.resolveType(leftExpression, controller.getClassNode());
            operandStack.doGroovyCast(targetType);
            leftExpression.visit(acg);
            operandStack.remove(operandStack.getStackLength()-mark);
View Full Code Here

            operandStack.remove(operandStack.getStackLength()-mark);
        }
        compileStack.popLHS();
       
        // return value of assignment
        rhsValueLoader.visit(acg);
        compileStack.removeVar(rhsValueId);
    }

    private void loadInitValue(ClassNode type) {
        MethodVisitor mv = controller.getMethodVisitor();
View Full Code Here

                                mv.visitInsn(I2S);
                            }
                        }
                    }
                };
                bytecodeExpression.visit(controller.getAcg());
                controller.getOperandStack().remove(1);
                return;
            }
        }
        super.writeBitwiseNegate(EMPTY_BITWISE_NEGATE);
View Full Code Here

                    mv.visitLabel(ne);
                    mv.visitInsn(ICONST_0);
                    mv.visitLabel(out);
                }
            };
            bytecodeExpression.visit(controller.getAcg());
            controller.getOperandStack().remove(1);
            return;
        }
        super.writeNotExpression(expression);
    }
View Full Code Here

                        } else if (double_TYPE == top) {
                            mv.visitInsn(DNEG);
                        }
                    }
                };
                bytecodeExpression.visit(controller.getAcg());
                controller.getOperandStack().remove(1);
                return;
            }
        }
        // we already visited the sub expression
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.