10 types derived from CType
Microsoft.CSharp (10)
Microsoft\CSharp\RuntimeBinder\Semantics\Types\AggregateType.cs (1)
19internal sealed class AggregateType : CType
Microsoft\CSharp\RuntimeBinder\Semantics\Types\ArgumentListType.cs (1)
11internal sealed class ArgumentListType : CType
Microsoft\CSharp\RuntimeBinder\Semantics\Types\ArrayType.cs (1)
14internal sealed class ArrayType : CType
Microsoft\CSharp\RuntimeBinder\Semantics\Types\MethodGroupType.cs (1)
11internal sealed class MethodGroupType : CType
Microsoft\CSharp\RuntimeBinder\Semantics\Types\NullableType.cs (1)
18internal sealed class NullableType : CType
Microsoft\CSharp\RuntimeBinder\Semantics\Types\NullType.cs (1)
10internal sealed class NullType : CType
Microsoft\CSharp\RuntimeBinder\Semantics\Types\ParameterModifierType.cs (1)
18internal sealed class ParameterModifierType : CType
Microsoft\CSharp\RuntimeBinder\Semantics\Types\PointerType.cs (1)
10internal sealed class PointerType : CType
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeParameterType.cs (1)
14internal sealed class TypeParameterType : CType
Microsoft\CSharp\RuntimeBinder\Semantics\Types\VoidType.cs (1)
12internal sealed class VoidType : CType
643 references to CType
Microsoft.CSharp (643)
Microsoft\CSharp\RuntimeBinder\Errors\ErrorFmt.cs (5)
59internal CType pType; 88public ErrArg(CType pType) 93public ErrArg(CType pType, ErrArgFlags eaf) 132public static implicit operator ErrArg(CType type) 170public ErrArgNoRef(CType pType)
Microsoft\CSharp\RuntimeBinder\Errors\ErrorHandling.cs (2)
76CType pType = null; 120CType pType2 = null;
Microsoft\CSharp\RuntimeBinder\Errors\UserStringBuilder.cs (3)
138CType pType = TypeManager.SubstType(agg.getThisType(), pctx); 403private void ErrAppendType(CType pType, SubstContext pctx) 479CType elementType = ((ArrayType)pType).BaseElementType;
Microsoft\CSharp\RuntimeBinder\RuntimeBinder.cs (14)
238CType actualType = SymbolTable.GetCTypeFromType(t); 239CType bestType = TypeManager.GetBestAccessibleType(_binder.Context.ContextForMemberLookup, actualType); 351CType type = SymbolTable.GetCTypeFromType(parameter.Type); 399CType ctype; 540CType callingObjectType = callingObject.Type; 563HashSet<CType> distinctCallingTypes = new HashSet<CType>(); 564List<CType> callingTypes = new List<CType>(); 812CType eventCType = null; 1226CType destinationType = SymbolTable.GetCTypeFromType(returnType); 1240CType pDestType = _binder.ChooseArrayIndexType(argument); 1262CType destinationType = SymbolTable.GetCTypeFromType(returnType); 1326CType boolType = SymbolLoader.GetPredefindType(PredefinedType.PT_BOOL);
Microsoft\CSharp\RuntimeBinder\Semantics\Binding\Better.cs (16)
44CType pTypeThrough, 121CType type1 = ta1[i]; 122CType type2 = ta2[i]; 203private static TypeArray RearrangeNamedArguments(TypeArray pta, MethPropWithInst mpwi, CType pTypeThrough, ArgInfos args) 221CType type = pTypeThrough ?? mpwi.GetType(); 222CType[] typeList = new CType[pta.Count]; 239CType tempType = pta[index]; 286CType pTypeThrough, 319CType p1 = pta1[i]; 320CType p2 = pta2[i]; 329CType argType = arg?.RuntimeObjectActualType ?? args.types[i]; 402private BetterType WhichConversionIsBetter(CType argType, CType p1, CType p2) 489CType pTypeThrough,
Microsoft\CSharp\RuntimeBinder\Semantics\BinOpArgInfo.cs (4)
35public CType type1; 36public CType type2; 37public CType typeRaw1; 38public CType typeRaw2;
Microsoft\CSharp\RuntimeBinder\Semantics\BinOpSig.cs (6)
57private readonly CType _type1; 58private readonly CType _type2; 60public BinOpFullSig(CType type1, CType type2, PfnBindBinOp pfn, OpSigFlags grfos, 124public CType Type1() 129public CType Type2()
Microsoft\CSharp\RuntimeBinder\Semantics\Conversion.cs (63)
47CType pSourceType, 48CType pDestinationType, 263private BetterType WhichTypeIsBetter(PredefinedType pt1, PredefinedType pt2, CType typeGiven) 300private BetterType WhichTypeIsBetter(CType type1, CType type2, CType typeGiven) 344private bool canConvert(CType src, CType dest, CONVERTTYPE flags) => BindImplicitConversion(null, src, dest, flags); 348public bool canConvert(CType src, CType dest) => canConvert(src, dest, 0); 353private bool canConvert(Expr expr, CType dest) => canConvert(expr, dest, 0); 357private bool canConvert(Expr expr, CType dest, CONVERTTYPE flags) => 364private Expr mustConvertCore(Expr expr, CType destExpr) => mustConvertCore(expr, destExpr, 0); 368private Expr mustConvertCore(Expr expr, CType dest, CONVERTTYPE flags) 417public Expr tryConvert(Expr expr, CType dest) 424private Expr tryConvert(Expr expr, CType dest, CONVERTTYPE flags) 439public Expr mustConvert(Expr expr, CType dest) => mustConvert(expr, dest, (CONVERTTYPE)0); 443private Expr mustConvert(Expr expr, CType dest, CONVERTTYPE flags) => mustConvertCore(expr, dest, flags); 454private Expr mustCastCore(Expr expr, CType dest, CONVERTTYPE flags) 530private static RuntimeBinderException CantConvert(Expr expr, CType dest) 539public Expr mustCast(Expr expr, CType dest) => mustCast(expr, dest, 0); 543public Expr mustCast(Expr expr, CType dest, CONVERTTYPE flags) => mustCastCore(expr, dest, flags); 547private Expr MustCastInUncheckedContext(Expr expr, CType dest, CONVERTTYPE flags) => 553private bool canCast(CType src, CType dest, CONVERTTYPE flags) => BindExplicitConversion(null, src, dest, flags); 557private bool BindImplicitConversion(Expr pSourceExpr, CType pSourceType, CType destinationType, CONVERTTYPE flags) 565private bool BindImplicitConversion(Expr pSourceExpr, CType pSourceType, CType destinationType, out Expr ppDestinationExpr, CONVERTTYPE flags) 575private bool BindImplicitConversion(Expr pSourceExpr, CType pSourceType, CType destinationType, bool needsExprDest, out Expr ppDestinationExpr, CONVERTTYPE flags) 585private bool BindExplicitConversion(Expr pSourceExpr, CType pSourceType, CType destinationType, bool needsExprDest, out Expr ppDestinationExpr, CONVERTTYPE flags) 595private bool BindExplicitConversion(Expr pSourceExpr, CType pSourceType, CType destinationType, out Expr ppDestinationExpr, CONVERTTYPE flags) 605private bool BindExplicitConversion(Expr pSourceExpr, CType pSourceType, CType destinationType, CONVERTTYPE flags) 653private bool bindUserDefinedConversion(Expr exprSrc, CType typeSrc, CType typeDst, bool needExprDest, out Expr pexprDst, bool fImplicitOnly) 664CType typeSrcBase = typeSrc.StripNubs(); 665CType typeDstBase = typeDst.StripNubs(); 714CType typeBestSrc = null; 715CType typeBestDst = null; 721CType typeFrom; 722CType typeTo; 1083private static RuntimeBinderException HandleAmbiguity(CType typeSrc, CType typeDst, List<UdConvInfo> prguci, int iuciBestSrc, int iuciBestDst) 1122private Expr BindUDConversionCore(Expr pFrom, CType pTypeFrom, CType pTypeTo, CType pTypeDestination, MethWithInst mwiBest) 1129private Expr BindUDConversionCore(Expr pFrom, CType pTypeFrom, CType pTypeTo, CType pTypeDestination, MethWithInst mwiBest, out Expr ppTransformedArgument) 1146private ConstCastResult bindConstantCast(Expr exprSrc, CType typeDest, bool needExprDest, out Expr pexprDest, bool explicitConversion) 1357private int CompareSrcTypesBased(CType type1, bool fImplicit1, CType type2, bool fImplicit2) 1392private int CompareDstTypesBased(CType type1, bool fImplicit1, CType type2, bool fImplicit2) 1409private static Expr BindDecimalConstCast(CType destType, CType srcType, ExprConstant src) 1411CType typeDecimal = SymbolLoader.GetPredefindType(PredefinedType.PT_DECIMAL); 1520private bool CanExplicitConversionBeBoundInUncheckedContext(Expr exprSrc, CType typeSrc, CType typeDest, CONVERTTYPE flags)
Microsoft\CSharp\RuntimeBinder\Semantics\Conversions.cs (15)
29public static bool FImpRefConv(CType typeSrc, CType typeDst) => 78public static bool FExpRefConv(CType typeSrc, CType typeDst) 185CType typeArr = arrayDest.ElementType; 186CType typeLst = aggtypeSrc.TypeArgsAll[0]; 225public static bool HasGenericDelegateExplicitReferenceConversion(CType source, CType target) => 230public static bool HasGenericDelegateExplicitReferenceConversion(CType pSource, AggregateType pTarget) 250CType pSourceArg = pSourceArgs[iParam]; 251CType pTargetArg = pTargetArgs[iParam]; 330public static bool FWrappingConv(CType typeSrc, CType typeDst) => typeDst is NullableType nubDst && typeSrc == nubDst.UnderlyingType; 344public static bool FUnwrappingConv(CType typeSrc, CType typeDst)
Microsoft\CSharp\RuntimeBinder\Semantics\ExplicitConversion.cs (9)
21private readonly CType _typeSrc; 22private readonly CType _typeDest; 47public ExplicitConversion(ExpressionBinder binder, Expr exprSrc, CType typeSrc, CType typeDest, bool needsExprDest, CONVERTTYPE flags) 256CType typeArr = arrSrc.ElementType; 257CType typeLst = aggDest.TypeArgsAll[0]; 297CType typeArr = arrayDest.ElementType; 298CType typeLst = aggSrc.TypeArgsAll[0]; 483CType underlyingType = aggTypeDest.UnderlyingEnumType;
Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs (44)
309CType pIntType = GetPredefindType(PredefinedType.PT_INT); 313CType elementType = pArrayType.ElementType; 318CType pDestType = ChooseArrayIndexType(pOp2); 337private Expr MustConvertWithSuppressedMessage(Expr x, CType pDestType) 343private static ExprCast ExprFactoryCreateCastWithSuppressedMessage(EXPRFLAG flags, CType type, Expr argument) 350private void bindSimpleCast(Expr exprSrc, CType typeDest, out Expr pexprDest) => 355private void bindSimpleCast(Expr exprSrc, CType typeDest, out Expr pexprDest, EXPRFLAG exprFlags) 405CType callingObjectType = pObject?.Type; 410CType pReturnType; 449CType pFieldType = TypeManager.SubstType(fwt.Field().GetType(), fwt.GetType()); 505CType pReturnType = TypeManager.SubstType(pwt.Prop().RetType, pwt.GetType()); 517CType type = null; 554CType typeSrc = arg.Type; 613CType typeParam = paramsCur[0]; 665private ExprCall BindLiftedUDUnop(Expr arg, CType typeArg, MethPropWithInst mpwi) 667CType typeRaw = typeArg.StripNubs(); 675CType typeRet = TypeManager.SubstType(mpwi.Meth().RetType, mpwi.GetType()); 695private ExprCall BindUDUnopCall(Expr arg, CType typeArg, MethPropWithInst mpwi) 697CType typeRet = TypeManager.SubstType(mpwi.Meth().RetType, mpwi.GetType()); 846CType type = null; 857private void CheckPropertyAccess(MethWithType mwt, PropWithType pwtSlot, CType type) 940foreach (CType type in meth.Params.Items) 1012CType typeObj = pObject.Type; 1013CType typeTmp; 1086private void verifyMethodArgs(ExprWithArgs call, CType callingObjectType) 1100private void AdjustCallArgumentsForParams(CType callingObjectType, CType type, MethodOrPropertySymbol mp, TypeArray pTypeArgs, Expr argsPtr, out Expr newArgs) 1162CType substDestType = TypeManager.SubstType(@params[index], type, pTypeArgs); 1176CType arrayType = (ArrayType)TypeManager.SubstType(mp.Params[mp.Params.Count - 1], type, pTypeArgs); 1195CType substDestType = TypeManager.SubstType(@params[iDst], type, pTypeArgs); 1243CType substitutedArrayType = TypeManager.SubstType(mp.Params[mp.Params.Count - 1], type, pTypeArgs); 1254CType elementType = subArr.ElementType; 1313internal CType ChooseArrayIndexType(Expr args) 1318CType type = GetPredefindType(predef); 1339CType[] prgtype = new CType[argInfo.carg]; 1370CType[] prgtype; 1376prgtype = new CType[@params.Count - 1]; 1382prgtype = new CType[count]; 1385CType type = @params[@params.Count - 1]; 1395CType elementType = arr.ElementType; 1436private static bool isConstantInRange(ExprConstant exprSrc, CType typeDest) 1443private static bool isConstantInRange(ExprConstant exprSrc, CType typeDest, bool realsOk) 1640private static void CheckUnsafe(CType type)
Microsoft\CSharp\RuntimeBinder\Semantics\ExprFactory.cs (21)
13public static ExprCall CreateCall(EXPRFLAG flags, CType type, Expr arguments, ExprMemberGroup memberGroup, MethWithInst method) => 16public static ExprField CreateField(CType type, Expr optionalObject, FieldWithType field) => 19public static ExprArrayInit CreateArrayInit(CType type, Expr arguments, Expr argumentDimensions, int[] dimSizes) => 22public static ExprProperty CreateProperty(CType type, Expr optionalObjectThrough, Expr arguments, ExprMemberGroup memberGroup, PropWithType property, MethWithType setMethod) => 25public static ExprMemberGroup CreateMemGroup(EXPRFLAG flags, Name name, TypeArray typeArgs, SYMKIND symKind, CType parentType, Expr obj, CMemberLookupResults memberLookupResults) => 34obj, new CMemberLookupResults(TypeArray.Allocate((CType)method.GetType()), name)); 44public static ExprCast CreateCast(CType type, Expr argument) => CreateCast(0, type, argument); 48public static ExprCast CreateCast(EXPRFLAG flags, CType type, Expr argument) => new ExprCast(flags, type, argument); 83public static ExprTypeOf CreateTypeOf(CType sourceType) => 88public static ExprUserLogicalOp CreateUserLogOp(CType type, Expr trueFalseCall, ExprCall operatorCall) => 102public static ExprMultiGet CreateMultiGet(EXPRFLAG flags, CType type, ExprMulti multi) => 107public static ExprMulti CreateMulti(EXPRFLAG flags, CType type, Expr left, Expr op) => 119public static Expr CreateZeroInit(CType type) 156public static ExprConstant CreateConstant(CType type, ConstVal constVal) => new ExprConstant(type, constVal); 168public static ExprArrayIndex CreateArrayIndex(CType type, Expr array, Expr index) => 171public static ExprBinOp CreateBinop(ExpressionKind exprKind, CType type, Expr left, Expr right) => 174public static ExprUnaryOp CreateUnaryOp(ExpressionKind exprKind, CType type, Expr operand) => 177public static ExprOperator CreateOperator(ExpressionKind exprKind, CType type, Expr arg1, Expr arg2) 186public static ExprBinOp CreateUserDefinedBinop(ExpressionKind exprKind, CType type, Expr left, Expr right, Expr call, MethPropWithInst userMethod) => 190public static ExprUnaryOp CreateUserDefinedUnaryOperator(ExpressionKind exprKind, CType type, Expr operand, ExprCall call, MethPropWithInst userMethod) => 264public static ExprClass CreateClass(CType type) => new ExprClass(type);
Microsoft\CSharp\RuntimeBinder\Semantics\GroupToArgsBinder.cs (20)
57private readonly List<CType> _HiddenTypes; 84_HiddenTypes = new List<CType>(); 105private static CType GetTypeQualifier(ExprMemberGroup pGroup) 326CType pTypeThrough = _pGroup.OptionalObject?.Type; 467CType[] prgTypes = new CType[pCurrentParameters.Count]; 488private static Expr GenerateOptionalArgument(MethodOrPropertySymbol methprop, CType type, int index) 490CType pParamType = type; 491CType pRawParamType = type.StripNubs(); 496CType pConstValType = methprop.GetDefaultParameterValueConstValType(index); 581public static MethodOrPropertySymbol FindMostDerivedMethod(MethodOrPropertySymbol pMethProp, CType pType) 706CType[] prgTypes = new CType[@params.Count]; 918CType var = _pCurrentParameters[ivar]; 929CType var = _pCurrentParameters[ivar]; 961CType argStripped = _pArguments.types[ivar] is ParameterModifierType modArg ? 963CType varStripped = var is ParameterModifierType modVar ? modVar.ParameterType : var; 1024CType pType = _pCurrentParameters[iParam]; 1043private static bool DoesTypeArgumentsContainErrorSym(CType var) 1053CType type = typeVars[i];
Microsoft\CSharp\RuntimeBinder\Semantics\ImplicitConversion.cs (6)
19public ImplicitConversion(ExpressionBinder binder, Expr exprSrc, CType typeSrc, CType typeDest, bool needsExprDest, CONVERTTYPE flags) 33private readonly CType _typeSrc; 34private readonly CType _typeDest; 298CType typeDstBase = nubDst.StripNubs(out dstWasNullable); 299CType typeSrcBase = _typeSrc.StripNubs(out srcWasNullable);
Microsoft\CSharp\RuntimeBinder\Semantics\MemberLookup.cs (4)
41private CType _typeSrc; 42private CType _typeQual; 486private static bool IsDelegateType(CType pSrcType, AggregateType pAggType) => 522public bool Lookup(CType typeSrc, Expr obj, ParentSymbol symWhere, Name name, int arity, MemLookFlags flags)
Microsoft\CSharp\RuntimeBinder\Semantics\MemberLookupResults.cs (1)
33CType qualifyingType, AggregateSymbol context, int arity, EXPRFLAG flags, symbmask_t mask, ArgInfos nonTrailingNamedArguments) =>
Microsoft\CSharp\RuntimeBinder\Semantics\MethodIterator.cs (2)
19private readonly CType _qualifyingType; 28public CMethodIterator(Name name, TypeArray containingTypes, CType qualifyingType, AggregateSymbol context, int arity, EXPRFLAG flags, symbmask_t mask, ArgInfos nonTrailingNamedArguments)
Microsoft\CSharp\RuntimeBinder\Semantics\MethodTypeInferrer.cs (74)
36private readonly List<CType>[] _pExactBounds; 37private readonly List<CType>[] _pUpperBounds; 38private readonly List<CType>[] _pLowerBounds; 39private readonly CType[] _pFixedResults; 127_pFixedResults = new CType[pMethodTypeParameters.Count]; 128_pLowerBounds = new List<CType>[pMethodTypeParameters.Count]; 129_pUpperBounds = new List<CType>[pMethodTypeParameters.Count]; 130_pExactBounds = new List<CType>[pMethodTypeParameters.Count]; 133_pLowerBounds[iBound] = new List<CType>(); 134_pUpperBounds[iBound] = new List<CType>(); 135_pExactBounds[iBound] = new List<CType>(); 180private void AddLowerBound(TypeParameterType pParam, CType pBound) 192private void AddUpperBound(TypeParameterType pParam, CType pBound) 204private void AddExactBound(TypeParameterType pParam, CType pBound) 244private static bool IsReallyAType(CType pType) => 277CType pDest = _pMethodFormalParameterTypes[iArg]; 288CType pSource = pExpr.RuntimeObjectActualType ?? _pMethodArguments.types[iArg]; 759private void ExactInference(CType pSource, CType pDest) 798private bool ExactTypeParameterInference(CType pSource, CType pDest) 815private bool ExactArrayInference(CType pSource, CType pDest) 835private bool ExactNullableInference(CType pSource, CType pDest) 850private bool ExactConstructedInference(CType pSource, CType pDest) 894private void LowerBoundInference(CType pSource, CType pDest) 964private bool LowerBoundTypeParameterInference(CType pSource, CType pDest) 982private bool LowerBoundArrayInference(CType pSource, CType pDest) 1005CType pElementSource = pArraySource.ElementType; 1006CType pElementDest; 1071private bool LowerBoundConstructedInference(CType pSource, CType pDest) 1134private bool LowerBoundClassInference(CType pSource, AggregateType pDest) 1176private bool LowerBoundInterfaceInference(CType pSource, AggregateType pDest) 1252CType pSourceArg = pSourceArgs[arg]; 1253CType pDestArg = pDestArgs[arg]; 1279private void UpperBoundInference(CType pSource, CType pDest) 1323private bool UpperBoundTypeParameterInference(CType pSource, CType pDest) 1341private bool UpperBoundArrayInference(CType pSource, CType pDest) 1356CType pElementDest = pArrayDest.ElementType; 1357CType pElementSource; 1401private bool UpperBoundConstructedInference(CType pSource, CType pDest) 1457private bool UpperBoundClassInference(AggregateType pSource, CType pDest) 1487private bool UpperBoundInterfaceInference(AggregateType pSource, CType pDest) 1559CType pSourceArg = pSourceArgs[arg]; 1560CType pDestArg = pDestArgs[arg]; 1606List<CType> initialCandidates = new List<CType>(); 1613HashSet<CType> typeSet = new HashSet<CType>(); 1615foreach (CType pCurrent in _pLowerBounds[iParam]) 1623foreach (CType pCurrent in _pUpperBounds[iParam]) 1644foreach (CType pBound in _pLowerBounds[iParam]) 1646List<CType> removeList = new List<CType>(); 1647foreach (CType pCandidate in initialCandidates) 1654foreach (CType pRemove in removeList) 1662foreach (CType pBound in _pUpperBounds[iParam]) 1664List<CType> removeList = new List<CType>(); 1665foreach (CType pCandidate in initialCandidates) 1672foreach (CType pRemove in removeList) 1682CType pBest = null; 1683foreach (CType pCandidate in initialCandidates) 1685foreach (CType pCandidate2 in initialCandidates)
Microsoft\CSharp\RuntimeBinder\Semantics\Nullable.cs (1)
53CType typeBase = nubSrc.UnderlyingType;
Microsoft\CSharp\RuntimeBinder\Semantics\Operators.cs (67)
215CType typeSig1 = GetPredefindType(bos.pt1); 216CType typeSig2 = GetPredefindType(bos.pt2); 471CType typeBool = GetPredefindType(PredefinedType.PT_BOOL); 644CType resultType; 674private void LiftArgument(Expr pArgument, CType pParameterType, bool bConvertBeforeLift, 751private bool CanConvertArg1(BinOpArgInfo info, CType typeDst, out LiftFlags pgrflt, 752out CType ptypeSig1, out CType ptypeSig2) 787private bool CanConvertArg2(BinOpArgInfo info, CType typeDst, out LiftFlags pgrflt, 788out CType ptypeSig1, out CType ptypeSig2) 827CType typeSig1; 828CType typeSig2; 871CType typeSig1 = null; 872CType typeSig2 = null; 947CType type1 = info.type1; 948CType type2 = info.type2; 949CType typeObj = GetPredefindType(PredefinedType.PT_OBJECT); 950CType typeCls = null; 961CType typeDel = GetPredefindType(PredefinedType.PT_DELEGATE); 1056private int WhichBofsIsBetter(BinOpFullSig bofs1, BinOpFullSig bofs2, CType type1, CType type2) 1183CType type = pArgument.Type; 1187CType nonNub = nub.UnderlyingType; 1329CType pArgumentType = pArgument.Type; 1330CType pRawType = pArgumentType.StripNubs(); 1425CType pArgumentType = pArgument.Type; 1426CType pRawType = pArgumentType.StripNubs(); 1439CType typeSig = null; 1568private int WhichUofsIsBetter(UnaOpFullSig uofs1, UnaOpFullSig uofs2, CType typeArg) 1645CType typeRaw = uofs.GetType().StripNubs(); 1665private Expr BindIncOpCore(ExpressionKind ek, EXPRFLAG flags, Expr exprVal, CType type) 1724private Expr LScalar(ExpressionKind ek, EXPRFLAG flags, Expr exprVal, CType type, ConstVal cv, CType typeTmp) 1726CType typeOne = type; 1747CType type = uofs.GetType(); 1806CType typeDec = GetPredefindType(PredefinedType.PT_DECIMAL); 1809CType typeRet; 1850CType typeDec = GetPredefindType(PredefinedType.PT_DECIMAL); 1918CType typeBool = GetPredefindType(PredefinedType.PT_BOOL); 1919CType typeRes = TypeManager.GetNullable(typeBool); 1961CType typeBool = GetPredefindType(PredefinedType.PT_BOOL); 2023CType RetType = null; 2072CType typeOp = GetPredefindType(ptOp); 2092CType nonNullableType1 = arg1.Type is NullableType arg1NubType ? arg1NubType.UnderlyingType : arg1.Type; 2093CType nonNullableType2 = arg2.Type is NullableType arg2NubType ? arg2NubType.UnderlyingType : arg2.Type; 2142CType typeEnum = ((ExprCast)arg).Argument.Type; 2151CType typeOp = GetPredefindType(ptOp); 2243CType typeOp = GetPredefindType(ptOp); 2254CType typeDest = kind.IsRelational() ? GetPredefindType(PredefinedType.PT_BOOL) : typeOp; 2298CType typeOp = GetPredefindType(ptOp); 2333CType typeDest = kind.IsRelational() ? GetPredefindType(PredefinedType.PT_BOOL) : op1.Type; 2394CType typeRet = pCall.Type; 2427private static AggregateType GetUserDefinedBinopArgumentType(CType type) 2443private static int GetUserDefinedBinopArgumentTypes(CType type1, CType type2, AggregateType[] rgats) 2473CType typeRet = TypeManager.SubstType(method.RetType, ats); 2532CType[] rgtype = new CType[2]; 2640CType typeRetRaw = TypeManager.SubstType(pmethBest.mpwi.Meth().RetType, pmethBest.mpwi.GetType()); 2647private ExprCall BindUDBinopCall(Expr arg1, Expr arg2, TypeArray Params, CType typeRet, MethPropWithInst mpwi) 2671CType typeRet; 2672CType typeRetRaw = TypeManager.SubstType(mpwi.Meth().RetType, mpwi.GetType()); 2746private static AggregateType GetEnumBinOpType(ExpressionKind ek, CType argType1, CType argType2, out AggregateType ppEnumType) 2789private static ExprBinOp CreateBinopForPredefMethodCall(ExpressionKind ek, PREDEFMETH predefMeth, CType RetType, Expr arg1, Expr arg2) 2805private static ExprUnaryOp CreateUnaryOpForPredefMethodCall(ExpressionKind ek, PREDEFMETH predefMeth, CType pRetType, Expr pArg)
Microsoft\CSharp\RuntimeBinder\Semantics\PredefinedMembers.cs (7)
235private static CType LoadTypeFromSignature(int[] signature, ref int indexIntoSignatures, TypeArray classTyVars) 265CType[] typeArgs = new CType[typeCount]; 286CType[] ptypes = new CType[count]; 345CType returnType = LoadTypeFromSignature(signature, ref index, classTyVars); 362private static MethodSymbol LookupMethodWhileLoading(AggregateSymbol type, int cMethodTyVars, Name methodName, ACCESS methodAccess, bool isStatic, bool isVirtual, CType returnType, TypeArray argumentTypes)
Microsoft\CSharp\RuntimeBinder\Semantics\SemanticChecker.cs (7)
25public static void CheckForStaticClass(CType type) 35public static ACCESSERROR CheckAccess2(Symbol symCheck, AggregateType atsCheck, Symbol symWhere, CType typeThru) 66CType type = symCheck.getType(); 86public static bool CheckTypeAccess(CType type, Symbol symWhere) 121private static ACCESSERROR CheckAccessCore(Symbol symCheck, AggregateType atsCheck, Symbol symWhere, CType typeThru) 259public static RuntimeBinderException ReportAccessError(SymWithType swtBad, Symbol symWhere, CType typeQual) 272public static bool CheckAccess(Symbol symCheck, AggregateType atsCheck, Symbol symWhere, CType typeThru) =>
Microsoft\CSharp\RuntimeBinder\Semantics\SubstitutionContext.cs (4)
10public readonly CType[] ClassTypes; 11public readonly CType[] MethodTypes; 17ClassTypes = typeArgsCls?.Items ?? Array.Empty<CType>(); 19MethodTypes = typeArgsMeth?.Items ?? Array.Empty<CType>();
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\EventSymbol.cs (1)
28public CType type; // Type of the event.
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\FieldSymbol.cs (2)
27public void SetType(CType pType) 32public new CType GetType()
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\LocalVariableSymbol.cs (2)
16public void SetType(CType pType) 21public new CType GetType()
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\MethodOrPropertySymbol.cs (6)
39private CType[] _defaultParameterConstValTypes; 50public CType RetType; // Return type. 68_defaultParameterConstValTypes = Array.Empty<CType>(); 76_defaultParameterConstValTypes = new CType[count]; 130public void SetDefaultParameterValue(int index, CType type, ConstVal cv) 145public CType GetDefaultParameterValueConstValType(int index)
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\Symbol.cs (1)
110public CType getType()
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymbolLoader.cs (20)
32foreach (CType iface in atsDer.IfacesAll.Items) 49public static bool IsBaseClassOfClass(CType pDerived, CType pBase) 61private static bool IsBaseClass(CType pDerived, CType pBase) 113public static bool HasIdentityOrImplicitReferenceConversion(CType pSource, CType pDest) 125private static bool AreTypesEqualForConversion(CType pType1, CType pType2) => pType1.Equals(pType2); 129private static bool HasArrayConversionToInterface(ArrayType pSource, CType pDest) 172private static bool HasImplicitReferenceConversion(CType pSource, CType pDest) 300private static bool HasAnyBaseInterfaceConversion(CType pDerived, CType pBase) 385CType pSourceArg = pSourceArgs[iParam]; 386CType pDestArg = pDestArgs[iParam]; 417private static bool HasImplicitBoxingConversion(CType pSource, CType pDest) 456public static bool HasBaseConversion(CType pSource, CType pDest)
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\SymFactory.cs (1)
118public static LocalVariableSymbol CreateLocalVar(Name name, Scope parent, CType type)
Microsoft\CSharp\RuntimeBinder\Semantics\Symbols\VariableSymbol.cs (1)
17protected CType type; // CType of the field.
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ArrayIndex.cs (1)
8public ExprArrayIndex(CType type, Expr array, Expr index)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ArrayInitialization.cs (1)
8public ExprArrayInit(CType type, Expr arguments, Expr argumentDimensions, int[] dimensionSizes)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\BinaryOperator.cs (2)
10public ExprBinOp(ExpressionKind kind, CType type, Expr left, Expr right) 21public ExprBinOp(ExpressionKind kind, CType type, Expr left, Expr right, Expr call, MethPropWithInst userMethod)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Call.cs (1)
10public ExprCall(CType type, EXPRFLAG flags, Expr arguments, ExprMemberGroup member, MethWithInst method)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Cast.cs (1)
11public ExprCast(EXPRFLAG flags, CType type, Expr argument)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Class.cs (1)
10public ExprClass(CType type)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\CompoundOperator.cs (2)
10public ExprMultiGet(CType type, EXPRFLAG flags, ExprMulti multi) 23public ExprMulti(CType type, EXPRFLAG flags, Expr left, Expr op)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Concatenate.cs (2)
21private static CType TypeFromOperands(Expr first, Expr second) 23CType type = first.Type;
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Constant.cs (1)
12public ExprConstant(CType type, ConstVal value)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\EXPR.cs (3)
11private CType _type; 20internal CType RuntimeObjectActualType { get; set; } 30public CType Type
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ExprOperator.cs (2)
10protected ExprOperator(ExpressionKind kind, CType type) 16protected ExprOperator(ExpressionKind kind, CType type, Expr call, MethPropWithInst userDefinedMethod)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ExprWithArgs.cs (1)
8protected ExprWithArgs(ExpressionKind kind, CType type)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ExprWithType.cs (1)
10protected ExprWithType(ExpressionKind kind, CType type)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Field.cs (1)
8public ExprField(CType type, Expr optionalObject, FieldWithType field)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\FieldInfo.cs (1)
10public ExprFieldInfo(FieldSymbol field, AggregateType fieldType, CType type)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\MemberGroup.cs (2)
11public ExprMemberGroup(EXPRFLAG flags, Name name, TypeArray typeArgs, SYMKIND symKind, CType parentType, Expr optionalObject, CMemberLookupResults memberLookupResults) 46public CType ParentType { get; }
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\MethodInfo.cs (2)
14public ExprMethodInfo(CType type, MethodSymbol method, AggregateType methodType, TypeArray methodParameters) 35CType genericReturn = TypeManager.SubstType(methSym.RetType, aggType, methSym.typeVars);
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Property.cs (1)
19public ExprProperty(CType type, Expr pOptionalObjectThrough, Expr pOptionalArguments, ExprMemberGroup pMemberGroup, PropWithType pwtSlot, MethWithType mwtSet)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\PropertyInfo.cs (1)
13public ExprPropertyInfo(CType type, PropertySymbol propertySymbol, AggregateType propertyType)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\TypeOf.cs (3)
10public ExprTypeOf(CType type, CType sourceType) 17public CType SourceType { get; }
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\UnaryOperator.cs (2)
10public ExprUnaryOp(ExpressionKind kind, CType type, Expr operand) 18public ExprUnaryOp(ExpressionKind kind, CType type, Expr operand, Expr call, MethPropWithInst userMethod)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\UserDefinedLogicalOperator.cs (1)
10public ExprUserLogicalOp(CType type, Expr trueFalseCall, ExprCall operatorCall)
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Visitors\ExpressionTreeRewriter.cs (25)
104CType typeRet = TypeManager.SubstType(mwi.Meth().RetType, mwi.GetType(), mwi.TypeArgs); 408CType typeL = origL.Type; 409CType typeR = origR.Type; 415CType convertL = null; 416CType convertR = null; 669private Expr GenerateConversion(Expr arg, CType CType, bool bChecked) => 673private static Expr GenerateConversionWithSource(Expr pTarget, CType pType, bool bChecked) 684CType pStrippedTypeOfArgument = pArgument.Type.StripNubs(); 690private Expr GenerateUserDefinedConversion(Expr arg, CType type, MethWithInst method) 697private static Expr GenerateUserDefinedConversion(Expr arg, CType CType, Expr target, MethWithInst method) 709CType underlyingType = arg.Type.StripNubs().UnderlyingEnumType; 710CType nullableType = TypeManager.GetNullable(underlyingType); 720CType pMethodReturnType = TypeManager.SubstType(method.Meth().RetType, 789private static Expr GenerateParameter(string name, CType CType) 801private static ExprTypeOf CreateTypeOf(CType type) => ExprFactory.CreateTypeOf(type); 858CType intType = SymbolLoader.GetPredefindType(PredefinedType.PT_INT); 988CType fptype1 = method.Params[0]; 989CType fptype2 = method.Params[1]; 990CType aatype1 = orig1.Type; 991CType aatype2 = orig2.Type; 1001CType nubfptype1 = TypeManager.GetNullable(fptype1); 1002CType nubfptype2 = TypeManager.GetNullable(fptype2); 1018private static bool IsNullableValueType(CType pType) => 1027private static bool isEnumToDecimalConversion(CType argtype, CType desttype) =>
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\ZeroInitialize.cs (1)
11public ExprZeroInit(CType type)
Microsoft\CSharp\RuntimeBinder\Semantics\TypeBind.cs (7)
37public static bool CheckConstraints(CType type, CheckConstraintsFlags flags) 105CType arg = typeArgsThis[i].GetNakedType(true); 153CType arg = typeArgs[i]; 166private static bool CheckSingleConstraint(Symbol symErr, TypeParameterType var, CType arg, TypeArray typeArgsCls, TypeArray typeArgsMeth, CheckConstraintsFlags flags) 215CType typeBnd = bnds[j]; 312private static bool SatisfiesBound(CType arg, CType typeBnd)
Microsoft\CSharp\RuntimeBinder\Semantics\Types\AggregateType.cs (3)
191List<CType> typeList = new List<CType>(); 321CType typeArg = typeArgs[i];
Microsoft\CSharp\RuntimeBinder\Semantics\Types\ArrayType.cs (5)
16public ArrayType(CType elementType, int rank, bool isSZArray) 28public CType ElementType { get; } 31public CType BaseElementType 35CType type = ElementType; 59public override CType BaseOrParameterOrElementType => ElementType;
Microsoft\CSharp\RuntimeBinder\Semantics\Types\NullableType.cs (5)
22public NullableType(CType underlyingType) 32public override CType StripNubs() => UnderlyingType; 34public override CType StripNubs(out bool wasNullable) 40public CType UnderlyingType { get; } 54public override CType BaseOrParameterOrElementType => UnderlyingType;
Microsoft\CSharp\RuntimeBinder\Semantics\Types\ParameterModifierType.cs (3)
20public ParameterModifierType(CType parameterType, bool isOut) 29public CType ParameterType { get; } 37public override CType BaseOrParameterOrElementType => ParameterType;
Microsoft\CSharp\RuntimeBinder\Semantics\Types\PointerType.cs (3)
12public PointerType(CType referentType) 18public CType ReferentType { get; } 28public override CType BaseOrParameterOrElementType => ReferentType;
Microsoft\CSharp\RuntimeBinder\Semantics\Types\Type.cs (5)
28public virtual CType BaseOrParameterOrElementType => null; 44public CType GetNakedType(bool fStripNub) 46for (CType type = this; ;) 70public virtual CType StripNubs() => this; 72public virtual CType StripNubs(out bool wasNullable)
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeArray.cs (18)
26private readonly CType[] _types; 29public TypeArrayKey(CType[] types) 33foreach (CType type in types) 47CType[] types = _types; 48CType[] otherTypes = other._types; 84public static readonly TypeArray Empty = new TypeArray(Array.Empty<CType>()); 86private TypeArray(CType[] types) 94public CType[] Items { get; } 96public CType this[int i] => Items[i]; 105public void CopyItems(int i, int c, CType[] dest) => Array.Copy(Items, i, dest, 0, c); 119CType[] types = array.Items; 120CType[] newTypes = new CType[ctype]; 125public static TypeArray Allocate(params CType[] types) 145CType[] prgtype1 = pta1.Items; 151CType[] prgtype2 = pta2.Items; 157CType[] combined = new CType[prgtype1.Length + prgtype2.Length];
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeManager.cs (51)
68public static ArrayType GetArray(CType elementType, int args, bool isSZArray) 139public static PointerType GetPointer(CType baseType) 155public static NullableType GetNullable(CType pUnderlyingType) 169public static ParameterModifierType GetParameterModifier(CType paramType, bool isOut) 189private static CType SubstType(CType typeSrc, TypeArray typeArgsCls, TypeArray typeArgsMeth, bool denormMeth) 206private static CType SubstType(CType typeSrc, TypeArray typeArgsCls, TypeArray typeArgsMeth) => 214CType[] srcs = taSrc.Items; 217CType src = srcs[i]; 218CType dst = SubstTypeCore(src, ctx); 221CType[] dsts = new CType[srcs.Length]; 263private static CType SubstTypeCore(CType type, SubstContext pctx) 265CType typeSrc; 266CType typeDst; 328public static bool SubstEqualTypes(CType typeDst, CType typeSrc, TypeArray typeArgsCls, TypeArray typeArgsMeth, bool denormMeth) 375private static bool SubstEqualTypesCore(CType typeDst, CType typeSrc, SubstContext pctx) 473public static bool TypeContainsType(CType type, CType typeFind) 516public static bool TypeContainsTyVars(CType type, TypeArray typeVars) 570public static CType SubstType(CType typeSrc, SubstContext pctx) => 574public static CType SubstType(CType typeSrc, AggregateType atsCls) => SubstType(typeSrc, atsCls, null); 577public static CType SubstType(CType typeSrc, AggregateType atsCls, TypeArray typeArgsMeth) => 581public static CType SubstType(CType typeSrc, CType typeCls, TypeArray typeArgsMeth) => 592private static bool SubstEqualTypes(CType typeDst, CType typeSrc, CType typeCls, TypeArray typeArgsMeth) => 596public static bool SubstEqualTypes(CType typeDst, CType typeSrc, CType typeCls) => SubstEqualTypes(typeDst, typeSrc, typeCls, null); 613internal static CType GetBestAccessibleType(AggregateSymbol context, CType typeSrc) 638if ((aggSrc.IsInterfaceType || aggSrc.IsDelegateType) && TryVarianceAdjustmentToGetAccessibleType(context, aggSrc, out CType typeDst)) 669if (TryArrayVarianceAdjustmentToGetAccessibleType(context, arrSrc, out CType typeDst)) 691private static bool TryVarianceAdjustmentToGetAccessibleType(AggregateSymbol context, AggregateType typeSrc, out CType typeDst) 710CType[] newTypeArgsTemp = new CType[typeArgs.Count]; 714CType typeArg = typeArgs[i]; 736CType intermediateType = GetAggregate(aggSym, typeSrc.OuterType, newTypeArgs); 753private static bool TryArrayVarianceAdjustmentToGetAccessibleType(AggregateSymbol context, ArrayType typeSrc, out CType typeDst) 761CType elementType = typeSrc.ElementType; 765CType destElement = GetBestAccessibleType(context, elementType);
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeTable.cs (20)
54private static readonly Dictionary<KeyPair<CType, int>, ArrayType> s_arrayTable = 55new Dictionary<KeyPair<CType, int>, ArrayType>(); 57private static readonly Dictionary<KeyPair<CType, bool>, ParameterModifierType> s_parameterModifierTable = 58new Dictionary<KeyPair<CType, bool>, ParameterModifierType>(); 61private static readonly Dictionary<CType, PointerType> s_pointerTable = new Dictionary<CType, PointerType>(); 62private static readonly Dictionary<CType, NullableType> s_nullableTable = new Dictionary<CType, NullableType>(); 82public static ArrayType LookupArray(CType elementType, int rankNum) 85s_arrayTable.TryGetValue(new KeyPair<CType, int>(elementType, rankNum), out ArrayType result); 89public static void InsertArray(CType elementType, int rankNum, ArrayType pArray) 93s_arrayTable.Add(new KeyPair<CType, int>(elementType, rankNum), pArray); 96public static ParameterModifierType LookupParameterModifier(CType elementType, bool isOut) 99s_parameterModifierTable.TryGetValue(new KeyPair<CType, bool>(elementType, isOut), out ParameterModifierType result); 103public static void InsertParameterModifier(CType elementType, bool isOut, ParameterModifierType parameterModifier) 107s_parameterModifierTable.Add(new KeyPair<CType, bool>(elementType, isOut), parameterModifier); 110public static PointerType LookupPointer(CType elementType) 116public static void InsertPointer(CType elementType, PointerType pointer) 122public static NullableType LookupNullable(CType underlyingType) 128public static void InsertNullable(CType underlyingType, NullableType nullable)
Microsoft\CSharp\RuntimeBinder\Semantics\UnaOpSig.cs (3)
36private readonly CType _type; 38public UnaOpFullSig(CType type, PfnBindUnaOp pfn, LiftFlags grflt, UnaOpFuncKind fnkind) 88public new CType GetType()
Microsoft\CSharp\RuntimeBinder\SymbolTable.cs (32)
102CType type = callingObject.Type; 179CType cType = GetCTypeFromType(type); 311CType[] ctypes = new CType[genericArguments.Length]; 341List<CType> ctypes = new List<CType>(); 366CType ctype; 593private static CType LoadSymbolsFromType(Type type) 620CType ctype = ProcessSpecialTypeInChain(current, t); 680private static CType GetConstructedType(Type type, AggregateSymbol agg) 686List<CType> types = new List<CType>(); 697CType ctype = agg.getThisType(); 704private static CType ProcessSpecialTypeInChain(NamespaceOrAggregateSymbol parent, Type t) 827internal static CType[] GetCTypeArrayFromTypes(Type[] types) 834return Array.Empty<CType>(); 837CType[] ctypes = new CType[length]; 851internal static CType GetCTypeFromType(Type type) => type.IsByRef 1141CType addedFieldType = addedField?.GetType(); 1515CType cvType = SymbolLoader.GetPredefindType(PredefinedType.PT_DATETIME); 1525CType cvType = SymbolLoader.GetPredefindType(PredefinedType.PT_DECIMAL); 1534CType cvType = SymbolLoader.GetPredefindType(PredefinedType.PT_OBJECT); 1642CType[] types = new CType[isVarArg ? parameters.Length + 1 : parameters.Length]; 1661private static CType GetTypeOfParameter(ParameterInfo p, MemberInfo m) 1664CType ctype; 1678CType parameterType = mod.ParameterType; 1742CType t = GetCTypeFromType(baseMemberInfo.DeclaringType); 1801CType t = GetCTypeFromType(type); 1805CType endT; 1815foreach (CType bound in paramType.Bounds.Items)