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