Package com.sun.tools.javac.tree.JCTree

Examples of com.sun.tools.javac.tree.JCTree.Tag


        if (currentValue == null) {
            return Value.UNKNOWN;
        }

        Tag opcode = OPASG_TO_OP.get(assignOp.getTag());
        Value newValue = Value.binary(opcode, currentValue, rhs);
        currentAssignments.put(targetSym, newValue);

        return newValue;
    }
View Full Code Here


    public Value evaluate(AJCUnaryAsg unary) {
        Value arg = evaluate(unary.arg);

        Value result = null;
        Tag opcode = unary.getTag();

        int inc;
        switch (opcode) {
            case POSTINC:
                inc = 1;
View Full Code Here

public class ConstFoldTranslator extends BaseTranslator {
    @Override
    public void visitUnary(AJCUnary tree) {
        super.visitUnary(tree);
        // Determine the type of this unary operation.
        final Tag nodeTag = tree.getTag();
        final AJCExpressionTree expr = tree.arg;

        // Replace each unary operation on a literal with a literal of the new value.
        if (!(expr instanceof AJCLiteral)) {
            return;
View Full Code Here

    @Override
    public void visitBinary(AJCBinary tree) {
        super.visitBinary(tree);
        // Determine the type of this unary operation.
        final Tag nodeTag = tree.getTag();
        AJCExpressionTree leftOperand = tree.lhs;
        AJCExpressionTree rightOperand = tree.rhs;

        // Ensure this is an operation on literals before proceeding.
        if (!(leftOperand instanceof AJCLiteral && rightOperand instanceof AJCLiteral)) {
View Full Code Here

TOP

Related Classes of com.sun.tools.javac.tree.JCTree.Tag

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.