854 references to PredefinedType
Microsoft.CSharp (854)
Microsoft\CSharp\RuntimeBinder\RuntimeBinder.cs (5)
375
AggregateType delegateType = SymbolLoader.GetPredefindType(
PredefinedType
.PT_FUNC);
527
callingType = SymbolLoader.GetPredefindType(
PredefinedType
.PT_ARRAY);
955
Expr result = _binder.tryConvert(arg1, SymbolLoader.GetPredefindType(
PredefinedType
.PT_BOOL));
967
?? _binder.mustConvert(arg1, SymbolLoader.GetPredefindType(
PredefinedType
.PT_BOOL));
1296
CType boolType = SymbolLoader.GetPredefindType(
PredefinedType
.PT_BOOL);
Microsoft\CSharp\RuntimeBinder\Semantics\Binding\Better.cs (4)
464
PredefinedType
pt1 = p1.PredefinedType;
465
if (pt1 <=
PredefinedType
.PT_OBJECT)
467
PredefinedType
pt2 = p2.PredefinedType;
468
if (pt2 <=
PredefinedType
.PT_OBJECT)
Microsoft\CSharp\RuntimeBinder\Semantics\BinOpArgInfo.cs (8)
23
pt1 = type1.IsPredefined ? type1.PredefinedType :
PredefinedType
.PT_COUNT;
24
pt2 = type2.IsPredefined ? type2.PredefinedType :
PredefinedType
.PT_COUNT;
25
ptRaw1 = typeRaw1.IsPredefined ? typeRaw1.PredefinedType :
PredefinedType
.PT_COUNT;
26
ptRaw2 = typeRaw2.IsPredefined ? typeRaw2.PredefinedType :
PredefinedType
.PT_COUNT;
31
public
PredefinedType
pt1;
32
public
PredefinedType
pt2;
33
public
PredefinedType
ptRaw1;
34
public
PredefinedType
ptRaw2;
Microsoft\CSharp\RuntimeBinder\Semantics\BinOpSig.cs (9)
18
public BinOpSig(
PredefinedType
pt1,
PredefinedType
pt2,
29
public
PredefinedType
pt1;
30
public
PredefinedType
pt2;
62
this.pt1 =
PredefinedType
.PT_UNDEFINEDINDEX;
63
this.pt2 =
PredefinedType
.PT_UNDEFINEDINDEX;
89
_type1 = pt1 !=
PredefinedType
.PT_UNDEFINEDINDEX ? GetPredefindType(pt1) : null;
90
_type2 = pt2 !=
PredefinedType
.PT_UNDEFINEDINDEX ? GetPredefindType(pt2) : null;
96
return pt1 !=
PredefinedType
.PT_UNDEFINEDINDEX;
Microsoft\CSharp\RuntimeBinder\Semantics\Conversion.cs (37)
129
private const int NUM_SIMPLE_TYPES = (int)
PredefinedType
.PT_ULONG + 1;
130
private const int NUM_EXT_TYPES = (int)
PredefinedType
.PT_OBJECT + 1;
132
private static ConvKind GetConvKind(
PredefinedType
ptSrc,
PredefinedType
ptDst)
138
if (ptSrc == ptDst || ptDst ==
PredefinedType
.PT_OBJECT && ptSrc <
PredefinedType
.PT_COUNT)
142
if (ptSrc ==
PredefinedType
.PT_OBJECT && ptDst <
PredefinedType
.PT_COUNT)
149
private static bool isUserDefinedConversion(
PredefinedType
ptSrc,
PredefinedType
ptDst)
231
GetPredefindType((
PredefinedType
)i) == null ||
232
GetPredefindType((
PredefinedType
)j) == null ||
233
(!canConvert(GetPredefindType((
PredefinedType
)i), GetPredefindType((
PredefinedType
)j), CONVERTTYPE.NOUDC) || s_simpleTypeBetter[i][j] == left) &&
234
(!canConvert(GetPredefindType((
PredefinedType
)j), GetPredefindType((
PredefinedType
)i), CONVERTTYPE.NOUDC) || s_simpleTypeBetter[j][i] == left));
243
private BetterType WhichSimpleConversionIsBetter(
PredefinedType
pt1,
PredefinedType
pt2)
260
private BetterType WhichTypeIsBetter(
PredefinedType
pt1,
PredefinedType
pt2, CType typeGiven)
278
if (pt2 ==
PredefinedType
.PT_OBJECT && pt1 <
PredefinedType
.PT_COUNT)
282
if (pt1 ==
PredefinedType
.PT_OBJECT && pt2 <
PredefinedType
.PT_COUNT)
326
PredefinedType
pt1 = (type1 as NullableType).UnderlyingType.PredefinedType;
327
PredefinedType
pt2 = (type2 as NullableType).UnderlyingType.PredefinedType;
661
fIntPtrOverride2 = atSrcBase.IsPredefType(
PredefinedType
.PT_INTPTR) || atSrcBase.IsPredefType(
PredefinedType
.PT_UINTPTR);
672
if (fIntPtrOverride2 && !typeDstBase.IsPredefType(
PredefinedType
.PT_LONG) && !typeDstBase.IsPredefType(
PredefinedType
.PT_ULONG))
705
PredefinedType
aggPredefType = aggCur.GetPredefType();
707
(aggPredefType ==
PredefinedType
.PT_INTPTR ||
708
aggPredefType ==
PredefinedType
.PT_UINTPTR ||
709
aggPredefType ==
PredefinedType
.PT_DECIMAL));
754
if (fIntPtrOverride2 && (typeTo.IsPredefType(
PredefinedType
.PT_INT) || typeTo.IsPredefType(
PredefinedType
.PT_UINT)))
1377
CType typeDecimal = SymbolLoader.GetPredefindType(
PredefinedType
.PT_DECIMAL);
Microsoft\CSharp\RuntimeBinder\Semantics\Conversions.cs (5)
141
AggregateSymbol aggIList = SymbolLoader.GetPredefAgg(
PredefinedType
.PT_G_ILIST);
142
AggregateSymbol aggIReadOnlyList = SymbolLoader.GetPredefAgg(
PredefinedType
.PT_G_IREADONLYLIST);
158
if (SymbolLoader.HasIdentityOrImplicitReferenceConversion(SymbolLoader.GetPredefindType(
PredefinedType
.PT_ARRAY), typeSrc))
172
AggregateSymbol aggIList = SymbolLoader.GetPredefAgg(
PredefinedType
.PT_G_ILIST);
173
AggregateSymbol aggIReadOnlyList = SymbolLoader.GetPredefAgg(
PredefinedType
.PT_G_IREADONLYLIST);
Microsoft\CSharp\RuntimeBinder\Semantics\ExplicitConversion.cs (16)
244
AggregateSymbol aggIList = SymbolLoader.GetPredefAgg(
PredefinedType
.PT_G_ILIST);
245
AggregateSymbol aggIReadOnlyList = SymbolLoader.GetPredefAgg(
PredefinedType
.PT_G_IREADONLYLIST);
285
AggregateSymbol aggIList = SymbolLoader.GetPredefAgg(
PredefinedType
.PT_G_ILIST);
286
AggregateSymbol aggIReadOnlyList = SymbolLoader.GetPredefAgg(
PredefinedType
.PT_G_IREADONLYLIST);
364
if (_binder.canConvert(GetPredefindType(
PredefinedType
.PT_ARRAY), _typeSrc, CONVERTTYPE.NOUDC))
421
if (aggDest.isPredefAgg(
PredefinedType
.PT_DECIMAL))
429
!(aggDest.IsPredefined() && aggDest.GetPredefType() ==
PredefinedType
.PT_CHAR))
456
Debug.Assert(_typeSrc.IsPredefType(
PredefinedType
.PT_DECIMAL));
499
Debug.Assert(aggTypeDest.IsPredefType(
PredefinedType
.PT_DECIMAL));
560
if (_typeSrc.IsPredefType(
PredefinedType
.PT_DECIMAL))
565
if (_typeSrc.IsNumericType || _typeSrc.IsPredefined && _typeSrc.PredefinedType ==
PredefinedType
.PT_CHAR)
585
(_typeSrc.IsPredefType(
PredefinedType
.PT_OBJECT) || _typeSrc.IsPredefType(
PredefinedType
.PT_VALUE) || _typeSrc.IsPredefType(
PredefinedType
.PT_ENUM)))
615
PredefinedType
ptSrc = _typeSrc.PredefinedType;
616
PredefinedType
ptDest = aggDest.GetPredefType();
Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs (11)
273
private static AggregateType GetPredefindType(
PredefinedType
pt)
275
Debug.Assert(pt !=
PredefinedType
.PT_VOID); // use getVoidType()
305
CType pIntType = GetPredefindType(
PredefinedType
.PT_INT);
369
(!exprSrc.Type.IsPredefType(
PredefinedType
.PT_STRING) || constant.Val.IsNullRef))
1278
private static ReadOnlySpan<
PredefinedType
> RgptIntOp =>
1280
PredefinedType
.PT_INT,
1281
PredefinedType
.PT_UINT,
1282
PredefinedType
.PT_LONG,
1283
PredefinedType
.PT_ULONG
1290
foreach (
PredefinedType
predef in RgptIntOp)
1308
return GetPredefindType(
PredefinedType
.PT_INT);
Microsoft\CSharp\RuntimeBinder\Semantics\ExprFactory.cs (9)
60
TypeManager.GetPredefAgg(method.IsConstructor() ?
PredefinedType
.PT_CONSTRUCTORINFO :
PredefinedType
.PT_METHODINFO).getThisType(),
65
new ExprPropertyInfo(TypeManager.GetPredefAgg(
PredefinedType
.PT_PROPERTYINFO).getThisType(), prop, propertyType);
69
new ExprFieldInfo(field, fieldType, TypeManager.GetPredefAgg(
PredefinedType
.PT_FIELDINFO).getThisType());
73
new ExprTypeOf(TypeManager.GetPredefAgg(
PredefinedType
.PT_TYPE).getThisType(), sourceType);
84
CreateConstant(TypeManager.GetPredefAgg(
PredefinedType
.PT_STRING).getThisType(), ConstVal.Get(str));
124
if (type.IsPredefType(
PredefinedType
.PT_DECIMAL))
143
CreateConstant(TypeManager.GetPredefAgg(
PredefinedType
.PT_INT).getThisType(), ConstVal.Get(x));
147
CreateConstant(TypeManager.GetPredefAgg(
PredefinedType
.PT_BOOL).getThisType(), ConstVal.Get(b));
Microsoft\CSharp\RuntimeBinder\Semantics\GroupToArgsBinder.cs (8)
279
AggregateType typeObject = SymbolLoader.GetPredefindType(
PredefinedType
.PT_OBJECT);
498
if (pConstValType.IsPredefType(
PredefinedType
.PT_DATETIME) &&
499
(pRawParamType.IsPredefType(
PredefinedType
.PT_DATETIME) || pRawParamType.IsPredefType(
PredefinedType
.PT_OBJECT) || pRawParamType.IsPredefType(
PredefinedType
.PT_VALUE)))
504
AggregateType dateTimeType = SymbolLoader.GetPredefindType(
PredefinedType
.PT_DATETIME);
542
if (pParamType.IsPredefType(
PredefinedType
.PT_OBJECT))
555
AggregateSymbol agg = SymbolLoader.GetPredefAgg(
PredefinedType
.PT_MISSING);
Microsoft\CSharp\RuntimeBinder\Semantics\ImplicitConversion.cs (14)
118
((_flags & CONVERTTYPE.ISEXPLICIT) == 0 || (!_typeSrc.IsPredefType(
PredefinedType
.PT_FLOAT) && !_typeSrc.IsPredefType(
PredefinedType
.PT_DOUBLE))))
404
!_typeDest.IsPredefType(
PredefinedType
.PT_G_OPTIONAL))
452
if (!_typeDest.IsPredefType(
PredefinedType
.PT_OBJECT))
646
aggTypeSrc.OwningAggregate.GetPredefType() !=
PredefinedType
.PT_BOOL &&
675
PredefinedType
ptSrc = aggSrc.GetPredefType();
676
PredefinedType
ptDest = _typeDest.PredefinedType;
691
((ptSrc ==
PredefinedType
.PT_INT && ptDest !=
PredefinedType
.PT_BOOL && ptDest !=
PredefinedType
.PT_CHAR) ||
692
(ptSrc ==
PredefinedType
.PT_LONG && ptDest ==
PredefinedType
.PT_ULONG)) &&
701
Debug.Assert(ptSrc ==
PredefinedType
.PT_FLOAT || ptSrc ==
PredefinedType
.PT_DOUBLE);
Microsoft\CSharp\RuntimeBinder\Semantics\MemberLookup.cs (4)
316
if (!field.getType().IsPredefType(
PredefinedType
.PT_OBJECT))
330
if (!prop.getType().IsPredefType(
PredefinedType
.PT_OBJECT))
558
? SymbolLoader.GetPredefindType(
PredefinedType
.PT_OBJECT)
568
Debug.Assert(typeCls2 != null && typeCls2.IsPredefType(
PredefinedType
.PT_OBJECT));
Microsoft\CSharp\RuntimeBinder\Semantics\MethodTypeInferrer.cs (10)
1016
else if (pDest.IsPredefType(
PredefinedType
.PT_G_IENUMERABLE) ||
1017
pDest.IsPredefType(
PredefinedType
.PT_G_ICOLLECTION) ||
1018
pDest.IsPredefType(
PredefinedType
.PT_G_ILIST) ||
1019
pDest.IsPredefType(
PredefinedType
.PT_G_IREADONLYCOLLECTION) ||
1020
pDest.IsPredefType(
PredefinedType
.PT_G_IREADONLYLIST))
1367
else if (pSource.IsPredefType(
PredefinedType
.PT_G_IENUMERABLE) ||
1368
pSource.IsPredefType(
PredefinedType
.PT_G_ICOLLECTION) ||
1369
pSource.IsPredefType(
PredefinedType
.PT_G_ILIST) ||
1370
pSource.IsPredefType(
PredefinedType
.PT_G_IREADONLYLIST) ||
1371
pSource.IsPredefType(
PredefinedType
.PT_G_IREADONLYCOLLECTION))
Microsoft\CSharp\RuntimeBinder\Semantics\Operators.cs (162)
85
new BinOpSig (
PredefinedType
.PT_INT,
PredefinedType
.PT_INT, BinOpMask.Integer, 8, BindIntBinOp, OpSigFlags.Value, BinOpFuncKind.IntBinOp ),
86
new BinOpSig (
PredefinedType
.PT_UINT,
PredefinedType
.PT_UINT, BinOpMask.Integer, 7, BindIntBinOp, OpSigFlags.Value, BinOpFuncKind.IntBinOp ),
87
new BinOpSig (
PredefinedType
.PT_LONG,
PredefinedType
.PT_LONG, BinOpMask.Integer, 6, BindIntBinOp, OpSigFlags.Value, BinOpFuncKind.IntBinOp ),
88
new BinOpSig (
PredefinedType
.PT_ULONG,
PredefinedType
.PT_ULONG, BinOpMask.Integer, 5, BindIntBinOp, OpSigFlags.Value, BinOpFuncKind.IntBinOp ),
90
new BinOpSig (
PredefinedType
.PT_ULONG,
PredefinedType
.PT_LONG, BinOpMask.Integer, 4, null, OpSigFlags.Value, BinOpFuncKind.None ),
92
new BinOpSig (
PredefinedType
.PT_LONG,
PredefinedType
.PT_ULONG, BinOpMask.Integer, 3, null, OpSigFlags.Value, BinOpFuncKind.None ),
93
new BinOpSig (
PredefinedType
.PT_FLOAT,
PredefinedType
.PT_FLOAT, BinOpMask.Real, 1, BindRealBinOp, OpSigFlags.Value, BinOpFuncKind.RealBinOp ),
94
new BinOpSig (
PredefinedType
.PT_DOUBLE,
PredefinedType
.PT_DOUBLE, BinOpMask.Real, 0, BindRealBinOp, OpSigFlags.Value, BinOpFuncKind.RealBinOp ),
95
new BinOpSig (
PredefinedType
.PT_DECIMAL,
PredefinedType
.PT_DECIMAL, BinOpMask.Real, 0, BindDecBinOp, OpSigFlags.Value, BinOpFuncKind.DecBinOp ),
96
new BinOpSig (
PredefinedType
.PT_STRING,
PredefinedType
.PT_STRING, BinOpMask.Equal, 0, BindStrCmpOp, OpSigFlags.Reference, BinOpFuncKind.StrCmpOp ),
97
new BinOpSig (
PredefinedType
.PT_STRING,
PredefinedType
.PT_STRING, BinOpMask.Add, 2, BindStrBinOp, OpSigFlags.Reference, BinOpFuncKind.StrBinOp ),
98
new BinOpSig (
PredefinedType
.PT_STRING,
PredefinedType
.PT_OBJECT, BinOpMask.Add, 1, BindStrBinOp, OpSigFlags.Reference, BinOpFuncKind.StrBinOp ),
99
new BinOpSig (
PredefinedType
.PT_OBJECT,
PredefinedType
.PT_STRING, BinOpMask.Add, 0, BindStrBinOp, OpSigFlags.Reference, BinOpFuncKind.StrBinOp ),
100
new BinOpSig (
PredefinedType
.PT_INT,
PredefinedType
.PT_INT, BinOpMask.Shift, 3, BindShiftOp, OpSigFlags.Value, BinOpFuncKind.ShiftOp ),
101
new BinOpSig (
PredefinedType
.PT_UINT,
PredefinedType
.PT_INT, BinOpMask.Shift, 2, BindShiftOp, OpSigFlags.Value, BinOpFuncKind.ShiftOp ),
102
new BinOpSig (
PredefinedType
.PT_LONG,
PredefinedType
.PT_INT, BinOpMask.Shift, 1, BindShiftOp, OpSigFlags.Value, BinOpFuncKind.ShiftOp ),
103
new BinOpSig (
PredefinedType
.PT_ULONG,
PredefinedType
.PT_INT, BinOpMask.Shift, 0, BindShiftOp, OpSigFlags.Value, BinOpFuncKind.ShiftOp ),
104
new BinOpSig (
PredefinedType
.PT_BOOL,
PredefinedType
.PT_BOOL, BinOpMask.BoolNorm, 0, BindBoolBinOp, OpSigFlags.Value, BinOpFuncKind.BoolBinOp ),
107
new BinOpSig (
PredefinedType
.PT_BOOL,
PredefinedType
.PT_BOOL, BinOpMask.Logical, 0, BindBoolBinOp, OpSigFlags.BoolBit, BinOpFuncKind.BoolBinOp ),
108
new BinOpSig (
PredefinedType
.PT_BOOL,
PredefinedType
.PT_BOOL, BinOpMask.Bitwise, 0, BindLiftedBoolBitwiseOp, OpSigFlags.BoolBit, BinOpFuncKind.BoolBitwiseOp ),
118
new UnaOpSig(
PredefinedType
.PT_INT, UnaOpMask.Signed, 7, BindIntUnaOp, UnaOpFuncKind.IntUnaOp ),
119
new UnaOpSig(
PredefinedType
.PT_UINT, UnaOpMask.Unsigned, 6, BindIntUnaOp, UnaOpFuncKind.IntUnaOp ),
120
new UnaOpSig(
PredefinedType
.PT_LONG, UnaOpMask.Signed, 5, BindIntUnaOp, UnaOpFuncKind.IntUnaOp ),
121
new UnaOpSig(
PredefinedType
.PT_ULONG, UnaOpMask.Unsigned, 4, BindIntUnaOp, UnaOpFuncKind.IntUnaOp ),
123
new UnaOpSig(
PredefinedType
.PT_ULONG, UnaOpMask.Minus, 3, null, UnaOpFuncKind.None ),
124
new UnaOpSig(
PredefinedType
.PT_FLOAT, UnaOpMask.Real, 1, BindRealUnaOp, UnaOpFuncKind.RealUnaOp ),
125
new UnaOpSig(
PredefinedType
.PT_DOUBLE, UnaOpMask.Real, 0, BindRealUnaOp, UnaOpFuncKind.RealUnaOp ),
126
new UnaOpSig(
PredefinedType
.PT_DECIMAL, UnaOpMask.Real, 0, BindDecUnaOp, UnaOpFuncKind.DecUnaOp ),
127
new UnaOpSig(
PredefinedType
.PT_BOOL, UnaOpMask.Bool, 0, BindBoolUnaOp, UnaOpFuncKind.BoolUnaOp ),
128
new UnaOpSig(
PredefinedType
.PT_INT, UnaOpMask.IncDec, 6, null, UnaOpFuncKind.None ),
129
new UnaOpSig(
PredefinedType
.PT_UINT, UnaOpMask.IncDec, 5, null, UnaOpFuncKind.None ),
130
new UnaOpSig(
PredefinedType
.PT_LONG, UnaOpMask.IncDec, 4, null, UnaOpFuncKind.None ),
131
new UnaOpSig(
PredefinedType
.PT_ULONG, UnaOpMask.IncDec, 3, null, UnaOpFuncKind.None ),
132
new UnaOpSig(
PredefinedType
.PT_FLOAT, UnaOpMask.IncDec, 1, null, UnaOpFuncKind.None ),
133
new UnaOpSig(
PredefinedType
.PT_DOUBLE, UnaOpMask.IncDec, 0, null, UnaOpFuncKind.None ),
134
new UnaOpSig(
PredefinedType
.PT_DECIMAL, UnaOpMask.IncDec, 0, null, UnaOpFuncKind.None ),
141
if (info.pt1 <=
PredefinedType
.PT_ULONG && info.pt2 <=
PredefinedType
.PT_ULONG)
178
if (info.pt1 <=
PredefinedType
.PT_ULONG && info.pt2 <=
PredefinedType
.PT_ULONG)
458
CType typeBool = GetPredefindType(
PredefinedType
.PT_BOOL);
631
resultType = GetPredefindType(
PredefinedType
.PT_BOOL);
926
CType typeObj = GetPredefindType(
PredefinedType
.PT_OBJECT);
938
CType typeDel = GetPredefindType(
PredefinedType
.PT_DELEGATE);
983
if (type1.IsInterfaceType || type1.IsPredefType(
PredefinedType
.PT_STRING)
987
type1 = GetPredefindType(
PredefinedType
.PT_ARRAY);
991
if (type2.IsInterfaceType || type2.IsPredefType(
PredefinedType
.PT_STRING)
995
type2 = GetPredefindType(
PredefinedType
.PT_ARRAY);
1000
type1.IsClassType && !type1.IsPredefType(
PredefinedType
.PT_STRING)
1001
&& !type1.IsPredefType(
PredefinedType
.PT_DELEGATE));
1003
type2.IsClassType && !type2.IsPredefType(
PredefinedType
.PT_STRING)
1004
&& !type2.IsPredefType(
PredefinedType
.PT_DELEGATE));
1165
PredefinedType
ptOp = nonNub.FundamentalType switch
1167
FUNDTYPE.FT_U4 =>
PredefinedType
.PT_UINT,
1168
FUNDTYPE.FT_I8 =>
PredefinedType
.PT_LONG,
1169
FUNDTYPE.FT_U8 =>
PredefinedType
.PT_ULONG,
1170
_ =>
PredefinedType
.PT_INT, // Promote all smaller types to int.
1305
PredefinedType
ptRaw = pRawType.IsPredefined ? pRawType.PredefinedType :
PredefinedType
.PT_COUNT;
1310
if (ptRaw >
PredefinedType
.PT_ULONG)
1400
PredefinedType
pt = pArgumentType.IsPredefined ? pArgumentType.PredefinedType :
PredefinedType
.PT_COUNT;
1401
PredefinedType
ptRaw = pRawType.IsPredefined ? pRawType.PredefinedType :
PredefinedType
.PT_COUNT;
1638
type = GetPredefindType(
PredefinedType
.PT_INT);
1645
Debug.Assert(type.IsPredefType(
PredefinedType
.PT_DECIMAL));
1664
type = GetPredefindType(
PredefinedType
.PT_INT);
1765
Debug.Assert(arg1.Type.IsPredefType(
PredefinedType
.PT_DECIMAL) && arg2.Type.IsPredefType(
PredefinedType
.PT_DECIMAL));
1767
CType typeDec = GetPredefindType(
PredefinedType
.PT_DECIMAL);
1791
typeRet = GetPredefindType(
PredefinedType
.PT_BOOL);
1807
Debug.Assert(arg.Type.IsPredefType(
PredefinedType
.PT_DECIMAL));
1810
CType typeDec = GetPredefindType(
PredefinedType
.PT_DECIMAL);
1828
Debug.Assert(arg1.Type.IsPredefType(
PredefinedType
.PT_STRING) || arg2.Type.IsPredefType(
PredefinedType
.PT_STRING));
1841
Debug.Assert(arg2.Type.IsPredefType(
PredefinedType
.PT_INT));
1843
PredefinedType
ptOp = arg1.Type.PredefinedType;
1844
Debug.Assert(ptOp ==
PredefinedType
.PT_INT || ptOp ==
PredefinedType
.PT_UINT || ptOp ==
PredefinedType
.PT_LONG || ptOp ==
PredefinedType
.PT_ULONG);
1859
Debug.Assert(arg1.Type.IsPredefType(
PredefinedType
.PT_BOOL) || arg1.Type is NullableType argNubType1 && argNubType1.UnderlyingType.IsPredefType(
PredefinedType
.PT_BOOL));
1860
Debug.Assert(arg2.Type.IsPredefType(
PredefinedType
.PT_BOOL) || arg2.Type is NullableType argNubType2 && argNubType2.UnderlyingType.IsPredefType(
PredefinedType
.PT_BOOL));
1862
return ExprFactory.CreateBinop(ek, GetPredefindType(
PredefinedType
.PT_BOOL), arg1, arg2);
1869
Debug.Assert(expr1.Type.IsPredefType(
PredefinedType
.PT_BOOL) || expr1.Type is NullableType expNubType1 && expNubType1.UnderlyingType.IsPredefType(
PredefinedType
.PT_BOOL));
1870
Debug.Assert(expr2.Type.IsPredefType(
PredefinedType
.PT_BOOL) || expr2.Type is NullableType expNubType2 && expNubType2.UnderlyingType.IsPredefType(
PredefinedType
.PT_BOOL));
1874
CType typeBool = GetPredefindType(
PredefinedType
.PT_BOOL);
1912
Debug.Assert(arg.Type.IsPredefType(
PredefinedType
.PT_BOOL));
1916
CType typeBool = GetPredefindType(
PredefinedType
.PT_BOOL);
1938
Debug.Assert(arg1.Type.IsPredefType(
PredefinedType
.PT_STRING) && arg2.Type.IsPredefType(
PredefinedType
.PT_STRING));
1945
return CreateBinopForPredefMethodCall(ek, predefMeth, GetPredefindType(
PredefinedType
.PT_BOOL), arg1, arg2);
1958
arg1 = binder.mustConvert(arg1, GetPredefindType(
PredefinedType
.PT_OBJECT), CONVERTTYPE.NOUDC);
1959
arg2 = binder.mustConvert(arg2, GetPredefindType(
PredefinedType
.PT_OBJECT), CONVERTTYPE.NOUDC);
1961
return ExprFactory.CreateBinop(ek, GetPredefindType(
PredefinedType
.PT_BOOL), arg1, arg2);
1972
Debug.Assert(arg1.Type == arg2.Type && (arg1.Type.IsDelegateType || arg1.Type.IsPredefType(
PredefinedType
.PT_DELEGATE)));
1992
RetType = GetPredefindType(
PredefinedType
.PT_BOOL);
1998
RetType = GetPredefindType(
PredefinedType
.PT_BOOL);
2016
PredefinedType
ptOp = typeEnum.FundamentalType switch
2018
FUNDTYPE.FT_U4 =>
PredefinedType
.PT_UINT,
2019
FUNDTYPE.FT_I8 =>
PredefinedType
.PT_LONG,
2020
FUNDTYPE.FT_U8 =>
PredefinedType
.PT_ULONG,
2021
_ =>
PredefinedType
.PT_INT, // Promote all smaller types to int.
2031
Debug.Assert(!typeDst.IsPredefType(
PredefinedType
.PT_BOOL));
2057
PredefinedType
ptOp = typeEnum.FundamentalType switch
2059
FUNDTYPE.FT_U4 =>
PredefinedType
.PT_UINT,
2060
FUNDTYPE.FT_I8 =>
PredefinedType
.PT_LONG,
2061
FUNDTYPE.FT_U8 =>
PredefinedType
.PT_ULONG,
2062
_ =>
PredefinedType
.PT_INT, // Promote all smaller types to int.
2093
PredefinedType
ptOp = typeEnum.FundamentalType switch
2095
FUNDTYPE.FT_U4 =>
PredefinedType
.PT_UINT,
2096
FUNDTYPE.FT_I8 =>
PredefinedType
.PT_LONG,
2097
FUNDTYPE.FT_U8 =>
PredefinedType
.PT_ULONG,
2098
_ =>
PredefinedType
.PT_INT, // Promote all smaller types to int.
2187
private ExprOperator BindIntOp(ExpressionKind kind, EXPRFLAG flags, Expr op1, Expr op2,
PredefinedType
ptOp)
2190
Debug.Assert(ptOp ==
PredefinedType
.PT_INT || ptOp ==
PredefinedType
.PT_UINT || ptOp ==
PredefinedType
.PT_LONG || ptOp ==
PredefinedType
.PT_ULONG);
2202
CType typeDest = kind.IsRelational() ? GetPredefindType(
PredefinedType
.PT_BOOL) : typeOp;
2212
private ExprOperator BindIntegerNeg(EXPRFLAG flags, Expr op,
PredefinedType
ptOp)
2244
Debug.Assert(ptOp ==
PredefinedType
.PT_INT || ptOp ==
PredefinedType
.PT_UINT || ptOp ==
PredefinedType
.PT_LONG || ptOp ==
PredefinedType
.PT_ULONG);
2249
if (ptOp ==
PredefinedType
.PT_ULONG)
2254
if (ptOp ==
PredefinedType
.PT_UINT && op.Type.FundamentalType == FUNDTYPE.FT_U4)
2256
op = mustConvertCore(op, GetPredefindType(
PredefinedType
.PT_LONG), CONVERTTYPE.NOUDC);
2276
Debug.Assert(op1.Type.IsPredefType(
PredefinedType
.PT_FLOAT) || op1.Type.IsPredefType(
PredefinedType
.PT_DOUBLE));
2279
CType typeDest = kind.IsRelational() ? GetPredefindType(
PredefinedType
.PT_BOOL) : op1.Type;
2365
pCallT = mustConvert(pCallT, GetPredefindType(
PredefinedType
.PT_BOOL));
2366
pCallF = mustConvert(pCallF, GetPredefindType(
PredefinedType
.PT_BOOL));
2424
if (!typeRet.IsPredefType(
PredefinedType
.PT_BOOL))
2437
if (!typeRet.IsPredefType(
PredefinedType
.PT_BOOL))
2642
Debug.Assert(typeRetRaw.IsPredefType(
PredefinedType
.PT_BOOL));
2650
Debug.Assert(typeRetRaw.IsPredefType(
PredefinedType
.PT_BOOL));
2713
typeDst = GetPredefindType(
PredefinedType
.PT_BOOL);
Microsoft\CSharp\RuntimeBinder\Semantics\PredefinedMembers.cs (350)
150
SIG_CLASS_TYVAR = (int)
PredefinedType
.PT_VOID + 1, // next element in signature is index of class tyvar
159
public
PredefinedType
type;
166
public PredefinedMethodInfo(PREDEFMETH method,
PredefinedType
type, PredefinedName name, MethodCallingConventionEnum callingConvention, ACCESS access, int cTypeVars, int[] signature)
228
private static AggregateSymbol GetPredefAgg(
PredefinedType
pt) => SymbolLoader.GetPredefAgg(pt);
249
case (MethodSignatureEnum)
PredefinedType
.PT_VOID:
253
Debug.Assert(current >= 0 && (int)current < (int)
PredefinedType
.PT_COUNT);
254
AggregateSymbol agg = GetPredefAgg((
PredefinedType
)current);
399
private static
PredefinedType
GetPropPredefType(PREDEFPROP property)
429
new PredefinedMethodInfo( PREDEFMETH.PM_DECIMAL_OPDECREMENT,
PredefinedType
.PT_DECIMAL, PredefinedName.PN_OPDECREMENT, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_DECIMAL, 1, (int)
PredefinedType
.PT_DECIMAL }),
430
new PredefinedMethodInfo( PREDEFMETH.PM_DECIMAL_OPINCREMENT,
PredefinedType
.PT_DECIMAL, PredefinedName.PN_OPINCREMENT, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_DECIMAL, 1, (int)
PredefinedType
.PT_DECIMAL }),
431
new PredefinedMethodInfo( PREDEFMETH.PM_DECIMAL_OPUNARYMINUS,
PredefinedType
.PT_DECIMAL, PredefinedName.PN_OPUNARYMINUS, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_DECIMAL, 1, (int)
PredefinedType
.PT_DECIMAL }),
432
new PredefinedMethodInfo( PREDEFMETH.PM_DELEGATE_COMBINE,
PredefinedType
.PT_DELEGATE, PredefinedName.PN_COMBINE, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_DELEGATE, 2, (int)
PredefinedType
.PT_DELEGATE, (int)
PredefinedType
.PT_DELEGATE }),
433
new PredefinedMethodInfo( PREDEFMETH.PM_DELEGATE_OPEQUALITY,
PredefinedType
.PT_DELEGATE, PredefinedName.PN_OPEQUALITY, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BOOL, 2, (int)
PredefinedType
.PT_DELEGATE, (int)
PredefinedType
.PT_DELEGATE }),
434
new PredefinedMethodInfo( PREDEFMETH.PM_DELEGATE_OPINEQUALITY,
PredefinedType
.PT_DELEGATE, PredefinedName.PN_OPINEQUALITY, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BOOL, 2, (int)
PredefinedType
.PT_DELEGATE, (int)
PredefinedType
.PT_DELEGATE }),
435
new PredefinedMethodInfo( PREDEFMETH.PM_DELEGATE_REMOVE,
PredefinedType
.PT_DELEGATE, PredefinedName.PN_REMOVE, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_DELEGATE, 2, (int)
PredefinedType
.PT_DELEGATE, (int)
PredefinedType
.PT_DELEGATE }),
436
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_ADD,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_ADD, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION }),
437
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_ADD_USER_DEFINED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_ADD, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 3, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_METHODINFO }),
438
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_ADDCHECKED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_ADDCHECKED, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION }),
439
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_ADDCHECKED_USER_DEFINED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_ADDCHECKED, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 3, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_METHODINFO }),
440
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_AND,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_AND, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION }),
441
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_AND_USER_DEFINED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_AND, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 3, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_METHODINFO }),
442
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_ANDALSO,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_ANDALSO, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION }),
443
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_ANDALSO_USER_DEFINED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_ANDALSO, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 3, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_METHODINFO }),
444
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_ARRAYINDEX,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_ARRAYINDEX, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION }),
445
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_ARRAYINDEX2,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_ARRAYINDEX, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_METHODCALLEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)MethodSignatureEnum.SIG_SZ_ARRAY, (int)
PredefinedType
.PT_EXPRESSION }),
446
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_ASSIGN,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_ASSIGN, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION }),
447
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_CONSTANT_OBJECT_TYPE,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_CONSTANT, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_CONSTANTEXPRESSION, 2, (int)
PredefinedType
.PT_OBJECT, (int)
PredefinedType
.PT_TYPE }),
448
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_CONVERT,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_CONVERT, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_UNARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_TYPE }),
449
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_CONVERT_USER_DEFINED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_CONVERT, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_UNARYEXPRESSION, 3, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_TYPE, (int)
PredefinedType
.PT_METHODINFO }),
450
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_CONVERTCHECKED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_CONVERTCHECKED, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_UNARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_TYPE }),
451
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_CONVERTCHECKED_USER_DEFINED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_CONVERTCHECKED, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_UNARYEXPRESSION, 3, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_TYPE, (int)
PredefinedType
.PT_METHODINFO }),
452
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_DIVIDE,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_DIVIDE, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION }),
453
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_DIVIDE_USER_DEFINED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_DIVIDE, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 3, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_METHODINFO }),
454
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_EQUAL,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_EQUAL, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION }),
455
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_EQUAL_USER_DEFINED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_EQUAL, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 4, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_BOOL, (int)
PredefinedType
.PT_METHODINFO }),
456
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_EXCLUSIVEOR,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_EXCLUSIVEOR, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION }),
457
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_EXCLUSIVEOR_USER_DEFINED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_EXCLUSIVEOR, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 3, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_METHODINFO }),
458
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_FIELD,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_CAP_FIELD, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_MEMBEREXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_FIELDINFO }),
459
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_GREATERTHAN,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_GREATERTHAN, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION }),
460
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_GREATERTHAN_USER_DEFINED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_GREATERTHAN, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 4, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_BOOL, (int)
PredefinedType
.PT_METHODINFO }),
461
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_GREATERTHANOREQUAL,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_GREATERTHANOREQUAL, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION }),
462
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_GREATERTHANOREQUAL_USER_DEFINED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_GREATERTHANOREQUAL, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 4, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_BOOL, (int)
PredefinedType
.PT_METHODINFO }),
463
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_LAMBDA,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_LAMBDA, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 1, new int[] { (int)
PredefinedType
.PT_G_EXPRESSION, (int)MethodSignatureEnum.SIG_METH_TYVAR, 0, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)MethodSignatureEnum.SIG_SZ_ARRAY, (int)
PredefinedType
.PT_PARAMETEREXPRESSION }),
464
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_LEFTSHIFT,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_LEFTSHIFT, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION }),
465
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_LEFTSHIFT_USER_DEFINED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_LEFTSHIFT, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 3, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_METHODINFO }),
466
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_LESSTHAN,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_LESSTHAN, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION }),
467
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_LESSTHAN_USER_DEFINED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_LESSTHAN, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 4, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_BOOL, (int)
PredefinedType
.PT_METHODINFO }),
468
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_LESSTHANOREQUAL,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_LESSTHANOREQUAL, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION }),
469
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_LESSTHANOREQUAL_USER_DEFINED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_LESSTHANOREQUAL, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 4, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_BOOL, (int)
PredefinedType
.PT_METHODINFO }),
470
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_MODULO,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_MODULO, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION }),
471
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_MODULO_USER_DEFINED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_MODULO, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 3, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_METHODINFO }),
472
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_MULTIPLY,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_MULTIPLY, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION }),
473
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_MULTIPLY_USER_DEFINED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_MULTIPLY, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 3, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_METHODINFO }),
474
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_MULTIPLYCHECKED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_MULTIPLYCHECKED, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION }),
475
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_MULTIPLYCHECKED_USER_DEFINED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_MULTIPLYCHECKED, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 3, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_METHODINFO }),
476
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_NOTEQUAL,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_NOTEQUAL, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION }),
477
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_NOTEQUAL_USER_DEFINED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_NOTEQUAL, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 4, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_BOOL, (int)
PredefinedType
.PT_METHODINFO }),
478
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_OR,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_OR, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION }),
479
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_OR_USER_DEFINED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_OR, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 3, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_METHODINFO }),
480
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_ORELSE,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_ORELSE, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION }),
481
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_ORELSE_USER_DEFINED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_ORELSE, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 3, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_METHODINFO }),
482
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_PARAMETER,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_PARAMETER, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_PARAMETEREXPRESSION, 2, (int)
PredefinedType
.PT_TYPE, (int)
PredefinedType
.PT_STRING }),
483
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_RIGHTSHIFT,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_RIGHTSHIFT, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION }),
484
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_RIGHTSHIFT_USER_DEFINED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_RIGHTSHIFT, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 3, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_METHODINFO }),
485
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_SUBTRACT,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_SUBTRACT, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION }),
486
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_SUBTRACT_USER_DEFINED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_SUBTRACT, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 3, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_METHODINFO }),
487
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_SUBTRACTCHECKED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_SUBTRACTCHECKED, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION }),
488
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_SUBTRACTCHECKED_USER_DEFINED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_SUBTRACTCHECKED, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BINARYEXPRESSION, 3, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_METHODINFO }),
489
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_UNARYPLUS_USER_DEFINED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_PLUS, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_UNARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_METHODINFO }),
490
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_NEGATE,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_NEGATE, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_UNARYEXPRESSION, 1, (int)
PredefinedType
.PT_EXPRESSION }),
491
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_NEGATE_USER_DEFINED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_NEGATE, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_UNARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_METHODINFO }),
492
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_NEGATECHECKED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_NEGATECHECKED, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_UNARYEXPRESSION, 1, (int)
PredefinedType
.PT_EXPRESSION }),
493
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_NEGATECHECKED_USER_DEFINED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_NEGATECHECKED, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_UNARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_METHODINFO }),
494
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_CALL,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_CALL, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_METHODCALLEXPRESSION, 3, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_METHODINFO, (int)MethodSignatureEnum.SIG_SZ_ARRAY, (int)
PredefinedType
.PT_EXPRESSION }),
495
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_NEW,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_NEW, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_NEWEXPRESSION, 2, (int)
PredefinedType
.PT_CONSTRUCTORINFO, (int)MethodSignatureEnum.SIG_SZ_ARRAY, (int)
PredefinedType
.PT_EXPRESSION }),
496
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_NEW_TYPE,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_NEW, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_NEWEXPRESSION, 1, (int)
PredefinedType
.PT_TYPE }),
497
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_QUOTE,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_QUOTE, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_UNARYEXPRESSION, 1, (int)
PredefinedType
.PT_EXPRESSION }),
498
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_NOT,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_NOT, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_UNARYEXPRESSION, 1, (int)
PredefinedType
.PT_EXPRESSION }),
499
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_NOT_USER_DEFINED,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_NOT, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_UNARYEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_METHODINFO }),
500
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_NEWARRAYINIT,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_NEWARRAYINIT, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_NEWARRAYEXPRESSION, 2, (int)
PredefinedType
.PT_TYPE, (int)MethodSignatureEnum.SIG_SZ_ARRAY, (int)
PredefinedType
.PT_EXPRESSION }),
501
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_PROPERTY,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_EXPRESSION_PROPERTY, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_MEMBEREXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)
PredefinedType
.PT_PROPERTYINFO }),
502
new PredefinedMethodInfo( PREDEFMETH.PM_EXPRESSION_INVOKE,
PredefinedType
.PT_EXPRESSION, PredefinedName.PN_INVOKE, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_INVOCATIONEXPRESSION, 2, (int)
PredefinedType
.PT_EXPRESSION, (int)MethodSignatureEnum.SIG_SZ_ARRAY, (int)
PredefinedType
.PT_EXPRESSION }),
503
new PredefinedMethodInfo( PREDEFMETH.PM_G_OPTIONAL_CTOR,
PredefinedType
.PT_G_OPTIONAL, PredefinedName.PN_CTOR, MethodCallingConventionEnum.Instance, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_VOID, 1, (int)MethodSignatureEnum.SIG_CLASS_TYVAR, 0 }),
504
new PredefinedMethodInfo( PREDEFMETH.PM_G_OPTIONAL_GETVALUE,
PredefinedType
.PT_G_OPTIONAL, PredefinedName.PN_GETVALUE, MethodCallingConventionEnum.Instance, ACCESS.ACC_PUBLIC, 0, new int[] { (int)MethodSignatureEnum.SIG_CLASS_TYVAR, 0, 0 }),
505
new PredefinedMethodInfo( PREDEFMETH.PM_STRING_CONCAT_OBJECT_2,
PredefinedType
.PT_STRING, PredefinedName.PN_CONCAT, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_STRING, 2, (int)
PredefinedType
.PT_OBJECT, (int)
PredefinedType
.PT_OBJECT }),
506
new PredefinedMethodInfo( PREDEFMETH.PM_STRING_CONCAT_OBJECT_3,
PredefinedType
.PT_STRING, PredefinedName.PN_CONCAT, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_STRING, 3, (int)
PredefinedType
.PT_OBJECT, (int)
PredefinedType
.PT_OBJECT, (int)
PredefinedType
.PT_OBJECT }),
507
new PredefinedMethodInfo( PREDEFMETH.PM_STRING_CONCAT_STRING_2,
PredefinedType
.PT_STRING, PredefinedName.PN_CONCAT, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_STRING, 2, (int)
PredefinedType
.PT_STRING, (int)
PredefinedType
.PT_STRING }),
508
new PredefinedMethodInfo( PREDEFMETH.PM_STRING_OPEQUALITY,
PredefinedType
.PT_STRING, PredefinedName.PN_OPEQUALITY, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BOOL, 2, (int)
PredefinedType
.PT_STRING, (int)
PredefinedType
.PT_STRING }),
509
new PredefinedMethodInfo( PREDEFMETH.PM_STRING_OPINEQUALITY,
PredefinedType
.PT_STRING, PredefinedName.PN_OPINEQUALITY, MethodCallingConventionEnum.Static, ACCESS.ACC_PUBLIC, 0, new int[] { (int)
PredefinedType
.PT_BOOL, 2, (int)
PredefinedType
.PT_STRING, (int)
PredefinedType
.PT_STRING }),
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\AggregateSymbol.cs (6)
55
private
PredefinedType
_iPredef; // index of the predefined type, if isPredefined.
113
public bool isPredefAgg(
PredefinedType
pt)
115
return _isPredefined && (
PredefinedType
)_iPredef == pt;
202
public
PredefinedType
GetPredefType()
204
return (
PredefinedType
)_iPredef;
207
public void SetPredefType(
PredefinedType
predef)
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\MethodSymbol.cs (1)
73
return getClass().isPredefAgg(
PredefinedType
.PT_G_OPTIONAL) &&
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymbolLoader.cs (15)
13
public static AggregateSymbol GetPredefAgg(
PredefinedType
pt) => TypeManager.GetPredefAgg(pt);
16
public static AggregateType GetPredefindType(
PredefinedType
pt) => GetPredefAgg(pt).getThisType();
141
if (pDest.IsPredefType(
PredefinedType
.PT_IENUMERABLE))
148
if (!aggDest.isPredefAgg(
PredefinedType
.PT_G_ILIST) &&
149
!aggDest.isPredefAgg(
PredefinedType
.PT_G_ICOLLECTION) &&
150
!aggDest.isPredefAgg(
PredefinedType
.PT_G_IENUMERABLE) &&
151
!aggDest.isPredefAgg(
PredefinedType
.PT_G_IREADONLYCOLLECTION) &&
152
!aggDest.isPredefAgg(
PredefinedType
.PT_G_IREADONLYLIST))
171
if (pSource.IsReferenceType && pDest.IsPredefType(
PredefinedType
.PT_OBJECT))
233
if (aggDest.IsPredefType(
PredefinedType
.PT_MULTIDEL)
234
|| aggDest.IsPredefType(
PredefinedType
.PT_DELEGATE) || IsBaseInterface(
235
GetPredefindType(
PredefinedType
.PT_MULTIDEL), aggDest))
262
if (aggDest.IsPredefType(
PredefinedType
.PT_ARRAY)
263
|| IsBaseInterface(GetPredefindType(
PredefinedType
.PT_ARRAY), aggDest))
462
if (pSource is AggregateType && pDest.IsPredefType(
PredefinedType
.PT_OBJECT))
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Concatenate.cs (4)
16
Debug.Assert(first.Type.IsPredefType(
PredefinedType
.PT_STRING) || second.Type.IsPredefType(
PredefinedType
.PT_STRING));
24
if (type.IsPredefType(
PredefinedType
.PT_STRING))
29
Debug.Assert(second.Type.IsPredefType(
PredefinedType
.PT_STRING));
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Visitors\ExpressionTreeRewriter.cs (24)
55
PredefinedType
.PT_EXPRESSION);
94
AggregateType expressionType = SymbolLoader.GetPredefindType(
PredefinedType
.PT_EXPRESSION);
101
Expr parameters = GenerateParamsArray(null,
PredefinedType
.PT_PARAMETEREXPRESSION);
168
pExpr.Type.IsPredefType(
PredefinedType
.PT_G_EXPRESSION) &&
188
if (expr.FirstArgument.Type.IsPredefType(
PredefinedType
.PT_STRING) && expr.SecondArgument.Type.IsPredefType(
PredefinedType
.PT_STRING))
199
Expr methodInfo = ExprFactory.CreateMethodInfo(method, SymbolLoader.GetPredefindType(
PredefinedType
.PT_STRING), null);
239
Expr Params = GenerateParamsArray(args,
PredefinedType
.PT_EXPRESSION);
303
Expr Params = GenerateParamsArray(args,
PredefinedType
.PT_EXPRESSION);
328
Expr Params = GenerateParamsArray(args,
PredefinedType
.PT_EXPRESSION);
341
Expr Params = GenerateParamsArray(args,
PredefinedType
.PT_EXPRESSION);
369
Expr Params = GenerateParamsArray(args,
PredefinedType
.PT_EXPRESSION);
624
return GenerateCall(pdm, null, methodInfo, GenerateParamsArray(op,
PredefinedType
.PT_EXPRESSION));
790
SymbolLoader.GetPredefindType(
PredefinedType
.PT_STRING); // force an ensure state
837
Expr Params = GenerateParamsArray(args,
PredefinedType
.PT_EXPRESSION);
857
CType intType = SymbolLoader.GetPredefindType(
PredefinedType
.PT_INT);
880
AggregateType pObject = SymbolLoader.GetPredefindType(
PredefinedType
.PT_OBJECT);
888
AggregateType stringType = SymbolLoader.GetPredefindType(
PredefinedType
.PT_STRING);
908
AggregateType expressionType = SymbolLoader.GetPredefindType(
PredefinedType
.PT_EXPRESSION);
922
AggregateType expressionType = SymbolLoader.GetPredefindType(
PredefinedType
.PT_EXPRESSION);
937
AggregateType expressionType = SymbolLoader.GetPredefindType(
PredefinedType
.PT_EXPRESSION);
952
AggregateType expressionType = SymbolLoader.GetPredefindType(
PredefinedType
.PT_EXPRESSION);
962
private static ExprArrayInit GenerateParamsArray(Expr args,
PredefinedType
pt)
1027
argtype.StripNubs().IsEnumType && desttype.StripNubs().IsPredefType(
PredefinedType
.PT_DECIMAL);
Microsoft\CSharp\RuntimeBinder\Semantics\TypeBind.cs (2)
203
if (bnds.Count != 0 && bnds[0].IsPredefType(
PredefinedType
.PT_VALUE))
237
if (typeBnd.IsPredefType(
PredefinedType
.PT_ENUM) || nubArg.UnderlyingType == typeBnd)
Microsoft\CSharp\RuntimeBinder\Semantics\Types\AggregateType.cs (12)
149
return PredefinedTypes.GetPredefinedAggregate(
PredefinedType
.PT_OBJECT).getThisType();
218
public override
PredefinedType
PredefinedType
227
public override bool IsPredefType(
PredefinedType
pt)
260
PredefinedType
pt = agg.GetPredefType();
261
return PredefinedTypeFacts.IsSimpleType(pt) || pt ==
PredefinedType
.PT_STRING;
368
if (IsPredefType(
PredefinedType
.PT_INTPTR) || IsPredefType(
PredefinedType
.PT_UINTPTR))
384
OwningAggregate.IsEnum() && OwningAggregate.GetUnderlyingType().PredefinedType ==
PredefinedType
.PT_DECIMAL
385
|| IsPredefined && PredefinedType ==
PredefinedType
.PT_DATETIME
386
|| IsPredefined && PredefinedType ==
PredefinedType
.PT_DECIMAL);
388
return IsPredefined && PredefinedType ==
PredefinedType
.PT_DATETIME
393
return IsPredefined && PredefinedType ==
PredefinedType
.PT_STRING
Microsoft\CSharp\RuntimeBinder\Semantics\Types\ArrayType.cs (1)
66
public override AggregateType GetAts() => SymbolLoader.GetPredefindType(
PredefinedType
.PT_ARRAY);
Microsoft\CSharp\RuntimeBinder\Semantics\Types\PredefinedTypes.cs (103)
14
private static readonly AggregateSymbol[] s_predefSymbols = new AggregateSymbol[(int)
PredefinedType
.PT_COUNT];
18
private static AggregateSymbol DelayLoadPredefSym(
PredefinedType
pt)
25
internal static AggregateSymbol InitializePredefinedType(AggregateSymbol sym,
PredefinedType
pt)
29
sym.SetSkipUDOps(pt <=
PredefinedType
.PT_ENUM && pt !=
PredefinedType
.PT_INTPTR && pt !=
PredefinedType
.PT_UINTPTR && pt !=
PredefinedType
.PT_TYPE);
35
public static AggregateSymbol GetPredefinedAggregate(
PredefinedType
pt) =>
43
private static string GetNiceName(
PredefinedType
pt) => PredefinedTypeFacts.GetNiceName(pt);
51
internal static FUNDTYPE GetFundType(
PredefinedType
type) => s_types[(int)type].FundType;
53
internal static Type GetAssociatedSystemType(
PredefinedType
type) => s_types[(int)type].AssociatedSystemType;
55
internal static bool IsSimpleType(
PredefinedType
type) => type <
PredefinedType
.FirstNonSimpleType;
57
internal static bool IsNumericType(
PredefinedType
type)
61
case
PredefinedType
.PT_BYTE:
62
case
PredefinedType
.PT_SHORT:
63
case
PredefinedType
.PT_INT:
64
case
PredefinedType
.PT_LONG:
65
case
PredefinedType
.PT_FLOAT:
66
case
PredefinedType
.PT_DOUBLE:
67
case
PredefinedType
.PT_DECIMAL:
68
case
PredefinedType
.PT_SBYTE:
69
case
PredefinedType
.PT_USHORT:
70
case
PredefinedType
.PT_UINT:
71
case
PredefinedType
.PT_ULONG:
78
internal static string GetNiceName(
PredefinedType
type) =>
81
PredefinedType
.PT_BYTE => "byte",
82
PredefinedType
.PT_SHORT => "short",
83
PredefinedType
.PT_INT => "int",
84
PredefinedType
.PT_LONG => "long",
85
PredefinedType
.PT_FLOAT => "float",
86
PredefinedType
.PT_DOUBLE => "double",
87
PredefinedType
.PT_DECIMAL => "decimal",
88
PredefinedType
.PT_CHAR => "char",
89
PredefinedType
.PT_BOOL => "bool",
90
PredefinedType
.PT_SBYTE => "sbyte",
91
PredefinedType
.PT_USHORT => "ushort",
92
PredefinedType
.PT_UINT => "uint",
93
PredefinedType
.PT_ULONG => "ulong",
94
PredefinedType
.PT_OBJECT => "object",
95
PredefinedType
.PT_STRING => "string",
99
public static
PredefinedType
TryGetPredefTypeIndex(string name) =>
100
s_typesByName.TryGetValue(name, out
PredefinedType
type) ? type :
PredefinedType
.PT_UNDEFINEDINDEX;
105
public readonly
PredefinedType
Type;
111
internal PredefinedTypeInfo(
PredefinedType
type, Type associatedSystemType, string name, FUNDTYPE fundType)
121
internal PredefinedTypeInfo(
PredefinedType
type, Type associatedSystemType, string name)
128
new PredefinedTypeInfo(
PredefinedType
.PT_BYTE, typeof(byte), "System.Byte", FUNDTYPE.FT_U1),
129
new PredefinedTypeInfo(
PredefinedType
.PT_SHORT, typeof(short), "System.Int16", FUNDTYPE.FT_I2),
130
new PredefinedTypeInfo(
PredefinedType
.PT_INT, typeof(int), "System.Int32", FUNDTYPE.FT_I4),
131
new PredefinedTypeInfo(
PredefinedType
.PT_LONG, typeof(long), "System.Int64", FUNDTYPE.FT_I8),
132
new PredefinedTypeInfo(
PredefinedType
.PT_FLOAT, typeof(float), "System.Single", FUNDTYPE.FT_R4),
133
new PredefinedTypeInfo(
PredefinedType
.PT_DOUBLE, typeof(double), "System.Double", FUNDTYPE.FT_R8),
134
new PredefinedTypeInfo(
PredefinedType
.PT_DECIMAL, typeof(decimal), "System.Decimal", FUNDTYPE.FT_STRUCT),
135
new PredefinedTypeInfo(
PredefinedType
.PT_CHAR, typeof(char), "System.Char", FUNDTYPE.FT_U2),
136
new PredefinedTypeInfo(
PredefinedType
.PT_BOOL, typeof(bool), "System.Boolean", FUNDTYPE.FT_I1),
137
new PredefinedTypeInfo(
PredefinedType
.PT_SBYTE, typeof(sbyte), "System.SByte", FUNDTYPE.FT_I1),
138
new PredefinedTypeInfo(
PredefinedType
.PT_USHORT, typeof(ushort), "System.UInt16", FUNDTYPE.FT_U2),
139
new PredefinedTypeInfo(
PredefinedType
.PT_UINT, typeof(uint), "System.UInt32", FUNDTYPE.FT_U4),
140
new PredefinedTypeInfo(
PredefinedType
.PT_ULONG, typeof(ulong), "System.UInt64", FUNDTYPE.FT_U8),
141
new PredefinedTypeInfo(
PredefinedType
.PT_INTPTR, typeof(IntPtr), "System.IntPtr", FUNDTYPE.FT_STRUCT),
142
new PredefinedTypeInfo(
PredefinedType
.PT_UINTPTR, typeof(UIntPtr), "System.UIntPtr", FUNDTYPE.FT_STRUCT),
143
new PredefinedTypeInfo(
PredefinedType
.PT_OBJECT, typeof(object), "System.Object"),
144
new PredefinedTypeInfo(
PredefinedType
.PT_STRING, typeof(string), "System.String"),
145
new PredefinedTypeInfo(
PredefinedType
.PT_DELEGATE, typeof(Delegate), "System.Delegate"),
146
new PredefinedTypeInfo(
PredefinedType
.PT_MULTIDEL, typeof(MulticastDelegate), "System.MulticastDelegate"),
147
new PredefinedTypeInfo(
PredefinedType
.PT_ARRAY, typeof(Array), "System.Array"),
148
new PredefinedTypeInfo(
PredefinedType
.PT_TYPE, typeof(Type), "System.Type"),
149
new PredefinedTypeInfo(
PredefinedType
.PT_VALUE, typeof(ValueType), "System.ValueType"),
150
new PredefinedTypeInfo(
PredefinedType
.PT_ENUM, typeof(Enum), "System.Enum"),
151
new PredefinedTypeInfo(
PredefinedType
.PT_DATETIME, typeof(DateTime), "System.DateTime", FUNDTYPE.FT_STRUCT),
152
new PredefinedTypeInfo(
PredefinedType
.PT_IENUMERABLE, typeof(System.Collections.IEnumerable), "System.Collections.IEnumerable"),
153
new PredefinedTypeInfo(
PredefinedType
.PT_G_IENUMERABLE, typeof(IEnumerable<>), "System.Collections.Generic.IEnumerable`1"),
154
new PredefinedTypeInfo(
PredefinedType
.PT_G_OPTIONAL, typeof(Nullable<>), "System.Nullable`1", FUNDTYPE.FT_STRUCT),
155
new PredefinedTypeInfo(
PredefinedType
.PT_G_IQUERYABLE, typeof(System.Linq.IQueryable<>), "System.Linq.IQueryable`1"),
156
new PredefinedTypeInfo(
PredefinedType
.PT_G_ICOLLECTION, typeof(ICollection<>), "System.Collections.Generic.ICollection`1"),
157
new PredefinedTypeInfo(
PredefinedType
.PT_G_ILIST, typeof(IList<>), "System.Collections.Generic.IList`1"),
158
new PredefinedTypeInfo(
PredefinedType
.PT_G_EXPRESSION, typeof(System.Linq.Expressions.Expression<>), "System.Linq.Expressions.Expression`1"),
159
new PredefinedTypeInfo(
PredefinedType
.PT_EXPRESSION, typeof(System.Linq.Expressions.Expression), "System.Linq.Expressions.Expression"),
160
new PredefinedTypeInfo(
PredefinedType
.PT_BINARYEXPRESSION, typeof(System.Linq.Expressions.BinaryExpression), "System.Linq.Expressions.BinaryExpression"),
161
new PredefinedTypeInfo(
PredefinedType
.PT_UNARYEXPRESSION, typeof(System.Linq.Expressions.UnaryExpression), "System.Linq.Expressions.UnaryExpression"),
162
new PredefinedTypeInfo(
PredefinedType
.PT_CONSTANTEXPRESSION, typeof(System.Linq.Expressions.ConstantExpression), "System.Linq.Expressions.ConstantExpression"),
163
new PredefinedTypeInfo(
PredefinedType
.PT_PARAMETEREXPRESSION, typeof(System.Linq.Expressions.ParameterExpression), "System.Linq.Expressions.ParameterExpression"),
164
new PredefinedTypeInfo(
PredefinedType
.PT_MEMBEREXPRESSION, typeof(System.Linq.Expressions.MemberExpression), "System.Linq.Expressions.MemberExpression"),
165
new PredefinedTypeInfo(
PredefinedType
.PT_METHODCALLEXPRESSION, typeof(System.Linq.Expressions.MethodCallExpression), "System.Linq.Expressions.MethodCallExpression"),
166
new PredefinedTypeInfo(
PredefinedType
.PT_NEWEXPRESSION, typeof(System.Linq.Expressions.NewExpression), "System.Linq.Expressions.NewExpression"),
167
new PredefinedTypeInfo(
PredefinedType
.PT_NEWARRAYEXPRESSION, typeof(System.Linq.Expressions.NewArrayExpression), "System.Linq.Expressions.NewArrayExpression"),
168
new PredefinedTypeInfo(
PredefinedType
.PT_INVOCATIONEXPRESSION, typeof(System.Linq.Expressions.InvocationExpression), "System.Linq.Expressions.InvocationExpression"),
169
new PredefinedTypeInfo(
PredefinedType
.PT_FIELDINFO, typeof(System.Reflection.FieldInfo), "System.Reflection.FieldInfo"),
170
new PredefinedTypeInfo(
PredefinedType
.PT_METHODINFO, typeof(System.Reflection.MethodInfo), "System.Reflection.MethodInfo"),
171
new PredefinedTypeInfo(
PredefinedType
.PT_CONSTRUCTORINFO, typeof(System.Reflection.ConstructorInfo), "System.Reflection.ConstructorInfo"),
172
new PredefinedTypeInfo(
PredefinedType
.PT_PROPERTYINFO, typeof(System.Reflection.PropertyInfo), "System.Reflection.PropertyInfo"),
173
new PredefinedTypeInfo(
PredefinedType
.PT_MISSING, typeof(System.Reflection.Missing), "System.Reflection.Missing"),
174
new PredefinedTypeInfo(
PredefinedType
.PT_G_IREADONLYLIST, typeof(IReadOnlyList<>), "System.Collections.Generic.IReadOnlyList`1"),
175
new PredefinedTypeInfo(
PredefinedType
.PT_G_IREADONLYCOLLECTION, typeof(IReadOnlyCollection<>), "System.Collections.Generic.IReadOnlyCollection`1"),
176
new PredefinedTypeInfo(
PredefinedType
.PT_FUNC, typeof(Func<>), "System.Func`1")
179
private static readonly Dictionary<string,
PredefinedType
> s_typesByName = CreatePredefinedTypeFacts();
181
private static Dictionary<string,
PredefinedType
> CreatePredefinedTypeFacts()
183
var typesByName = new Dictionary<string,
PredefinedType
>((int)
PredefinedType
.PT_COUNT);
184
for (int i = 0; i < (int)
PredefinedType
.PT_COUNT; i++)
187
Debug.Assert(s_types[i].Type == (
PredefinedType
)i);
189
typesByName.Add(s_types[i].Name, (
PredefinedType
)i);
Microsoft\CSharp\RuntimeBinder\Semantics\Types\Type.cs (2)
112
public virtual bool IsPredefType(
PredefinedType
pt) => false;
117
public virtual
PredefinedType
PredefinedType => throw Error.InternalCompilerError();
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeManager.cs (5)
180
public static AggregateSymbol GetNullable() => GetPredefAgg(
PredefinedType
.PT_G_OPTIONAL);
547
public static AggregateSymbol GetPredefAgg(
PredefinedType
pt) => PredefinedTypes.GetPredefinedAggregate(pt);
628
return GetPredefAgg(
PredefinedType
.PT_OBJECT).getThisType();
654
return GetPredefAgg(
PredefinedType
.PT_ARRAY).getThisType();
660
return GetPredefAgg(
PredefinedType
.PT_VALUE).getThisType();
Microsoft\CSharp\RuntimeBinder\Semantics\Types\VoidType.cs (2)
21
public override bool IsPredefType(
PredefinedType
pt) => pt ==
PredefinedType
.PT_VOID;
Microsoft\CSharp\RuntimeBinder\Semantics\UnaOpSig.cs (6)
18
public UnaOpSig(
PredefinedType
pt, UnaOpMask grfuom, int cuosSkip, PfnBindUnaOp pfn, UnaOpFuncKind fnkind)
26
public
PredefinedType
pt;
40
this.pt =
PredefinedType
.PT_UNDEFINEDINDEX;
61
Debug.Assert(pt !=
PredefinedType
.PT_UNDEFINEDINDEX);
62
_type = pt !=
PredefinedType
.PT_UNDEFINEDINDEX ? GetPredefindType(pt) : null;
67
return pt !=
PredefinedType
.PT_UNDEFINEDINDEX;
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (19)
104
type = SymbolLoader.GetPredefindType(
PredefinedType
.PT_ARRAY);
958
PredefinedType
predefinedType = PredefinedTypeFacts.TryGetPredefTypeIndex(typeName);
959
if (predefinedType !=
PredefinedType
.PT_UNDEFINEDINDEX)
1486
CType cvType = SymbolLoader.GetPredefindType(
PredefinedType
.PT_DATETIME);
1496
CType cvType = SymbolLoader.GetPredefindType(
PredefinedType
.PT_DECIMAL);
1505
CType cvType = SymbolLoader.GetPredefindType(
PredefinedType
.PT_OBJECT);
1517
cvType = SymbolLoader.GetPredefindType(
PredefinedType
.PT_BYTE);
1522
cvType = SymbolLoader.GetPredefindType(
PredefinedType
.PT_SHORT);
1527
cvType = SymbolLoader.GetPredefindType(
PredefinedType
.PT_INT);
1532
cvType = SymbolLoader.GetPredefindType(
PredefinedType
.PT_LONG);
1537
cvType = SymbolLoader.GetPredefindType(
PredefinedType
.PT_FLOAT);
1542
cvType = SymbolLoader.GetPredefindType(
PredefinedType
.PT_DOUBLE);
1547
cvType = SymbolLoader.GetPredefindType(
PredefinedType
.PT_CHAR);
1552
cvType = SymbolLoader.GetPredefindType(
PredefinedType
.PT_BOOL);
1557
cvType = SymbolLoader.GetPredefindType(
PredefinedType
.PT_SBYTE);
1562
cvType = SymbolLoader.GetPredefindType(
PredefinedType
.PT_USHORT);
1567
cvType = SymbolLoader.GetPredefindType(
PredefinedType
.PT_UINT);
1572
cvType = SymbolLoader.GetPredefindType(
PredefinedType
.PT_ULONG);
1577
cvType = SymbolLoader.GetPredefindType(
PredefinedType
.PT_STRING);