public EXPRBINOP CreateBinop(ExpressionKind exprKind, CType pType, EXPR p1, EXPR p2)
        {
            //Debug.Assert(exprKind.isBinaryOperator());
            EXPRBINOP rval = new EXPRBINOP();

            rval.kind  = exprKind;
            rval.type  = pType;
            rval.flags = EXPRFLAG.EXF_BINOP;
            rval.SetOptionalLeftChild(p1);
            rval.SetOptionalRightChild(p2);
            rval.isLifted = false;
            rval.SetOptionalUserDefinedCall(null);
            rval.SetUserDefinedCallMethod(null);
            Debug.Assert(rval != null);
            return(rval);
        }
        public EXPRBINOP CreateUserDefinedBinop(ExpressionKind exprKind, CType pType, EXPR p1, EXPR p2, EXPR call, MethPropWithInst pmpwi)
        {
            Debug.Assert(p1 != null);
            Debug.Assert(p2 != null);
            Debug.Assert(call != null);
            EXPRBINOP rval = new EXPRBINOP();

            rval.kind  = exprKind;
            rval.type  = pType;
            rval.flags = EXPRFLAG.EXF_BINOP;
            rval.SetOptionalLeftChild(p1);
            rval.SetOptionalRightChild(p2);
            // The call may be lifted, but we do not mark the outer binop as lifted.
            rval.isLifted = false;
            rval.SetOptionalUserDefinedCall(call);
            rval.SetUserDefinedCallMethod(pmpwi);
            if (call.HasError())
            {
                rval.SetError();
            }
            Debug.Assert(rval != null);
            return(rval);
        }
Exemple #3
0
 public EXPRBINOP CreateUserDefinedBinop(ExpressionKind exprKind, CType pType, EXPR p1, EXPR p2, EXPR call, MethPropWithInst pmpwi)
 {
     Debug.Assert(p1 != null);
     Debug.Assert(p2 != null);
     Debug.Assert(call != null);
     EXPRBINOP rval = new EXPRBINOP();
     rval.kind = exprKind;
     rval.type = pType;
     rval.flags = EXPRFLAG.EXF_BINOP;
     rval.SetOptionalLeftChild(p1);
     rval.SetOptionalRightChild(p2);
     // The call may be lifted, but we do not mark the outer binop as lifted.
     rval.isLifted = false;
     rval.SetOptionalUserDefinedCall(call);
     rval.SetUserDefinedCallMethod(pmpwi);
     if (call.HasError())
     {
         rval.SetError();
     }
     Debug.Assert(rval != null);
     return (rval);
 }
Exemple #4
0
 public EXPRBINOP CreateBinop(ExpressionKind exprKind, CType pType, EXPR p1, EXPR p2)
 {
     //Debug.Assert(exprKind.isBinaryOperator());
     EXPRBINOP rval = new EXPRBINOP();
     rval.kind = exprKind;
     rval.type = pType;
     rval.flags = EXPRFLAG.EXF_BINOP;
     rval.SetOptionalLeftChild(p1);
     rval.SetOptionalRightChild(p2);
     rval.isLifted = false;
     rval.SetOptionalUserDefinedCall(null);
     rval.SetUserDefinedCallMethod(null);
     Debug.Assert(rval != null);
     return (rval);
 }