Package org.openquark.cal.compiler.SourceModel.Expr

Examples of org.openquark.cal.compiler.SourceModel.Expr.BinaryOp


                        isRedundant = false;
                    }
                }
               
            } else if(lambdaExp instanceof BinaryOp) {
                BinaryOp definingExpr = (BinaryOp)lambdaExp;
               
                if(lambda.getNParameters() == 2 &&
                   isParameterVar(lambda.getNthParameter(0), definingExpr.getLeftExpr()) &&
                   isParameterVar(lambda.getNthParameter(1), definingExpr.getRightExpr())) {
                   
                    isRedundant = true;
                   
                } else if(lambda.getNParameters() == 1 &&
                   isParameterVar(lambda.getNthParameter(0), definingExpr.getRightExpr()) &&
                   !containsParameterReference(lambda.getNthParameter(0), definingExpr.getLeftExpr())) {
                   
                    isRedundant = true;
                }
           
            } else if(lambdaExp instanceof UnaryOp) {
                UnaryOp definingExpr = (UnaryOp)lambdaExp;
                if(lambda.getNParameters() == 1 &&
                   isParameterVar(lambda.getNthParameter(0), definingExpr.getExpr())) {
                   
                    isRedundant = true;
                }
            }
           
View Full Code Here

TOP

Related Classes of org.openquark.cal.compiler.SourceModel.Expr.BinaryOp

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.