public DelegateInfo(TypeDesc delegateType, DelegateFeature features) { Debug.Assert(delegateType.IsDelegate); Debug.Assert(delegateType.IsTypeDefinition); _delegateType = delegateType; _supportedFeatures = features; }
public CompilerTypeSystemContext(TargetDetails details, SharedGenericsMode genericsMode, DelegateFeature delegateFeatures) : base(details) { _genericsMode = genericsMode; _vectorOfTFieldLayoutAlgorithm = new VectorOfTFieldLayoutAlgorithm(_metadataFieldLayoutAlgorithm); _vectorFieldLayoutAlgorithm = new VectorFieldLayoutAlgorithm(_metadataFieldLayoutAlgorithm); _delegateFeatures = delegateFeatures; GenericsConfig = new SharedGenericsConfiguration(); }
protected override DelegateInfo CreateValueFromKey(TypeDesc key) { if (_supportLevel == CoreLibSupportLevel.Unknown) { // Check if the core library supports dynamic invoke. _supportLevel = DelegateInfo.SupportsDynamicInvoke(key.Context) ? CoreLibSupportLevel.Supported : CoreLibSupportLevel.Unsupported; } DelegateFeature supportedFeatures = _supportLevel == CoreLibSupportLevel.Supported ? DelegateFeature.DynamicInvoke | DelegateFeature.ObjectArrayThunk : 0; return(new DelegateInfo(key, supportedFeatures)); }
public DelegateInfoHashtable(DelegateFeature features) => _delegateFeatures = features;
public CompilerTypeSystemContext(TargetDetails details, SharedGenericsMode genericsMode, DelegateFeature delegateFeatures, int genericCycleCutoffPoint = DefaultGenericCycleCutoffPoint) : base(details) { _genericsMode = genericsMode; _vectorOfTFieldLayoutAlgorithm = new VectorOfTFieldLayoutAlgorithm(_metadataFieldLayoutAlgorithm); _vectorFieldLayoutAlgorithm = new VectorFieldLayoutAlgorithm(_metadataFieldLayoutAlgorithm); _delegateInfoHashtable = new DelegateInfoHashtable(delegateFeatures); _genericCycleDetector = new LazyGenericsSupport.GenericCycleDetector(genericCycleCutoffPoint); GenericsConfig = new SharedGenericsConfiguration(); }