public EXPRUSERDEFINEDCONVERSION CreateUserDefinedConversion(EXPR arg, EXPR call, MethWithInst mwi) { Debug.Assert(arg != null); Debug.Assert(call != null); EXPRUSERDEFINEDCONVERSION rval = new EXPRUSERDEFINEDCONVERSION(); rval.kind = ExpressionKind.EK_USERDEFINEDCONVERSION; rval.type = call.type; rval.flags = 0; rval.Argument = arg; rval.UserDefinedCall = call; rval.UserDefinedCallMethod = mwi; if (call.HasError()) { rval.SetError(); } Debug.Assert(rval != null); return(rval); }
public EXPRUNARYOP CreateUserDefinedUnaryOperator(ExpressionKind exprKind, CType pType, EXPR pOperand, EXPR call, MethPropWithInst pmpwi) { Debug.Assert(pType != null); Debug.Assert(pOperand != null); Debug.Assert(call != null); Debug.Assert(pmpwi != null); EXPRUNARYOP rval = new EXPRUNARYOP(); rval.kind = exprKind; rval.type = pType; rval.flags = 0; rval.Child = pOperand; // The call may be lifted, but we do not mark the outer binop as lifted. rval.OptionalUserDefinedCall = call; rval.UserDefinedCallMethod = pmpwi; if (call.HasError()) { rval.SetError(); } 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); }
public EXPRUNARYOP CreateUserDefinedUnaryOperator(ExpressionKind exprKind, CType pType, EXPR pOperand, EXPR call, MethPropWithInst pmpwi) { Debug.Assert(pType != null); Debug.Assert(pOperand != null); Debug.Assert(call != null); Debug.Assert(pmpwi != null); EXPRUNARYOP rval = new EXPRUNARYOP(); rval.kind = exprKind; rval.type = pType; rval.flags = 0; rval.Child = pOperand; // The call may be lifted, but we do not mark the outer binop as lifted. rval.OptionalUserDefinedCall = call; rval.UserDefinedCallMethod = pmpwi; if (call.HasError()) { rval.SetError(); } 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); }
public EXPRUSERDEFINEDCONVERSION CreateUserDefinedConversion(EXPR arg, EXPR call, MethWithInst mwi) { Debug.Assert(arg != null); Debug.Assert(call != null); EXPRUSERDEFINEDCONVERSION rval = new EXPRUSERDEFINEDCONVERSION(); rval.kind = ExpressionKind.EK_USERDEFINEDCONVERSION; rval.type = call.type; rval.flags = 0; rval.Argument = arg; rval.UserDefinedCall = call; rval.UserDefinedCallMethod = mwi; if (call.HasError()) { rval.SetError(); } Debug.Assert(rval != null); return rval; }