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