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\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\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\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\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\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)