Package r.nodes.ast

Examples of r.nodes.ast.Constant


                ArgumentList list = new ArgumentList.Default();
                for (int i = 0; i < args.length; i++) {
                    if (i == posName) {
                        continue;
                    }
                    list.add(names[i], new Constant(args[i]));
                }
                return new RLanguage(new FunctionCall(functionName, list));
            }
        };
    }
View Full Code Here


        if (arit != null) {
            BinaryOperation bin = (BinaryOperation) valueNode;
            ASTNode binLHS = bin.getLHS();
            ASTNode binRHS = bin.getRHS();
            SimpleAccessVariable binVar = null;
            Constant constNode = null;

            if (binLHS instanceof SimpleAccessVariable) {
                binVar = (SimpleAccessVariable) binLHS;
            } else if (binRHS instanceof SimpleAccessVariable) {
                binVar = (SimpleAccessVariable) binRHS;
            }
            if (binLHS instanceof Constant) {
                constNode = (Constant) binLHS;
            } else if (binRHS instanceof Constant) {
                constNode = (Constant) binRHS;
            }
            if (binVar != null && constNode != null) {
                RSymbol binVarSymbol = binVar.getSymbol();
                int slot = getFrameSlot(assign, binVarSymbol);
                if (binVarSymbol == symbol && !assign.isSuper() && (constNode.getValue() instanceof ScalarIntImpl) && slot != -1) {
                    int cValue = ((ScalarIntImpl) constNode.getValue()).getInt();
                    if (cValue == 1) {
                        if (valueNode instanceof Add) {
                            // integer increment
                            if (DEBUG_SPECIAL_NODES) {
                                Utils.debug("increment node at " + PrettyPrinter.prettyPrint(assign));
View Full Code Here

TOP

Related Classes of r.nodes.ast.Constant

Copyright © 2018 www.massapicom. 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.