145 references to ExprFactory
Microsoft.CSharp (145)
Microsoft\CSharp\RuntimeBinder\RuntimeBinder.cs (13)
388return ExprFactory.CreateAnonymousMethod(delegateType, pScope, call); 415ExprLocal exprLocal = ExprFactory.CreateLocal(local); 449ExprFactory.AppendItemToList(arg, ref args, ref last); 469arg = ExprFactory.CreateConstant(SymbolTable.GetCTypeFromType(argument.Type), default(ConstVal)); 473arg = ExprFactory.CreateNull(); 478arg = ExprFactory.CreateConstant(SymbolTable.GetCTypeFromType(argument.Type), ConstVal.Get(argument.Value)); 488arg = ExprFactory.CreateNull(); 500arg = ExprFactory.CreateNamedArgumentSpecification(NameManager.Add(argument.Info.Name), arg); 621ExprMemberGroup memgroup = ExprFactory.CreateMemGroup( // Tree 716callingObject = ExprFactory.CreateClass(SymbolTable.GetCTypeFromType(t)); 914pList = pList == null ? pArg : ExprFactory.CreateList(pArg, pList); 1137ExprFactory.CreateClass(SymbolTable.GetCTypeFromType(argument.Value as Type)) : 1361return ExprFactory.CreateConstant(boolType, ConstVal.Get(result));
Microsoft\CSharp\RuntimeBinder\Semantics\Conversion.cs (10)
1020ExprMemberGroup pMemGroup = ExprFactory.CreateMemGroup(null, mwiBest); 1024ExprCall call = ExprFactory.CreateCall(0, typeDst, exprSrc, pMemGroup, mwiBest); 1062ExprCall pConversionCall = ExprFactory.CreateCall(0, typeDst, pConversionArgument, pMemGroup, mwiBest); 1078pexprDst = ExprFactory.CreateUserDefinedConversion(pTransformedArgument, exprDst, mwiBest); 1133ExprMemberGroup pMemGroup = ExprFactory.CreateMemGroup(null, mwiBest); 1134ExprCall pCall = ExprFactory.CreateCall(0, pTypeTo, pTransformedArgument, pMemGroup, mwiBest); 1196pexprDest = ExprFactory.CreateConstant(typeDest, cv); 1328ExprConstant expr = ExprFactory.CreateConstant(typeDest, cv); 1453ExprConstant exprConst = ExprFactory.CreateConstant(typeDecimal, cv); 1510ExprConstant exprConst = ExprFactory.CreateConstant(destType, cv);
Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs (22)
331return ExprFactory.CreateArrayIndex(elementType, pOp1, transformedIndices); 344=> ExprFactory.CreateCast(flags, type, argument); 366ExprCast exprCast = ExprFactory.CreateCast(exprFlags, typeDest, exprSrc); 379ExprConstant expr = ExprFactory.CreateConstant(typeDest, constant.Val); 420ExprCall pResult = ExprFactory.CreateCall(0, pReturnType, pArguments, pMemGroup, mwi); 460ExprField pResult = ExprFactory.CreateField(pFieldType, pOptionalObject, fwt); 536ExprProperty result = ExprFactory.CreateProperty(pReturnType, pObjectThrough, args, pMemGroup, pwt, mwtSet); 660return ExprFactory.CreateUserDefinedUnaryOperator(ek, call.Type, arg, call, pmethBest.mpwi); 685ExprMemberGroup pMemGroup = ExprFactory.CreateMemGroup(null, mpwi); 686ExprCall call = ExprFactory.CreateCall(0, typeRet, arg, pMemGroup, null); 699ExprMemberGroup pMemGroup = ExprFactory.CreateMemGroup(null, mpwi); 700ExprCall call = ExprFactory.CreateCall(0, typeRet, mustConvert(arg, typeArg), pMemGroup, null); 1135ExprFactory.AppendItemToList(indir, ref newArgs, ref newArgsTail); 1179ExprArrayInit arrayInit = ExprFactory.CreateArrayInit(arrayType, null, null, s_zero); 1217ExprFactory.AppendItemToList(rval, ref newArgs, ref newArgsTail); 1257ExprArrayInit exprArrayInit = ExprFactory.CreateArrayInit(substitutedArrayType, null, null, s_zero); 1270argsPtr = ExprFactory.CreateList(argsPtr, exprArrayInit); 1272ExprFactory.AppendItemToList(exprArrayInit, ref newArgs, ref newArgsTail); 1294ExprFactory.AppendItemToList(expr, ref newList, ref newListTail); 1299ExprFactory.AppendItemToList(exprArrayInit, ref newArgs, ref newArgsTail); 1652private static ExprWrap WrapShortLivedExpression(Expr expr) => ExprFactory.CreateWrap(expr); 1654private static ExprAssignment GenerateOptimizedAssignment(Expr op1, Expr op2) => ExprFactory.CreateAssignment(op1, op2);
Microsoft\CSharp\RuntimeBinder\Semantics\EXPRExtensions.cs (1)
26ExprFactory.AppendItemToList(mappedItem, ref result, ref tail);
Microsoft\CSharp\RuntimeBinder\Semantics\GroupToArgsBinder.cs (8)
506optionalArgument = ExprFactory.CreateConstant(dateTimeType, ConstVal.Get(DateTime.FromBinary(cv.Int64Val))); 517optionalArgument = ExprFactory.CreateConstant( 527optionalArgument = ExprFactory.CreateNull(); 535optionalArgument = ExprFactory.CreateZeroInit(pParamType); 550optionalArgument = ExprFactory.CreateNull(); 560ExprField exprField = ExprFactory.CreateField(agg.getThisType(), null, fwt); 561optionalArgument = ExprFactory.CreateCast(type, exprField); 569optionalArgument = ExprFactory.CreateZeroInit(pParamType);
Microsoft\CSharp\RuntimeBinder\Semantics\ImplicitConversion.cs (7)
317? ExprFactory.CreateZeroInit(nubDst) 318: ExprFactory.CreateCast(_typeDest, _exprSrc); 370ExprMemberGroup pMemGroup = ExprFactory.CreateMemGroup(null, mwi); 371ExprCall exprDst = ExprFactory.CreateCall(0, nubDst, _exprSrc, pMemGroup, null); 416? ExprFactory.CreateZeroInit(_typeDest) 417: ExprFactory.CreateCast(_typeDest, _exprSrc); 662_exprDest = ExprFactory.CreateConstant(_typeDest, ConstVal.GetDefaultValue(_typeDest.ConstValKind));
Microsoft\CSharp\RuntimeBinder\Semantics\Nullable.cs (4)
58ExprMemberGroup pMemGroup = ExprFactory.CreateMemGroup(exprSrc, mpwi); 59return ExprFactory.CreateProperty(typeBase, null, null, pMemGroup, pwt, null); 73ExprMemberGroup memgroup = ExprFactory.CreateMemGroup(null, methwithinst); 74return ExprFactory.CreateCall(EXPRFLAG.EXF_NEWOBJCALL | EXPRFLAG.EXF_CANTBENULL, pNubSourceType, exprSrc, memgroup, methwithinst);
Microsoft\CSharp\RuntimeBinder\Semantics\Operators.cs (40)
178return ExprFactory.CreateUserDefinedBinop(ek, expr.Type, info.arg1, info.arg2, expr, pmpwi); 475arg2 = ExprFactory.CreateZeroInit(info.type1); 476exprRes = ExprFactory.CreateBinop(ek, typeBool, arg1, arg2); 480arg1 = ExprFactory.CreateZeroInit(info.type2); 481exprRes = ExprFactory.CreateBinop(ek, typeBool, arg1, arg2); 661ExprBinOp exprRes = ExprFactory.CreateBinop(ek, resultType, pArgument1, pArgument2); 1307pArgument = ExprFactory.CreateCast(pArgument.Type, pArgument); 1374ExprMultiGet exprGet = ExprFactory.CreateMultiGet(0, pArgumentType, null); 1385ExprMulti exprMulti = ExprFactory.CreateMulti(EXPRFLAG.EXF_ASSGOP | flags, pArgumentType, pArgument, exprVal); 1554ExprUnaryOp exprRes = ExprFactory.CreateUnaryOp(ek, type, pArgument); 1732ExprBinOp pExprResult = ExprFactory.CreateBinop(ek, typeTmp, exprVal, ExprFactory.CreateConstant(typeOne, cv)); 1745ExprMultiGet exprGet = ExprFactory.CreateMultiGet(EXPRFLAG.EXF_ASSGOP, arg.Type, null); 1760ExprMulti exprMulti = ExprFactory.CreateMulti(EXPRFLAG.EXF_ASSGOP | flags, arg.Type, arg, op); 1775ExprMultiGet exprGet = ExprFactory.CreateMultiGet(EXPRFLAG.EXF_ASSGOP, arg.Type, null); 1785ExprUnaryOp exprRes = ExprFactory.CreateUnaryOp((ek == ExpressionKind.Add) ? ExpressionKind.Inc : ExpressionKind.Dec, arg.Type/* type */, exprVal); 1789ExprMulti exprMulti = ExprFactory.CreateMulti(EXPRFLAG.EXF_ASSGOP | flags, arg.Type, arg, exprRes); 1834return ExprFactory.CreateBinop(ek, typeRet, arg1, arg2); 1858return ExprFactory.CreateUnaryOp(ExpressionKind.UnaryPlus, typeDec, arg); 1888return ExprFactory.CreateBinop(ek, arg1.Type, arg1, arg2); 1905return ExprFactory.CreateBinop(ek, GetPredefindType(PredefinedType.PT_BOOL), arg1, arg2); 1932ExprBinOp exprRes = ExprFactory.CreateBinop(ek, typeRes, expr1, expr2); 1969return ExprFactory.CreateUnaryOp(ExpressionKind.LogicalNot, typeBool, arg); 1971return ExprFactory.CreateConstant(typeBool, ConstVal.Get(((ExprConstant)argConst).Val.Int32Val == 0)); 2008return ExprFactory.CreateBinop(ek, GetPredefindType(PredefinedType.PT_BOOL), arg1, arg2); 2118ExprBinOp exprRes = ExprFactory.CreateBinop(ek, typeOp, arg1, arg2); 2256ExprOperator exprRes = ExprFactory.CreateOperator(kind, typeDest, op1, op2); 2312ExprOperator exprRes = ExprFactory.CreateNeg(flags, op); 2335ExprOperator exprRes = ExprFactory.CreateOperator(kind, typeDest, op1, op2); 2364return ExprFactory.CreateConcat(op1, op2); 2424return ExprFactory.CreateUserLogOp(typeRet, kind == ExpressionKind.LogicalAnd ? pCallF : pCallT, pCall); 2617ExprList args = ExprFactory.CreateList(arg1, arg2); 2651ExprList args = ExprFactory.CreateList(arg1, arg2); 2658ExprMemberGroup pMemGroup = ExprFactory.CreateMemGroup(null, mpwi); 2659ExprCall call = ExprFactory.CreateCall(0, typeRet, args, pMemGroup, null); 2727ExprList args = ExprFactory.CreateList(exprVal1, exprVal2); 2728ExprMemberGroup pMemGroup = ExprFactory.CreateMemGroup(null, mpwi); 2729ExprCall call = ExprFactory.CreateCall(0, typeRet, args, pMemGroup, null); 2793ExprBinOp binop = ExprFactory.CreateBinop(ek, RetType, arg1, arg2); 2809ExprUnaryOp pUnaryOp = ExprFactory.CreateUnaryOp(ek, pRetType, pArg);
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Visitors\ExpressionTreeRewriter.cs (40)
53Expr propInfo = ExprFactory.CreatePropertyInfo(prop.PropWithTypeSlot.Prop(), prop.PropWithTypeSlot.Ats); 103Expr args = ExprFactory.CreateList(body, parameters); 105ExprMemberGroup pMemGroup = ExprFactory.CreateMemGroup(null, mwi); 106ExprCall call = ExprFactory.CreateCall(0, typeRet, args, pMemGroup, mwi); 108return ExprFactory.CreateSequence(createParameters, call); 133pObject = ExprFactory.CreateNull(); 139ExprFieldInfo pFieldInfo = ExprFactory.CreateFieldInfo(expr.FieldWithType.Field(), expr.FieldWithType.GetType()); 200Expr methodInfo = ExprFactory.CreateMethodInfo(method, SymbolLoader.GetPredefindType(PredefinedType.PT_STRING), null); 277pObject = ExprFactory.CreateNull(); 302Expr methodInfo = ExprFactory.CreateMethodInfo(expr.MethWithInst); 318pObject = ExprFactory.CreateNull(); 324Expr propInfo = ExprFactory.CreatePropertyInfo(expr.PropWithTypeSlot.Prop(), expr.PropWithTypeSlot.GetType()); 567Expr methodInfo = ExprFactory.CreateMethodInfo(expr.UserDefinedCallMethod); 620Expr methodInfo = ExprFactory.CreateMethodInfo(expr.UserDefinedCallMethod); 663Expr lift = ExprFactory.CreateBoolConstant(false); // We never lift to null in C#. 664Expr methodInfo = ExprFactory.CreateMethodInfo(expr.UserDefinedCallMethod); 725Expr methodInfo = ExprFactory.CreateMethodInfo(method); 792ExprConstant nameString = ExprFactory.CreateStringConstant(name); 801private static ExprTypeOf CreateTypeOf(CType type) => ExprFactory.CreateTypeOf(type); 816local.wrap = ExprFactory.CreateWrap(create); 817Expr save = ExprFactory.CreateSave(local.wrap); 824sequence = ExprFactory.CreateSequence(sequence, save); 836Expr constructorInfo = ExprFactory.CreateMethodInfo(expr.MethWithInst); 850ExprFactory.AppendItemToList(Visit(oldArg), ref newArgs, ref newArgsTail); 867newIndex = ExprFactory.CreateCast(EXPRFLAG.EXF_INDEXEXPR, intType, newIndex); 871ExprFactory.AppendItemToList(rewrittenIndex, ref newIndices, ref newIndicesTail); 895ExprCast cast = ExprFactory.CreateCast(flags, pObject, expr); 911ExprMemberGroup pMemGroup = ExprFactory.CreateMemGroup(null, mwi); 912ExprCall call = ExprFactory.CreateCall(0, mwi.Meth().RetType, arg1, pMemGroup, mwi); 924Expr args = ExprFactory.CreateList(arg1, arg2); 926ExprMemberGroup pMemGroup = ExprFactory.CreateMemGroup(null, mwi); 927ExprCall call = ExprFactory.CreateCall(0, mwi.Meth().RetType, args, pMemGroup, mwi); 939Expr args = ExprFactory.CreateList(arg1, arg2, arg3); 941ExprMemberGroup pMemGroup = ExprFactory.CreateMemGroup(null, mwi); 942ExprCall call = ExprFactory.CreateCall(0, mwi.Meth().RetType, args, pMemGroup, mwi); 954Expr args = ExprFactory.CreateList(arg1, arg2, arg3, arg4); 956ExprMemberGroup pMemGroup = ExprFactory.CreateMemGroup(null, mwi); 957ExprCall call = ExprFactory.CreateCall(0, mwi.Meth().RetType, args, pMemGroup, mwi); 968ExprConstant paramsArrayArg = ExprFactory.CreateIntegerConstant(parameterCount); 969return ExprFactory.CreateArrayInit(paramsArrayType, args, paramsArrayArg, new int[] { parameterCount });