145 references to ExprFactory
Microsoft.CSharp (145)
Microsoft\CSharp\RuntimeBinder\RuntimeBinder.cs (13)
376return ExprFactory.CreateAnonymousMethod(delegateType, pScope, call); 402ExprLocal exprLocal = ExprFactory.CreateLocal(local); 435ExprFactory.AppendItemToList(arg, ref args, ref last); 454arg = ExprFactory.CreateConstant(SymbolTable.GetCTypeFromType(argument.Type), default(ConstVal)); 458arg = ExprFactory.CreateNull(); 463arg = ExprFactory.CreateConstant(SymbolTable.GetCTypeFromType(argument.Type), ConstVal.Get(argument.Value)); 473arg = ExprFactory.CreateNull(); 485arg = ExprFactory.CreateNamedArgumentSpecification(NameManager.Add(argument.Info.Name), arg); 605ExprMemberGroup memgroup = ExprFactory.CreateMemGroup( // Tree 695callingObject = ExprFactory.CreateClass(SymbolTable.GetCTypeFromType(t)); 891pList = pList == null ? pArg : ExprFactory.CreateList(pArg, pList); 1111ExprFactory.CreateClass(SymbolTable.GetCTypeFromType(argument.Value as Type)) : 1331return ExprFactory.CreateConstant(boolType, ConstVal.Get(result));
Microsoft\CSharp\RuntimeBinder\Semantics\Conversion.cs (10)
993ExprMemberGroup pMemGroup = ExprFactory.CreateMemGroup(null, mwiBest); 997ExprCall call = ExprFactory.CreateCall(0, typeDst, exprSrc, pMemGroup, mwiBest); 1035ExprCall pConversionCall = ExprFactory.CreateCall(0, typeDst, pConversionArgument, pMemGroup, mwiBest); 1051pexprDst = ExprFactory.CreateUserDefinedConversion(pTransformedArgument, exprDst, mwiBest); 1103ExprMemberGroup pMemGroup = ExprFactory.CreateMemGroup(null, mwiBest); 1104ExprCall pCall = ExprFactory.CreateCall(0, pTypeTo, pTransformedArgument, pMemGroup, mwiBest); 1165pexprDest = ExprFactory.CreateConstant(typeDest, cv); 1297ExprConstant expr = ExprFactory.CreateConstant(typeDest, cv); 1419ExprConstant exprConst = ExprFactory.CreateConstant(typeDecimal, cv); 1476ExprConstant exprConst = ExprFactory.CreateConstant(destType, cv);
Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs (22)
327return ExprFactory.CreateArrayIndex(elementType, pOp1, transformedIndices); 338=> ExprFactory.CreateCast(flags, type, argument); 358ExprCast exprCast = ExprFactory.CreateCast(exprFlags, typeDest, exprSrc); 371ExprConstant expr = ExprFactory.CreateConstant(typeDest, constant.Val); 411ExprCall pResult = ExprFactory.CreateCall(0, pReturnType, pArguments, pMemGroup, mwi); 450ExprField pResult = ExprFactory.CreateField(pFieldType, pOptionalObject, fwt); 525ExprProperty result = ExprFactory.CreateProperty(pReturnType, pObjectThrough, args, pMemGroup, pwt, mwtSet); 648return ExprFactory.CreateUserDefinedUnaryOperator(ek, call.Type, arg, call, pmethBest.mpwi); 672ExprMemberGroup pMemGroup = ExprFactory.CreateMemGroup(null, mpwi); 673ExprCall call = ExprFactory.CreateCall(0, typeRet, arg, pMemGroup, null); 685ExprMemberGroup pMemGroup = ExprFactory.CreateMemGroup(null, mpwi); 686ExprCall call = ExprFactory.CreateCall(0, typeRet, mustConvert(arg, typeArg), pMemGroup, null); 1110ExprFactory.AppendItemToList(indir, ref newArgs, ref newArgsTail); 1154ExprArrayInit arrayInit = ExprFactory.CreateArrayInit(arrayType, null, null, s_zero); 1192ExprFactory.AppendItemToList(rval, ref newArgs, ref newArgsTail); 1232ExprArrayInit exprArrayInit = ExprFactory.CreateArrayInit(substitutedArrayType, null, null, s_zero); 1245argsPtr = ExprFactory.CreateList(argsPtr, exprArrayInit); 1247ExprFactory.AppendItemToList(exprArrayInit, ref newArgs, ref newArgsTail); 1269ExprFactory.AppendItemToList(expr, ref newList, ref newListTail); 1274ExprFactory.AppendItemToList(exprArrayInit, ref newArgs, ref newArgsTail); 1623private static ExprWrap WrapShortLivedExpression(Expr expr) => ExprFactory.CreateWrap(expr); 1625private 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)
505optionalArgument = ExprFactory.CreateConstant(dateTimeType, ConstVal.Get(DateTime.FromBinary(cv.Int64Val))); 516optionalArgument = ExprFactory.CreateConstant( 526optionalArgument = ExprFactory.CreateNull(); 534optionalArgument = ExprFactory.CreateZeroInit(pParamType); 549optionalArgument = ExprFactory.CreateNull(); 559ExprField exprField = ExprFactory.CreateField(agg.getThisType(), null, fwt); 560optionalArgument = ExprFactory.CreateCast(type, exprField); 568optionalArgument = ExprFactory.CreateZeroInit(pParamType);
Microsoft\CSharp\RuntimeBinder\Semantics\ImplicitConversion.cs (7)
315? ExprFactory.CreateZeroInit(nubDst) 316: ExprFactory.CreateCast(_typeDest, _exprSrc); 368ExprMemberGroup pMemGroup = ExprFactory.CreateMemGroup(null, mwi); 369ExprCall exprDst = ExprFactory.CreateCall(0, nubDst, _exprSrc, pMemGroup, null); 414? ExprFactory.CreateZeroInit(_typeDest) 415: ExprFactory.CreateCast(_typeDest, _exprSrc); 660_exprDest = ExprFactory.CreateConstant(_typeDest, ConstVal.GetDefaultValue(_typeDest.ConstValKind));
Microsoft\CSharp\RuntimeBinder\Semantics\Nullable.cs (4)
57ExprMemberGroup pMemGroup = ExprFactory.CreateMemGroup(exprSrc, mpwi); 58return ExprFactory.CreateProperty(typeBase, null, null, pMemGroup, pwt, null); 71ExprMemberGroup memgroup = ExprFactory.CreateMemGroup(null, methwithinst); 72return ExprFactory.CreateCall(EXPRFLAG.EXF_NEWOBJCALL | EXPRFLAG.EXF_CANTBENULL, pNubSourceType, exprSrc, memgroup, methwithinst);
Microsoft\CSharp\RuntimeBinder\Semantics\Operators.cs (40)
169return ExprFactory.CreateUserDefinedBinop(ek, expr.Type, info.arg1, info.arg2, expr, pmpwi); 462arg2 = ExprFactory.CreateZeroInit(info.type1); 463exprRes = ExprFactory.CreateBinop(ek, typeBool, arg1, arg2); 467arg1 = ExprFactory.CreateZeroInit(info.type2); 468exprRes = ExprFactory.CreateBinop(ek, typeBool, arg1, arg2); 645ExprBinOp exprRes = ExprFactory.CreateBinop(ek, resultType, pArgument1, pArgument2); 1282pArgument = ExprFactory.CreateCast(pArgument.Type, pArgument); 1348ExprMultiGet exprGet = ExprFactory.CreateMultiGet(0, pArgumentType, null); 1359ExprMulti exprMulti = ExprFactory.CreateMulti(EXPRFLAG.EXF_ASSGOP | flags, pArgumentType, pArgument, exprVal); 1526ExprUnaryOp exprRes = ExprFactory.CreateUnaryOp(ek, type, pArgument); 1696ExprBinOp pExprResult = ExprFactory.CreateBinop(ek, typeTmp, exprVal, ExprFactory.CreateConstant(typeOne, cv)); 1708ExprMultiGet exprGet = ExprFactory.CreateMultiGet(EXPRFLAG.EXF_ASSGOP, arg.Type, null); 1723ExprMulti exprMulti = ExprFactory.CreateMulti(EXPRFLAG.EXF_ASSGOP | flags, arg.Type, arg, op); 1737ExprMultiGet exprGet = ExprFactory.CreateMultiGet(EXPRFLAG.EXF_ASSGOP, arg.Type, null); 1747ExprUnaryOp exprRes = ExprFactory.CreateUnaryOp((ek == ExpressionKind.Add) ? ExpressionKind.Inc : ExpressionKind.Dec, arg.Type/* type */, exprVal); 1751ExprMulti exprMulti = ExprFactory.CreateMulti(EXPRFLAG.EXF_ASSGOP | flags, arg.Type, arg, exprRes); 1795return ExprFactory.CreateBinop(ek, typeRet, arg1, arg2); 1818return ExprFactory.CreateUnaryOp(ExpressionKind.UnaryPlus, typeDec, arg); 1846return ExprFactory.CreateBinop(ek, arg1.Type, arg1, arg2); 1862return ExprFactory.CreateBinop(ek, GetPredefindType(PredefinedType.PT_BOOL), arg1, arg2); 1888ExprBinOp exprRes = ExprFactory.CreateBinop(ek, typeRes, expr1, expr2); 1924return ExprFactory.CreateUnaryOp(ExpressionKind.LogicalNot, typeBool, arg); 1926return ExprFactory.CreateConstant(typeBool, ConstVal.Get(((ExprConstant)argConst).Val.Int32Val == 0)); 1961return ExprFactory.CreateBinop(ek, GetPredefindType(PredefinedType.PT_BOOL), arg1, arg2); 2068ExprBinOp exprRes = ExprFactory.CreateBinop(ek, typeOp, arg1, arg2); 2204ExprOperator exprRes = ExprFactory.CreateOperator(kind, typeDest, op1, op2); 2259ExprOperator exprRes = ExprFactory.CreateNeg(flags, op); 2281ExprOperator exprRes = ExprFactory.CreateOperator(kind, typeDest, op1, op2); 2309return ExprFactory.CreateConcat(op1, op2); 2367return ExprFactory.CreateUserLogOp(typeRet, kind == ExpressionKind.LogicalAnd ? pCallF : pCallT, pCall); 2554ExprList args = ExprFactory.CreateList(arg1, arg2); 2587ExprList args = ExprFactory.CreateList(arg1, arg2); 2594ExprMemberGroup pMemGroup = ExprFactory.CreateMemGroup(null, mpwi); 2595ExprCall call = ExprFactory.CreateCall(0, typeRet, args, pMemGroup, null); 2662ExprList args = ExprFactory.CreateList(exprVal1, exprVal2); 2663ExprMemberGroup pMemGroup = ExprFactory.CreateMemGroup(null, mpwi); 2664ExprCall call = ExprFactory.CreateCall(0, typeRet, args, pMemGroup, null); 2726ExprBinOp binop = ExprFactory.CreateBinop(ek, RetType, arg1, arg2); 2741ExprUnaryOp pUnaryOp = ExprFactory.CreateUnaryOp(ek, pRetType, pArg);
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Visitors\ExpressionTreeRewriter.cs (40)
52Expr propInfo = ExprFactory.CreatePropertyInfo(prop.PropWithTypeSlot.Prop(), prop.PropWithTypeSlot.Ats); 102Expr args = ExprFactory.CreateList(body, parameters); 104ExprMemberGroup pMemGroup = ExprFactory.CreateMemGroup(null, mwi); 105ExprCall call = ExprFactory.CreateCall(0, typeRet, args, pMemGroup, mwi); 107return ExprFactory.CreateSequence(createParameters, call); 132pObject = ExprFactory.CreateNull(); 138ExprFieldInfo pFieldInfo = ExprFactory.CreateFieldInfo(expr.FieldWithType.Field(), expr.FieldWithType.GetType()); 199Expr methodInfo = ExprFactory.CreateMethodInfo(method, SymbolLoader.GetPredefindType(PredefinedType.PT_STRING), null); 276pObject = ExprFactory.CreateNull(); 301Expr methodInfo = ExprFactory.CreateMethodInfo(expr.MethWithInst); 317pObject = ExprFactory.CreateNull(); 323Expr propInfo = ExprFactory.CreatePropertyInfo(expr.PropWithTypeSlot.Prop(), expr.PropWithTypeSlot.GetType()); 566Expr methodInfo = ExprFactory.CreateMethodInfo(expr.UserDefinedCallMethod); 619Expr methodInfo = ExprFactory.CreateMethodInfo(expr.UserDefinedCallMethod); 662Expr lift = ExprFactory.CreateBoolConstant(false); // We never lift to null in C#. 663Expr methodInfo = ExprFactory.CreateMethodInfo(expr.UserDefinedCallMethod); 724Expr methodInfo = ExprFactory.CreateMethodInfo(method); 791ExprConstant nameString = ExprFactory.CreateStringConstant(name); 800private static ExprTypeOf CreateTypeOf(CType type) => ExprFactory.CreateTypeOf(type); 815local.wrap = ExprFactory.CreateWrap(create); 816Expr save = ExprFactory.CreateSave(local.wrap); 823sequence = ExprFactory.CreateSequence(sequence, save); 835Expr constructorInfo = ExprFactory.CreateMethodInfo(expr.MethWithInst); 849ExprFactory.AppendItemToList(Visit(oldArg), ref newArgs, ref newArgsTail); 866newIndex = ExprFactory.CreateCast(EXPRFLAG.EXF_INDEXEXPR, intType, newIndex); 870ExprFactory.AppendItemToList(rewrittenIndex, ref newIndices, ref newIndicesTail); 894ExprCast cast = ExprFactory.CreateCast(flags, pObject, expr); 910ExprMemberGroup pMemGroup = ExprFactory.CreateMemGroup(null, mwi); 911ExprCall call = ExprFactory.CreateCall(0, mwi.Meth().RetType, arg1, pMemGroup, mwi); 923Expr args = ExprFactory.CreateList(arg1, arg2); 925ExprMemberGroup pMemGroup = ExprFactory.CreateMemGroup(null, mwi); 926ExprCall call = ExprFactory.CreateCall(0, mwi.Meth().RetType, args, pMemGroup, mwi); 938Expr args = ExprFactory.CreateList(arg1, arg2, arg3); 940ExprMemberGroup pMemGroup = ExprFactory.CreateMemGroup(null, mwi); 941ExprCall call = ExprFactory.CreateCall(0, mwi.Meth().RetType, args, pMemGroup, mwi); 953Expr args = ExprFactory.CreateList(arg1, arg2, arg3, arg4); 955ExprMemberGroup pMemGroup = ExprFactory.CreateMemGroup(null, mwi); 956ExprCall call = ExprFactory.CreateCall(0, mwi.Meth().RetType, args, pMemGroup, mwi); 967ExprConstant paramsArrayArg = ExprFactory.CreateIntegerConstant(parameterCount); 968return ExprFactory.CreateArrayInit(paramsArrayType, args, paramsArrayArg, new int[] { parameterCount });