Microsoft\CSharp\RuntimeBinder\Semantics\Conversion.cs (63)
47CType pSourceType,
48CType pDestinationType,
260private BetterType WhichTypeIsBetter(PredefinedType pt1, PredefinedType pt2, CType typeGiven)
296private BetterType WhichTypeIsBetter(CType type1, CType type2, CType typeGiven)
339private bool canConvert(CType src, CType dest, CONVERTTYPE flags) => BindImplicitConversion(null, src, dest, flags);
342public bool canConvert(CType src, CType dest) => canConvert(src, dest, 0);
346private bool canConvert(Expr expr, CType dest) => canConvert(expr, dest, 0);
349private bool canConvert(Expr expr, CType dest, CONVERTTYPE flags) =>
355private Expr mustConvertCore(Expr expr, CType destExpr) => mustConvertCore(expr, destExpr, 0);
358private Expr mustConvertCore(Expr expr, CType dest, CONVERTTYPE flags)
406public Expr tryConvert(Expr expr, CType dest)
412private Expr tryConvert(Expr expr, CType dest, CONVERTTYPE flags)
426public Expr mustConvert(Expr expr, CType dest) => mustConvert(expr, dest, (CONVERTTYPE)0);
429private Expr mustConvert(Expr expr, CType dest, CONVERTTYPE flags) => mustConvertCore(expr, dest, flags);
439private Expr mustCastCore(Expr expr, CType dest, CONVERTTYPE flags)
514private static RuntimeBinderException CantConvert(Expr expr, CType dest)
522public Expr mustCast(Expr expr, CType dest) => mustCast(expr, dest, 0);
525public Expr mustCast(Expr expr, CType dest, CONVERTTYPE flags) => mustCastCore(expr, dest, flags);
528private Expr MustCastInUncheckedContext(Expr expr, CType dest, CONVERTTYPE flags) =>
533private bool canCast(CType src, CType dest, CONVERTTYPE flags) => BindExplicitConversion(null, src, dest, flags);
536private bool BindImplicitConversion(Expr pSourceExpr, CType pSourceType, CType destinationType, CONVERTTYPE flags)
543private bool BindImplicitConversion(Expr pSourceExpr, CType pSourceType, CType destinationType, out Expr ppDestinationExpr, CONVERTTYPE flags)
552private bool BindImplicitConversion(Expr pSourceExpr, CType pSourceType, CType destinationType, bool needsExprDest, out Expr ppDestinationExpr, CONVERTTYPE flags)
561private bool BindExplicitConversion(Expr pSourceExpr, CType pSourceType, CType destinationType, bool needsExprDest, out Expr ppDestinationExpr, CONVERTTYPE flags)
570private bool BindExplicitConversion(Expr pSourceExpr, CType pSourceType, CType destinationType, out Expr ppDestinationExpr, CONVERTTYPE flags)
579private bool BindExplicitConversion(Expr pSourceExpr, CType pSourceType, CType destinationType, CONVERTTYPE flags)
626private bool bindUserDefinedConversion(Expr exprSrc, CType typeSrc, CType typeDst, bool needExprDest, out Expr pexprDst, bool fImplicitOnly)
637CType typeSrcBase = typeSrc.StripNubs();
638CType typeDstBase = typeDst.StripNubs();
687CType typeBestSrc = null;
688CType typeBestDst = null;
694CType typeFrom;
695CType typeTo;
1055private static RuntimeBinderException HandleAmbiguity(CType typeSrc, CType typeDst, List<UdConvInfo> prguci, int iuciBestSrc, int iuciBestDst)
1093private Expr BindUDConversionCore(Expr pFrom, CType pTypeFrom, CType pTypeTo, CType pTypeDestination, MethWithInst mwiBest)
1099private Expr BindUDConversionCore(Expr pFrom, CType pTypeFrom, CType pTypeTo, CType pTypeDestination, MethWithInst mwiBest, out Expr ppTransformedArgument)
1115private ConstCastResult bindConstantCast(Expr exprSrc, CType typeDest, bool needExprDest, out Expr pexprDest, bool explicitConversion)
1325private int CompareSrcTypesBased(CType type1, bool fImplicit1, CType type2, bool fImplicit2)
1359private int CompareDstTypesBased(CType type1, bool fImplicit1, CType type2, bool fImplicit2)
1375private static Expr BindDecimalConstCast(CType destType, CType srcType, ExprConstant src)
1377CType typeDecimal = SymbolLoader.GetPredefindType(PredefinedType.PT_DECIMAL);
1485private bool CanExplicitConversionBeBoundInUncheckedContext(Expr exprSrc, CType typeSrc, CType typeDest, CONVERTTYPE flags)
Microsoft\CSharp\RuntimeBinder\Semantics\ExpressionBinder.cs (44)
305CType pIntType = GetPredefindType(PredefinedType.PT_INT);
309CType elementType = pArrayType.ElementType;
314CType pDestType = ChooseArrayIndexType(pOp2);
332private Expr MustConvertWithSuppressedMessage(Expr x, CType pDestType)
337private static ExprCast ExprFactoryCreateCastWithSuppressedMessage(EXPRFLAG flags, CType type, Expr argument)
343private void bindSimpleCast(Expr exprSrc, CType typeDest, out Expr pexprDest) =>
347private void bindSimpleCast(Expr exprSrc, CType typeDest, out Expr pexprDest, EXPRFLAG exprFlags)
396CType callingObjectType = pObject?.Type;
401CType pReturnType;
439CType pFieldType = TypeManager.SubstType(fwt.Field().GetType(), fwt.GetType());
494CType pReturnType = TypeManager.SubstType(pwt.Prop().RetType, pwt.GetType());
506CType type = null;
542CType typeSrc = arg.Type;
601CType typeParam = paramsCur[0];
652private ExprCall BindLiftedUDUnop(Expr arg, CType typeArg, MethPropWithInst mpwi)
654CType typeRaw = typeArg.StripNubs();
662CType typeRet = TypeManager.SubstType(mpwi.Meth().RetType, mpwi.GetType());
681private ExprCall BindUDUnopCall(Expr arg, CType typeArg, MethPropWithInst mpwi)
683CType typeRet = TypeManager.SubstType(mpwi.Meth().RetType, mpwi.GetType());
828CType type = null;
838private void CheckPropertyAccess(MethWithType mwt, PropWithType pwtSlot, CType type)
919foreach (CType type in meth.Params.Items)
989CType typeObj = pObject.Type;
990CType typeTmp;
1062private void verifyMethodArgs(ExprWithArgs call, CType callingObjectType)
1075private void AdjustCallArgumentsForParams(CType callingObjectType, CType type, MethodOrPropertySymbol mp, TypeArray pTypeArgs, Expr argsPtr, out Expr newArgs)
1137CType substDestType = TypeManager.SubstType(@params[index], type, pTypeArgs);
1151CType arrayType = (ArrayType)TypeManager.SubstType(mp.Params[mp.Params.Count - 1], type, pTypeArgs);
1170CType substDestType = TypeManager.SubstType(@params[iDst], type, pTypeArgs);
1218CType substitutedArrayType = TypeManager.SubstType(mp.Params[mp.Params.Count - 1], type, pTypeArgs);
1229CType elementType = subArr.ElementType;
1287internal CType ChooseArrayIndexType(Expr args)
1292CType type = GetPredefindType(predef);
1313CType[] prgtype = new CType[argInfo.carg];
1344CType[] prgtype;
1350prgtype = new CType[@params.Count - 1];
1356prgtype = new CType[count];
1359CType type = @params[@params.Count - 1];
1369CType elementType = arr.ElementType;
1409private static bool isConstantInRange(ExprConstant exprSrc, CType typeDest)
1415private static bool isConstantInRange(ExprConstant exprSrc, CType typeDest, bool realsOk)
1611private 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) =>
33obj, new CMemberLookupResults(TypeArray.Allocate((CType)method.GetType()), name));
41public static ExprCast CreateCast(CType type, Expr argument) => CreateCast(0, type, argument);
44public static ExprCast CreateCast(EXPRFLAG flags, CType type, Expr argument) => new ExprCast(flags, type, argument);
72public static ExprTypeOf CreateTypeOf(CType sourceType) =>
76public static ExprUserLogicalOp CreateUserLogOp(CType type, Expr trueFalseCall, ExprCall operatorCall) =>
87public static ExprMultiGet CreateMultiGet(EXPRFLAG flags, CType type, ExprMulti multi) =>
91public static ExprMulti CreateMulti(EXPRFLAG flags, CType type, Expr left, Expr op) =>
102public static Expr CreateZeroInit(CType type)
139public static ExprConstant CreateConstant(CType type, ConstVal constVal) => new ExprConstant(type, constVal);
149public static ExprArrayIndex CreateArrayIndex(CType type, Expr array, Expr index) =>
152public static ExprBinOp CreateBinop(ExpressionKind exprKind, CType type, Expr left, Expr right) =>
155public static ExprUnaryOp CreateUnaryOp(ExpressionKind exprKind, CType type, Expr operand) =>
158public static ExprOperator CreateOperator(ExpressionKind exprKind, CType type, Expr arg1, Expr arg2)
167public static ExprBinOp CreateUserDefinedBinop(ExpressionKind exprKind, CType type, Expr left, Expr right, Expr call, MethPropWithInst userMethod) =>
171public static ExprUnaryOp CreateUserDefinedUnaryOperator(ExpressionKind exprKind, CType type, Expr operand, ExprCall call, MethPropWithInst userMethod) =>
245public static ExprClass CreateClass(CType type) => new ExprClass(type);
Microsoft\CSharp\RuntimeBinder\Semantics\MethodTypeInferrer.cs (74)
35private readonly List<CType>[] _pExactBounds;
36private readonly List<CType>[] _pUpperBounds;
37private readonly List<CType>[] _pLowerBounds;
38private readonly CType[] _pFixedResults;
126_pFixedResults = new CType[pMethodTypeParameters.Count];
127_pLowerBounds = new List<CType>[pMethodTypeParameters.Count];
128_pUpperBounds = new List<CType>[pMethodTypeParameters.Count];
129_pExactBounds = new List<CType>[pMethodTypeParameters.Count];
132_pLowerBounds[iBound] = new List<CType>();
133_pUpperBounds[iBound] = new List<CType>();
134_pExactBounds[iBound] = new List<CType>();
179private void AddLowerBound(TypeParameterType pParam, CType pBound)
191private void AddUpperBound(TypeParameterType pParam, CType pBound)
203private void AddExactBound(TypeParameterType pParam, CType pBound)
243private static bool IsReallyAType(CType pType) =>
276CType pDest = _pMethodFormalParameterTypes[iArg];
287CType pSource = pExpr.RuntimeObjectActualType ?? _pMethodArguments.types[iArg];
758private void ExactInference(CType pSource, CType pDest)
797private bool ExactTypeParameterInference(CType pSource, CType pDest)
814private bool ExactArrayInference(CType pSource, CType pDest)
834private bool ExactNullableInference(CType pSource, CType pDest)
849private bool ExactConstructedInference(CType pSource, CType pDest)
893private void LowerBoundInference(CType pSource, CType pDest)
963private bool LowerBoundTypeParameterInference(CType pSource, CType pDest)
981private bool LowerBoundArrayInference(CType pSource, CType pDest)
1004CType pElementSource = pArraySource.ElementType;
1005CType pElementDest;
1070private bool LowerBoundConstructedInference(CType pSource, CType pDest)
1133private bool LowerBoundClassInference(CType pSource, AggregateType pDest)
1175private bool LowerBoundInterfaceInference(CType pSource, AggregateType pDest)
1251CType pSourceArg = pSourceArgs[arg];
1252CType pDestArg = pDestArgs[arg];
1278private void UpperBoundInference(CType pSource, CType pDest)
1322private bool UpperBoundTypeParameterInference(CType pSource, CType pDest)
1340private bool UpperBoundArrayInference(CType pSource, CType pDest)
1355CType pElementDest = pArrayDest.ElementType;
1356CType pElementSource;
1400private bool UpperBoundConstructedInference(CType pSource, CType pDest)
1456private bool UpperBoundClassInference(AggregateType pSource, CType pDest)
1486private bool UpperBoundInterfaceInference(AggregateType pSource, CType pDest)
1558CType pSourceArg = pSourceArgs[arg];
1559CType pDestArg = pDestArgs[arg];
1605List<CType> initialCandidates = new List<CType>();
1612HashSet<CType> typeSet = new HashSet<CType>();
1614foreach (CType pCurrent in _pLowerBounds[iParam])
1622foreach (CType pCurrent in _pUpperBounds[iParam])
1643foreach (CType pBound in _pLowerBounds[iParam])
1645List<CType> removeList = new List<CType>();
1646foreach (CType pCandidate in initialCandidates)
1653foreach (CType pRemove in removeList)
1661foreach (CType pBound in _pUpperBounds[iParam])
1663List<CType> removeList = new List<CType>();
1664foreach (CType pCandidate in initialCandidates)
1671foreach (CType pRemove in removeList)
1681CType pBest = null;
1682foreach (CType pCandidate in initialCandidates)
1684foreach (CType pCandidate2 in initialCandidates)
Microsoft\CSharp\RuntimeBinder\Semantics\Operators.cs (67)
204CType typeSig1 = GetPredefindType(bos.pt1);
205CType typeSig2 = GetPredefindType(bos.pt2);
458CType typeBool = GetPredefindType(PredefinedType.PT_BOOL);
628CType resultType;
657private void LiftArgument(Expr pArgument, CType pParameterType, bool bConvertBeforeLift,
732private bool CanConvertArg1(BinOpArgInfo info, CType typeDst, out LiftFlags pgrflt,
733out CType ptypeSig1, out CType ptypeSig2)
767private bool CanConvertArg2(BinOpArgInfo info, CType typeDst, out LiftFlags pgrflt,
768out CType ptypeSig1, out CType ptypeSig2)
806CType typeSig1;
807CType typeSig2;
849CType typeSig1 = null;
850CType typeSig2 = null;
924CType type1 = info.type1;
925CType type2 = info.type2;
926CType typeObj = GetPredefindType(PredefinedType.PT_OBJECT);
927CType typeCls = null;
938CType typeDel = GetPredefindType(PredefinedType.PT_DELEGATE);
1032private int WhichBofsIsBetter(BinOpFullSig bofs1, BinOpFullSig bofs2, CType type1, CType type2)
1158CType type = pArgument.Type;
1162CType nonNub = nub.UnderlyingType;
1303CType pArgumentType = pArgument.Type;
1304CType pRawType = pArgumentType.StripNubs();
1398CType pArgumentType = pArgument.Type;
1399CType pRawType = pArgumentType.StripNubs();
1412CType typeSig = null;
1539private int WhichUofsIsBetter(UnaOpFullSig uofs1, UnaOpFullSig uofs2, CType typeArg)
1611CType typeRaw = uofs.GetType().StripNubs();
1630private Expr BindIncOpCore(ExpressionKind ek, EXPRFLAG flags, Expr exprVal, CType type)
1688private Expr LScalar(ExpressionKind ek, EXPRFLAG flags, Expr exprVal, CType type, ConstVal cv, CType typeTmp)
1690CType typeOne = type;
1710CType type = uofs.GetType();
1767CType typeDec = GetPredefindType(PredefinedType.PT_DECIMAL);
1770CType typeRet;
1810CType typeDec = GetPredefindType(PredefinedType.PT_DECIMAL);
1874CType typeBool = GetPredefindType(PredefinedType.PT_BOOL);
1875CType typeRes = TypeManager.GetNullable(typeBool);
1916CType typeBool = GetPredefindType(PredefinedType.PT_BOOL);
1975CType RetType = null;
2023CType typeOp = GetPredefindType(ptOp);
2042CType nonNullableType1 = arg1.Type is NullableType arg1NubType ? arg1NubType.UnderlyingType : arg1.Type;
2043CType nonNullableType2 = arg2.Type is NullableType arg2NubType ? arg2NubType.UnderlyingType : arg2.Type;
2091CType typeEnum = ((ExprCast)arg).Argument.Type;
2100CType typeOp = GetPredefindType(ptOp);
2191CType typeOp = GetPredefindType(ptOp);
2202CType typeDest = kind.IsRelational() ? GetPredefindType(PredefinedType.PT_BOOL) : typeOp;
2245CType typeOp = GetPredefindType(ptOp);
2279CType typeDest = kind.IsRelational() ? GetPredefindType(PredefinedType.PT_BOOL) : op1.Type;
2337CType typeRet = pCall.Type;
2370private static AggregateType GetUserDefinedBinopArgumentType(CType type)
2385private static int GetUserDefinedBinopArgumentTypes(CType type1, CType type2, AggregateType[] rgats)
2414CType typeRet = TypeManager.SubstType(method.RetType, ats);
2472CType[] rgtype = new CType[2];
2577CType typeRetRaw = TypeManager.SubstType(pmethBest.mpwi.Meth().RetType, pmethBest.mpwi.GetType());
2583private ExprCall BindUDBinopCall(Expr arg1, Expr arg2, TypeArray Params, CType typeRet, MethPropWithInst mpwi)
2606CType typeRet;
2607CType typeRetRaw = TypeManager.SubstType(mpwi.Meth().RetType, mpwi.GetType());
2680private static AggregateType GetEnumBinOpType(ExpressionKind ek, CType argType1, CType argType2, out AggregateType ppEnumType)
2722private static ExprBinOp CreateBinopForPredefMethodCall(ExpressionKind ek, PREDEFMETH predefMeth, CType RetType, Expr arg1, Expr arg2)
2737private static ExprUnaryOp CreateUnaryOpForPredefMethodCall(ExpressionKind ek, PREDEFMETH predefMeth, CType pRetType, Expr pArg)
Microsoft\CSharp\RuntimeBinder\Semantics\PredefinedMembers.cs (7)
231private static CType LoadTypeFromSignature(int[] signature, ref int indexIntoSignatures, TypeArray classTyVars)
261CType[] typeArgs = new CType[typeCount];
281CType[] ptypes = new CType[count];
337CType returnType = LoadTypeFromSignature(signature, ref index, classTyVars);
353private 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)
24public static void CheckForStaticClass(CType type)
33public static ACCESSERROR CheckAccess2(Symbol symCheck, AggregateType atsCheck, Symbol symWhere, CType typeThru)
64CType type = symCheck.getType();
83public static bool CheckTypeAccess(CType type, Symbol symWhere)
117private static ACCESSERROR CheckAccessCore(Symbol symCheck, AggregateType atsCheck, Symbol symWhere, CType typeThru)
254public static RuntimeBinderException ReportAccessError(SymWithType swtBad, Symbol symWhere, CType typeQual)
266public static bool CheckAccess(Symbol symCheck, AggregateType atsCheck, Symbol symWhere, CType typeThru) =>
Microsoft\CSharp\RuntimeBinder\Semantics\Tree\Visitors\ExpressionTreeRewriter.cs (25)
103CType typeRet = TypeManager.SubstType(mwi.Meth().RetType, mwi.GetType(), mwi.TypeArgs);
407CType typeL = origL.Type;
408CType typeR = origR.Type;
414CType convertL = null;
415CType convertR = null;
668private Expr GenerateConversion(Expr arg, CType CType, bool bChecked) =>
672private static Expr GenerateConversionWithSource(Expr pTarget, CType pType, bool bChecked)
683CType pStrippedTypeOfArgument = pArgument.Type.StripNubs();
689private Expr GenerateUserDefinedConversion(Expr arg, CType type, MethWithInst method)
696private static Expr GenerateUserDefinedConversion(Expr arg, CType CType, Expr target, MethWithInst method)
708CType underlyingType = arg.Type.StripNubs().UnderlyingEnumType;
709CType nullableType = TypeManager.GetNullable(underlyingType);
719CType pMethodReturnType = TypeManager.SubstType(method.Meth().RetType,
788private static Expr GenerateParameter(string name, CType CType)
800private static ExprTypeOf CreateTypeOf(CType type) => ExprFactory.CreateTypeOf(type);
857CType intType = SymbolLoader.GetPredefindType(PredefinedType.PT_INT);
987CType fptype1 = method.Params[0];
988CType fptype2 = method.Params[1];
989CType aatype1 = orig1.Type;
990CType aatype2 = orig2.Type;
1000CType nubfptype1 = TypeManager.GetNullable(fptype1);
1001CType nubfptype2 = TypeManager.GetNullable(fptype2);
1017private static bool IsNullableValueType(CType pType) =>
1026private static bool isEnumToDecimalConversion(CType argtype, CType desttype) =>
Microsoft\CSharp\RuntimeBinder\Semantics\Types\TypeManager.cs (51)
67public static ArrayType GetArray(CType elementType, int args, bool isSZArray)
135public static PointerType GetPointer(CType baseType)
150public static NullableType GetNullable(CType pUnderlyingType)
164public static ParameterModifierType GetParameterModifier(CType paramType, bool isOut)
182private static CType SubstType(CType typeSrc, TypeArray typeArgsCls, TypeArray typeArgsMeth, bool denormMeth)
197private static CType SubstType(CType typeSrc, TypeArray typeArgsCls, TypeArray typeArgsMeth) =>
204CType[] srcs = taSrc.Items;
207CType src = srcs[i];
208CType dst = SubstTypeCore(src, ctx);
211CType[] dsts = new CType[srcs.Length];
249private static CType SubstTypeCore(CType type, SubstContext pctx)
251CType typeSrc;
252CType typeDst;
313public static bool SubstEqualTypes(CType typeDst, CType typeSrc, TypeArray typeArgsCls, TypeArray typeArgsMeth, bool denormMeth)
360private static bool SubstEqualTypesCore(CType typeDst, CType typeSrc, SubstContext pctx)
458public static bool TypeContainsType(CType type, CType typeFind)
501public static bool TypeContainsTyVars(CType type, TypeArray typeVars)
552public static CType SubstType(CType typeSrc, SubstContext pctx) =>
555public static CType SubstType(CType typeSrc, AggregateType atsCls) => SubstType(typeSrc, atsCls, null);
557public static CType SubstType(CType typeSrc, AggregateType atsCls, TypeArray typeArgsMeth) =>
560public static CType SubstType(CType typeSrc, CType typeCls, TypeArray typeArgsMeth) =>
568private static bool SubstEqualTypes(CType typeDst, CType typeSrc, CType typeCls, TypeArray typeArgsMeth) =>
571public static bool SubstEqualTypes(CType typeDst, CType typeSrc, CType typeCls) => SubstEqualTypes(typeDst, typeSrc, typeCls, null);
587internal static CType GetBestAccessibleType(AggregateSymbol context, CType typeSrc)
612if ((aggSrc.IsInterfaceType || aggSrc.IsDelegateType) && TryVarianceAdjustmentToGetAccessibleType(context, aggSrc, out CType typeDst))
643if (TryArrayVarianceAdjustmentToGetAccessibleType(context, arrSrc, out CType typeDst))
664private static bool TryVarianceAdjustmentToGetAccessibleType(AggregateSymbol context, AggregateType typeSrc, out CType typeDst)
683CType[] newTypeArgsTemp = new CType[typeArgs.Count];
687CType typeArg = typeArgs[i];
709CType intermediateType = GetAggregate(aggSym, typeSrc.OuterType, newTypeArgs);
725private static bool TryArrayVarianceAdjustmentToGetAccessibleType(AggregateSymbol context, ArrayType typeSrc, out CType typeDst)
733CType elementType = typeSrc.ElementType;
737CType 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)