8 types derived from MethodDesc
ILCompiler.TypeSystem (8)
parent\parent\Common\TypeSystem\Common\ArrayType.cs (1)
184public sealed partial class ArrayMethod : MethodDesc
parent\parent\Common\TypeSystem\Common\InstantiatedMethod.cs (1)
12public sealed partial class InstantiatedMethod : MethodDesc
parent\parent\Common\TypeSystem\Common\MethodDelegator.cs (1)
13public abstract partial class MethodDelegator : MethodDesc
parent\parent\Common\TypeSystem\Common\MethodForInstantiatedType.cs (1)
12public sealed partial class MethodForInstantiatedType : MethodDesc
parent\parent\Common\TypeSystem\Ecma\EcmaMethod.cs (1)
16public sealed partial class EcmaMethod : MethodDesc, EcmaModule.IEntityHandleObject
parent\parent\Common\TypeSystem\IL\Stubs\ILEmitter.cs (1)
861public abstract partial class ILStubMethod : MethodDesc
parent\parent\Common\TypeSystem\IL\Stubs\PInvokeTargetNativeMethod.cs (1)
16public sealed partial class PInvokeTargetNativeMethod : MethodDesc
parent\parent\Common\TypeSystem\RuntimeDetermined\MethodForRuntimeDeterminedType.cs (1)
11public sealed partial class MethodForRuntimeDeterminedType : MethodDesc
3144 references to MethodDesc
crossgen2 (8)
Program.cs (8)
437MethodDesc singleMethod = CheckAndParseSingleMethodModeArguments(typeSystemContext); 788private MethodDesc CheckAndParseSingleMethodModeArguments(CompilerTypeSystemContext context) 802MethodDesc method = null; 805foreach (var searchMethod in owningType.GetMethods()) 835foreach (var searchMethod in owningType.GetMethods()) 866internal static string CreateReproArgumentString(MethodDesc method) 876foreach (var searchMethod in method.OwningType.GetMethods()) 899MethodDesc failingMethod = ex.Method;
ilc (23)
ConfigurablePInvokePolicy.cs (2)
118public override LinkageMetadata GetLinkageMetadata(MethodDesc method) 121MethodDesc target = method is PInvokeTargetNativeMethod nativeMethod ? nativeMethod.Target : method;
parent\parent\Common\TypeSystem\IL\HelperExtensions.cs (8)
30public static MethodDesc GetHelperEntryPoint(this TypeSystemContext context, ReadOnlySpan<byte> typeName, ReadOnlySpan<byte> methodName) 33MethodDesc helperMethod = helperType.GetKnownMethod(methodName, null); 37public static MethodDesc GetCoreLibEntryPoint(this TypeSystemContext context, ReadOnlySpan<byte> namespaceName, ReadOnlySpan<byte> typeName, ReadOnlySpan<byte> methodName, MethodSignature signature) 43public static MethodDesc GetOptionalHelperEntryPoint(this TypeSystemContext context, ReadOnlySpan<byte> typeName, ReadOnlySpan<byte> methodName) 46MethodDesc helperMethod = helperType?.GetMethod(methodName, null); 55public static void EmitCallThrowHelper(this ILCodeStream codeStream, ILEmitter emitter, MethodDesc method) 74public static MethodDesc GetKnownMethod(this TypeDesc type, ReadOnlySpan<byte> name, MethodSignature signature) 76MethodDesc method = type.GetMethod(name, signature);
Program.cs (10)
47private IReadOnlyCollection<MethodDesc> CreateInitializerList(CompilerTypeSystemContext context) 61IReadOnlyCollection<MethodDesc> result = libraryInitializers.LibraryInitializerMethods; 65List<MethodDesc> instrumentedResult = new List<MethodDesc>(result); 168MethodDesc singleMethod = CheckAndParseSingleMethodModeArguments(typeSystemContext); 355MethodDesc throwInvalidProgramMethod = typeSystemContext.GetHelperEntryPoint("ThrowHelpers"u8, "ThrowInvalidProgramException"u8); 357new GenericRootProvider<MethodDesc>(throwInvalidProgramMethod, 358(MethodDesc method, IRootingServiceProvider rooter) => rooter.AddCompilationRoot(method, "Invalid IL insurance"))); 788private MethodDesc CheckAndParseSingleMethodModeArguments(CompilerTypeSystemContext context) 803MethodDesc method = owningType.GetMethod(Encoding.UTF8.GetBytes(singleMethodName), null);
RdXmlRootProvider.cs (3)
164static bool SignatureMatches(MethodDesc method, List<TypeDesc> parameter) 180foreach (var m in containingType.GetMethods()) 182var method = m;
ILCompiler.Compiler (1593)
Compiler\AnalysisBasedInteropStubManager.cs (2)
46public override void AddDependenciesDueToMethodCodePresence(IDependencySink dependencies, NodeFactory factory, MethodDesc method) 54public override void AddMarshalAPIsGenericDependencies(IDependencySink dependencies, NodeFactory factory, MethodDesc method)
Compiler\AnalysisBasedMetadataManager.cs (10)
30private readonly Dictionary<MethodDesc, MetadataCategory> _reflectableMethods = new Dictionary<MethodDesc, MetadataCategory>(); 39Array.Empty<ReflectableEntity<TypeDesc>>(), Array.Empty<ReflectableEntity<MethodDesc>>(), 57IEnumerable<ReflectableEntity<MethodDesc>> reflectableMethods, 146out List<MetadataMapping<MethodDesc>> methodMappings, 147out Dictionary<MethodDesc, int> methodMetadataMappings, 164protected sealed override MetadataCategory GetMetadataCategory(MethodDesc method) 210MethodDesc method = pair.Key; 242public bool GeneratesMetadata(MethodDesc methodDef) 283public bool IsBlocked(MethodDesc methodDef)
Compiler\BodySubstitution.cs (1)
32public MethodIL EmitIL(MethodDesc method)
Compiler\BodySubstitutionParser.cs (9)
22private readonly Dictionary<MethodDesc, BodySubstitution> _methodSubstitutions; 29_methodSubstitutions = new Dictionary<MethodDesc, BodySubstitution>(); 36_methodSubstitutions = new Dictionary<MethodDesc, BodySubstitution>(); 61MethodDesc method = FindMethod(type, signature); 157private static MethodDesc FindMethod(TypeDesc type, string signature) 159foreach (MethodDesc meth in type.GetMethods()) 228private Dictionary<MethodDesc, BodySubstitution> _bodySubstitutions; 231public IReadOnlyDictionary<MethodDesc, BodySubstitution> BodySubstitutions => _bodySubstitutions; 234public BodyAndFieldSubstitutions(Dictionary<MethodDesc, BodySubstitution> bodySubstitutions, Dictionary<FieldDesc, object> fieldSubstitutions)
Compiler\Compilation.cs (40)
79public virtual MethodIL GetMethodIL(MethodDesc method) 92public void DetectGenericCycles(MethodDesc caller, MethodDesc callee) 102public bool CanInline(MethodDesc caller, MethodDesc callee) 117public DelegateCreationInfo GetDelegateCtor(TypeDesc delegateType, MethodDesc target, TypeDesc constrainedType, bool followVirtualDispatch) 127MethodDesc originalTarget = target; 128MethodDesc targetDefinition = target.GetMethodDefinition(); 174public MethodDesc ExpandIntrinsicForCallsite(MethodDesc intrinsicMethod, MethodDesc callsiteMethod) 240public bool IsEffectivelySealed(MethodDesc method) 245public MethodDesc ResolveVirtualMethod(MethodDesc declMethod, TypeDesc implType, out CORINFO_DEVIRTUALIZATION_DETAIL devirtualizationDetail) 266return ((MethodDesc)targetOfLookup).IsRuntimeDeterminedExactMethod; 302public static MethodDesc GetConstructorForCreateInstanceIntrinsic(TypeDesc type) 304MethodDesc ctor = type.GetDefaultConstructor(); 355return NodeFactory.MethodGenericDictionary((MethodDesc)targetOfLookup); 357return NodeFactory.FatFunctionPointer((MethodDesc)targetOfLookup); 359return NodeFactory.RuntimeMethodHandle((MethodDesc)targetOfLookup); 365MethodDesc ctor = GetConstructorForCreateInstanceIntrinsic(type); 379public GenericDictionaryLookup ComputeGenericLookup(MethodDesc contextMethod, ReadyToRunHelperId lookupKind, object targetOfLookup) 457public bool IsFatPointerCandidate(MethodDesc containingMethod, MethodSignature signature) 480public MethodDesc GetTargetOfGenericVirtualMethodCall(MethodDesc calledMethod) 488MethodDesc targetMethod = calledMethod.GetCanonMethodTarget(CanonicalFormKind.Specific); 489MethodDesc targetMethodDefinition = targetMethod.GetMethodDefinition(); 491MethodDesc slotNormalizedMethodDefinition = MetadataVirtualMethodAlgorithm.FindSlotDefiningMethodForVirtualMethod(targetMethodDefinition); 508MethodDesc runtimeDeterminedSlotNormalizedMethod; 560private sealed class ILCache : LockFreeReaderHashtable<MethodDesc, ILCache.MethodILData> 569protected override int GetKeyHashCode(MethodDesc key) 577protected override bool CompareKeyToValue(MethodDesc key, MethodILData value) 585protected override MethodILData CreateValueFromKey(MethodDesc key) 592public MethodDesc Method; 608public override MethodIL GetMethodIL(MethodDesc method) 653public IEnumerable<MethodDesc> CompiledMethodBodies 665public bool IsMethodBodyCompiled(MethodDesc method) 694public IEnumerable<MethodDesc> ReflectedMethods 710public readonly MethodDesc Method; 711public ConstrainedCallInfo(TypeDesc constrainedType, MethodDesc method)
Compiler\CompilationModuleGroup.Aot.cs (4)
18public abstract bool ContainsMethodDictionary(MethodDesc method); 22public abstract bool ImportsMethod(MethodDesc method, bool unboxingStub); 51public abstract bool AllowInstanceMethodOptimization(MethodDesc method); 57public abstract bool AllowVirtualMethodOnAbstractTypeOptimization(MethodDesc method);
Compiler\CompilerTypeSystemContext.Aot.cs (8)
198protected override IEnumerable<MethodDesc> GetAllMethods(TypeDesc type) 203protected override IEnumerable<MethodDesc> GetAllVirtualMethods(TypeDesc type) 209private IEnumerable<MethodDesc> GetAllMethods(TypeDesc type, bool virtualOnly) 229protected virtual IEnumerable<MethodDesc> GetAllMethodsForDelegate(TypeDesc type, bool virtualOnly) 236foreach (MethodDesc syntheticMethod in info.Methods) 245foreach (MethodDesc syntheticMethod in info.Methods) 253IEnumerable<MethodDesc> metadataMethods = virtualOnly ? type.GetVirtualMethods() : type.GetMethods(); 254foreach (var m in metadataMethods)
Compiler\CompilerTypeSystemContext.DynamicInvoke.cs (1)
25public MethodDesc GetDynamicInvokeThunk(MethodSignature signature, bool valueTypeInstanceMethod)
Compiler\CompilerTypeSystemContext.GetFieldMethodOverrides.cs (15)
16private MethodDesc _objectEqualsMethod; 19private sealed class GetFieldMethodHashtable : LockFreeReaderHashtable<MetadataType, MethodDesc> 22protected override int GetValueHashCode(MethodDesc value) => value.OwningType.GetHashCode(); 23protected override bool CompareKeyToValue(MetadataType key, MethodDesc value) => key == value.OwningType; 24protected override bool CompareValueToValue(MethodDesc v1, MethodDesc v2) => v1.OwningType == v2.OwningType; 26protected override MethodDesc CreateValueFromKey(MetadataType key) 34protected virtual IEnumerable<MethodDesc> GetAllMethodsForValueType(TypeDesc valueType, bool virtualOnly) 40MethodDesc getFieldHelperMethod = _getFieldMethodHashtable.GetOrCreateValue((MetadataType)valueTypeDefinition); 52IEnumerable<MethodDesc> metadataMethods = virtualOnly ? valueType.GetVirtualMethods() : valueType.GetMethods(); 53foreach (MethodDesc method in metadataMethods) 57protected virtual IEnumerable<MethodDesc> GetAllMethodsForAttribute(TypeDesc attributeType, bool virtualOnly) 63MethodDesc getFieldHelperMethod = _getFieldMethodHashtable.GetOrCreateValue((MetadataType)attributeTypeDefinition); 75IEnumerable<MethodDesc> metadataMethods = virtualOnly ? attributeType.GetVirtualMethods() : attributeType.GetMethods(); 76foreach (MethodDesc method in metadataMethods)
Compiler\CompilerTypeSystemContext.InterfaceThunks.cs (13)
70public MethodDesc GetDefaultInterfaceMethodImplementationThunk(MethodDesc targetMethod, TypeDesc implementingClass, DefType interfaceOnDefinition, out int interfaceIndex) 98MethodDesc thunk = _dimThunkHashtable.GetOrCreateValue(methodKey); 105public readonly MethodDesc TargetMethod; 109public DefaultInterfaceMethodImplementationInstantiationThunkHashtableKey(MethodDesc targetMethod, int interfaceIndex, bool useContextFromRuntime) 149public bool IsDefaultInterfaceMethodImplementationInstantiationThunk(MethodDesc method) 157public MethodDesc GetTargetOfDefaultInterfaceMethodImplementationInstantiationThunk(MethodDesc method) 167private readonly MethodDesc _targetMethod; 173public DefaultInterfaceMethodImplementationInstantiationThunk(MethodDesc targetMethod, int interfaceIndex, bool useContextFromRuntime) 212public MethodDesc TargetMethod => _targetMethod; 230public MethodDesc BaseMethod => _targetMethod; 243MethodDesc getOrdinalInterfaceMethod = Context.GetHelperEntryPoint("SharedCodeHelpers"u8, "GetOrdinalInterface"u8);
Compiler\CompilerTypeSystemContext.Sorting.cs (1)
15protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
Compiler\Dataflow\AsyncMaskingILProvider.cs (6)
28public override MethodIL GetMethodIL(MethodDesc method) 32MethodDesc methodForIL; 45MethodDesc owningMethod = methodIL.OwningMethod; 56private readonly MethodDesc _owner; 59public AsyncMaskedMethodIL(MethodDesc owner, MethodIL wrappedIL) 63public override MethodDesc OwningMethod => _owner;
Compiler\Dataflow\AttributeDataFlow.cs (3)
48public DependencyList? ProcessAttributeDataflow(MethodDesc method, CustomAttributeValue arguments) 84MethodDesc setter = property.SetMethod; 97private void ProcessAttributeDataflow(MethodDesc method, ImmutableArray<object?> arguments, ref DependencyList? result)
Compiler\Dataflow\CompilerGeneratedCallGraph.cs (5)
29public void TrackCall(MethodDesc fromMethod, MethodDesc toMethod) 37public void TrackCall(MethodDesc fromMethod, DefType toType) 45public void TrackCall(DefType fromType, MethodDesc toMethod) 54public IEnumerable<TypeSystemEntity> GetReachableMembers(MethodDesc start)
Compiler\Dataflow\CompilerGeneratedState.cs (40)
26MethodDesc CreatingMethod, 89private Dictionary<MetadataType, MethodDesc>? _compilerGeneratedTypeToUserCodeMethod; 91private Dictionary<MethodDesc, MethodDesc>? _compilerGeneratedMethodToUserCodeMethod; 96private Dictionary<MethodDesc, List<TypeSystemEntity>>? _compilerGeneratedMembers; 125var userDefinedMethods = new HashSet<MethodDesc>(); 137void ProcessMethod(MethodDesc method) 175MethodDesc? referencedMethod = methodBody.GetObject(reader.ReadILToken(), NotFoundBehavior.ReturnNull) as MethodDesc; 193var alreadyAssociatedMethod = generatedTypeToTypeArgs[generatedType].CreatingMethod; 258_compilerGeneratedTypeToUserCodeMethod ??= new Dictionary<MetadataType, MethodDesc>(); 261var alreadyAssociatedMethod = _compilerGeneratedTypeToUserCodeMethod[stateMachineType]; 287foreach (MethodDesc method in type.GetMethods()) 299foreach (var method in nestedType.GetMethods()) 314foreach (var userDefinedMethod in userDefinedMethods) 320_compilerGeneratedMembers ??= new Dictionary<MethodDesc, List<TypeSystemEntity>>(); 327case MethodDesc nestedFunction: 330_compilerGeneratedMethodToUserCodeMethod ??= new Dictionary<MethodDesc, MethodDesc>(); 333var alreadyAssociatedMethod = _compilerGeneratedMethodToUserCodeMethod[nestedFunction]; 364var method = info.CreatingMethod; 365var alreadyAssociatedMethod = _generatedTypeToTypeArgumentInfo[generatedType].CreatingMethod; 403var method = typeInfo.CreatingMethod; 468MethodDesc? methodOperand = null; 473methodOperand = body.GetObject(reader.ReadILToken()) as MethodDesc; 474if (methodOperand is MethodDesc { OwningType: MetadataType owningType } 487methodOperand = body.GetObject(reader.ReadILToken()) as MethodDesc; 528public bool TryGetCompilerGeneratedCalleesForUserMethod(MethodDesc method, [NotNullWhen(true)] out List<TypeSystemEntity>? callees) 549public bool TryGetOwningMethodForCompilerGeneratedMethod(MethodDesc compilerGeneratedMethod, [NotNullWhen(true)] out MethodDesc? owningMethod) 560public bool TryGetOwningMethodForCompilerGeneratedType(MetadataType compilerGeneratedType, [NotNullWhen(true)] out MethodDesc? owningMethod) 604if (member is MethodDesc method && CompilerGeneratedNames.IsLambdaOrLocalFunction(method.Name.AsSpan())) 613public static bool TryGetStateMachineType(MethodDesc method, [NotNullWhen(true)] out MetadataType? stateMachineType) 660public bool TryGetCompilerGeneratedCalleesForUserMethod(MethodDesc method, [NotNullWhen(true)] out List<TypeSystemEntity>? callees) 707public bool TryGetOwningMethodForCompilerGeneratedMember(TypeSystemEntity sourceMember, [NotNullWhen(true)] out MethodDesc? owningMethod) 727MethodDesc? compilerGeneratedMethod = sourceMember as MethodDesc; 740public bool TryGetUserMethodForCompilerGeneratedMember(TypeSystemEntity sourceMember, [NotNullWhen(true)] out MethodDesc? userMethod) 746Debug.Assert(sourceMember is not MethodDesc sourceMethod || sourceMethod.IsTypicalMethodDefinition); 753MethodDesc? userMethodCandidate;
Compiler\Dataflow\DiagnosticUtilities.cs (8)
13internal static string GetParameterNameForErrorMessage(MethodDesc method, int parameterIndex) 21internal static string GetMethodSignatureDisplayName(MethodDesc method) 30if (parent is MethodDesc m) 42case MethodDesc method: 95internal static bool IsInRequiresScope(this MethodDesc method, string requiresAttribute) 98internal static bool IsInRequiresScope(this MethodDesc method, string requiresAttribute, [NotNullWhen(returnValue: true)] out CustomAttributeValue<TypeDesc>? attribute) 121internal static bool DoesMethodRequire(this MethodDesc method, string requiresAttribute, [NotNullWhen(returnValue: true)] out CustomAttributeValue<TypeDesc>? attribute) 181MethodDesc method => DoesMethodRequire(method, requiresAttribute, out attribute),
Compiler\Dataflow\FlowAnnotations.cs (21)
52public bool RequiresDataflowAnalysisDueToSignature(MethodDesc method) 68public bool RequiresVirtualMethodDataflowAnalysis(MethodDesc method) 110public bool HasGenericParameterAnnotation(MethodDesc method) 125MethodDesc method = param.Method.Method.GetTypicalMethodDefinition(); 135public DynamicallyAccessedMemberTypes GetReturnParameterAnnotation(MethodDesc method) 167MethodDesc method => ShouldWarnWhenAccessedForReflection(method), 190MethodDesc parent = ecmaGenericParameter.Module.GetMethod(paramDef.Parent); 201public bool ShouldWarnWhenAccessedForReflection(MethodDesc method) 528MethodDesc setMethod = property.SetMethod; 573MethodDesc getMethod = property.GetMethod; 727internal void ValidateMethodAnnotationsAreSame(MethodDesc method, MethodDesc baseMethod, TypeSystemEntity origin) 785private void ValidateMethodParametersHaveNoAnnotations(DynamicallyAccessedMemberTypes[] parameterAnnotations, MethodDesc method, MethodDesc baseMethod, TypeSystemEntity origin) 798private void ValidateMethodGenericParametersHaveNoAnnotations(DynamicallyAccessedMemberTypes[] genericParameterAnnotations, MethodDesc method, MethodDesc baseMethod, TypeSystemEntity origin) 831case (TypeDesc, MethodDesc method): 833DiagnosticUtilities.GetMethodSignatureDisplayName(method), DiagnosticUtilities.GetMethodSignatureDisplayName((MethodDesc)baseProvider)); 860public bool TryGetAnnotation(MethodDesc method, out MethodAnnotations annotations) 926public readonly MethodDesc Method; 932MethodDesc method,
Compiler\Dataflow\GenericArgumentDataFlow.cs (4)
45public static void ProcessGenericArgumentDataFlow(IDependencySink dependencies, NodeFactory factory, in MessageOrigin origin, TypeDesc type, MethodDesc contextMethod) 109public static void ProcessGenericArgumentDataFlow(in DiagnosticContext diagnosticContext, ReflectionMarker reflectionMarker, MethodDesc method) 111MethodDesc typicalMethod = method.GetTypicalMethodDefinition(); 149public static bool RequiresGenericArgumentDataFlow(FlowAnnotations flowAnnotations, MethodDesc method)
Compiler\Dataflow\HandleCallAction.cs (11)
31private readonly MethodDesc _callingMethod; 32private readonly MethodDesc _reason; 39MethodDesc callingMethod, 40MethodDesc reason) 148MethodDesc methodInstantiated = methodBaseValue.RepresentedMethod.Method; 312&& systemTypeValue.RepresentedType.Type.GetParameterlessConstructor() is MethodDesc ctorMethod 584MethodDesc contextMethod, 698foreach (var method in type.Type.GetMethodsOnTypeHierarchy(m => m.Name.StringEquals(name), bindingFlags)) 818private readonly MethodDesc _method; 820public MakeGenericMethodSite(MethodDesc method) => _method = method; 830MethodDesc instantiatedMethod = _method.InstantiateSignature(typeInstantiation, methodInstantiation);
Compiler\Dataflow\InterproceduralState.cs (3)
56public void TrackMethod(MethodDesc method) 79foreach (var stateMachineMethod in stateMachineType.GetMethods()) 130private bool TryGetMethodBody(MethodDesc method, [NotNullWhen(true)] out MethodIL? methodBody)
Compiler\Dataflow\MethodBodyScanner.cs (15)
288MethodDesc startingMethod = startingMethodBody.OwningMethod; 334private static void TrackNestedFunctionReference(MethodDesc referencedMethod, ref InterproceduralState interproceduralState) 336MethodDesc method = referencedMethod.GetTypicalMethodDefinition(); 346MethodDesc thisMethod = methodIL.OwningMethod; 475if (methodIL.GetObject(reader.ReadILToken()) is MethodDesc methodOperand) 536if (methodIL.GetObject(reader.ReadILToken()) is MethodDesc methodOperand) 763MethodDesc methodOperand = (MethodDesc)methodIL.GetObject(reader.ReadILToken()); 884private void ScanLdarg(ILOpcode opcode, int parameterIndex, Stack<StackSlot> currentStack, MethodDesc thisMethod) 979else if (operand is MethodDesc method) 1167MethodDesc methodCalled, 1241MethodDesc calledMethod, 1265protected abstract void HandleMethodTokenAccess(MethodIL methodIL, int offset, MethodDesc accessedMethod); 1276MethodDesc calledMethod, 1327MethodDesc calledMethod,
Compiler\Dataflow\MethodReturnValue.cs (2)
21public MethodReturnValue(MethodDesc method, bool isNewObj, DynamicallyAccessedMemberTypes dynamicallyAccessedMemberTypes) 30public readonly MethodDesc MethodDesc;
Compiler\Dataflow\ReflectionMarker.cs (11)
44public List<(MethodDesc OwningMethod, INodeWithRuntimeDeterminedDependencies Dependency)> RuntimeDeterminedDependencies { get; } = new List<(MethodDesc, INodeWithRuntimeDeterminedDependencies)>(); 97case MethodDesc method: 200internal void MarkMethod(in MessageOrigin origin, MethodDesc method, TypeSystemEntity reason, AccessKind accessKind = AccessKind.Unspecified) 208internal void MarkMethod(in MessageOrigin origin, MethodDesc method, string reason, AccessKind accessKind = AccessKind.Unspecified) 258internal void MarkConstructorsOnType(in MessageOrigin origin, TypeDesc type, Func<MethodDesc, bool>? filter, TypeSystemEntity reason, BindingFlags? bindingFlags = null) 264foreach (var ctor in type.GetConstructorsOnType(filter, bindingFlags)) 303MethodDesc cctor = type.GetStaticConstructor(); 325Debug.Assert(entity is MethodDesc or FieldDesc); 353if (entity is MethodDesc) 377Debug.Assert(entity is MethodDesc or FieldDesc);
Compiler\Dataflow\ReflectionMethodBodyScanner.cs (9)
38public static bool RequiresReflectionMethodBodyScannerForCallSite(FlowAnnotations flowAnnotations, MethodDesc method) 49public static bool RequiresReflectionMethodBodyScannerForMethodBody(FlowAnnotations flowAnnotations, MethodDesc methodDefinition) 128public static DependencyList ScanAndProcessReturnValue(NodeFactory factory, FlowAnnotations annotations, Logger logger, MethodIL methodIL, out List<(MethodDesc OwningMethod, INodeWithRuntimeDeterminedDependencies Dependency)> runtimeDependencies) 271protected override void HandleMethodTokenAccess(MethodIL methodIL, int offset, MethodDesc accessedMethod) 289public override MultiValue HandleCall(MethodIL callingMethodIL, MethodDesc calledMethod, ILOpcode operation, int offset, ValueNodeList methodParams) 333MethodDesc calledMethod, 340var callingMethodDefinition = callingMethodBody.OwningMethod; 442private void ProcessGenericArgumentDataFlow(MethodDesc method) 477internal static bool IsPInvokeDangerous(MethodDesc calledMethod, out bool comDangerousMethod, out bool aotUnsafeDelegate)
Compiler\Dataflow\TrimAnalysisGenericInstantiationAccessPattern.cs (1)
41case MethodDesc method:
Compiler\Dataflow\TrimAnalysisMethodCallPattern.cs (3)
22public readonly MethodDesc CalledMethod; 31MethodDesc calledMethod, 36Debug.Assert(origin.MemberDefinition is MethodDesc);
Compiler\Dataflow\TrimAnalysisTokenAccessPattern.cs (1)
30case MethodDesc method:
Compiler\DelegateCreationInfo.cs (8)
33private MethodDesc _targetMethod; 43public MethodDesc TargetMethod 54public MethodDesc PossiblyUnresolvedTargetMethod 170private DelegateCreationInfo(TypeDesc delegateType, IMethodNode constructor, MethodDesc targetMethod, TypeDesc constrainedType, TargetKind targetKind, IMethodNode thunk = null) 186public static DelegateCreationInfo Create(TypeDesc delegateType, MethodDesc targetMethod, TypeDesc constrainedType, NodeFactory factory, bool followVirtualDispatch) 211MethodDesc invokeThunk; 212MethodDesc initMethod; 244MethodDesc targetCanonMethod = targetMethod.GetCanonMethodTarget(CanonicalFormKind.Specific);
Compiler\DependencyAnalysis\AddressTakenMethodNode.cs (1)
34public MethodDesc Method => _methodNode.Method;
Compiler\DependencyAnalysis\CodeBasedDependencyAlgorithm.cs (3)
19public static void AddDependenciesDueToMethodCodePresence(IDependencySink dependencies, NodeFactory factory, MethodDesc method, MethodIL methodIL) 70public static bool HasConditionalDependenciesDueToMethodCodePresence(MethodDesc method) 76public static void AddConditionalDependenciesDueToMethodCodePresence(IConditionalDependencySink dependencies, NodeFactory factory, MethodDesc method)
Compiler\DependencyAnalysis\CustomAttributeBasedDependencyAlgorithm.cs (3)
115MethodDesc constructor = module.GetMethod(attribute.Constructor); 234MethodDesc setterMethod = (MethodDesc)attributeTypeDefinition.Module.GetObject(accessors.Setter);
Compiler\DependencyAnalysis\DataflowAnalyzedMethodNode.cs (4)
22private List<(MethodDesc OwningMethod, INodeWithRuntimeDeterminedDependencies Dependency)> _runtimeDependencies; 45_runtimeDependencies = new List<(MethodDesc, INodeWithRuntimeDeterminedDependencies)>(); 58MethodDesc method = methodBody.Method; 59MethodDesc typicalMethod = method.GetTypicalMethodDefinition();
Compiler\DependencyAnalysis\DelegateTargetVirtualMethodNode.cs (6)
18private readonly MethodDesc _method; 21public DelegateTargetVirtualMethodNode(MethodDesc method, bool reflected) 44private readonly MethodDesc _declaration; 45private readonly MethodDesc _implementation; 47public ReflectableVirtualMethodImplNode(MethodDesc declaration, MethodDesc implementation)
Compiler\DependencyAnalysis\DictionaryLayoutNode.cs (5)
45MethodDesc method = _owningMethodOrType as MethodDesc; 61Debug.Assert(_owningMethodOrType is MethodDesc); 159if (_owningMethodOrType is MethodDesc) 161templateLayout = factory.NativeLayout.TemplateMethodLayout((MethodDesc)_owningMethodOrType);
Compiler\DependencyAnalysis\DispatchCellNode.cs (3)
19private readonly MethodDesc _targetMethod; 24internal MethodDesc TargetMethod => _targetMethod; 28public DispatchCellNode(MethodDesc targetMethod, ISortableSymbolNode callSiteIdentifier)
Compiler\DependencyAnalysis\EETypeNode.cs (22)
112foreach (MethodDesc method in defType.GetAllVirtualMethods()) 121MethodDesc slotDecl = MetadataVirtualMethodAlgorithm.FindSlotDefiningMethodForVirtualMethod(method); 145foreach (MethodDesc method in interfaceImpl.EnumAllVirtualSlots()) 152MethodDesc slotDecl = method.Signature.IsStatic ? 299foreach (var method in currentType.GetAllVirtualMethods()) 370foreach (MethodDesc decl in defType.EnumAllVirtualSlots()) 376MethodDesc impl = defType.FindVirtualFunctionTargetMethodOnObjectType(decl); 391MethodDesc canonImpl = impl.GetCanonMethodTarget(CanonicalFormKind.Specific); 448foreach (MethodDesc interfaceMethod in interfaceType.EnumAllVirtualSlots()) 459MethodDesc interfaceMethodDefinition = interfaceMethod; 463MethodDesc implMethod = isStaticInterfaceMethod ? 479MethodDesc defaultIntfMethod = implMethod.GetCanonMethodTarget(CanonicalFormKind.Specific); 506MethodDesc typicalInterfaceMethod = interfaceMethod.GetTypicalMethodDefinition(); 531MethodDesc defaultIntfMethod = implMethod.GetCanonMethodTarget(CanonicalFormKind.Specific); 567internal static bool MethodHasNonGenericILMethodBody(MethodDesc method) 645foreach (var method in _type.GetClosestDefType().ConvertToCanonForm(CanonicalFormKind.Specific).GetAllMethodsAndAsyncVariants()) 937IReadOnlyList<MethodDesc> virtualSlots = declVTable.Slots; 941MethodDesc declMethod = virtualSlots[i]; 962MethodDesc implMethod = implType.GetClosestDefType().FindVirtualFunctionTargetMethodOnObjectType(declMethod); 980MethodDesc canonImplMethod = implMethod.GetCanonMethodTarget(CanonicalFormKind.Specific); 1048MethodDesc finalizerMethod = _type.GetFinalizer(); 1049MethodDesc canonFinalizerMethod = finalizerMethod.GetCanonMethodTarget(CanonicalFormKind.Specific);
Compiler\DependencyAnalysis\ExactMethodInstantiationsEntryNode.cs (3)
16private readonly MethodDesc _method; 18public ExactMethodInstantiationsEntryNode(MethodDesc method) 26public MethodDesc Method => _method;
Compiler\DependencyAnalysis\ExactMethodInstantiationsNode.cs (6)
52foreach (MethodDesc method in factory.MetadataManager.GetExactMethodHashtableEntries()) 76MethodDesc methodForMetadata = GetMethodForMetadata(method, out bool isAsyncVariant, out bool isReturnDroppingAsyncThunk); 104public static void GetExactMethodInstantiationDependenciesForMethod(DependencySink dependencies, NodeFactory factory, MethodDesc method) 123private static MethodDesc GetMethodForMetadata(MethodDesc method, out bool isAsyncVariant, out bool isReturnDroppingAsyncThunk) 125MethodDesc result = method.GetTypicalMethodDefinition();
Compiler\DependencyAnalysis\ExternMethodSymbolNode.cs (3)
16private MethodDesc _method; 18public ExternMethodSymbolNode(NodeFactory factory, MethodDesc method, bool isUnboxing = false) 26public MethodDesc Method
Compiler\DependencyAnalysis\ExternSymbolsImportedNodeProvider.cs (2)
28public override ISortableSymbolNode ImportedMethodDictionaryNode(NodeFactory factory, MethodDesc method) 33public override IMethodNode ImportedMethodCodeNode(NodeFactory factory, MethodDesc method, bool unboxingStub)
Compiler\DependencyAnalysis\FatFunctionPointerNode.cs (3)
23public FatFunctionPointerNode(MethodDesc methodRepresented, bool isUnboxingStub, bool addressTaken) 44public MethodDesc Method { get; } 69MethodDesc canonMethod = Method.GetCanonMethodTarget(CanonicalFormKind.Specific);
Compiler\DependencyAnalysis\GenericDictionaryNode.cs (5)
151foreach (var method in _owningType.GetAllMethodsAndAsyncVariants()) 187private MethodDesc _owningMethod; 198public MethodDesc OwningMethod => _owningMethod; 208MethodDesc canonicalTarget = _owningMethod.GetCanonMethodTarget(CanonicalFormKind.Specific); 269public MethodGenericDictionaryNode(MethodDesc owningMethod, NodeFactory factory)
Compiler\DependencyAnalysis\GenericLookupResult.cs (26)
36Debug.Assert(_canonicalOwner is MethodDesc); 37MethodDesc owningMethodDefinition = ((MethodDesc)_canonicalOwner).GetTypicalMethodDefinition(); 40MethodDesc concreteMethod = owningMethodDefinition; 428private MethodDesc _method; 432public MethodHandleGenericLookupResult(MethodDesc method) 440MethodDesc instantiatedMethod = _method.GetNonRuntimeDeterminedMethodFromRuntimeDeterminedMethodViaSubstitution(dictionary.TypeInstantiation, dictionary.MethodInstantiation); 549private MethodDesc _method; 553public MethodDictionaryGenericLookupResult(MethodDesc method) 561MethodDesc instantiatedMethod = _method.GetNonRuntimeDeterminedMethodFromRuntimeDeterminedMethodViaSubstitution(dictionary.TypeInstantiation, dictionary.MethodInstantiation); 584public MethodDesc Method => _method; 613private MethodDesc _method; 618public MethodEntryGenericLookupResult(MethodDesc method, bool isUnboxingThunk) 627MethodDesc instantiatedMethod = _method.GetNonRuntimeDeterminedMethodFromRuntimeDeterminedMethodViaSubstitution(dictionary.TypeInstantiation, dictionary.MethodInstantiation); 661MethodDesc canonMethod = _method.GetCanonMethodTarget(CanonicalFormKind.Specific); 697private MethodDesc _method; 701public DispatchCellGenericLookupResult(MethodDesc method) 712MethodDesc instantiatedMethod = _method.GetNonRuntimeDeterminedMethodFromRuntimeDeterminedMethodViaSubstitution(context.TypeInstantiation, context.MethodInstantiation); 722(GenericDictionaryNode)factory.MethodGenericDictionary((MethodDesc)contextOwner); 1017MethodDesc defaultCtor = Compilation.GetConstructorForCreateInstanceIntrinsic(instantiatedType); 1052private MethodDesc _constrainedMethod; 1058public ConstrainedMethodUseLookupResult(MethodDesc constrainedMethod, TypeDesc constraintType, bool directCall) 1070MethodDesc canonMethod = _constrainedMethod.GetCanonMethodTarget(CanonicalFormKind.Specific); 1086MethodDesc instantiatedConstrainedMethod = _constrainedMethod.GetNonRuntimeDeterminedMethodFromRuntimeDeterminedMethodViaSubstitution(dictionary.TypeInstantiation, dictionary.MethodInstantiation); 1097MethodDesc implMethod; 1099MethodDesc instantiatedConstrainedMethodDefinition = instantiatedConstrainedMethod.GetMethodDefinition();
Compiler\DependencyAnalysis\GenericMethodsHashtableEntryNode.cs (3)
14private readonly MethodDesc _method; 16public GenericMethodsHashtableEntryNode(MethodDesc method) 21public MethodDesc Method => _method;
Compiler\DependencyAnalysis\GenericMethodsHashtableNode.cs (6)
52foreach (MethodDesc method in factory.MetadataManager.GetGenericMethodHashtableEntries()) 71MethodDesc methodForMetadata = GetMethodForMetadata(method, out bool isAsyncVariant, out bool isReturnDroppingAsyncThunk); 97public static void GetGenericMethodsHashtableDependenciesForMethod(DependencySink dependencies, NodeFactory factory, MethodDesc method) 116private static MethodDesc GetMethodForMetadata(MethodDesc method, out bool isAsyncVariant, out bool isReturnDroppingAsyncThunk) 118MethodDesc result = method.GetTypicalMethodDefinition();
Compiler\DependencyAnalysis\GenericMethodsTemplateMap.cs (2)
76public static void AddTemplateMethodDependencies(IDependencySink dependencies, NodeFactory factory, MethodDesc method) 85private static bool IsEligibleToBeATemplate(MethodDesc method)
Compiler\DependencyAnalysis\GenericVirtualMethodImplNode.cs (2)
18private readonly MethodDesc _method; 20public GenericVirtualMethodImplNode(MethodDesc method)
Compiler\DependencyAnalysis\GenericVirtualMethodTableNode.cs (15)
21private Dictionary<MethodDesc, Dictionary<TypeDesc, MethodDesc>> _gvmImplementations; 26_gvmImplementations = new Dictionary<MethodDesc, Dictionary<TypeDesc, MethodDesc>>(); 47public static void AddGenericVirtualMethodImplementationDependencies(DependencySink dependencies, NodeFactory factory, MethodDesc callingMethod, MethodDesc implementationMethod) 52MethodDesc openCallingMethod = callingMethod.GetTypicalMethodDefinition(); 53MethodDesc openImplementationMethod = implementationMethod.GetTypicalMethodDefinition(); 61private void AddGenericVirtualMethodImplementation(MethodDesc callingMethod, MethodDesc implementationMethod) 66MethodDesc openCallingMethod = callingMethod.GetTypicalMethodDefinition(); 67MethodDesc openImplementationMethod = implementationMethod.GetTypicalMethodDefinition(); 71_gvmImplementations[openCallingMethod] = new Dictionary<TypeDesc, MethodDesc>(); 107MethodDesc callingMethod = gvmEntry.Key; 109MethodDesc implementationMethod = implementationEntry.Value;
Compiler\DependencyAnalysis\GvmDispatchCellInfoSectionNode.cs (6)
56MethodDesc targetMethod = cells[firstCell].TargetMethod; 100public static void AddCellDependencies(DependencySink dependencies, NodeFactory factory, MethodDesc targetMethod) 102MethodDesc canonMethod = targetMethod.GetCanonMethodTarget(CanonicalFormKind.Specific); 118public static MethodDesc GetMethodForMetadata(MethodDesc method, out bool isAsyncVariant) 121MethodDesc targetMethodForMetadata = method.GetTypicalMethodDefinition();
Compiler\DependencyAnalysis\ILScanNodeFactory.cs (2)
20protected override IMethodNode CreateMethodEntrypointNode(MethodDesc method) 45protected override IMethodNode CreateUnboxingStubNode(MethodDesc method)
Compiler\DependencyAnalysis\ImportedNodeProvider.cs (4)
17public abstract ISortableSymbolNode ImportedMethodDictionaryNode(NodeFactory factory, MethodDesc method); 18public abstract IMethodNode ImportedMethodCodeNode(NodeFactory factory, MethodDesc method, bool unboxingStub); 38public override ISortableSymbolNode ImportedMethodDictionaryNode(NodeFactory factory, MethodDesc method) 43public override IMethodNode ImportedMethodCodeNode(NodeFactory factory, MethodDesc method, bool unboxingStub)
Compiler\DependencyAnalysis\InlineableStringsResourceNode.cs (1)
61public static void AddDependenciesDueToResourceStringUse(IDependencySink dependencies, NodeFactory factory, MethodDesc method)
Compiler\DependencyAnalysis\InterfaceDispatchCellInfoSectionNode.cs (3)
56MethodDesc targetMethod = cells[firstCell].TargetMethod; 93public static void AddCellDependencies(DependencySink dependencies, NodeFactory factory, MethodDesc targetMethod) 105private static IEETypeNode GetInterfaceTypeNode(NodeFactory factory, MethodDesc targetMethod)
Compiler\DependencyAnalysis\InterfaceDispatchMapNode.cs (8)
98foreach (MethodDesc slotMethod in vtableSlice.Slots) 100MethodDesc declMethod = slotMethod; 112var implMethod = declMethod.Signature.IsStatic ? 169IReadOnlyList<MethodDesc> virtualSlots = interfaceVTable.Slots; 173MethodDesc declMethod = virtualSlots[interfaceMethodSlot]; 184var implMethod = declMethod.Signature.IsStatic ? 196MethodDesc targetMethod = implMethod; 230DefaultInterfaceMethodResolution baseResult = declTypeBaseDefinition.ResolveInterfaceMethodToDefaultImplementationOnType(declMethod, out MethodDesc baseImplMethod);
Compiler\DependencyAnalysis\InterfaceGenericVirtualMethodTableNode.cs (11)
22private Dictionary<MethodDesc, HashSet<object>> _interfaceGvmSlots; 28_interfaceGvmSlots = new Dictionary<MethodDesc, HashSet<object>>(); 49public static void AddGenericVirtualMethodImplementationDependencies(DependencySink dependencies, NodeFactory factory, MethodDesc callingMethod, TypeDesc implementationType, MethodDesc implementationMethod) 54MethodDesc openCallingMethod = callingMethod.GetTypicalMethodDefinition(); 62MethodDesc openImplementationMethod = implementationMethod.GetTypicalMethodDefinition(); 82private void AddGenericVirtualMethodImplementation(MethodDesc callingMethod, TypeDesc implementationType, MethodDesc implementationMethod, DefaultInterfaceMethodResolution resolution) 87MethodDesc openCallingMethod = callingMethod.GetTypicalMethodDefinition(); 150MethodDesc callingMethod = gvmEntry.Key; 163if (impl is MethodDesc implementationMethod)
Compiler\DependencyAnalysis\InvalidExternalTypeMapNode.cs (2)
13internal sealed class InvalidExternalTypeMapNode(TypeDesc typeMapGroup, MethodDesc throwingMethodStub) : SortableDependencyNode, IExternalTypeMapNode 33public MethodDesc ThrowingMethodStub { get; } = throwingMethodStub;
Compiler\DependencyAnalysis\InvalidProxyTypeMapNode.cs (2)
13internal sealed class InvalidProxyTypeMapNode(TypeDesc typeMapGroup, MethodDesc throwingMethodStub) : SortableDependencyNode, IProxyTypeMapNode 16public MethodDesc ThrowingMethodStub { get; } = throwingMethodStub;
Compiler\DependencyAnalysis\MetadataEETypeNode.cs (1)
66foreach (MethodDesc intfaceMethod in intface.GetAllVirtualMethods())
Compiler\DependencyAnalysis\MethodExceptionHandlingInfoNode.cs (3)
13private readonly MethodDesc _owningMethod; 16public MethodDesc Method => _owningMethod; 18public MethodExceptionHandlingInfoNode(MethodDesc owningMethod, ObjectData data)
Compiler\DependencyAnalysis\MethodMetadataNode.cs (2)
34public MethodMetadataNode(MethodDesc method, bool isMinimal) 41public MethodDesc Method => _method;
Compiler\DependencyAnalysis\ModuleInitializerListNode.cs (1)
42MethodDesc method = methodNode.Method;
Compiler\DependencyAnalysis\ModuleMetadataNode.cs (1)
39&& ecmaModule.EntryPoint is MethodDesc entrypoint
Compiler\DependencyAnalysis\ModuleUseBasedDependencyAlgorithm.cs (1)
14if (module.GetGlobalModuleType().GetStaticConstructor() is MethodDesc moduleCctor)
Compiler\DependencyAnalysis\NativeLayoutVertexNode.cs (33)
100protected readonly MethodDesc _method; 105public MethodDesc Method => _method; 111public NativeLayoutMethodEntryVertexNode(NodeFactory factory, MethodDesc method, MethodEntryFlags flags) 188MethodDesc methodForToken = GetMethodForMetadata(_method, out bool isAsyncVariant, out bool isReturnDroppingAsyncThunk); 207private static MethodDesc GetMethodForMetadata(MethodDesc method, out bool isAsyncVariant, out bool isReturnDroppingAsyncThunk) 209MethodDesc result = method.GetTypicalMethodDefinition(); 620private static bool NeedsEntrypoint(MethodDesc method) 637public NativeLayoutTemplateMethodSignatureVertexNode(NodeFactory factory, MethodDesc method) 684if (owningMethodOrType is MethodDesc owningMethod) 702if (_owningMethodOrType is MethodDesc owningMethod) 774private MethodDesc _method; 778public NativeLayoutTemplateMethodLayoutVertexNode(NodeFactory factory, MethodDesc method) 1006MethodDesc cctorMethod = _type.GetStaticConstructor(); 1007MethodDesc canonCctorMethod = cctorMethod.GetCanonMethodTarget(CanonicalFormKind.Specific); 1200private MethodDesc _method; 1202public NativeLayoutInterfaceDispatchGenericDictionarySlotNode(NodeFactory factory, MethodDesc method) 1215MethodDesc canonMethod = _method.GetCanonMethodTarget(CanonicalFormKind.Specific); 1229MethodDesc method = _method; 1241private MethodDesc _method; 1243public NativeLayoutGvmDispatchGenericDictionarySlotNode(NodeFactory factory, MethodDesc method) 1266MethodDesc canonMethod = _method.GetCanonMethodTarget(CanonicalFormKind.Specific); 1281private MethodDesc _method; 1283public NativeLayoutMethodDictionaryGenericDictionarySlotNode(NodeFactory factory, MethodDesc method) 1356private MethodDesc _method; 1358public NativeLayoutMethodLdTokenGenericDictionarySlotNode(NodeFactory factory, MethodDesc method) 1399private MethodDesc _constrainedMethod; 1403public NativeLayoutConstrainedMethodDictionarySlotNode(MethodDesc constrainedMethod, TypeDesc constraintType, bool directCall) 1464MethodDesc canonMethod = _constrainedMethod.GetCanonMethodTarget(CanonicalFormKind.Specific); 1482var canonConstrainedMethod = _constrainedMethod.GetCanonMethodTarget(CanonicalFormKind.Specific); 1492private MethodDesc _method; 1502public WrappedMethodEntryVertexNode(NodeFactory factory, MethodDesc method, bool unboxingStub, IMethodNode functionPointerNode) : 1518public NativeLayoutMethodEntrypointGenericDictionarySlotNode(NodeFactory factory, MethodDesc method, IMethodNode functionPointerNode, bool unboxingStub)
Compiler\DependencyAnalysis\NodeFactory.cs (107)
133protected virtual bool CanFold(MethodDesc method) => false; 278_directPInvokes = new NodeCache<MethodDesc, ExternFunctionSymbolNode>((MethodDesc key) => 287MethodDesc nativeTarget = key is PInvokeTargetNativeMethod 319_tentativeMethodEntrypoints = new NodeCache<MethodDesc, IMethodNode>((MethodDesc method) => 331_unboxingStubs = new NodeCache<MethodDesc, IMethodNode>(CreateUnboxingStubNode); 348_gvmDependenciesNode = new NodeCache<MethodDesc, GVMDependenciesNode>(method => 353_gvmImpls = new NodeCache<MethodDesc, GenericVirtualMethodImplNode>(method => 358_genericMethodEntries = new NodeCache<MethodDesc, GenericMethodsHashtableEntryNode>(method => 363_exactMethodEntries = new NodeCache<MethodDesc, ExactMethodInstantiationsEntryNode>(method => 373_addressTakenMethods = new NodeCache<MethodDesc, AddressTakenMethodNode>(method => 378_reflectedDelegateTargetMethods = new NodeCache<MethodDesc, DelegateTargetVirtualMethodNode>(method => 383_delegateTargetMethods = new NodeCache<MethodDesc, DelegateTargetVirtualMethodNode>(method => 388_reflectableVirtualMethodImpls = new NodeCache<(MethodDesc Declaration, MethodDesc Implementation), ReflectableVirtualMethodImplNode>(methods => 398_reflectedMethods = new NodeCache<MethodDesc, ReflectedMethodNode>(method => 440_variantMethods = new NodeCache<MethodDesc, VariantInterfaceMethodUseNode>((MethodDesc method) => 504_runtimeMethodHandles = new NodeCache<MethodDesc, RuntimeMethodHandleNode>((MethodDesc method) => 549_eagerCctorIndirectionNodes = new NodeCache<MethodDesc, EmbeddedObjectNode>((MethodDesc method) => 568_methodGenericDictionaries = new NodeCache<MethodDesc, ISortableSymbolNode>(method => 592_methodsWithMetadata = new NodeCache<MethodDesc, MethodMetadataNode>(method => 597_methodsWithLimitedMetadata = new NodeCache<MethodDesc, MethodMetadataNode>(method => 639_stringAllocators = new NodeCache<MethodDesc, IMethodNode>(constructor => 741protected abstract IMethodNode CreateMethodEntrypointNode(MethodDesc method); 743protected abstract IMethodNode CreateUnboxingStubNode(MethodDesc method); 923public DispatchCellNode DispatchCell(MethodDesc method, ISortableSymbolNode callSite = null) 928private NodeCache<MethodDesc, RuntimeMethodHandleNode> _runtimeMethodHandles; 930public RuntimeMethodHandleNode RuntimeMethodHandle(MethodDesc method) 1034private NodeCache<MethodDesc, ExternFunctionSymbolNode> _directPInvokes; 1035public ExternFunctionSymbolNode DirectPInvokeTarget(MethodDesc method) 1091private NodeCache<MethodDesc, ISortableSymbolNode> _methodGenericDictionaries; 1092public ISortableSymbolNode MethodGenericDictionary(MethodDesc method) 1109private NodeCache<MethodDesc, IMethodNode> _stringAllocators; 1110public IMethodNode StringAllocator(MethodDesc stringConstructor) 1126private sealed class MethodEntrypointHashtable : LockFreeReaderHashtable<MethodDesc, IMethodNode> 1130protected override bool CompareKeyToValue(MethodDesc key, IMethodNode value) => key == value.Method; 1132protected override IMethodNode CreateValueFromKey(MethodDesc key) => _factory.CreateMethodEntrypointNode(key); 1133protected override int GetKeyHashCode(MethodDesc key) => key.GetHashCode(); 1138private NodeCache<MethodDesc, IMethodNode> _unboxingStubs; 1141public IMethodNode MethodEntrypoint(MethodDesc method, bool unboxingStub = false) 1151protected NodeCache<MethodDesc, IMethodNode> _tentativeMethodEntrypoints; 1153public IMethodNode TentativeMethodEntrypoint(MethodDesc method, bool unboxingStub = false) 1161public IMethodNode MethodEntrypointOrTentativeMethod(MethodDesc method, bool unboxingStub = false) 1180public IMethodNode FatFunctionPointer(MethodDesc method, bool isUnboxingStub = false) 1187public IMethodNode FatAddressTakenFunctionPointer(MethodDesc method, bool isUnboxingStub = false) 1195public IMethodNode ExactCallableAddress(MethodDesc method, bool isUnboxingStub = false) 1197MethodDesc canonMethod = method.GetCanonMethodTarget(CanonicalFormKind.Specific); 1204public IMethodNode ExactCallableAddressTakenAddress(MethodDesc method, bool isUnboxingStub = false) 1206MethodDesc canonMethod = method.GetCanonMethodTarget(CanonicalFormKind.Specific); 1213public IMethodNode CanonicalEntrypoint(MethodDesc method) 1215MethodDesc canonMethod = method.GetCanonMethodTarget(CanonicalFormKind.Specific); 1222private NodeCache<MethodDesc, GVMDependenciesNode> _gvmDependenciesNode; 1223public GVMDependenciesNode GVMDependencies(MethodDesc method) 1228private NodeCache<MethodDesc, GenericVirtualMethodImplNode> _gvmImpls; 1229public GenericVirtualMethodImplNode GenericVirtualMethodImpl(MethodDesc method) 1234private NodeCache<MethodDesc, GenericMethodsHashtableEntryNode> _genericMethodEntries; 1235public GenericMethodsHashtableEntryNode GenericMethodsHashtableEntry(MethodDesc method) 1240private NodeCache<MethodDesc, ExactMethodInstantiationsEntryNode> _exactMethodEntries; 1241public ExactMethodInstantiationsEntryNode ExactMethodInstantiationsHashtableEntry(MethodDesc method) 1252private NodeCache<MethodDesc, AddressTakenMethodNode> _addressTakenMethods; 1253public IMethodNode AddressTakenMethodEntrypoint(MethodDesc method, bool unboxingStub = false) 1261private NodeCache<MethodDesc, DelegateTargetVirtualMethodNode> _reflectedDelegateTargetMethods; 1262public DelegateTargetVirtualMethodNode ReflectedDelegateTargetVirtualMethod(MethodDesc method) 1267private NodeCache<MethodDesc, DelegateTargetVirtualMethodNode> _delegateTargetMethods; 1268public DelegateTargetVirtualMethodNode DelegateTargetVirtualMethod(MethodDesc method) 1273private NodeCache<(MethodDesc Declaration, MethodDesc Implementation), ReflectableVirtualMethodImplNode> _reflectableVirtualMethodImpls; 1274public ReflectableVirtualMethodImplNode ReflectableVirtualMethodImpl(MethodDesc declaration, MethodDesc implementation) 1289private NodeCache<MethodDesc, ReflectedMethodNode> _reflectedMethods; 1290public ReflectedMethodNode ReflectedMethod(MethodDesc method) 1331private sealed class ShadowConcreteMethodHashtable : LockFreeReaderHashtable<MethodDesc, ShadowConcreteMethodNode> 1335protected override bool CompareKeyToValue(MethodDesc key, ShadowConcreteMethodNode value) => key == value.Method; 1337protected override ShadowConcreteMethodNode CreateValueFromKey(MethodDesc key) => 1339protected override int GetKeyHashCode(MethodDesc key) => key.GetHashCode(); 1344public ShadowConcreteMethodNode ShadowConcreteMethod(MethodDesc method) 1349private sealed class ShadowNonConcreteMethodHashtable : LockFreeReaderHashtable<MethodDesc, ShadowNonConcreteMethodNode> 1353protected override bool CompareKeyToValue(MethodDesc key, ShadowNonConcreteMethodNode value) => key == value.Method; 1355protected override ShadowNonConcreteMethodNode CreateValueFromKey(MethodDesc key) => 1357protected override int GetKeyHashCode(MethodDesc key) => key.GetHashCode(); 1362public ShadowNonConcreteMethodNode ShadowNonConcreteMethod(MethodDesc method) 1389var method = type.GetKnownMethod(Encoding.UTF8.GetBytes(entry[2]), null); 1407private MethodDesc _instanceMethodRemovedHelper; 1408public MethodDesc InstanceMethodRemovedHelper 1418private sealed class VirtualMethodUseHashtable : LockFreeReaderHashtable<MethodDesc, VirtualMethodUseNode> 1422protected override bool CompareKeyToValue(MethodDesc key, VirtualMethodUseNode value) => key == value.Method; 1424protected override VirtualMethodUseNode CreateValueFromKey(MethodDesc key) 1431protected override int GetKeyHashCode(MethodDesc key) => key.GetHashCode(); 1437public DependencyNodeCore<NodeFactory> VirtualMethodUse(MethodDesc decl) 1442private NodeCache<MethodDesc, VariantInterfaceMethodUseNode> _variantMethods; 1444public DependencyNodeCore<NodeFactory> VariantInterfaceMethodUse(MethodDesc decl) 1494private NodeCache<MethodDesc, MethodMetadataNode> _methodsWithMetadata; 1496internal MethodMetadataNode MethodMetadata(MethodDesc method) 1504private NodeCache<MethodDesc, MethodMetadataNode> _methodsWithLimitedMetadata; 1506internal MethodMetadataNode LimitedMethodMetadata(MethodDesc method) 1608private NodeCache<MethodDesc, EmbeddedObjectNode> _eagerCctorIndirectionNodes; 1610public EmbeddedObjectNode EagerCctorIndirection(MethodDesc cctorMethod) 1664public WasmTypeNode WasmTypeNode(MethodDesc desc) 1757public Vertex EncodeReferenceToMethod(NativeWriter writer, MethodDesc method) 1765public readonly MethodDesc Method; 1768public MethodKey(MethodDesc method, bool isUnboxingStub) 1827public readonly MethodDesc Target; 1830public DispatchCellKey(MethodDesc target, ISortableSymbolNode callsiteId)
Compiler\DependencyAnalysis\NodeFactory.GenericLookups.cs (13)
45_methodHandles = new NodeCache<MethodDesc, GenericLookupResult>(method => 55_methodDictionaries = new NodeCache<MethodDesc, GenericLookupResult>(method => 65_dispatchCells = new NodeCache<MethodDesc, GenericLookupResult>(method => 140private NodeCache<MethodDesc, GenericLookupResult> _methodHandles; 142public GenericLookupResult MethodHandle(MethodDesc method) 175private NodeCache<MethodDesc, GenericLookupResult> _methodDictionaries; 177public GenericLookupResult MethodDictionary(MethodDesc method) 182private NodeCache<MethodDesc, GenericLookupResult> _dispatchCells; 184public GenericLookupResult DispatchCell(MethodDesc method) 191public GenericLookupResult MethodEntry(MethodDesc method, bool isUnboxingThunk = false) 211public GenericLookupResult ConstrainedMethodUse(MethodDesc constrainedMethod, TypeDesc constraintType, bool directCall) 221public ConstrainedMethodUseKey(MethodDesc constrainedMethod, TypeDesc constraintType, bool directCall) 228public readonly MethodDesc ConstrainedMethod;
Compiler\DependencyAnalysis\NodeFactory.NativeLayout.cs (25)
55_methodEntries = new NodeCache<MethodDesc, NativeLayoutMethodEntryVertexNode>(method => 60_templateMethodEntries = new NodeCache<MethodDesc, NativeLayoutTemplateMethodSignatureVertexNode>(method => 65_templateMethodLayouts = new NodeCache<MethodDesc, NativeLayoutTemplateMethodLayoutVertexNode>(method => 110_interfaceCell_GenericDictionarySlots = new NodeCache<MethodDesc, NativeLayoutInterfaceDispatchGenericDictionarySlotNode>(method => 115_gvmCell_GenericDictionarySlots = new NodeCache<MethodDesc, NativeLayoutGvmDispatchGenericDictionarySlotNode>(method => 120_methodDictionary_GenericDictionarySlots = new NodeCache<MethodDesc, NativeLayoutMethodDictionaryGenericDictionarySlotNode>(method => 135_methodLdToken_GenericDictionarySlots = new NodeCache<MethodDesc, NativeLayoutMethodLdTokenGenericDictionarySlotNode>(method => 315private NodeCache<MethodDesc, NativeLayoutMethodEntryVertexNode> _methodEntries; 316internal NativeLayoutMethodEntryVertexNode MethodEntry(MethodDesc method) 321private NodeCache<MethodDesc, NativeLayoutTemplateMethodSignatureVertexNode> _templateMethodEntries; 322internal NativeLayoutTemplateMethodSignatureVertexNode TemplateMethodEntry(MethodDesc method) 327private NodeCache<MethodDesc, NativeLayoutTemplateMethodLayoutVertexNode> _templateMethodLayouts; 328public NativeLayoutTemplateMethodLayoutVertexNode TemplateMethodLayout(MethodDesc method) 381private NodeCache<MethodDesc, NativeLayoutInterfaceDispatchGenericDictionarySlotNode> _interfaceCell_GenericDictionarySlots; 382public NativeLayoutInterfaceDispatchGenericDictionarySlotNode InterfaceCellDictionarySlot(MethodDesc method) 387private NodeCache<MethodDesc, NativeLayoutGvmDispatchGenericDictionarySlotNode> _gvmCell_GenericDictionarySlots; 388public NativeLayoutGvmDispatchGenericDictionarySlotNode GvmCellDictionarySlot(MethodDesc method) 393private NodeCache<MethodDesc, NativeLayoutMethodDictionaryGenericDictionarySlotNode> _methodDictionary_GenericDictionarySlots; 394public NativeLayoutMethodDictionaryGenericDictionarySlotNode MethodDictionaryDictionarySlot(MethodDesc method) 404public readonly MethodDesc Method; 407public MethodEntrypointSlotKey(MethodDesc method, bool unboxing, IMethodNode functionPointerTarget) 447public NativeLayoutMethodEntrypointGenericDictionarySlotNode MethodEntrypointDictionarySlot(MethodDesc method, bool unboxing, IMethodNode functionPointerTarget) 458private NodeCache<MethodDesc, NativeLayoutMethodLdTokenGenericDictionarySlotNode> _methodLdToken_GenericDictionarySlots; 459public NativeLayoutMethodLdTokenGenericDictionarySlotNode MethodLdTokenDictionarySlot(MethodDesc method) 471public NativeLayoutConstrainedMethodDictionarySlotNode ConstrainedMethodUse(MethodDesc constrainedMethod, TypeDesc constraintType, bool directCall)
Compiler\DependencyAnalysis\NonGCStaticsNode.cs (1)
211MethodDesc cctorMethod = _type.GetStaticConstructor();
Compiler\DependencyAnalysis\ReadyToRunGenericHelperNode.cs (20)
44|| (dictionaryOwner is MethodDesc method && method.HasInstantiation)); 67return factory.GenericLookup.MethodHandle((MethodDesc)target); 77return factory.GenericLookup.MethodDictionary((MethodDesc)target); 79return factory.GenericLookup.DispatchCell((MethodDesc)target); 81return factory.GenericLookup.MethodEntry((MethodDesc)target); 163MethodDesc instantiatedTargetMethod = createInfo.TargetMethod.GetNonRuntimeDeterminedMethodFromRuntimeDeterminedMethodViaSubstitution(typeInstantiation, methodInstantiation); 251MethodDesc targetMethod = delegateCreationInfo.PossiblyUnresolvedTargetMethod.GetCanonMethodTarget(CanonicalFormKind.Specific); 260if (_dictionaryOwner is MethodDesc) 262templateLayout = factory.NativeLayout.TemplateMethodLayout((MethodDesc)_dictionaryOwner); 293MethodDesc targetMethod = delegateCreationInfo.PossiblyUnresolvedTargetMethod.GetCanonMethodTarget(CanonicalFormKind.Specific); 305if (_dictionaryOwner is MethodDesc) 310compare = comparer.Compare((MethodDesc)_dictionaryOwner, (MethodDesc)((ReadyToRunGenericHelperNode)other)._dictionaryOwner); 314if (((ReadyToRunGenericHelperNode)other)._dictionaryOwner is MethodDesc) 337return comparer.Compare((MethodDesc)_target, (MethodDesc)((ReadyToRunGenericHelperNode)other)._target); 360if (_dictionaryOwner is MethodDesc) 361mangledContextName = nameMangler.GetMangledMethodName((MethodDesc)_dictionaryOwner); 382if (_dictionaryOwner is MethodDesc) 383mangledContextName = nameMangler.GetMangledMethodName((MethodDesc)_dictionaryOwner);
Compiler\DependencyAnalysis\ReadyToRunHelperNode.cs (9)
72MethodDesc method = (MethodDesc)target; 110sb.Append(nameMangler.GetMangledMethodName((MethodDesc)_target)); 125var targetMethod = (MethodDesc)_target; 133sink.Add(factory.VirtualMethodUse((MethodDesc)_target), "ReadyToRun Virtual Method Call"); 143MethodDesc targetMethod = info.TargetMethod; 186return comparer.Compare((MethodDesc)_target, (MethodDesc)((ReadyToRunHelperNode)other)._target);
Compiler\DependencyAnalysis\ReflectedMethodNode.cs (4)
23private readonly MethodDesc _method; 25public ReflectedMethodNode(MethodDesc method) 31public MethodDesc Method => _method; 42MethodDesc typicalMethod = _method.GetTypicalMethodDefinition();
Compiler\DependencyAnalysis\ReflectionInvokeMapNode.cs (4)
41public static void AddDependenciesDueToReflectability(IDependencySink dependencies, NodeFactory factory, MethodDesc method) 51MethodDesc invokeStub = factory.MetadataManager.GetReflectionInvokeStub(method); 139MethodDesc method = mappingEntry.Entity; 215MethodDesc invokeStub = factory.MetadataManager.GetReflectionInvokeStub(method);
Compiler\DependencyAnalysis\ReflectionInvokeSupportDependencyAlgorithm.cs (1)
30public static void GetDependenciesFromParamsArray(IDependencySink dependencies, NodeFactory factory, MethodDesc method)
Compiler\DependencyAnalysis\ReflectionVirtualInvokeMapNode.cs (9)
41public static bool NeedsVirtualInvokeInfo(NodeFactory factory, MethodDesc method) 52public static MethodDesc GetDeclaringVirtualMethodAndHierarchyDistance(MethodDesc method, out int parentHierarchyDistance) 56MethodDesc declaringMethodForSlot = MetadataVirtualMethodAlgorithm.FindSlotDefiningMethodForVirtualMethod(method.GetTypicalMethodDefinition()); 80public static void AddVirtualInvokeMapDependencies(IDependencySink dependencies, NodeFactory factory, MethodDesc method) 89MethodDesc methodDefinition = method.GetMethodDefinition(); 90MethodDesc slotDefiningMethod = MetadataVirtualMethodAlgorithm.FindSlotDefiningMethodForVirtualMethod(methodDefinition); 129MethodDesc method = mappingEntry.Entity; 174MethodDesc declaringMethodForSlot = GetDeclaringVirtualMethodAndHierarchyDistance(method, out parentHierarchyDistance);
Compiler\DependencyAnalysis\RuntimeImportMethodNode.cs (4)
16private MethodDesc _method; 18public RuntimeImportMethodNode(MethodDesc method, NameMangler nameMangler) 22private RuntimeImportMethodNode(MethodDesc method, NameMangler nameMangler, LinkageMetadata linkageMetadata) 29public MethodDesc Method
Compiler\DependencyAnalysis\RuntimeMethodHandleNode.cs (4)
15private MethodDesc _targetMethod; 17public MethodDesc Method => _targetMethod; 19public RuntimeMethodHandleNode(MethodDesc targetMethod) 56MethodDesc canonMethod = _targetMethod.GetCanonMethodTarget(CanonicalFormKind.Specific);
Compiler\DependencyAnalysis\ScannedMethodNode.cs (7)
23private readonly MethodDesc _method; 31public ScannedMethodNode(MethodDesc method) 38public MethodDesc Method => _method; 61MethodDesc nonUnboxingMethod = factory.TypeSystemContext.GetTargetOfSpecialUnboxingThunk(_method); 98public void AddRuntimeDeterminedStaticDependencies(DependencySink sink, NodeFactory factory, MethodDesc concreteMethod) 106public void AddRuntimeDeterminedConditionalDependencies(DependencySink sink, NodeFactory factory, MethodDesc concreteMethod) 118MethodDesc concreteMethod,
Compiler\DependencyAnalysis\SealedVTableNode.cs (15)
71public int ComputeSealedVTableSlot(MethodDesc method) 85public int ComputeDefaultInterfaceMethodSlot(MethodDesc method, DefType interfaceOnDefinition) 123IReadOnlyList<MethodDesc> virtualSlots = declTypeVTable.Slots; 133MethodDesc implMethod = declType.FindVirtualFunctionTargetMethodOnObjectType(virtualSlots[i]); 166MethodDesc declMethod = virtualSlots[interfaceMethodSlot]; 174MethodDesc interfaceDefDeclMethod = declMethod; 178var implMethod = declMethod.Signature.IsStatic ? 192MethodDesc targetMethod = implMethod; 218MethodDesc canonImplMethod = implMethod.GetCanonMethodTarget(CanonicalFormKind.Specific); 314private readonly MethodDesc _method; 318private SealedVTableEntry(MethodDesc method, DefType interfaceDefinition, IMethodNode target) 324public static SealedVTableEntry FromVirtualMethod(MethodDesc method, IMethodNode target) 327public static SealedVTableEntry FromDefaultInterfaceMethod(MethodDesc method, DefType interfaceOnDefinition, IMethodNode target) 330public bool Matches(MethodDesc method) 352public bool Matches(MethodDesc method, DefType interfaceDefinition)
Compiler\DependencyAnalysis\StringAllocatorMethodNode.cs (4)
24private readonly MethodDesc _allocationMethod; 25private readonly MethodDesc _constructorMethod; 27public MethodDesc Method => _allocationMethod; 36public StringAllocatorMethodNode(MethodDesc constructorMethod)
Compiler\DependencyAnalysis\Target_ARM\ARMReadyToRunHelperNode.cs (2)
131MethodDesc targetMethod = (MethodDesc)Target;
Compiler\DependencyAnalysis\Target_ARM64\ARM64ReadyToRunHelperNode.cs (2)
146MethodDesc targetMethod = (MethodDesc)Target;
Compiler\DependencyAnalysis\Target_LoongArch64\LoongArch64ReadyToRunHelperNode.cs (2)
138MethodDesc targetMethod = (MethodDesc)Target;
Compiler\DependencyAnalysis\Target_RiscV64\RiscV64ReadyToRunHelperNode.cs (2)
136MethodDesc targetMethod = (MethodDesc)Target;
Compiler\DependencyAnalysis\Target_Wasm\WasmReadyToRunHelperNode.cs (2)
179MethodDesc targetMethod = (MethodDesc)Target;
Compiler\DependencyAnalysis\Target_X64\X64ReadyToRunHelperNode.cs (2)
151MethodDesc targetMethod = (MethodDesc)Target;
Compiler\DependencyAnalysis\Target_X86\X86ReadyToRunHelperNode.cs (2)
160MethodDesc targetMethod = (MethodDesc)Target;
Compiler\DependencyAnalysis\TentativeInstanceMethodNode.cs (1)
37MethodDesc helper = factory.InstanceMethodRemovedHelper;
Compiler\DependencyAnalysis\TentativeMethodNode.cs (2)
35MethodDesc helper = factory.TypeSystemContext.GetOptionalHelperEntryPoint("ThrowHelpers"u8, "ThrowBodyRemoved"u8); 39public MethodDesc Method => _methodNode.Method;
Compiler\DependencyAnalysis\TypeGVMEntriesNode.cs (10)
20public TypeGVMEntryInfo(MethodDesc callingMethod, MethodDesc implementationMethod) 25public MethodDesc CallingMethod { get; } 26public MethodDesc ImplementationMethod { get; } 31public InterfaceGVMEntryInfo(MethodDesc callingMethod, MethodDesc implementationMethod, 72foreach (MethodDesc decl in _associatedType.EnumAllVirtualSlots()) 83MethodDesc impl = _associatedType.FindVirtualFunctionTargetMethodOnObjectType(decl); 94foreach (var method in iface.GetVirtualMethods()) 105MethodDesc slotDecl = method.Signature.IsStatic ?
Compiler\DependencyAnalysis\TypeMetadataNode.cs (1)
78foreach (MethodDesc method in _type.GetMethods())
Compiler\DependencyAnalysis\UnboxingStubNode.cs (3)
16public MethodDesc Method { get; } 35public UnboxingStubNode(MethodDesc target) 53public static Utf8String GetMangledName(NameMangler nameMangler, MethodDesc method)
Compiler\DependencyAnalysis\VariantInterfaceMethodUseNode.cs (3)
24private readonly MethodDesc _decl; 26public VariantInterfaceMethodUseNode(MethodDesc decl) 95public static bool IsVariantMethodCall(NodeFactory factory, MethodDesc calledMethod)
Compiler\DependencyAnalysis\VTableSliceNode.cs (19)
29protected static MethodDesc[] ComputeSlots(TypeDesc type) 31var slots = default(ArrayBuilder<MethodDesc>); 36IEnumerable<MethodDesc> allSlots = defType.EnumAllVirtualSlots(); 38foreach (var method in allSlots) 58public abstract IReadOnlyList<MethodDesc> Slots 63public abstract bool IsSlotUsed(MethodDesc slot); 107private readonly MethodDesc[] _slots; 109public PrecomputedVTableSliceNode(TypeDesc type, MethodDesc[] slots) 115public override IReadOnlyList<MethodDesc> Slots 123public override bool IsSlotUsed(MethodDesc slot) 156private readonly HashSet<MethodDesc> _usedMethods = new HashSet<MethodDesc>(); 157private readonly MethodDesc[] _slots; 162public LazilyBuiltVTableSliceNode(TypeDesc type, MethodDesc[] slots = null) 168public override IReadOnlyList<MethodDesc> Slots 176public override bool IsSlotUsed(MethodDesc slot) 194public void AddEntry(MethodDesc virtualMethod) 226IEnumerable<MethodDesc> allSlots = defType.EnumAllVirtualSlots(); 228foreach (var method in allSlots)
Compiler\DescriptorMarker.cs (5)
120case MethodDesc m: 241protected override void ProcessMethod(TypeDesc type, MethodDesc method, XPathNavigator nav, object? customData) 254private void ProcessMethodIfNotNull(TypeDesc type, MethodDesc method, XPathNavigator nav, object? customData) 262protected override MethodDesc? GetMethod(TypeDesc type, string signature) 264foreach (MethodDesc meth in type.GetAllMethods())
Compiler\DynamicInvokeThunkGenerationPolicy.cs (3)
20public abstract bool HasStaticInvokeThunk(MethodDesc targetMethod); 28public override bool HasStaticInvokeThunk(MethodDesc targetMethod) => false; 36public override bool HasStaticInvokeThunk(MethodDesc targetMethod) => true;
Compiler\EmptyInteropStubManager.cs (3)
23public override LinkageMetadata GetLinkageMetadata(MethodDesc method) 39public override void AddDependenciesDueToMethodCodePresence(IDependencySink dependencies, NodeFactory factory, MethodDesc method) 47public override void AddMarshalAPIsGenericDependencies(IDependencySink dependencies, NodeFactory factory, MethodDesc method)
Compiler\HardwareIntrinsicHelpers.Aot.cs (2)
17public static bool IsIsSupportedMethod(MethodDesc method) 26public static MethodIL EmitIsSupportedIL(MethodDesc method, FieldDesc isSupportedField, InstructionSet instructionSet)
Compiler\HardwareIntrinsicILProvider.cs (1)
37public override MethodIL GetMethodIL(MethodDesc method)
Compiler\IInliningPolicy.cs (2)
10bool CanInline(MethodDesc caller, MethodDesc callee);
Compiler\ILAssemblyGeneratingMethodDebugInfoProvider.cs (3)
23private readonly Dictionary<MethodDesc, MethodDebugInformation> _generatedInfos = new Dictionary<MethodDesc, MethodDebugInformation>(); 60MethodDesc owningMethod = methodIL.OwningMethod;
Compiler\ILScanner.cs (33)
57var canonicalMethodsToCompile = new HashSet<MethodDesc>(); 71MethodDesc method = methodCodeNodeNeedingCode.Method; 119MethodDesc method = methodCodeNodeNeedingCode.Method; 195MethodDesc methodDesc = JitHelper.GetEntryPoint(_compilation.TypeSystemContext, key); 289private readonly Dictionary<TypeDesc, MethodDesc[]> _vtableSlices = new Dictionary<TypeDesc, MethodDesc[]>(); 298ArrayBuilder<MethodDesc> usedSlots = default; 302MethodDesc slot = vtableSliceNode.Slots[i]; 314if (!_vtableSlices.TryGetValue(type, out MethodDesc[] slots)) 384MethodDesc targetMethod = methodDictLookup.Method.GetCanonMethodTarget(CanonicalFormKind.Specific); 439Debug.Assert(methodOrType is MethodDesc); 440MethodDesc method = (MethodDesc)methodOrType; 457private HashSet<MethodDesc> _overriddenMethods = new(); 458private HashSet<MethodDesc> _generatedVirtualMethods = new(); 473var vtables = new Dictionary<TypeDesc, List<MethodDesc>>(); 594static List<MethodDesc> BuildVTable(NodeFactory factory, TypeDesc currentType, TypeDesc implType, List<MethodDesc> vtable) 601IReadOnlyList<MethodDesc> slice = factory.VTable(currentType).Slots; 602foreach (MethodDesc decl in slice) 614if (!vtables.TryGetValue(baseType, out List<MethodDesc> baseVtable)) 615vtables.Add(baseType, baseVtable = BuildVTable(factory, baseType, baseType, new List<MethodDesc>())); 617if (!vtables.TryGetValue(type, out List<MethodDesc> vtable)) 618vtables.Add(type, vtable = BuildVTable(factory, type, type, new List<MethodDesc>())); 707public override bool IsEffectivelySealed(MethodDesc method) 722MethodDesc canonMethod = method.GetCanonMethodTarget(CanonicalFormKind.Specific); 730protected override MethodDesc ResolveVirtualMethod(MethodDesc declMethod, DefType implType, out CORINFO_DEVIRTUALIZATION_DETAIL devirtualizationDetail) 833public bool CanInline(MethodDesc caller, MethodDesc callee) 854private readonly Dictionary<MethodDesc, TypeSystemException> _importationErrors = new Dictionary<MethodDesc, TypeSystemException>(); 868public override TypeSystemException GetCompilationError(MethodDesc method)
Compiler\InteropStubManager.cs (3)
28public abstract void AddDependenciesDueToMethodCodePresence(IDependencySink dependencies, NodeFactory factory, MethodDesc method); 38public abstract void AddMarshalAPIsGenericDependencies(IDependencySink dependencies, NodeFactory factory, MethodDesc method); 48public LinkageMetadata GetLinkageMetadata(MethodDesc method)
Compiler\IRootingServiceProvider.cs (3)
14void AddCompilationRoot(MethodDesc method, string reason) => AddCompilationRoot(method, reason, default); 15void AddCompilationRoot(MethodDesc method, string reason, Utf8String exportName, bool exportHidden = false); 18void AddReflectionRoot(MethodDesc method, string reason);
Compiler\JitHelper.cs (1)
17public static MethodDesc GetEntryPoint(TypeSystemContext context, ReadyToRunHelper id)
Compiler\LazyGenericsPolicy.cs (3)
10public abstract bool UsesLazyGenerics(MethodDesc method); 17public sealed override bool UsesLazyGenerics(MethodDesc method) 44public sealed override bool UsesLazyGenerics(MethodDesc method) => false;
Compiler\LibraryInitializers.cs (4)
22private List<MethodDesc> _libraryInitializerMethods; 33public IReadOnlyCollection<MethodDesc> LibraryInitializerMethods 48_libraryInitializerMethods = new List<MethodDesc>(); 56MethodDesc initializerMethod = containingType.GetMethod(LibraryInitializerMethodName, null);
Compiler\LibraryRootProvider.cs (2)
52foreach (MethodDesc method in type.GetAllMethodsAndAsyncVariants()) 84public static void CheckCanGenerateMethod(MethodDesc method)
Compiler\Logger.cs (2)
254if (originMember is MethodDesc method && 267MethodDesc owningMethod;
Compiler\Logging\DocumentationSignatureParser.cs (4)
357typeParameterContext is MethodDesc || 367if (typeParameterContext is MethodDesc methodContext) 381var typeContext = typeParameterContext is MethodDesc methodContext 585foreach (var method in type.GetMethods())
Compiler\Logging\MessageContainer.cs (3)
133if (origin.MemberDefinition is MethodDesc originMethod && originMethod.GetTypicalMethodDefinition() is not EcmaMethod) 155if (origin.MemberDefinition is MethodDesc originMethod && originMethod.GetTypicalMethodDefinition() is not EcmaMethod) 175MethodDesc method => method.OwningType,
Compiler\Logging\UnconditionalSuppressMessageAttributeState.cs (3)
81while (_compilerGeneratedState.TryGetOwningMethodForCompilerGeneratedMember(provider, out MethodDesc? owningMethod)) 123if (warningOriginMember is MethodDesc method) 310case MethodDesc method:
Compiler\MainMethodRootProvider.cs (3)
26private readonly IReadOnlyCollection<MethodDesc> _libraryInitializers; 29public MainMethodRootProvider(EcmaModule module, IReadOnlyCollection<MethodDesc> libraryInitializers, bool generateLibraryAndModuleInitializers, string entryPointName = null) 39MethodDesc mainMethod = _module.EntryPoint;
Compiler\MetadataBlockingPolicy.cs (2)
24public abstract bool IsBlocked(MethodDesc method); 40public override bool IsBlocked(MethodDesc method)
Compiler\MetadataManager.cs (65)
56private List<MetadataMapping<MethodDesc>> _methodMappings; 57private Dictionary<MethodDesc, int> _methodHandleMap; 75private readonly SortedSet<MethodDesc> _reflectableMethods = new SortedSet<MethodDesc>(TypeSystemComparer.Instance); 86private readonly SortedSet<MethodDesc> _genericMethodHashtableEntries = new SortedSet<MethodDesc>(TypeSystemComparer.Instance); 87private readonly SortedSet<MethodDesc> _exactMethodHashtableEntries = new SortedSet<MethodDesc>(TypeSystemComparer.Instance); 390public virtual bool IsReflectionInvokable(MethodDesc method) 395public static bool IsMethodSupportedInReflectionInvoke(MethodDesc method) 440public bool HasReflectionInvokeStub(MethodDesc method) 451public bool ShouldMethodBeInInvokeMap(MethodDesc method) 464public void GetDependenciesDueToGenericDictionary(DependencySink dependencies, NodeFactory factory, MethodDesc method) 472public void AddConditionalDependenciesDueToGenericDictionary(DependencySink dependencies, NodeFactory factory, MethodDesc method) 485public void GetDependenciesDueToReflectability(IDependencySink dependencies, NodeFactory factory, MethodDesc method) 541MethodDesc method, 547protected virtual void GetMetadataDependenciesDueToReflectability(IDependencySink dependencies, NodeFactory factory, MethodDesc method) 554public virtual void AddNativeLayoutMetadataDependencies(DependencySink dependencies, NodeFactory factory, MethodDesc method) 605public virtual void GetDependenciesDueToLdToken(DependencySink dependencies, NodeFactory factory, MethodDesc method) 620public void GetDependenciesDueToDelegateCreation(DependencySink dependencies, NodeFactory factory, TypeDesc delegateType, MethodDesc target) 631public virtual void GetConditionalDependenciesDueToDelegateCreation(DependencySink dependencies, NodeFactory factory, TypeDesc delegateType, MethodDesc target) 640public virtual void GetDependenciesForOverridingMethod(DependencySink dependencies, NodeFactory factory, MethodDesc decl, MethodDesc impl) 653public void GetDependenciesDueToMethodCodePresence(IDependencySink dependencies, NodeFactory factory, MethodDesc method, MethodIL methodIL) 660public virtual void GetConditionalDependenciesDueToMethodCodePresence(IConditionalDependencySink dependencies, NodeFactory factory, MethodDesc method) 666protected virtual void GetDependenciesDueToMethodCodePresenceInternal(IDependencySink dependencies, NodeFactory factory, MethodDesc method, MethodIL methodIL) 675public bool HasReflectionInvokeStubForInvokableMethod(MethodDesc method) 685public bool WillUseMetadataTokenToReferenceMethod(MethodDesc method) 702public MethodDesc GetReflectionInvokeStub(MethodDesc method) 725out List<MetadataMapping<MethodDesc>> methodMappings, 726out Dictionary<MethodDesc, int> methodMetadataMappings, 737out List<MetadataMapping<MethodDesc>> methodMappings, 738out Dictionary<MethodDesc, int> methodMetadataMappings, 751var methodsWithMappings = new HashSet<MethodDesc>(); 752foreach (var method in GetReflectableMethods()) 762var methodBodies = new HashSet<MethodDesc>(); 765MethodDesc method = methodBody.Method; 825methodMappings = new List<MetadataMapping<MethodDesc>>(); 826methodMetadataMappings = new Dictionary<MethodDesc, int>(); 852foreach (var method in GetReflectableMethods()) 854MethodDesc typicalMethod = method.GetTypicalMethodDefinition(); 885methodMappings.Add(new MetadataMapping<MethodDesc>(method, writer.GetRecordHandle(record))); 935protected StackTraceRecordData CreateStackTraceRecord(Metadata.MetadataTransform transform, MethodDesc method, StackTraceRecordFlags flags) 938MethodDesc methodToGenerateMetadataFor = method.GetTypicalMethodDefinition(); 1004public IEnumerable<MetadataMapping<MethodDesc>> GetMethodMapping(NodeFactory factory) 1010public int GetMetadataHandleForMethod(NodeFactory factory, MethodDesc method) 1095public IEnumerable<MethodDesc> GetReflectableMethods() 1115public IEnumerable<MethodDesc> GetGenericMethodHashtableEntries() 1120public IEnumerable<MethodDesc> GetExactMethodHashtableEntries() 1222public bool IsReflectionBlocked(MethodDesc method) 1224MethodDesc methodDefinition = method.GetMethodDefinition(); 1230MethodDesc typicalMethodDefinition = methodDefinition.GetTypicalMethodDefinition(); 1257public bool CanGenerateMetadata(MethodDesc method) 1276protected abstract MetadataCategory GetMetadataCategory(MethodDesc method); 1292public virtual void GetDependenciesDueToAccess(IDependencySink dependencies, NodeFactory factory, MethodIL methodIL, MethodDesc calledMethod) 1300public virtual DependencyList GetDependenciesForCustomAttribute(NodeFactory factory, MethodDesc attributeCtor, CustomAttributeValue decodedValue, TypeSystemEntity parent) 1305public virtual void NoteOverridingMethod(MethodDesc baseMethod, MethodDesc overridingMethod, TypeSystemEntity origin = null) 1321public readonly MethodDesc Method; 1328public StackTraceMapping(MethodDesc method, int owningTypeHandle, int methodSignatureHandle, int methodNameHandle, int methodInstantiationArgumentCollectionHandle, StackTraceRecordFlags flags) 1335public readonly MethodDesc Method; 1339public ReflectionStackTraceMapping(MethodDesc method, int owningTypeHandle, int methodHandle) 1353public readonly MethodDesc Method; 1360public StackTraceRecordData(MethodDesc method, MetadataRecord owningType, MetadataRecord methodSignature, MetadataRecord methodName, MetadataRecord methodInstantiationArgumentCollection, StackTraceRecordFlags flags)
Compiler\MethodBodyDeduplicator.cs (1)
26public bool CanFold(MethodDesc method)
Compiler\MethodImportationErrorProvider.cs (1)
17public virtual TypeSystemException GetCompilationError(MethodDesc method) => null;
Compiler\MstatObjectDumper.cs (6)
40private List<(MethodDesc Method, string MangledName, int Size, int GcInfoSize)> _methods = new(); 41private Dictionary<MethodDesc, int> _methodEhInfo = new(); 43private Dictionary<MethodDesc, List<(MethodDesc Method, int MangledName)>> _deduplicatedBodies = new(); 114if (!_deduplicatedBodies.TryGetValue(originalBody.Method, out List<(MethodDesc, int)> targetBodies)) 115_deduplicatedBodies.Add(originalBody.Method, targetBodies = new List<(MethodDesc, int)>());
Compiler\MultiFileCompilationModuleGroup.cs (5)
45public sealed override bool ContainsMethodBody(MethodDesc method, bool unboxingStub) 53public sealed override bool ContainsMethodDictionary(MethodDesc method) 59public sealed override bool ImportsMethod(MethodDesc method, bool unboxingStub) 109public override bool AllowInstanceMethodOptimization(MethodDesc method) 122public override bool AllowVirtualMethodOnAbstractTypeOptimization(MethodDesc method)
Compiler\NativeLibraryInitializerRootProvider.cs (2)
23private IReadOnlyCollection<MethodDesc> _libraryInitializers; 25public NativeLibraryInitializerRootProvider(ModuleDesc module, IReadOnlyCollection<MethodDesc> libraryInitializers)
Compiler\NodeMangler.cs (2)
29public abstract Utf8String MethodGenericDictionary(MethodDesc method); 30public abstract Utf8String ExternMethod(Utf8String unmangledName, MethodDesc method);
Compiler\NoMetadataBlockingPolicy.cs (1)
45public override bool IsBlocked(MethodDesc method)
Compiler\ReachabilityInstrumentationFilter.cs (1)
54public override MethodIL GetMethodIL(MethodDesc method)
Compiler\ReachabilityInstrumentationProvider.cs (5)
39public static MethodDesc CreateInitializerMethod(CompilerTypeSystemContext context) => new InitializeMethod(context); 46public override MethodIL GetMethodIL(MethodDesc method) 84public override MethodDesc OwningMethod => _originalMethodIL.OwningMethod; 256MethodDesc registerMethod = Context.GetHelperEntryPoint("ReachabilityInstrumentationSupport"u8, "Register"u8); 263protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
Compiler\RootingHelpers.cs (7)
61foreach (var method in type.ConvertToCanonForm(CanonicalFormKind.Specific).GetMethods()) 84public static bool TryRootMethod(IRootingServiceProvider rootProvider, MethodDesc method, string reason) 97public static void RootMethod(IRootingServiceProvider rootProvider, MethodDesc method, string reason) 140MethodDesc method, 155MethodDesc method, 172MethodDesc method, 176MethodDesc typicalMethod = method.GetTypicalMethodDefinition();
Compiler\RootingServiceProvider.cs (3)
27public void AddCompilationRoot(MethodDesc method, string reason, Utf8String exportName, bool exportHidden = false) 29MethodDesc canonMethod = method.GetCanonMethodTarget(CanonicalFormKind.Specific); 61public void AddReflectionRoot(MethodDesc method, string reason)
Compiler\SingleFileCompilationModuleGroup.cs (5)
22public override bool ContainsMethodBody(MethodDesc method, bool unboxingStub) 27public override bool ContainsMethodDictionary(MethodDesc method) 33public override bool ImportsMethod(MethodDesc method, bool unboxingStub) 66public override bool AllowInstanceMethodOptimization(MethodDesc method) 71public override bool AllowVirtualMethodOnAbstractTypeOptimization(MethodDesc method)
Compiler\SingleMethodCompilationModuleGroup.cs (7)
16private MethodDesc _method; 18public SingleMethodCompilationModuleGroup(MethodDesc method) 31public override bool ContainsMethodBody(MethodDesc method, bool unboxingStub) 36public sealed override bool ContainsMethodDictionary(MethodDesc method) 52public override bool ImportsMethod(MethodDesc method, bool unboxingStub) 77public override bool AllowInstanceMethodOptimization(MethodDesc method) 82public override bool AllowVirtualMethodOnAbstractTypeOptimization(MethodDesc method)
Compiler\StackTraceEmissionPolicy.cs (3)
14public abstract MethodStackTraceVisibilityFlags GetMethodVisibility(MethodDesc method); 19public override MethodStackTraceVisibilityFlags GetMethodVisibility(MethodDesc method) 38public override MethodStackTraceVisibilityFlags GetMethodVisibility(MethodDesc method)
Compiler\SubstitutedILProvider.cs (10)
39public override MethodIL GetMethodIL(MethodDesc method) 677private bool TryGetMethodConstantValue(MethodDesc method, out int constant, int level = 0) 742MethodDesc callee = (MethodDesc)methodIL.GetObject(reader.ReadILToken()); 810MethodDesc method = (MethodDesc)methodIL.GetObject(reader.ReadILToken()); 1138MethodDesc method = (MethodDesc)methodIL.GetObject(reader.ReadILToken()); 1149private bool TryGetCharacteristicValue(MethodDesc maybeCharacteristicMethod, out bool value) 1179public override MethodDesc OwningMethod => _wrappedMethodIL.OwningMethod;
Compiler\SubstitutionProvider.cs (3)
30public BodySubstitution GetSubstitution(MethodDesc method) 123public bool HasSubstitutedBody(MethodDesc method) 178public IReadOnlyDictionary<MethodDesc, BodySubstitution> BodySubstitutions { get; }
Compiler\TypePreinit.cs (33)
118private bool TryGetNestedPreinitResult(MethodDesc callingMethod, MetadataType type, Stack<MethodDesc> recursionProtect, ref int instructionCounter, out NestedPreinitResult result) 123recursionProtect ??= new Stack<MethodDesc>(); 169private Status TryScanMethod(MethodDesc method, Value[] parameters, Stack<MethodDesc> recursionProtect, ref int instructionCounter, out Value returnValue) 181private Status TryScanMethod(MethodIL methodIL, Value[] parameters, Stack<MethodDesc> recursionProtect, ref int instructionCounter, out Value returnValue) 490MethodDesc method = (MethodDesc)methodIL.GetObject(reader.ReadILToken()); 498MethodDesc directMethod = constrainedType.GetClosestDefType().TryResolveConstraintMethodApprox(method.OwningType, method, out bool forceUseRuntimeLookup, ref staticResolution); 544recursionProtect ??= new Stack<MethodDesc>(); 562MethodDesc ctor = (MethodDesc)methodIL.GetObject(reader.ReadILToken()); 635MethodDesc pointedMethod = methodPointer.PointedToMethod; 700recursionProtect ??= new Stack<MethodDesc>(); 1038var method = methodIL.GetObject(reader.ReadILToken()) as MethodDesc; 1890private bool TryHandleIntrinsicCall(MethodDesc method, Value[] parameters, out Value retVal) 1979private static TypeDesc GetArgType(MethodDesc method, int index) 2602private readonly MethodDesc[] _methods; 2606: this(type, new MethodDesc[GetFieldCount(type)], fieldThatOwnsMemory) 2610private VTableLikeStructValue(MetadataType type, MethodDesc[] methods, FieldDesc fieldThatOwnsMemory) 2663foreach (MethodDesc method in _methods) 2680return new VTableLikeStructValue(_type, (MethodDesc[])_methods.Clone(), fieldThatOwnsMemory: null); 2749MethodDesc[] slots = new MethodDesc[GetFieldCount(mdType)]; 2783MethodDesc method = _parent._methods[GetFieldIndex(field)]; 3051public MethodDesc PointedToMethod { get; } 3053public MethodPointerValue(MethodDesc pointedToMethod) 3262private readonly MethodDesc _methodPointed; 3265public DelegateInstance(TypeDesc delegateType, MethodDesc methodPointed, ReferenceTypeValue firstParameter, AllocationSite allocationSite) 3287MethodDesc targetMethod = creationInfo.PossiblyUnresolvedTargetMethod.GetCanonMethodTarget(CanonicalFormKind.Specific); 3735public static Status Fail(MethodDesc method, ILOpcode opcode, string detail = null) 3740public static Status Fail(MethodDesc method, string detail)
Compiler\UnixNodeMangler.cs (2)
58public sealed override Utf8String MethodGenericDictionary(MethodDesc method) 63public sealed override Utf8String ExternMethod(Utf8String unmangledName, MethodDesc method)
Compiler\UsageBasedInteropStubManager.cs (2)
32public override void AddDependenciesDueToMethodCodePresence(IDependencySink dependencies, NodeFactory factory, MethodDesc method) 56public override void AddMarshalAPIsGenericDependencies(IDependencySink dependencies, NodeFactory factory, MethodDesc method)
Compiler\UsageBasedMetadataManager.cs (34)
58private readonly List<MethodDesc> _methodsWithMetadata = new List<MethodDesc>(); 196protected override MetadataCategory GetMetadataCategory(MethodDesc method) 233out List<MetadataMapping<MethodDesc>> methodMappings, 234out Dictionary<MethodDesc, int> methodMetadataMappings, 244protected override void GetMetadataDependenciesDueToReflectability(IDependencySink dependencies, NodeFactory factory, MethodDesc method) 249public override void AddNativeLayoutMetadataDependencies(DependencySink dependencies, NodeFactory factory, MethodDesc method) 270if (module.GetGlobalModuleType().GetStaticConstructor() is MethodDesc moduleCctor) 306MethodDesc invokeMethod = type.GetMethod("Invoke"u8, null); 320MethodDesc defaultConstructor = elementType.GetDefaultConstructor(); 501foreach (MethodDesc method in type.GetMethods()) 511MethodDesc reflectedMethod; 541public override void GetDependenciesDueToLdToken(DependencySink dependencies, NodeFactory factory, MethodDesc method) 546MethodDesc canonicalMethod = method.GetCanonMethodTarget(CanonicalFormKind.Specific); 559public override void GetConditionalDependenciesDueToDelegateCreation(DependencySink dependencies, NodeFactory factory, TypeDesc delegateType, MethodDesc target) 610public override void GetDependenciesForOverridingMethod(DependencySink dependencies, NodeFactory factory, MethodDesc decl, MethodDesc impl) 627protected override void GetDependenciesDueToMethodCodePresenceInternal(IDependencySink dependencies, NodeFactory factory, MethodDesc method, MethodIL methodIL) 678public override void GetConditionalDependenciesDueToMethodCodePresence(IConditionalDependencySink dependencies, NodeFactory factory, MethodDesc method) 680MethodDesc typicalMethod = method.GetTypicalMethodDefinition(); 695MethodDesc method, 773public override void GetDependenciesDueToAccess(IDependencySink dependencies, NodeFactory factory, MethodIL methodIL, MethodDesc calledMethod) 782public override DependencyList GetDependenciesForCustomAttribute(NodeFactory factory, MethodDesc attributeCtor, CustomAttributeValue decodedValue, TypeSystemEntity parent) 805public override void NoteOverridingMethod(MethodDesc baseMethod, MethodDesc overridingMethod, TypeSystemEntity origin) 838public static bool HasMismatchingAttributes(MethodDesc baseMethod, MethodDesc overridingMethod, string requiresAttributeName) 873var reflectableMethods = ReflectableEntityBuilder<MethodDesc>.Create(); 874foreach (var methodWithMetadata in _methodsWithMetadata) 879foreach (var method in GetReflectableMethods()) 890MethodDesc typicalMethod = method.GetTypicalMethodDefinition(); 931if (FlowAnnotations.CompilerGeneratedState.TryGetUserMethodForCompilerGeneratedMember(methodILDefinition.OwningMethod, out var userMethod)) 1019public bool GeneratesMetadata(MethodDesc methodDef) 1059public bool IsBlocked(MethodDesc methodDef)
Compiler\UserDefinedTypeDescriptor.cs (6)
183public uint GetMethodTypeIndex(MethodDesc method) 224public uint GetMethodFunctionIdTypeIndex(MethodDesc method) 872private Dictionary<MethodDesc, uint> _methodIndices = new Dictionary<MethodDesc, uint>(); 873private Dictionary<MethodDesc, uint> _methodIdIndices = new Dictionary<MethodDesc, uint>();
Compiler\VirtualMethodCallHelper.cs (6)
13public static int GetDefaultInterfaceMethodSlot(NodeFactory factory, MethodDesc method, TypeDesc implType, DefType interfaceOnDefinition, bool countDictionarySlots = true) 35public static int GetVirtualMethodSlot(NodeFactory factory, MethodDesc method, TypeDesc implType, bool countDictionarySlots = true) 70IReadOnlyList<MethodDesc> virtualSlots = factory.VTable(owningType).Slots; 110IReadOnlyList<MethodDesc> virtualSlots = factory.VTable(implType).Slots; 138IReadOnlyList<MethodDesc> baseVirtualSlots = factory.VTable(baseType).Slots; 139foreach (var vtableMethod in baseVirtualSlots)
Compiler\WindowsNodeMangler.cs (2)
81public sealed override Utf8String MethodGenericDictionary(MethodDesc method) 86public sealed override Utf8String ExternMethod(Utf8String unmangledName, MethodDesc method)
IL\ILImporter.Scanner.cs (53)
34private readonly MethodDesc _canonMethod; 84public ILImporter(ILScanner compilation, MethodDesc method, MethodIL methodIL = null) 113MethodDesc sharedMethod = method.GetSharedRuntimeFormMethodTarget(); 146MethodDesc method = _methodIL.OwningMethod; 168MethodDesc method = _methodIL.OwningMethod; 221private ISymbolNode GetGenericLookupHelper(ReadyToRunHelperId helperId, MethodDesc method) 333private IMethodNode GetMethodEntrypoint(MethodDesc method) 392|| !IsTaskConfigureAwait((MethodDesc)_methodIL.GetObject(reader.ReadILToken())) 404&& IsAsyncHelpersAwait((MethodDesc)_methodIL.GetObject(reader.ReadILToken())); 492if (!IsValueTaskAsTask((MethodDesc)_methodIL.GetObject(callToken))) 512MethodDesc ctorMethod = (MethodDesc)_methodIL.GetObject(ctorToken); 546var runtimeDeterminedMethod = (MethodDesc)_methodIL.GetObject(token); 547var method = (MethodDesc)_canonMethodIL.GetObject(token); 578MethodDesc asyncVariantMethod = _factory.TypeSystemContext.GetAsyncVariantMethod(method); 579MethodDesc asyncVariantRuntimeDeterminedMethod = _factory.TypeSystemContext.GetAsyncVariantMethod(runtimeDeterminedMethod); 587private void ImportCall(ILOpcode opcode, MethodDesc method, MethodDesc runtimeDeterminedMethod) 669MethodDesc ctor = Compilation.GetConstructorForCreateInstanceIntrinsic(type); 731MethodDesc methodAfterConstraintResolution = method; 756MethodDesc directMethod = constrained.GetClosestDefType().TryResolveConstraintMethodApprox(method.OwningType, method, out forceUseRuntimeLookup, ref staticResolution); 786MethodDesc targetMethod = methodAfterConstraintResolution; 834MethodDesc targetForDelegate = !resolvedConstraint || forceUseRuntimeLookup ? runtimeDeterminedMethod : targetMethod; 856MethodDesc targetOfLookup; 902MethodDesc concreteMethod = targetMethod; 1010MethodDesc methodToLookup = _compilation.GetTargetOfGenericVirtualMethodCall(runtimeDeterminedMethod); 1040MethodDesc slotDefiningMethod = targetMethod.IsNewSlot ? 1053var ctorMethod = (MethodDesc)_methodIL.GetObject(ctorToken); 1106private void RegisterDependenciesOnAwaitAwaiterInContinuation(MethodDesc runtimeDeterminedMethod, bool isUnsafe, string reason) 1131MethodDesc runtimeDeterminedResult = asyncHelpers 1135MethodDesc targetMethod = runtimeDeterminedResult.GetCanonMethodTarget(CanonicalFormKind.Specific); 1176MethodDesc stub = _compilation.PInvokeILProvider.GetCalliStub( 1229&& _methodIL.GetObject(reader.ReadILToken()) is MethodDesc { IsIntrinsic: true } intrinsicMethod 1364else if (obj is MethodDesc method) 1366_factory.MetadataManager.GetDependenciesDueToAccess(_dependencies, _factory, _methodIL, (MethodDesc)_canonMethodIL.GetObject(token)); 1843private static bool IsTypeGetTypeFromHandle(MethodDesc method) 1857private static bool IsActivatorDefaultConstructorOf(MethodDesc method) 1871private static bool IsActivatorAllocatorOf(MethodDesc method) 1885private static bool IsEETypePtrOf(MethodDesc method) 1899private static bool IsRuntimeHelpersIsReferenceOrContainsReferences(MethodDesc method) 1913private static bool IsMemoryMarshalGetArrayDataReference(MethodDesc method) 1927private static bool IsAsyncHelpersAwait(MethodDesc method) 1943private static bool IsAsyncHelpersAwaitAwaiter(MethodDesc method, out bool isUnsafe) 1967private static bool IsTaskConfigureAwait(MethodDesc method) 1987private static bool IsValueTaskAsTask(MethodDesc method) 2004private static bool IsValueTaskCtor(MethodDesc method) 2047MethodDesc taskReturningMethod = _canonMethod.GetTargetOfAsyncVariant(); 2054MethodDesc runtimeDeterminedCaller = _canonMethod.GetSharedRuntimeFormMethodTarget(); 2057MethodDesc runtimeDeterminedResult; 2076MethodDesc targetMethod = runtimeDeterminedResult.GetCanonMethodTarget(CanonicalFormKind.Specific);
IL\RvaIntrinsicPatternAnalyzer.cs (9)
161MethodDesc constructor = (MethodDesc)methodIL.GetObject(reader.PeekILToken()); 210if (!TryGetCallTarget(opcode, reader, methodIL, out MethodDesc method) 224if (!TryGetCallTarget(opcode, reader, methodIL, out MethodDesc method) 243private static bool TryGetCallTarget(ILOpcode opcode, in ILReader reader, MethodIL methodIL, out MethodDesc method) 246&& methodIL.GetObject(reader.PeekILToken()) is MethodDesc targetMethod) 322private static bool IsRuntimeHelpersInitializeArray(MethodDesc method) 335private static bool IsRuntimeHelpersCreateSpan(MethodDesc method, out TypeDesc elementType) 354private static bool IsRuntimeHelpersIntrinsic(MethodDesc method)
IL\Stubs\PInvokeILProvider.cs (2)
26public override MethodIL GetMethodIL(MethodDesc method) 35public MethodDesc GetCalliStub(MethodSignature signature, ModuleDesc moduleContext)
IL\Stubs\StartupCode\NativeLibraryStartupMethod.cs (4)
20private IReadOnlyCollection<MethodDesc> _libraryInitializers; 22public NativeLibraryStartupMethod(TypeDesc owningType, IReadOnlyCollection<MethodDesc> libraryInitializers) 68foreach (MethodDesc method in _libraryInitializers) 77MethodDesc runModuleInitializers = startup?.GetMethod("RunModuleInitializers"u8, null);
IL\Stubs\StartupCode\NativeLibraryStartupMethod.Sorting.cs (1)
14protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
IL\Stubs\StartupCode\StartupCodeMainMethod.cs (12)
22private IReadOnlyCollection<MethodDesc> _libraryInitializers; 25public StartupCodeMainMethod(TypeDesc owningType, MethodDesc mainMethod, IReadOnlyCollection<MethodDesc> libraryInitializers, bool generateLibraryAndModuleInitializers) 76foreach (MethodDesc method in _libraryInitializers) 88MethodDesc initArgs = startup?.GetMethod(initArgsName, null); 97MethodDesc initEntryAssembly = startup?.GetMethod("InitializeEntryAssembly"u8, null); 106MethodDesc initApartmentState = startup?.GetMethod("InitializeApartmentState"u8, null); 123MethodDesc runModuleInitializers = startup?.GetMethod("RunModuleInitializers"u8, null); 143MethodDesc setLatchedExitCode = startup?.GetMethod("SetLatchedExitCode"u8, null); 144MethodDesc shutdown = startup?.GetMethod("Shutdown"u8, null); 210public MainMethodWrapper(TypeDesc owningType, MethodDesc mainMethod) 216public MethodDesc WrappedMethod
IL\Stubs\StartupCode\StartupCodeMainMethod.Sorting.cs (2)
12protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer) 21protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
IL\TypeEqualityPatternAnalyzer.cs (4)
147=> opcode == ILOpcode.call && methodIL.GetObject(reader.PeekILToken()) is MethodDesc method 152=> opcode == ILOpcode.call && methodIL.GetObject(reader.PeekILToken()) is MethodDesc method 157=> opcode == ILOpcode.call && methodIL.GetObject(reader.PeekILToken()) is MethodDesc method 162=> opcode is ILOpcode.call or ILOpcode.callvirt && methodIL.GetObject(reader.PeekILToken()) is MethodDesc method
parent\parent\Common\Compiler\AsyncMethodVariant.cs (21)
44public override MethodDesc GetCanonMethodTarget(CanonicalFormKind kind) 49public override MethodDesc GetMethodDefinition() 54public override MethodDesc GetTypicalMethodDefinition() 59public override MethodDesc InstantiateSignature(Instantiation typeInstantiation, Instantiation methodInstantiation) 68protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer) 110public override MethodDesc GetCanonMethodTarget(CanonicalFormKind kind) 115public override MethodDesc GetMethodDefinition() 120public override MethodDesc GetTypicalMethodDefinition() 125public override MethodDesc InstantiateSignature(Instantiation typeInstantiation, Instantiation methodInstantiation) 134protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer) 143public static bool IsAsyncVariant(this MethodDesc method) 148public static bool IsReturnDroppingAsyncThunk(this MethodDesc method) 160public static bool IsAsyncThunk(this MethodDesc method) 169public static bool IsCompilerGeneratedILBodyForAsync(this MethodDesc method) 174public static bool RequiresSaveRestoreOfAsyncContexts(this MethodDesc method) 179public static MethodDesc GetAsyncVariant(this MethodDesc method) 185public static MethodDesc GetTargetOfAsyncVariant(this MethodDesc method) 191public static MethodDesc GetTargetOfReturnDroppingAsyncThunk(this MethodDesc method)
parent\parent\Common\Compiler\AsyncMethodVariant.Mangling.cs (2)
13MethodDesc IPrefixMangledMethod.BaseMethod => _wrappedMethod; 20MethodDesc IPrefixMangledMethod.BaseMethod => _asyncVariant.Target;
parent\parent\Common\Compiler\CachingVirtualMethodAlgorithm.cs (19)
15private readonly ConcurrentDictionary<TypeDesc, (MethodDesc Slot, MethodDesc Implementation)[]> _vtableCache 16= new ConcurrentDictionary<TypeDesc, (MethodDesc Slot, MethodDesc Implementation)[]>(); 18private readonly Func<TypeDesc, (MethodDesc Slot, MethodDesc Implementation)[]> _vtableCreator; 23private (MethodDesc Slot, MethodDesc Implementation)[] ComputeVtable(TypeDesc type) 28var result = new ArrayBuilder<(MethodDesc Slot, MethodDesc Implementation)>(3 /* At least Equals/GetHashCode/ToString */); 30foreach (MethodDesc slotDecl in base.ComputeAllVirtualSlots(type)) 38public override IEnumerable<MethodDesc> ComputeAllVirtualSlots(TypeDesc type) 46static IEnumerable<MethodDesc> GetCachedSlots(CachingVirtualMethodAlgorithm thisObj, TypeDesc type) 48foreach ((MethodDesc slot, _) in thisObj._vtableCache.GetOrAdd(type.GetTypeDefinition(), thisObj._vtableCreator)) 55public override MethodDesc FindVirtualFunctionTargetMethodOnObjectType(MethodDesc targetMethod, TypeDesc objectType) 58MethodDesc targetMethodDefinition = targetMethod.GetMethodDefinition(); 60MethodDesc slotDefiningMethod = targetMethodDefinition; 71MethodDesc result = kvp.Implementation;
parent\parent\Common\Compiler\CodeGenerationFailedException.cs (3)
14public MethodDesc Method { get; } 16public CodeGenerationFailedException(MethodDesc method) 21public CodeGenerationFailedException(MethodDesc method, Exception inner)
parent\parent\Common\Compiler\CompilationModuleGroup.cs (3)
17public abstract bool ContainsMethodBody(MethodDesc method, bool unboxingStub); 23public virtual bool CanInline(MethodDesc callerMethod, MethodDesc calleeMethod) => true;
parent\parent\Common\Compiler\CompilerTypeSystemContext.Async.cs (47)
16public static IEnumerable<MethodDesc> GetAllMethodsAndAsyncVariants(this TypeDesc type) 31private MethodDesc DecomposeAsyncVariant(MethodDesc method, out bool isAsyncVariant) 37private MethodDesc WrapAsAsyncVariant(MethodDesc originalMethod, MethodDesc resolvedMethod) 42MethodDesc asyncVariant = _context.GetAsyncVariantMethod(resolvedMethod); 55public override MethodDesc FindVirtualFunctionTargetMethodOnObjectType(MethodDesc targetMethod, TypeDesc objectType) 58MethodDesc result = base.FindVirtualFunctionTargetMethodOnObjectType(targetMethod, objectType); 65public override DefaultInterfaceMethodResolution ResolveInterfaceMethodToDefaultImplementationOnType(MethodDesc interfaceMethod, TypeDesc currentType, out MethodDesc impl) 75public override MethodDesc ResolveInterfaceMethodToStaticVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType) 78MethodDesc result = base.ResolveInterfaceMethodToStaticVirtualMethodOnType(interfaceMethod, currentType); 84public override MethodDesc ResolveInterfaceMethodToVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType) 87MethodDesc result = base.ResolveInterfaceMethodToVirtualMethodOnType(interfaceMethod, currentType); 93public override DefaultInterfaceMethodResolution ResolveVariantInterfaceMethodToDefaultImplementationOnType(MethodDesc interfaceMethod, TypeDesc currentType, out MethodDesc impl) 102public override MethodDesc ResolveVariantInterfaceMethodToStaticVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType) 105MethodDesc result = base.ResolveVariantInterfaceMethodToStaticVirtualMethodOnType(interfaceMethod, currentType); 111public override MethodDesc ResolveVariantInterfaceMethodToVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType) 114MethodDesc result = base.ResolveVariantInterfaceMethodToVirtualMethodOnType(interfaceMethod, currentType); 121public override IEnumerable<MethodDesc> ComputeAllVirtualSlots(TypeDesc type) 127internal static IEnumerable<MethodDesc> WithAsyncVariants(CompilerTypeSystemContext context, IEnumerable<MethodDesc> methods) 129foreach (MethodDesc method in methods) 172public MethodDesc GetTargetOfAsyncVariantMethod(MethodDesc asyncVariantMethod) 175MethodDesc result = asyncMethodVariantDefinition.Target; 191public MethodDesc GetAsyncVariantMethod(MethodDesc taskReturningMethod) 194MethodDesc taskReturningMethodDefinition = taskReturningMethod.GetTypicalMethodDefinition(); 195MethodDesc result = _asyncVariantHashtable.GetOrCreateValue((EcmaMethod)taskReturningMethodDefinition); 210public MethodDesc GetTargetOfReturnDroppingThunk(MethodDesc returnDroppingThunk) 214MethodDesc result = returnDroppingThunkDefinition.AsyncVariantTarget; 241public MethodDesc GetReturnDroppingAsyncVariantMethod(MethodDesc asyncVariantMethod) 246MethodDesc typicalMethodDefinition = asyncVariantMethod.GetTypicalMethodDefinition(); 247MethodDesc result = _returnDroppingHashtable.GetOrCreateValue((AsyncMethodVariant)typicalMethodDefinition); 273public AsyncResumptionStub GetAsyncResumptionStub(MethodDesc targetMethod, TypeDesc owningType) 280public readonly MethodDesc TargetMethod; 283public AsyncResumptionStubKey(MethodDesc targetMethod, TypeDesc owningType)
parent\parent\Common\Compiler\CompilerTypeSystemContext.BoxedTypes.cs (30)
54public MethodDesc GetSpecialUnboxingThunk(MethodDesc targetMethod, ModuleDesc ownerModuleOfThunk) 71var targetMethodDefinition = targetMethod.GetTypicalMethodDefinition(); 79MethodDesc thunk = GetMethodForInstantiatedType(thunkDefinition, boxedType); 85public MethodDesc GetUnboxingThunk(MethodDesc targetMethod, ModuleDesc ownerModuleOfThunk) 98var targetMethodDefinition = targetMethod.GetTypicalMethodDefinition(); 103MethodDesc thunk; 160public readonly MethodDesc TargetMethod; 163public UnboxingThunkHashtableKey(MethodDesc targetMethod, BoxedValueType owningType) 328public bool IsSpecialUnboxingThunk(MethodDesc method) 333public bool IsUnboxingThunk(MethodDesc method) 341public MethodDesc GetTargetOfSpecialUnboxingThunk(MethodDesc method) 347public MethodDesc GetTargetOfUnboxingThunk(MethodDesc method) 349MethodDesc typicalMethodTarget = method.GetTypicalMethodDefinition() switch 356MethodDesc methodOnInstantiatedType = typicalMethodTarget; 363MethodDesc instantiatedMethod = methodOnInstantiatedType; 377private MethodDesc _targetMethod; 380public GenericUnboxingThunk(BoxedValueType owningType, MethodDesc targetMethod) 395public MethodDesc TargetMethod => _targetMethod; 397MethodDesc IPrefixMangledMethod.BaseMethod => _targetMethod; 479protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer) 490private MethodDesc _targetMethod; 493public UnboxingThunk(BoxedValueType owningType, MethodDesc targetMethod) 508public MethodDesc TargetMethod => _targetMethod; 510MethodDesc IPrefixMangledMethod.BaseMethod => _targetMethod; 571MethodDesc methodToInstantiate = _targetMethod; 603protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
parent\parent\Common\Compiler\CompilerTypeSystemContext.Validation.cs (2)
206public void EnsureLoadableMethod(MethodDesc method) 212MethodDesc methodDef = method.GetMethodDefinition();
parent\parent\Common\Compiler\Dataflow\DynamicallyAccessedMembersBinder.cs (12)
38foreach (var c in typeDefinition.ApplyIncludeInherited(t => t.GetConstructorsOnType(filter: null, bindingFlags: BindingFlags.NonPublic), withInherited)) 45foreach (var c in typeDefinition.ApplyIncludeInherited(t => t.GetConstructorsOnType(filter: null, bindingFlags: BindingFlags.Public), withInherited)) 51foreach (var c in typeDefinition.GetConstructorsOnType(filter: m => m.IsPublic() && !m.HasMetadataParameters())) 58foreach (var m in typeDefinition.ApplyIncludeInherited(t => t.GetMethodsOnTypeHierarchy(filter: null, bindingFlags: BindingFlags.NonPublic | declaredOnlyFlags), withInherited)) 64foreach (var m in typeDefinition.GetMethodsOnTypeHierarchy(filter: null, bindingFlags: BindingFlags.Public | declaredOnlyFlags)) 140public static IEnumerable<MethodDesc> GetConstructorsOnType(this TypeDesc type, Func<MethodDesc, bool> filter, BindingFlags? bindingFlags = null) 148foreach (var method in type.GetMethods()) 172public static IEnumerable<MethodDesc> GetMethodsOnTypeHierarchy(this TypeDesc type, Func<MethodDesc, bool> filter, BindingFlags? bindingFlags = null) 185foreach (var method in type.GetMethods()) 493foreach (var m in type.GetMethods())
parent\parent\Common\Compiler\Dataflow\EcmaExtensions.cs (8)
20public static bool IsPublic(this MethodDesc method) 32public static bool IsPrivate(this MethodDesc method) 71public static ReferenceKind ParameterReferenceKind(this MethodDesc method, int index) 109MethodDesc method => method.OwningType, 119public static ParameterProxyEnumerable GetMetadataParameters(this MethodDesc method) 128public static int GetMetadataParametersCount(this MethodDesc method) => method.Signature.Length; 133public static bool HasMetadataParameters(this MethodDesc method) => method.GetMetadataParametersCount() != 0; 138public static int GetParametersCount(this MethodDesc method)
parent\parent\Common\Compiler\Dataflow\MethodProxy.cs (4)
16public MethodProxy(MethodDesc method) => Method = method; 18public static implicit operator MethodProxy(MethodDesc method) => new(method); 20public readonly MethodDesc Method; 55MethodDesc methodDef = Method.GetMethodDefinition();
parent\parent\Common\Compiler\Dataflow\TypeExtensions.cs (1)
51public static bool IsDeclaredOnType(this MethodDesc method, string fullTypeName)
parent\parent\Common\Compiler\DependencyAnalysis\ExternSymbolNode.cs (1)
75public ExternFunctionSymbolNode(Utf8String name, MethodDesc method, LinkageMetadata linkageMetadata)
parent\parent\Common\Compiler\DependencyAnalysis\GVMDependenciesNode.cs (9)
28private readonly MethodDesc _method; 30public GVMDependenciesNode(MethodDesc method) 137MethodDesc interfaceMethod = _method.GetMethodDefinition(); 142MethodDesc slotDecl = interfaceMethod.Signature.IsStatic ? 157MethodDesc implementingMethodInstantiation = slotDecl 161MethodDesc canonImpl = implementingMethodInstantiation.GetCanonMethodTarget(CanonicalFormKind.Specific); 228MethodDesc methodToResolve; 240MethodDesc instantiatedTargetMethod = potentialOverrideType.FindVirtualFunctionTargetMethodOnObjectType(methodToResolve) 271private static DependencyNodeCore<NodeFactory> GetVirtualMethodImplNode(NodeFactory factory, MethodDesc method)
parent\parent\Common\Compiler\DependencyAnalysis\IMethodBodyNode.cs (2)
20void AddRuntimeDeterminedStaticDependencies(DependencySink sink, NodeFactory factory, MethodDesc concreteMethod); 26void AddRuntimeDeterminedConditionalDependencies(DependencySink sink, NodeFactory factory, MethodDesc concreteMethod);
parent\parent\Common\Compiler\DependencyAnalysis\IMethodNode.cs (1)
13MethodDesc Method { get; }
parent\parent\Common\Compiler\DependencyAnalysis\MethodReadOnlyDataNode.cs (2)
13private MethodDesc _owningMethod; 16public MethodReadOnlyDataNode(MethodDesc owningMethod)
parent\parent\Common\Compiler\DependencyAnalysis\MethodReadWriteDataNode.cs (2)
13private MethodDesc _owningMethod; 16public MethodReadWriteDataNode(MethodDesc owningMethod)
parent\parent\Common\Compiler\DependencyAnalysis\ShadowConcreteMethodNode.cs (1)
21public ShadowConcreteMethodNode(MethodDesc method, IMethodBodyNode canonicalMethod)
parent\parent\Common\Compiler\DependencyAnalysis\ShadowMethodNode.cs (2)
32public MethodDesc Method { get; } 45public ShadowMethodNode(MethodDesc method, IMethodBodyNode canonicalMethod)
parent\parent\Common\Compiler\DependencyAnalysis\ShadowNonConcreteMethodNode.cs (1)
21public ShadowNonConcreteMethodNode(MethodDesc method, IMethodBodyNode canonicalMethod)
parent\parent\Common\Compiler\DependencyAnalysis\VirtualMethodUseNode.cs (4)
24private readonly MethodDesc _decl; 26public MethodDesc Method => _decl; 28public VirtualMethodUseNode(MethodDesc decl) 65MethodDesc canonDecl = _decl.GetCanonMethodTarget(CanonicalFormKind.Specific);
parent\parent\Common\Compiler\DevirtualizationManager.cs (11)
42public virtual bool IsEffectivelySealed(MethodDesc method) 56public MethodDesc ResolveVirtualMethod(MethodDesc declMethod, TypeDesc implType, out CORINFO_DEVIRTUALIZATION_DETAIL devirtualizationDetail) 65protected virtual MethodDesc ResolveVirtualMethod(MethodDesc declMethod, DefType implType, out CORINFO_DEVIRTUALIZATION_DETAIL devirtualizationDetail) 69MethodDesc originalDeclMethod = declMethod; 70MethodDesc impl; 127MethodDesc defaultInterfaceDispatchDeclMethod = null; 144MethodDesc dimMethod; 211MethodDesc slotDefiningMethodImpl = MetadataVirtualMethodAlgorithm.FindSlotDefiningMethodForVirtualMethod(impl.GetMethodDefinition()); 212MethodDesc slotDefiningMethodDecl = MetadataVirtualMethodAlgorithm.FindSlotDefiningMethodForVirtualMethod(declMethod);
parent\parent\Common\Compiler\DisplayNameHelpers.cs (4)
18MethodDesc method => method.GetDisplayName(), 29public static string GetDisplayName(this MethodDesc method) 43MethodDesc typicalMethod = method.GetTypicalMethodDefinition(); 51MethodDesc typicalMethod = method.GetTypicalMethodDefinition();
parent\parent\Common\Compiler\HardwareIntrinsicHelpers.cs (1)
17public static bool IsHardwareIntrinsic(MethodDesc method)
parent\parent\Common\Compiler\INativeFormatTypeReferenceProvider.cs (1)
12internal Vertex EncodeReferenceToMethod(NativeWriter writer, MethodDesc method);
parent\parent\Common\Compiler\MethodExtensions.cs (5)
108public static bool CanMethodBeInSealedVTable(this MethodDesc method, NodeFactory factory) 146public static bool NotCallableWithoutOwningEEType(this MethodDesc method) 175public static bool IsCallEffectivelyDirect(this MethodDesc method) 203public static bool IsAsyncCall(this MethodDesc method) => method.IsAsyncVariant() || method.IsReturnDroppingAsyncThunk() || (method.IsAsync && !method.GetTypicalMethodDefinition().Signature.ReturnsTaskOrValueTask()); 210public static bool SupportsAsyncVersionCodegen(this MethodDesc method) => method.IsAsyncVariant() && method.IsAsyncThunk() && !method.IsReturnDroppingAsyncThunk();
parent\parent\Common\Compiler\NameMangler.cs (1)
32public abstract Utf8String GetMangledMethodName(MethodDesc method);
parent\parent\Common\Compiler\NativeAotNameMangler.cs (10)
467private Dictionary<MethodDesc, Utf8String> _mangledMethodNames = new Dictionary<MethodDesc, Utf8String>(); 468private Dictionary<MethodDesc, Utf8String> _unqualifiedMangledMethodNames = new Dictionary<MethodDesc, Utf8String>(); 470public override Utf8String GetMangledMethodName(MethodDesc method) 493private Utf8String GetUnqualifiedMangledMethodName(MethodDesc method) 546private Utf8String ComputeUnqualifiedMangledMethodName(MethodDesc method) 558foreach (var m in method.OwningType.GetMethods()) 574var methodDefinition = method.GetMethodDefinition(); 598var typicalMethodDefinition = method.GetTypicalMethodDefinition();
parent\parent\Common\Compiler\ObjectWriter\OutputInfoBuilder.cs (1)
236private static string FormatMethodName(MethodDesc method, TypeNameFormatter typeNameFormatter)
parent\parent\Common\Compiler\ProcessLinkerXmlBase.cs (7)
352MethodDesc? method = GetMethod(type, signature); 368foreach (MethodDesc method in type.GetAllMethods()) 385protected virtual MethodDesc? GetMethod(TypeDesc type, string signature) => null; 387protected virtual void ProcessMethod(TypeDesc type, MethodDesc method, XPathNavigator nav, object? customData) { } 530public static string GetMethodSignature(MethodDesc meth, bool includeGenericParameters) 578private readonly MethodDesc? _method; 580public CecilTypeNameFormatter(MethodDesc? method)
parent\parent\Common\Compiler\PseudoDescExtensions.cs (2)
13public static PropertyPseudoDesc GetPropertyForAccessor(this MethodDesc accessor) 33public static EventPseudoDesc GetEventForAccessor(this MethodDesc accessor)
parent\parent\Common\Compiler\SingleMethodRootProvider.cs (2)
13private MethodDesc _method; 15public SingleMethodRootProvider(MethodDesc method)
parent\parent\Common\Compiler\TypeExtensions.cs (22)
43public static bool RequiresInstArg(this MethodDesc method) 53public static bool RequiresInstMethodDescArg(this MethodDesc method) 62public static bool RequiresInstMethodTableArg(this MethodDesc method) 72public static bool AcquiresInstMethodTableFromThis(this MethodDesc method) 84public static bool IsArrayAddressMethod(this MethodDesc method) 94public static bool IsArrayMethod(this MethodDesc method) 133public static bool IsGenericDepthGreaterThan(this MethodDesc method, int depth) 407public static MethodDesc TryResolveConstraintMethodApprox(this TypeDesc constrainedType, TypeDesc interfaceType, MethodDesc interfaceMethod, out bool forceRuntimeLookup) 419public static MethodDesc TryResolveConstraintMethodApprox(this TypeDesc constrainedType, TypeDesc interfaceType, MethodDesc interfaceMethod, out bool forceRuntimeLookup, ref DefaultInterfaceMethodResolution staticResolution) 469MethodDesc staticMethodDef = interfaceMethod.GetMethodDefinition(); 470MethodDesc exactInterfaceMethod = staticMethodDef; 475MethodDesc result = constrainedType.ResolveVariantInterfaceMethodToStaticVirtualMethodOnType(exactInterfaceMethod); 507MethodDesc genInterfaceMethod = interfaceMethod.GetMethodDefinition(); 508MethodDesc method = null; 528MethodDesc potentialInterfaceMethod = genInterfaceMethod; 569MethodDesc exactInterfaceMethod = context.GetMethodForInstantiatedType( 592MethodDesc exactInterfaceMethod = genInterfaceMethod; 603MethodDesc targetMethod = interfaceType.FindMethodOnTypeWithMatchingTypicalMethod(genInterfaceMethod); 758foreach (MethodDesc method in type.GetVirtualMethods()) 788public static bool IsRawPInvoke(this MethodDesc method)
parent\parent\Common\Compiler\TypeMapMetadata.cs (5)
133MethodDesc ThrowingMethodStub { get; } 139MethodDesc ThrowingMethodStub { get; } 168protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer) 346MethodDesc IExternalTypeMap.ThrowingMethodStub => _externalTypeMapExceptionStub; 350MethodDesc IProxyTypeMap.ThrowingMethodStub => _associatedTypeMapExceptionStub;
parent\parent\Common\JitInterface\WasmLowering.cs (2)
601public static WasmSignature GetSignature(MethodDesc method) 616public static LoweringFlags GetLoweringFlags(MethodDesc method)
parent\parent\Common\TypeSystem\IL\DelegateInfo.cs (12)
23private MethodDesc _invokeMethod; 25private MethodDesc _getThunkMethod; 31public IEnumerable<MethodDesc> Methods 45MethodDesc thunk = thunks[kind]; 78public MethodDesc InvokeMethod 123private MethodDesc _openStaticThunk; 124private MethodDesc _multicastThunk; 125private MethodDesc _closedStaticThunk; 126private MethodDesc _closedInstanceOverGeneric; 127private MethodDesc _invokeObjectArrayThunk; 128private MethodDesc _openInstanceThunk; 210public MethodDesc this[DelegateThunkKind kind]
parent\parent\Common\TypeSystem\IL\HelperExtensions.cs (8)
30public static MethodDesc GetHelperEntryPoint(this TypeSystemContext context, ReadOnlySpan<byte> typeName, ReadOnlySpan<byte> methodName) 33MethodDesc helperMethod = helperType.GetKnownMethod(methodName, null); 37public static MethodDesc GetCoreLibEntryPoint(this TypeSystemContext context, ReadOnlySpan<byte> namespaceName, ReadOnlySpan<byte> typeName, ReadOnlySpan<byte> methodName, MethodSignature signature) 43public static MethodDesc GetOptionalHelperEntryPoint(this TypeSystemContext context, ReadOnlySpan<byte> typeName, ReadOnlySpan<byte> methodName) 46MethodDesc helperMethod = helperType?.GetMethod(methodName, null); 55public static void EmitCallThrowHelper(this ILCodeStream codeStream, ILEmitter emitter, MethodDesc method) 74public static MethodDesc GetKnownMethod(this TypeDesc type, ReadOnlySpan<byte> name, MethodSignature signature) 76MethodDesc method = type.GetMethod(name, signature);
parent\parent\Common\TypeSystem\IL\ILProvider.cs (1)
14public abstract MethodIL GetMethodIL(MethodDesc method);
parent\parent\Common\TypeSystem\IL\NativeAotILProvider.cs (9)
19private static MethodIL TryGetRuntimeImplementedMethodIL(MethodDesc method) 46private static MethodIL TryGetIntrinsicMethodIL(MethodDesc method) 92private static MethodIL TryGetPerInstantiationIntrinsicMethodIL(MethodDesc method) 156MethodDesc underlyingCompareToMethod = underlyingType.GetKnownMethod("CompareTo"u8, 237MethodDesc methodToCall = GetMethodToCall(elementType); 250static MethodDesc GetMethodToCall(TypeDesc elementType) 281public override MethodIL GetMethodIL(MethodDesc method) 334MethodDesc typicalMethod = method.GetTypicalMethodDefinition(); 392public override MethodDesc OwningMethod => _variant;
parent\parent\Common\TypeSystem\IL\Stubs\ArrayMethodILEmitter.cs (2)
96MethodDesc checkArrayStore = 241MethodDesc throwHelper = context.GetHelperEntryPoint("ThrowHelpers"u8, "ThrowIndexOutOfRangeException"u8);
parent\parent\Common\TypeSystem\IL\Stubs\AssemblyGetExecutingAssemblyMethodThunk.cs (2)
73MethodDesc classlibHelper = Context.GetHelperEntryPoint("ReflectionHelpers"u8, "GetExecutingAssembly"u8); 98public MethodDesc GetHelper(IAssemblyDesc executingAssembly)
parent\parent\Common\TypeSystem\IL\Stubs\AssemblyGetExecutingAssemblyMethodThunk.Sorting.cs (1)
14protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\IL\Stubs\AsyncResumptionStub.cs (4)
18private readonly MethodDesc _targetMethod; 22public AsyncResumptionStub(MethodDesc targetMethod, TypeDesc owningType) 38public MethodDesc TargetMethod => _targetMethod; 108MethodDesc asyncCallContinuation = Context.SystemModule.GetKnownType("System.Runtime.CompilerServices"u8, "AsyncHelpers"u8)
parent\parent\Common\TypeSystem\IL\Stubs\AsyncResumptionStub.Mangling.cs (1)
12MethodDesc IPrefixMangledMethod.BaseMethod => _targetMethod;
parent\parent\Common\TypeSystem\IL\Stubs\AsyncResumptionStub.Sorting.cs (1)
13protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\IL\Stubs\AsyncThunks.cs (9)
17public static MethodIL EmitTaskReturningThunk(MethodDesc taskReturningMethod, MethodDesc asyncMethod) 100MethodDesc asyncCallContinuationMd = asyncHelpersType.GetKnownMethod("AsyncCallContinuation"u8, null); 112MethodDesc fromResultMethod; 132MethodDesc getCompletedTaskMethod; 159MethodDesc fromExceptionMd; 194MethodDesc createRuntimeAsyncTaskMd; 248public static MethodIL EmitReturnDroppingThunk(MethodDesc returnDroppingMethod, MethodDesc asyncVariantTarget)
parent\parent\Common\TypeSystem\IL\Stubs\CalliMarshallingMethodThunk.Sorting.cs (1)
13protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\IL\Stubs\ComparerIntrinsics.cs (5)
22public static MethodIL EmitComparerCreate(MethodDesc target) 30public static MethodIL EmitEqualityComparerCreate(MethodDesc target) 51private static MethodIL EmitComparerAndEqualityComparerCreateCommon(MethodDesc methodBeingGenerated, ReadOnlySpan<byte> flavor, ReadOnlySpan<byte> interfaceName) 244public static bool CanCompareValueTypeBits(MetadataType type, MethodDesc objectEqualsMethod) 250public static bool CanCompareValueTypeBitsUntilOffset(MetadataType type, MethodDesc objectEqualsMethod, out int lastFieldEndOffset)
parent\parent\Common\TypeSystem\IL\Stubs\DelegateMarshallingMethodThunk.cs (2)
30private readonly MethodDesc _invokeMethod; 33public MethodDesc InvokeMethod
parent\parent\Common\TypeSystem\IL\Stubs\DelegateMarshallingMethodThunk.Sorting.cs (1)
13protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\IL\Stubs\DelegateMethodILEmitter.cs (3)
14public static MethodIL EmitIL(MethodDesc method) 25MethodDesc notSupportedExceptionHelper = method.Context.GetHelperEntryPoint("ThrowHelpers"u8, "ThrowPlatformNotSupportedException"u8); 40MethodDesc notSupportedExceptionHelper = method.Context.GetHelperEntryPoint("ThrowHelpers"u8, "ThrowPlatformNotSupportedException"u8);
parent\parent\Common\TypeSystem\IL\Stubs\DelegateThunks.cs (8)
25public override MethodIL EmitIL(MethodDesc specializedMethod) 156public override MethodIL EmitIL(MethodDesc specializedMethod) 491public override MethodIL EmitIL(MethodDesc specializedMethod) 568MethodDesc emptyObjectArrayMethod = Context.SystemModule.GetKnownType("System"u8, "Array"u8) 593MethodDesc invokeMethod = instantiatedFunc.GetKnownMethod("Invoke"u8, null); 716MethodDesc thunk = _delegateInfo.Thunks[i]; 730MethodDesc thunk = _delegateInfo.Thunks[i]; 734MethodDesc targetMethod = thunk.InstantiateAsOpen();
parent\parent\Common\TypeSystem\IL\Stubs\DelegateThunks.Sorting.cs (2)
11protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer) 52protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\IL\Stubs\DynamicInvokeMethodThunk.Sorting.cs (1)
13protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\IL\Stubs\ForwardDelegateCreationThunk.Sorting.cs (1)
13protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\IL\Stubs\GetCanonTypeIntrinsic.cs (1)
16public static MethodIL EmitIL(MethodDesc target)
parent\parent\Common\TypeSystem\IL\Stubs\GetFieldHelperMethodOverride.cs (7)
69public override MethodIL EmitIL(MethodDesc specializedMethod) 75private MethodIL EmitILCommon(MethodDesc contextMethod) 84MethodDesc thrower = Context.GetHelperEntryPoint("ThrowHelpers"u8, "ThrowNotSupportedInlineArrayEqualsGetHashCode"u8); 98MethodDesc methodTableOfMethod = methodTableType.GetKnownMethod("Of"u8, null); 142MethodDesc mtOfFieldMethod = methodTableOfMethod.MakeInstantiatedMethod(boxableFieldType); 168&& MetadataVirtualMethodAlgorithm.FindSlotDefiningMethodForVirtualMethod(this) is MethodDesc slotMethod 169&& owningType.BaseType.FindVirtualFunctionTargetMethodOnObjectType(slotMethod) is MethodDesc baseMethod
parent\parent\Common\TypeSystem\IL\Stubs\GetFieldHelperMethodOverride.Sorting.cs (1)
12protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\IL\Stubs\InterlockedIntrinsics.cs (2)
21MethodDesc method) 59MethodDesc compareExchangeNonGeneric = method.OwningType.GetKnownMethod("CompareExchange"u8,
parent\parent\Common\TypeSystem\IL\Stubs\MethodBaseGetCurrentMethodThunk.cs (9)
20public MethodBaseGetCurrentMethodThunk(MethodDesc method) 37public MethodDesc Method 87MethodDesc classlibHelper = Context.GetHelperEntryPoint("ReflectionHelpers"u8, helperName); 105public MethodDesc GetHelper(MethodDesc currentMethod) 110private sealed class Unifier : LockFreeReaderHashtable<MethodDesc, MethodBaseGetCurrentMethodThunk> 112protected override int GetKeyHashCode(MethodDesc key) 120protected override bool CompareKeyToValue(MethodDesc key, MethodBaseGetCurrentMethodThunk value) 128protected override MethodBaseGetCurrentMethodThunk CreateValueFromKey(MethodDesc key)
parent\parent\Common\TypeSystem\IL\Stubs\MethodBaseGetCurrentMethodThunk.Mangling.cs (1)
11MethodDesc IPrefixMangledMethod.BaseMethod
parent\parent\Common\TypeSystem\IL\Stubs\MethodBaseGetCurrentMethodThunk.Sorting.cs (1)
13protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\IL\Stubs\PInvokeILEmitter.cs (8)
18private readonly MethodDesc _targetMethod; 25private PInvokeILEmitter(MethodDesc targetMethod, PInvokeILEmitterConfiguration pinvokeILEmitterConfiguration, InteropStateManager interopStateManager) 49private static Marshaller[] InitializeMarshallers(MethodDesc targetMethod, InteropStateManager interopStateManager, PInvokeFlags flags) 195MethodDesc helper = delegateMethod.Context.GetHelperType("InteropHelpers"u8) 197MethodDesc instantiatedHelper = delegateMethod.Context.GetInstantiatedMethod( 204MethodDesc invokeMethod = delegateMethod.DelegateType.GetKnownMethod("Invoke"u8, null); 328MethodDesc nativeMethod = 437public static MethodIL EmitIL(MethodDesc method,
parent\parent\Common\TypeSystem\IL\Stubs\PInvokeLazyFixupField.cs (3)
21private readonly MethodDesc _targetMethod; 24public PInvokeLazyFixupField(MetadataType owningType, MethodDesc targetMethod, MethodSignature nativeSignature) 32public MethodDesc TargetMethod
parent\parent\Common\TypeSystem\IL\Stubs\RuntimeHelpersIntrinsics.cs (2)
18public static MethodIL EmitIL(MethodDesc method) 71MethodDesc objectEquals = mdType.Context.GetWellKnownType(WellKnownType.Object).GetMethod("Equals"u8, null);
parent\parent\Common\TypeSystem\IL\Stubs\StreamIntrinsics.cs (3)
17public static MethodIL EmitIL(MethodDesc method) 26MethodDesc beginMethod = streamClass.GetMethod(isRead ? "BeginRead"u8 : "BeginWrite"u8, null); 27MethodDesc endMethod = streamClass.GetMethod(isRead ? "EndRead"u8 : "EndWrite"u8, null);
parent\parent\Common\TypeSystem\IL\Stubs\StructMarshallingThunk.Sorting.cs (1)
13protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\IL\Stubs\TypeGetTypeMethodThunk.cs (7)
20private readonly MethodDesc _helperMethod; 22public TypeGetTypeMethodThunk(TypeDesc owningType, MethodSignature signature, MethodDesc helperMethod, string defaultAssemblyName) 121public MethodDesc GetHelper(MethodDesc getTypeOverload, string defaultAssemblyName) 129public readonly MethodDesc GetTypeOverload; 131public Key(string defaultAssemblyName, MethodDesc getTypeOverload) 182MethodDesc helper = context.GetHelperEntryPoint("ReflectionHelpers"u8, helperName);
parent\parent\Common\TypeSystem\IL\Stubs\TypeGetTypeMethodThunk.Sorting.cs (1)
15protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\IL\Stubs\TypeSystemThrowingILEmitter.cs (2)
19public static MethodIL EmitIL(MethodDesc methodThatShouldThrow, TypeSystemException exception) 23MethodDesc helper;
parent\parent\Common\TypeSystem\IL\Stubs\UnsafeIntrinsics.cs (8)
17public static MethodIL EmitIL(MethodDesc method) 99private static MethodIL EmitAdd(MethodDesc method) 117private static MethodIL EmitSubtract(MethodDesc method) 137private static MethodIL EmitReadWrite(MethodDesc method, bool write, bool unaligned = false) 155private static MethodIL EmitCopy(MethodDesc method) 174private static MethodIL EmitCopyBlock(MethodDesc method, bool unaligned) 192private static MethodIL EmitInitBlock(MethodDesc method, bool unaligned) 210private static MethodIL EmitUnbox(MethodDesc method)
parent\parent\Common\TypeSystem\Interop\IL\InlineArrayType.cs (5)
170private MethodDesc[] _methods; 258MethodDesc[] methods = new MethodDesc[] { 265public override IEnumerable<MethodDesc> GetMethods() 274public MethodDesc GetInlineArrayMethod(InlineArrayMethodKind kind)
parent\parent\Common\TypeSystem\Interop\IL\InlineArrayType.Sorting.cs (1)
25protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\Interop\IL\MarshalHelpers.Aot.cs (2)
119public static MethodIL EmitExceptionBody(string message, MethodDesc method) 126MethodDesc exceptionCtor = InteropTypes.GetMarshalDirectiveException(context).GetKnownMethod(".ctor"u8, ctorSignature);
parent\parent\Common\TypeSystem\Interop\IL\Marshaller.Aot.cs (38)
111var helper = Context.GetHelperEntryPoint("InteropHelpers"u8, "AllocMemoryForAnsiCharArray"u8); 123var helper = Context.GetHelperEntryPoint("InteropHelpers"u8, "WideCharArrayToAnsiCharArray"u8); 135var helper = Context.GetHelperEntryPoint("InteropHelpers"u8, "AnsiCharArrayToWideCharArray"u8); 148var helper = Context.GetHelperEntryPoint("InteropHelpers"u8, "WideCharToAnsiChar"u8); 160var helper = Context.GetHelperEntryPoint("InteropHelpers"u8, "AnsiCharToWideChar"u8); 209var helper = Context.GetHelperEntryPoint("InteropHelpers"u8, helperMethodName); 221var helper = Context.GetHelperEntryPoint("InteropHelpers"u8, helperMethodName); 236var helper = Context.GetHelperEntryPoint("InteropHelpers"u8, helperMethodName); 560protected abstract MethodDesc GetManagedToNativeHelper(); 562protected abstract MethodDesc GetNativeToManagedHelper(); 619protected override MethodDesc GetManagedToNativeHelper() 624protected override MethodDesc GetNativeToManagedHelper() 640protected override MethodDesc GetManagedToNativeHelper() 645protected override MethodDesc GetNativeToManagedHelper() 879MethodDesc getNativeSizeHelper = Context.GetHelperEntryPoint("InteropHelpers"u8, "AsAnyGetNativeSize"u8); 984MethodDesc guidCtorHandleMethod = 988MethodDesc helper = Context.GetHelperEntryPoint("InteropHelpers"u8, "ConvertManagedComInterfaceToNative"u8); 998MethodDesc helper = Context.GetHelperEntryPoint("InteropHelpers"u8, "ConvertManagedComInterfaceToIUnknown"u8); 1010MethodDesc helper = Context.GetHelperEntryPoint("InteropHelpers"u8, "ConvertNativeComInterfaceToManaged"u8); 1029var helper = InteropTypes.GetMarshal(Context).GetKnownMethod("FreeBSTR"u8, null); 1037var helper = Context.GetHelperEntryPoint("InteropHelpers"u8, "StringToAnsiBstrBuffer"u8); 1048var helper = Context.GetHelperEntryPoint("InteropHelpers"u8, "AnsiBstrBufferToString"u8); 1062var helper = InteropTypes.GetMarshal(Context).GetKnownMethod("FreeBSTR"u8, null); 1070var helper = InteropTypes.GetMarshal(Context).GetKnownMethod("StringToBSTR"u8, null); 1081var helper = Context.GetHelperEntryPoint("InteropHelpers"u8, "BstrBufferToString"u8); 1095var helper = Context.GetHelperEntryPoint("InteropHelpers"u8, "DateTimeToOleDateTime"u8); 1106var helper = Context.GetHelperEntryPoint("InteropHelpers"u8, "OleDateTimeToDateTime"u8); 1120var helper = Context.GetHelperEntryPoint("InteropHelpers"u8, "DecimalToOleCurrency"u8); 1131var helper = Context.GetHelperEntryPoint("InteropHelpers"u8, "OleCurrencyToDecimal"u8); 1171var helper = Context.GetHelperEntryPoint("InteropHelpers"u8, "ConvertObjectToVariant"u8); 1186var helper = Context.GetHelperEntryPoint("InteropHelpers"u8, "VariantToObject"u8); 1203var helper = Context.GetHelperEntryPoint("InteropHelpers"u8, "CleanupVariant"u8); 1227var getInstanceMethod = marshallerType.GetMethod( 1235var initializeCustomMarshallerMethod = Context.GetHelperEntryPoint("InteropHelpers"u8, "InitializeCustomMarshaller"u8); 1267var manageToNativeMethod = customMarshallerType.GetKnownMethod( 1296var marshalNativeToManagedMethod = customMarshallerType.GetKnownMethod( 1314var cleanupManagedDataMethod = customMarshallerType.GetKnownMethod( 1331var cleanupNativeDataMethod = customMarshallerType.GetKnownMethod(
parent\parent\Common\TypeSystem\Interop\IL\Marshaller.cs (9)
446public static Marshaller[] GetMarshallersForMethod(MethodDesc targetMethod) 465public static bool IsMarshallingRequired(MethodDesc targetMethod) 1507MethodDesc getArrayDataReferenceGenericMethod = InteropTypes.GetMemoryMarshal(Context).GetKnownMethod("GetArrayDataReference"u8, null); 1508MethodDesc getArrayDataReferenceMethod = getArrayDataReferenceGenericMethod.MakeInstantiatedMethod(ManagedElementType); 1689var helper = Context.GetHelperEntryPoint("InteropHelpers"u8, "StringToUnicodeBuffer"u8); 1701var charPtrConstructor = Context.GetWellKnownType(WellKnownType.String).GetMethod(".ctor"u8, 1757var stringToAnsi = Context.GetHelperEntryPoint("InteropHelpers"u8, "StringToAnsiString"u8); 1770var ansiToString = Context.GetHelperEntryPoint("InteropHelpers"u8, "AnsiStringToString"u8); 1892var ctor = ManagedType.GetParameterlessConstructor();
parent\parent\Common\TypeSystem\Interop\IL\PInvokeDelegateWrapper.cs (5)
237private MethodDesc[] _methods; 241MethodDesc[] methods = new MethodDesc[] { 250public override IEnumerable<MethodDesc> GetMethods() 259public MethodDesc GetPInvokeDelegateWrapperMethod(PInvokeDelegateWrapperMethodKind kind)
parent\parent\Common\TypeSystem\Interop\IL\PInvokeDelegateWrapperConstructor.Sorting.cs (1)
11protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\Interop\IL\PInvokeILEmitterConfiguration.cs (1)
13public abstract LinkageMetadata GetLinkageMetadata(MethodDesc method);
parent\parent\Common\TypeSystem\Interop\InteropStateManager.cs (7)
133public MethodDesc GetStructMarshallingManagedToNativeThunk(TypeDesc managedType) 149public MethodDesc GetStructMarshallingNativeToManagedThunk(TypeDesc managedType) 165public MethodDesc GetStructMarshallingCleanupThunk(TypeDesc managedType) 183public FieldDesc GetPInvokeLazyFixupField(MethodDesc method, MethodSignature nativeSig) 188public MethodDesc GetPInvokeCalliStub(MethodSignature signature, ModuleDesc moduleContext) 451public readonly MethodDesc Method; 453public PInvokeLazyFixupFieldKey(MethodDesc method, MethodSignature nativeSignature)
parent\parent\Common\TypeSystem\Interop\UnmanagedCallingConventions.cs (2)
95public static UnmanagedCallingConventions GetUnmanagedCallersOnlyMethodCallingConventions(this MethodDesc method) 106public static UnmanagedCallingConventions GetPInvokeMethodCallingConventions(this MethodDesc method)
parent\parent\Common\TypeSystem\MetadataEmitter\TypeSystemMetadataEmitter.cs (4)
26private Dictionary<MethodDesc, EntityHandle> _methodRefs = new Dictionary<MethodDesc, EntityHandle>(); 168case MethodDesc method: return GetMethodRef(method); 295public EntityHandle GetMethodRef(MethodDesc method)
src\runtime\src\coreclr\tools\Common\Compiler\GenericCycleDetection\GraphBuilder.cs (4)
286foreach (MethodDesc interfaceMethod in interfaceType.GetVirtualMethods()) 296MethodDesc impl = interfaceMethod.Signature.IsStatic ? 411var m = methodIL.GetObject(MetadataTokens.GetToken(accessedMethod), NotFoundBehavior.ReturnNull) as MethodDesc;
src\runtime\src\coreclr\tools\Common\Compiler\GenericCycleDetection\GraphBuilder.MethodCall.cs (1)
19private void ProcessMethodCall(MethodDesc target, Instantiation typeContext, Instantiation methodContext)
src\runtime\src\coreclr\tools\Common\Compiler\GenericCycleDetection\ModuleCycleInfo.cs (8)
129return IsDeepPossiblyCyclicInstantiation((MethodDesc)entity); 211public bool IsDeepPossiblyCyclicInstantiation(MethodDesc method) 255var ownerMethod = owner as MethodDesc; 258var referentMethod = referent as MethodDesc; 303: ((MethodDesc)referent).GetTypicalMethodDefinition(); 305: ((MethodDesc)owner).GetTypicalMethodDefinition();
ILCompiler.MetadataTransform (30)
ILCompiler\Metadata\IMetadataPolicy.cs (2)
31bool GeneratesMetadata(Cts.MethodDesc methodDef); 69bool IsBlocked(Cts.MethodDesc methodDef);
ILCompiler\Metadata\MetadataTransform.cs (1)
63public abstract MetadataRecord HandleQualifiedMethod(Cts.MethodDesc method);
ILCompiler\Metadata\MetadataTransformResult.cs (4)
87public Method GetTransformedMethodDefinition(Cts.MethodDesc method) 100public IEnumerable<KeyValuePair<Cts.MethodDesc, Method>> GetTransformedMethodDefinitions() 102foreach (KeyValuePair<Cts.MethodDesc, MetadataRecord> entry in _transform._methods.Entries) 104yield return new KeyValuePair<Cts.MethodDesc, Method>(entry.Key, m);
ILCompiler\Metadata\Transform.CustomAttribute.cs (1)
32Cts.MethodDesc constructor = module.GetMethod(attribute.Constructor);
ILCompiler\Metadata\Transform.Event.cs (3)
22Cts.MethodDesc adderMethod = acc.Adder.IsNil ? null : module.GetMethod(acc.Adder); 23Cts.MethodDesc raiserMethod = acc.Raiser.IsNil ? null : module.GetMethod(acc.Raiser); 24Cts.MethodDesc removerMethod = acc.Remover.IsNil ? null : module.GetMethod(acc.Remover);
ILCompiler\Metadata\Transform.Method.cs (15)
21internal EntityMap<Cts.MethodDesc, MetadataRecord> _methods 22= new EntityMap<Cts.MethodDesc, MetadataRecord>(EqualityComparer<Cts.MethodDesc>.Default); 24private Action<Cts.MethodDesc, Method> _initMethodDef; 25private Action<Cts.MethodDesc, MemberReference> _initMethodRef; 26private Action<Cts.MethodDesc, MethodInstantiation> _initMethodInst; 28public override MetadataRecord HandleQualifiedMethod(Cts.MethodDesc method) 54private Method HandleMethodDefinition(Cts.MethodDesc method) 61private void InitializeMethodDefinition(Cts.MethodDesc entity, Method record) 130private MemberReference HandleMethodReference(Cts.MethodDesc method) 136private void InitializeMethodReference(Cts.MethodDesc entity, MemberReference record) 143private MethodInstantiation HandleMethodInstantiation(Cts.MethodDesc method) 148private void InitializeMethodInstantiation(Cts.MethodDesc entity, MethodInstantiation record) 211private static MethodAttributes GetMethodAttributes(Cts.MethodDesc method) 224private static MethodImplAttributes GetMethodImplAttributes(Cts.MethodDesc method)
ILCompiler\Metadata\Transform.Property.cs (2)
23Cts.MethodDesc getterMethod = acc.Getter.IsNil ? null : module.GetMethod(acc.Getter); 24Cts.MethodDesc setterMethod = acc.Setter.IsNil ? null : module.GetMethod(acc.Setter);
ILCompiler\Metadata\Transform.Scope.cs (1)
63Cts.MethodDesc entryPoint = ecmaAssembly.EntryPoint;
ILCompiler\Metadata\Transform.Type.cs (1)
320foreach (var method in entity.GetMethods())
ILCompiler.ReadyToRun (912)
Compiler\CallChainProfile.cs (21)
43private readonly Dictionary<MethodDesc, Dictionary<MethodDesc, int>> _resolvedProfileData; 64private Dictionary<MethodDesc, Dictionary<MethodDesc, int>> ResolveMethods(Dictionary<string, Dictionary<string, int>> profileData, CompilerTypeSystemContext context) 66var resolvedProfileData = new Dictionary<MethodDesc, Dictionary<MethodDesc, int>>(); 67Dictionary<string, MethodDesc> nameToMethodDescMap = new Dictionary<string, MethodDesc>(); 72var resolvedKeyMethod = CachedResolveMethodName(nameToMethodDescMap, keyAndMethods.Key, context); 80var resolvedCalledMethod = CachedResolveMethodName(nameToMethodDescMap ,methodAndHitCount.Key, context); 86resolvedProfileData.Add(resolvedKeyMethod, new Dictionary<MethodDesc, int>()); 100private MethodDesc CachedResolveMethodName(Dictionary<string, MethodDesc> nameToMethodDescMap, string methodName, CompilerTypeSystemContext context) 102MethodDesc resolvedMethod = null; 126private MethodDesc ResolveMethodName(CompilerTypeSystemContext context, string methodName) 186var resolvedMethod = ResolveMethodName(context, resolvedModule, namespaceAndTypeName, methodNameWithoutType); 207var resolvedMethod = ResolveMethodName(context, module, namespaceAndTypeName, methodNameWithoutType); 228private MethodDesc ResolveMethodName(CompilerTypeSystemContext context, ModuleDesc module, string namespaceAndTypeName, string methodName) 235var resolvedMethod = resolvedType.GetMethod(Encoding.UTF8.GetBytes(methodName), null); 325public IReadOnlyDictionary<MethodDesc, Dictionary<MethodDesc, int>> ResolvedProfileData => _resolvedProfileData;
Compiler\CompilationModuleGroup.ReadyToRun.cs (4)
43public virtual bool VersionsWithMethodBody(MethodDesc methodDesc) => ContainsMethodBody(methodDesc, unboxingStub: false); 51public virtual bool CrossModuleInlineable(MethodDesc methodDesc) => false; 60public virtual bool CrossModuleCompileable(MethodDesc methodDesc) => false; 75public abstract bool GeneratesPInvoke(MethodDesc method);
Compiler\DependencyAnalysis\AllMethodsOnTypeNode.cs (1)
36foreach (MethodDesc method in Type.GetAllMethods())
Compiler\DependencyAnalysis\ArrayInterfaceMethodsNode.cs (4)
57foreach (MethodDesc interfaceMethod in interfaceType.GetVirtualMethods()) 60MethodDesc helperMethodDef = szArrayHelper.GetMethod(interfaceMethod.Name, null); 64MethodDesc helperMethod = factory.TypeSystemContext.GetInstantiatedMethod(helperMethodDef, new Instantiation(elementType)); 65MethodDesc canonHelperMethod = helperMethod.GetCanonMethodTarget(CanonicalFormKind.Specific);
Compiler\DependencyAnalysis\ImportReferenceProvider.cs (1)
56Vertex INativeFormatTypeReferenceProvider.EncodeReferenceToMethod(NativeWriter writer, MethodDesc method) => throw new NotImplementedException();
Compiler\DependencyAnalysis\InheritedVirtualMethodsNode.cs (9)
52foreach (MethodDesc decl in defType.EnumAllVirtualSlots()) 58MethodDesc impl = defType.FindVirtualFunctionTargetMethodOnObjectType(decl); 62MethodDesc canonImpl = impl.GetCanonMethodTarget(CanonicalFormKind.Specific); 94foreach (MethodDesc interfaceMethod in interfaceType.EnumAllVirtualSlots()) 100MethodDesc interfaceMethodDefinition = interfaceMethod; 106MethodDesc implMethod = defTypeDefinition.InstantiateAsOpen().ResolveInterfaceMethodTarget(interfaceMethodDefinition); 157foreach (MethodDesc method in currentType.GetVirtualMethods()) 168foreach (MethodDesc interfaceMethod in interfaceType.GetVirtualMethods()) 189private static DependencyNodeCore<NodeFactory> GetVirtualMethodImplNode(NodeFactory factory, MethodDesc method)
Compiler\DependencyAnalysis\ReadyToRun\CopiedMethodILNode.cs (2)
75private static bool MayNeedILAtRuntime(NodeFactory factory, MethodDesc method) 85MethodDesc asyncVariant = method.GetAsyncVariant().GetTypicalMethodDefinition();
Compiler\DependencyAnalysis\ReadyToRun\DelayLoadHelperImport.cs (1)
37MethodDesc callingMethod = null)
Compiler\DependencyAnalysis\ReadyToRun\DelayLoadHelperMethodImport.cs (3)
33MethodDesc callingMethod = null) 46MethodDesc canonMethod = _method.Method.GetCanonMethodTarget(CanonicalFormKind.Specific); 69public MethodDesc Method => _method.Method;
Compiler\DependencyAnalysis\ReadyToRun\DelayLoadMethodImport.cs (1)
39public MethodDesc Method => MethodWithToken.Method;
Compiler\DependencyAnalysis\ReadyToRun\DevirtualizationManager.cs (4)
23public override bool IsEffectivelySealed(MethodDesc method) 28protected override MethodDesc ResolveVirtualMethod(MethodDesc declMethod, DefType implType, out CORINFO_DEVIRTUALIZATION_DETAIL devirtualizationDetail) 161MethodDesc resolvedVirtualMethod = base.ResolveVirtualMethod(declMethod, implType, out devirtualizationDetail);
Compiler\DependencyAnalysis\ReadyToRun\GCRefMapBuilder.cs (3)
127internal static (ArgIterator<TypeHandle>, TransitionBlock) BuildCallRefMapArgIterator(MethodDesc method, bool isUnboxingStub) 137public void GetCallRefMap(MethodDesc method, bool isUnboxingStub) 180private void FakeGcScanRoots(MethodDesc method, ArgIterator<TypeHandle> argit, CORCOMPILE_GCREFMAP_TOKENS[] frame, bool isUnboxingStub)
Compiler\DependencyAnalysis\ReadyToRun\GenericLookupSignature.cs (4)
236var contextAsMethod = _methodContext.Context as MethodDesc; 237var otherContextAsMethod = otherNode._methodContext.Context as MethodDesc;
Compiler\DependencyAnalysis\ReadyToRun\ILBodyFixupSignature.cs (5)
40private readonly MethodDesc _signatureMethod; 45public ILBodyFixupSignature(ReadyToRunFixupKind fixupKind, MethodDesc signatureMethod) 57public static MethodDesc GetSignatureMethodForCompiledMethod(MethodDesc compiledMethod) 59MethodDesc typicalDef = compiledMethod.GetTypicalMethodDefinition();
Compiler\DependencyAnalysis\ReadyToRun\Import.cs (2)
21internal readonly MethodDesc CallingMethod; 27public Import(ImportSectionNode tableNode, Signature importSignature, MethodDesc callingMethod = null, bool sortLast = false)
Compiler\DependencyAnalysis\ReadyToRun\InliningInfoNode.cs (17)
64Dictionary<MethodDesc, Dictionary<EcmaMethod, MethodDesc>> inlineeToInliners = new Dictionary<MethodDesc, Dictionary<EcmaMethod, MethodDesc>>(); 70MethodDesc[] inlinees = methodNode.InlinedMethods; 75MethodDesc inliner = methodNode.Method; 87MethodDesc inlinerIdentity; 104foreach (MethodDesc inlinee in inlinees) 106MethodDesc inlineeDefinition = inlinee.GetTypicalMethodDefinition(); 142if (!inlineeToInliners.TryGetValue(inlineeDefinition, out Dictionary<EcmaMethod, MethodDesc> inliners)) 144inliners = new Dictionary<EcmaMethod, MethodDesc>(); 149if (!inliners.TryGetValue(inlinerDefinition, out MethodDesc existingInliner) || (inlinerIdentity is EcmaMethod && existingInliner is not EcmaMethod)) 165MethodDesc inlinee = inlineeWithInliners.Key; 262MethodDesc[] sortedInliners = new MethodDesc[inlineeWithInliners.Value.Count]; 306foreach (var method in sortedInliners) 347var inliner = sortedInliners[inlinerIndex];
Compiler\DependencyAnalysis\ReadyToRun\InstanceEntryPointTableNode.cs (3)
57public static byte[] BuildSignatureForMethodDefinedInModule(MethodDesc method, NodeFactory factory) 76MethodDesc signatureMethod = isUnboxStub ? context.GetTargetOfUnboxingThunk(method) : method; 147MethodDesc hashtableKeyMethod = isUnboxingThunk ? context.GetTargetOfUnboxingThunk(method.Method) : method.Method;
Compiler\DependencyAnalysis\ReadyToRun\InstrumentationDataTableNode.cs (9)
29private readonly HashSet<MethodDesc> _methodsWithSynthesizedPgoData = new HashSet<MethodDesc>(); 190public void EmbedSynthesizedPgoDataForMethods(IDependencySink dependencies, IEnumerable<MethodDesc> mds) 193foreach (MethodDesc md in mds) 217foreach (MethodDesc method in _profileDataManager.GetInputProfileDataMethodsForModule(inputModule)) 248HashSet<MethodDesc> methodsToInsert = new(); 251foreach (MethodDesc method in _profileDataManager.GetInputProfileDataMethodsForModule(inputModule)) 263MethodDesc[] methods = methodsToInsert.ToArray(); 266foreach (MethodDesc method in methods)
Compiler\DependencyAnalysis\ReadyToRun\MethodColdCodeNode.cs (2)
14private MethodDesc _owningMethod; 16public MethodColdCodeNode(MethodDesc owningMethod)
Compiler\DependencyAnalysis\ReadyToRun\MethodFixupSignature.cs (4)
50public MethodDesc Method => _method.Method; 84internal static void AddVirtualEntryDependencies(IDependencySink sink, NodeFactory factory, MethodDesc method) 86MethodDesc canonMethod = method.GetCanonMethodTarget(CanonicalFormKind.Specific); 132private static bool HasNonCanonicalInstantiationArguments(MethodDesc canonMethod)
Compiler\DependencyAnalysis\ReadyToRun\MethodWithGCInfo.cs (15)
21private readonly MethodDesc _method; 33private MethodDesc[] _inlinedMethods; 37public MethodWithGCInfo(MethodDesc methodDesc) 63foreach (var inlinee in _inlinedMethods) 65MethodDesc inlineeDefinition = inlinee.GetTypicalMethodDefinition(); 95public MethodDesc Method => _method; 298public void AddRuntimeDeterminedStaticDependencies(DependencySink sink, NodeFactory factory, MethodDesc concreteMethod) 317public void AddRuntimeDeterminedConditionalDependencies(DependencySink sink, NodeFactory factory, MethodDesc concreteMethod) 321private static void AddRuntimeDeterminedDependency(DependencySink sink, NodeFactory factory, MethodDesc concreteMethod, object dependency) 362public MethodDesc[] InlinedMethods => _inlinedMethods; 437MethodDesc methodLayoutAnchor = GetMethodLayoutAnchor(_method, out int methodLayoutRank); 438MethodDesc otherLayoutAnchor = GetMethodLayoutAnchor(otherNode._method, out int otherLayoutRank); 454static MethodDesc GetMethodLayoutAnchor(MethodDesc method, out int layoutRank) 468public void InitializeInliningInfo(MethodDesc[] inlinedMethods, NodeFactory factory)
Compiler\DependencyAnalysis\ReadyToRun\ModuleTokenResolver.cs (2)
102public ModuleToken GetModuleTokenForMethod(MethodDesc method, bool allowDynamicallyCreatedReference, bool throwIfNotFound) 166public void AddModuleTokenForMethod(MethodDesc method, ModuleToken token)
Compiler\DependencyAnalysis\ReadyToRun\PrecodeMethodImport.cs (1)
37public MethodDesc Method => _method.Method;
Compiler\DependencyAnalysis\ReadyToRun\SignatureContext.cs (2)
69public IEcmaModule GetTargetModule(MethodDesc method) 79public ModuleToken GetModuleTokenForMethod(MethodDesc method)
Compiler\DependencyAnalysis\ReadyToRun\TypeFixupSignature.cs (1)
234foreach (MethodDesc method in type.ConvertToCanonForm(CanonicalFormKind.Specific).GetAllMethods())
Compiler\DependencyAnalysis\ReadyToRun\TypeValidationChecker.cs (14)
373HashSet<MethodDesc> overriddenDeclMethods = new HashSet<MethodDesc>(); 378var methodBody = type.Module.GetMethod(methodImpl.MethodBody); 379var methodDecl = type.Module.GetMethod(methodImpl.MethodDeclaration); 438foreach (var interfaceMethod in interfaceImplemented.GetVirtualMethods()) 440MethodDesc resolvedMethod; 467if (virtualMethodAlgorithm.ResolveInterfaceMethodToDefaultImplementationOnType(interfaceMethod, type, out var impl) != DefaultInterfaceMethodResolution.DefaultImplementation || impl.IsAbstract) 489foreach (var virtualMethod in type.EnumAllVirtualSlots()) 491var implementationMethod = virtualMethodAlgorithm.FindVirtualFunctionTargetMethodOnObjectType(virtualMethod, type); 506var implementationOnBaseType = baseTypeVirtualMethodAlgorithm.FindVirtualFunctionTargetMethodOnObjectType(virtualMethod, type.BaseType); 545static bool CompareGenericParameterConstraint(MethodDesc declMethod, GenericParameterDesc parameterOfDecl, MethodDesc implMethod, GenericParameterDesc parameterOfImpl) 579static bool CompareMethodConstraints(MethodDesc methodDecl, MethodDesc methodImpl)
Compiler\DependencyAnalysis\ReadyToRun\WasmImportThunkPortableEntrypoint.cs (1)
108MethodDesc method = ((MethodFixupSignature)(_import.Signature)).Method;
Compiler\DependencyAnalysis\ReadyToRun\WasmUnboxingStubNode.cs (2)
186private readonly MethodDesc _targetMethod; 190public WasmUnboxingStubTargetNode(MethodDesc targetMethod, WasmSignature signature, WasmUnboxingStubNode stub)
Compiler\DependencyAnalysis\ReadyToRunCodegenNodeFactory.cs (34)
75public HashSet<MethodDesc> CompiledMethodDefs; 132private NodeCache<MethodDesc, MethodWithGCInfo> _localMethodCache; 134public MethodWithGCInfo CompiledMethodNode(MethodDesc method) 141private bool CanPrecompileUnboxingStub(MethodDesc targetMethod) 163public bool NeedsUnboxingStub(MethodDesc method) 172public DependencyNodeCore<NodeFactory> UnboxingStub(MethodDesc targetMethod) 182MethodDesc thunk = targetMethod.IsSharedByGenericInstantiations && !targetMethod.HasInstantiation 189private WasmUnboxingStubTargetNode CreateWasmUnboxingStubTargetNode(MethodDesc targetMethod) 192MethodDesc thunk = targetMethod.IsSharedByGenericInstantiations && !targetMethod.HasInstantiation 253private NodeCache<MethodDesc, GVMDependenciesNode> _gvmDependenciesNode; 255public GVMDependenciesNode GVMDependencies(MethodDesc method) 258MethodDesc canonMethod = method.GetCanonMethodTarget(CanonicalFormKind.Specific); 259MethodDesc canonSlotMethodDefinition = MetadataVirtualMethodAlgorithm.FindSlotDefiningMethodForVirtualMethod(canonMethod.GetMethodDefinition()); 263private NodeCache<MethodDesc, VirtualMethodUseNode> _virtualMethodUseNodes; 265public VirtualMethodUseNode VirtualMethodUse(MethodDesc method) 269MethodDesc canonMethod = method.GetCanonMethodTarget(CanonicalFormKind.Specific); 401_gvmDependenciesNode = new NodeCache<MethodDesc, GVMDependenciesNode>(method => 411_virtualMethodUseNodes = new NodeCache<MethodDesc, VirtualMethodUseNode>(method => 483_wasmUnboxingStubTargets = new NodeCache<MethodDesc, WasmUnboxingStubTargetNode>(CreateWasmUnboxingStubTargetNode); 487_localMethodCache = new NodeCache<MethodDesc, MethodWithGCInfo>(key => 541_copiedMethodIL = new NodeCache<MethodDesc, CopiedMethodILNode>(method => 673MethodDesc compilableMethod = method.Method.GetCanonMethodTarget(CanonicalFormKind.Specific); 719MethodDesc method = methodNode.Method; 748public HashSet<MethodDesc> BuildCompiledMethodDefsSet() 752var set = new HashSet<MethodDesc>(); 881public readonly MethodDesc Method; 883public ILBodyFixupSignatureFixupKey(ReadyToRunFixupKind fixupKind, MethodDesc method) 898public ILBodyFixupSignature ILBodyFixupSignature(ReadyToRunFixupKind fixupKind, MethodDesc method) 1254foreach (MethodDesc method in ProfileDataManager.GetInputProfileDataMethodsForModule(inputModule)) 1442private NodeCache<MethodDesc, CopiedMethodILNode> _copiedMethodIL; 1484public bool CanBeInGenericCycle(MethodDesc method) 1489MethodDesc methodDefinition = method.GetTypicalMethodDefinition(); 1534private NodeCache<MethodDesc, WasmUnboxingStubTargetNode> _wasmUnboxingStubTargets; 1549public WasmTypeNode WasmTypeNode(MethodDesc method)
Compiler\DependencyAnalysis\ReadyToRunSymbolNodeFactory.cs (4)
532public Import DispatchCell(MethodWithToken method, MethodDesc callingMethod) 569public Import CheckILBodyFixupSignature(MethodDesc method) 586public readonly MethodDesc CallingMethod; 588public MethodAndCallSite(MethodWithToken method, MethodDesc callingMethod)
Compiler\ExternalReferenceTokenManager.cs (3)
83case MethodDesc methodDesc: 99MethodDesc methodDesc => _tokenResolver.GetModuleTokenForMethod(methodDesc, allowDynamicallyCreatedReference: true, throwIfNotFound: false), 113private void EnsureMethodDefTokensAreAvailableInVersionBubble(MethodDesc methodDesc)
Compiler\FileLayoutOptimizer.cs (11)
280public readonly MethodDesc Caller; 281public readonly MethodDesc Callee; 284public CallerCalleeCount(MethodDesc caller, MethodDesc callee, int count) 307Dictionary<MethodDesc, MethodWithGCInfo> methodMap = new Dictionary<MethodDesc, MethodWithGCInfo>(); 314foreach (KeyValuePair<MethodDesc, Dictionary<MethodDesc, int>> methodProfile in _profileData.CallChainProfile.ResolvedProfileData.Where(kvp => methodMap.ContainsKey(kvp.Key))) 316foreach (KeyValuePair<MethodDesc, int> callee in methodProfile.Value.Where(kvp => methodMap.ContainsKey(kvp.Key))) 353var mdToIndex = new Dictionary<MethodDesc, int>(); 369foreach ((MethodDesc other, int count) in data.CallWeights)
Compiler\IRootingServiceProvider.cs (1)
13void AddCompilationRoot(MethodDesc method, bool rootMinimalDependencies, string reason, bool isJitHelper = false);
Compiler\NoMethodsCompilationModuleGroup.cs (1)
23protected override bool ContainsMethodBodyCore(MethodDesc method, bool unboxingStub)
Compiler\ProfileData.cs (10)
37public MethodProfileData(MethodDesc method, MethodProfilingDataFlags flags, double exclusiveWeight, Dictionary<MethodDesc, int> callWeights, uint scenarioMask, PgoSchemaElem[] schemaData) 49public readonly MethodDesc Method; 53public readonly Dictionary<MethodDesc, int> CallWeights; 61public abstract MethodProfileData GetMethodProfileData(MethodDesc m); 63public abstract byte[] GetMethodBlockCount(MethodDesc m); 65public static void MergeProfileData(Dictionary<MethodDesc, MethodProfileData> mergedProfileData, ProfileData profileData) 81mergedCallWeights = new Dictionary<MethodDesc, int>(data.CallWeights); 135public override MethodProfileData GetMethodProfileData(MethodDesc m) 145public override byte[] GetMethodBlockCount(MethodDesc m)
Compiler\ProfileDataManager.cs (31)
45Func<MethodDesc, bool> canBeIncludedInCurrentCompilation, 102public IEnumerable<MethodDesc> GetInputProfileDataMethodsForModule(ModuleDesc moduleDesc) 107public bool IsMethodInInputProfileData(MethodDesc method) 112public MethodProfileData this[MethodDesc method] 133public MethodProfileData GetAllowSynthesis(Compilation comp, MethodDesc method, out bool isSynthesized) 176private PgoSchemaElem[] SynthesizeSchema(Compilation comp, MethodDesc method) 198MethodDesc targetMeth = obj as MethodDesc; 264IList<MethodDesc> compatible = _gdvEntityFinder.GetCompatibleWithDelegateInvoke(delegateSignature); 284Debug.Assert(value is MethodDesc or TypeDesc); 285if (value is MethodDesc md) 322private readonly Dictionary<MethodDesc, MethodProfileData> _profileData = new(); 323private readonly Dictionary<ModuleDesc, HashSet<MethodDesc>> _placedProfileMethods = new(); 324private readonly HashSet<MethodDesc> _placedProfileMethodsAll = new(); 332public MethodProfileData this[MethodDesc method] 344foreach ((MethodDesc method, MethodProfileData profileData) in _profileData) 350public bool Contains(MethodDesc md) => _profileData.ContainsKey(md); 352private void AssociateMethodProfileDataWithModule(MethodDesc method, MethodProfileData profileData) 383if (!_placedProfileMethods.TryGetValue(home, out HashSet<MethodDesc> set)) 384_placedProfileMethods.Add(home, set = new HashSet<MethodDesc>()); 391public IEnumerable<MethodDesc> GetPlacedMethodsForModuleDesc(ModuleDesc moduleDesc) 396return Array.Empty<MethodDesc>(); 412private readonly Dictionary<MethodSignature, List<MethodDesc>> _delegateTargets; 417Dictionary<MethodSignature, HashSet<MethodDesc>> delegateTargets = new(); 426foreach (MethodDesc method in type.GetMethods()) 434if (!delegateTargets.TryGetValue(method.Signature, out HashSet<MethodDesc> set)) 435delegateTargets.Add(method.Signature, set = new HashSet<MethodDesc>()); 480List<MethodDesc> list = new(kvp.Value); 493public IList<MethodDesc> GetCompatibleWithDelegateInvoke(MethodSignature delegateInvokeSignature) 495return _delegateTargets.TryGetValue(delegateInvokeSignature, out List<MethodDesc> methods) ? methods : Array.Empty<MethodDesc>();
Compiler\R2RTypeExtensions.cs (1)
51public static bool IsNonVersionable(this MethodDesc method)
Compiler\ReadyToRunCodegenCompilation.cs (50)
80public bool CanInline(MethodDesc caller, MethodDesc callee) 106MethodDesc calleeMethodImpl = callee.OwningType.FindVirtualFunctionTargetMethodOnObjectType(callee); 118public virtual MethodIL GetMethodIL(MethodDesc method) 128public bool IsEffectivelySealed(MethodDesc method) 133public MethodDesc ResolveVirtualMethod(MethodDesc declMethod, TypeDesc implType, out CORINFO_DEVIRTUALIZATION_DETAIL devirtualizationDetail) 183public sealed class ILCache : LockFreeReaderHashtable<MethodDesc, ILCache.MethodILData> 196protected override int GetKeyHashCode(MethodDesc key) 204protected override bool CompareKeyToValue(MethodDesc key, MethodILData value) 212protected override MethodILData CreateValueFromKey(MethodDesc key) 227public MethodDesc Method; 259public void AddCompilationRoot(MethodDesc method, bool rootMinimalDependencies, string reason, bool isJitHelper = false) 261MethodDesc canonMethod = method.GetCanonMethodTarget(CanonicalFormKind.Specific); 310private readonly Func<MethodDesc, string> _printReproInstructions; 314private readonly HashSet<MethodDesc> _methodsWhichNeedMutableILBodies = new HashSet<MethodDesc>(); 316private HashSet<MethodDesc> _directManagedHelpers; 326internal bool IsDirectManagedHelperEligible(MethodDesc method) 331HashSet<MethodDesc> directManagedHelpers = Volatile.Read(ref _directManagedHelpers); 361Func<MethodDesc, string> printReproInstructions, 477HashSet<MethodDesc> compiledMethodDefs = null; 504private void RewriteComponentFile(string inputFile, string outputFile, string ownerExecutableName, HashSet<MethodDesc> compiledMethodDefs) 722public void PrepareForCompilationRetry(MethodWithGCInfo methodToBeRecompiled, IEnumerable<MethodDesc> methodsThatNeedILBodies) 729foreach (var method in methodsThatNeedILBodies) 770var method = methodCodeNodeNeedingCode.Method; 771var typicalDef = method.GetTypicalMethodDefinition(); 844void EnsureGeneratedILTokensAreAvailable(MethodDesc method) 885MethodDesc[] mutableMethodBodyNeedList = new MethodDesc[_methodsWhichNeedMutableILBodies.Count]; 889Comparison<MethodDesc> comparison = (MethodDesc a, MethodDesc b) => comparer.Compare(a, b); 893foreach (var method in mutableMethodBodyNeedList) 905HashSet<MethodDesc> deniedHelpers = new HashSet<MethodDesc>(); 912HashSet<MethodDesc> newlyDeniedHelpers = new HashSet<MethodDesc>(); 946foreach (MethodDesc method in probeResult.MethodsRequiringILBodies) 1030HashSet<MethodDesc> deniedHelpers) 1032HashSet<MethodDesc> directManagedHelpers = new HashSet<MethodDesc>(); 1079void LogManagedHelperProbeFailure(MethodDesc method, string reason) 1144MethodDesc method = methodCodeNodeNeedingCode.Method; 1196private void EnsureInstantiationReferencesArePresentForExternalMethod(MethodDesc method) 1207private void AddNecessaryAsyncReferences(MethodDesc method) 1232MethodDesc[] requiredMethods = 1276private void AddNecessaryDelegateCtorReferences(MethodDesc method) 1287MethodDesc[] requiredMethods = 1318public string GetReproInstructions(MethodDesc method)
Compiler\ReadyToRunCodegenCompilationBuilder.cs (2)
52Func<MethodDesc, string> _printReproInstructions; 183public ReadyToRunCodegenCompilationBuilder UsePrintReproInstructions(Func<MethodDesc, string> printReproInstructions)
Compiler\ReadyToRunCompilationModuleGroupBase.cs (25)
55private readonly ConcurrentDictionary<MethodDesc, bool> _versionsWithMethodCache = new ConcurrentDictionary<MethodDesc, bool>(); 56private readonly Func<MethodDesc, bool> _versionsWithMethodUncached; 57private readonly ConcurrentDictionary<MethodDesc, bool> _crossModuleInlineableCache = new ConcurrentDictionary<MethodDesc, bool>(); 58private readonly Func<MethodDesc, bool> _crossModuleInlineableCacheUncached; 61private readonly ConcurrentDictionary<MethodDesc, bool> _crossModuleCompilableCache = new ConcurrentDictionary<MethodDesc, bool>(); 62private readonly Func<MethodDesc, bool> _crossModuleCompilableCacheUncached; 108public bool IsDirectPInvoke(MethodDesc method) 134public sealed override bool ContainsMethodBody(MethodDesc method, bool unboxingStub) 152protected abstract bool ContainsMethodBodyCore(MethodDesc method, bool unboxingStub); 170protected bool CompileVersionBubbleGenericsIntoCurrentModule(MethodDesc method) 435public sealed override bool VersionsWithMethodBody(MethodDesc method) 440private bool VersionsWithMethodUncached(MethodDesc method) 456public sealed override bool CanInline(MethodDesc callerMethod, MethodDesc calleeMethod) 473public bool IsNonVersionableWithILTokensThatDoNotNeedTranslation(MethodDesc method) 481public override bool CrossModuleCompileable(MethodDesc method) 489private bool CrossModuleCompileableUncached(MethodDesc method) 556public override bool CrossModuleInlineable(MethodDesc method) 565private bool CrossModuleInlineableInternal(MethodDesc method) 570private bool CrossModuleInlineableUncached(MethodDesc method) 757public sealed override bool GeneratesPInvoke(MethodDesc method) 941entityDefinitionInstantiation = ((MethodDesc)entityWithInstantiation).GetTypicalMethodDefinition().Instantiation;
Compiler\ReadyToRunCompilerContext.cs (1)
172protected override IEnumerable<MethodDesc> GetAllMethods(TypeDesc type)
Compiler\ReadyToRunHardwareIntrinsicRootProvider.cs (1)
26foreach (MethodDesc method in hardwareIntrinsicType.GetMethods())
Compiler\ReadyToRunJitHelperRootProvider.cs (7)
123var rootedMethods = new HashSet<MethodDesc>(); 143MethodDesc method = GetManagedHelper(context, helper); 151internal static MethodDesc GetManagedHelper(TypeSystemContext context, CorInfoHelpFunc helper) 164private static MethodDesc GetManagedHelper(TypeSystemContext context, ManagedHelperInfo helperInfo) 176MethodDesc result = null; 178foreach (MethodDesc method in helperType.GetMethods()) 252private static void RootMethod(IRootingServiceProvider rootProvider, MethodDesc method)
Compiler\ReadyToRunLibraryRootProvider.cs (8)
52foreach (MethodDesc method in type.GetAllMethods()) 66MethodDesc methodToRoot = method; 97public static void CheckCanGenerateMethod(MethodDesc method) 177public static MethodDesc InstantiateIfPossible(MethodDesc method) 185internal static MethodDesc InstantiateMethodIfPossible(MethodDesc method) 196internal static bool SkipCanonicalInstantiation(MethodDesc method, bool skipCanonicalInstantiation)
Compiler\ReadyToRunProfilingRootProvider.cs (2)
21private IEnumerable<MethodDesc> _profileData; 33foreach (var method in _profileData)
Compiler\ReadyToRunSingleAssemblyCompilationModuleGroup.cs (1)
25protected sealed override bool ContainsMethodBodyCore(MethodDesc method, bool unboxingStub)
Compiler\ReadyToRunTableManager.cs (1)
81MethodDesc method = methodNode.Method;
Compiler\ReadyToRunVisibilityRootProvider.cs (2)
56foreach (MethodDesc method in type.GetAllMethods()) 110MethodDesc methodToRoot = method;
Compiler\ReadyToRunXmlRootProvider.cs (4)
125foreach (MethodDesc method in typeWithMethods.GetAllMethods()) 131private void RootMethod(MethodDesc method, bool skipCanonicalInstantiation) 145MethodDesc methodToRoot = method; 202protected override void ProcessMethod(TypeDesc type, MethodDesc method, XPathNavigator nav, object customData)
Compiler\RuntimeDeterminedTypeHelper.cs (3)
94public static bool Equals(MethodDesc method1, MethodDesc method2) 185public static int GetHashCode(MethodDesc method)
Compiler\SingleMethodCompilationModuleGroup.cs (3)
17private MethodDesc _method; 21MethodDesc method) : 27protected override bool ContainsMethodBodyCore(MethodDesc method, bool unboxingStub)
IBC\IBCProfileData.cs (4)
61private readonly Dictionary<MethodDesc, MethodProfileData> _methodData = new Dictionary<MethodDesc, MethodProfileData>(); 69public override MethodProfileData GetMethodProfileData(MethodDesc m) 80public override byte[] GetMethodBlockCount(MethodDesc m)
IBC\IBCProfileParser.cs (10)
70HashSet<MethodDesc> methodsFoundInData = new HashSet<MethodDesc>(); 102MethodDesc associatedMethod = null; 110if (metadataObject is MethodDesc) 112associatedMethod = (MethodDesc)metadataObject; 411foreach (MethodDesc method in ecmaType.GetMethods()) 702private MethodDesc GetSigMethodInstantiationFromIBCMethodSpec(IBCModule ibcModule, BlobReader sig) 741MethodDesc ecmaMethod = ecmaModuleOfMethod.GetMethod(MetadataTokens.EntityHandle((int)methodToken)); 742MethodDesc methodOnType = methodType.FindMethodOnTypeWithMatchingTypicalMethod(ecmaMethod); 744MethodDesc methodFound = methodOnType;
IBC\MIbcProfileParser.cs (7)
62return new TypeSystemEntityOrUnknown((MethodDesc)null); 68MethodDesc foundMethod = _ilBody.GetObject((int)token, NotFoundBehavior.ReturnNull) as MethodDesc; 371Dictionary<MethodDesc, int> weights = null; 558methodProfileData.Add(new MethodProfileData((MethodDesc)methodInProgress, MethodProfilingDataFlags.ReadMethodCode, exclusiveWeight, weights, 0xFFFFFFFF, pgoSchemaData)); 585weights = new Dictionary<MethodDesc, int>(); 595weights.Add((MethodDesc)metadataObject, intValue);
IL\ReadyToRunILProvider.cs (14)
51private MethodIL TryGetIntrinsicMethodILForActivator(MethodDesc method) 61MethodDesc createDefaultInstance = method.OwningType.GetKnownMethod("CreateDefaultInstance"u8, method.GetTypicalMethodDefinition().Signature); 74private MethodIL TryGetIntrinsicMethodIL(MethodDesc method) 103private MethodIL TryGetPerInstantiationIntrinsicMethodIL(MethodDesc method) 141private Dictionary<MethodDesc, MethodIL> _manifestModuleWrappedMethods = new Dictionary<MethodDesc, MethodIL>(); 145public void CreateCrossModuleInlineableTokensForILBody(MethodDesc method) 168public bool NeedsCrossModuleInlineableTokens(MethodDesc method) 180private static bool NeedsTaskReturningThunk(MethodDesc method) 198private MethodIL GetMethodILForAsyncMethod(MethodDesc method) 210public override MethodIL GetMethodIL(MethodDesc method) 286MethodDesc _owningMethod; 367public override MethodDesc OwningMethod => _owningMethod; 393public override MethodDesc OwningMethod => _variant;
IL\Stubs\InstanceCalliHelperIntrinsics.cs (2)
13public static MethodIL EmitIL(MethodDesc method) 44public override MethodDesc OwningMethod => _wrappedMethodIL.OwningMethod;
IL\Stubs\PInvokeILEmitter.cs (5)
24private readonly MethodDesc _targetMethod; 27private static readonly ConditionalWeakTable<TypeSystemContext, ConcurrentDictionary<MethodDesc, PInvokeTargetNativeMethod>> s_contexts = new(); 29private PInvokeILEmitter(MethodDesc targetMethod) 59static PInvokeTargetNativeMethod AllocateTargetNativeMethod(MethodDesc targetMethod, MethodSignature nativeSigArg) 122public static MethodIL EmitIL(MethodDesc method)
JitInterface\CorInfoImpl.ReadyToRun.cs (86)
143public readonly MethodDesc Method; 150public MethodWithToken(MethodDesc method, ModuleToken token, TypeDesc constrainedType, bool unboxing, TypeSystemEntity genericContextObject, TypeDesc devirtualizedMethodOwner = null, bool forceOwningTypeFromMethodDesc = false) 153Debug.Assert(genericContextObject is null or MethodDesc or TypeDesc); 218if (genericContextObject is MethodDesc methodContext) 438public TypeDesc ContextType { get { return (Context is MethodDesc contextAsMethod ? contextAsMethod.OwningType : (TypeDesc)Context); } } 440public MethodDesc ContextMethod { get { return (MethodDesc)Context; } } 455if (Context is MethodDesc contextAsMethod) 480MethodDesc[] methodsRequiringILBodies) 485public MethodDesc[] MethodsRequiringILBodies { get; } = methodsRequiringILBodies; 496private HashSet<MethodDesc> _inlinedMethods; 499private List<MethodDesc> _ilBodiesNeeded; 501private HashSet<MethodDesc> _synthesizedPgoDependencies; 529MethodDesc asyncResumptionStub = _compilation.TypeSystemContext.GetAsyncResumptionStub(MethodBeingCompiled, MethodBeingCompiled.OwningType); 561public static bool ShouldSkipCompilation(InstructionSetSupport instructionSetSupport, MethodDesc methodNeedingCode, ReadyToRunCodegenCompilation compilation = null) 604public static bool ShouldCodeNotBeCompiledIntoFinalImage(InstructionSetSupport instructionSetSupport, MethodDesc method) 719private static ConditionalWeakTable<MethodDesc, DeterminismData> _determinismTable = new ConditionalWeakTable<MethodDesc, DeterminismData>(); 784public static bool IsMethodCompilable(Compilation compilation, MethodDesc method, bool isJitHelper) 808public ManagedHelperProbeResult ProbeManagedHelper(MethodDesc method, Logger logger) 862var typicalDef = MethodBeingCompiled.GetTypicalMethodDefinition(); 893_ilBodiesNeeded = _ilBodiesNeeded ?? new List<MethodDesc>(); 919MethodDesc[] methodsRequiringILBodies = _ilBodiesNeeded is null ? null : [.. _ilBodiesNeeded]; 1057MethodDesc targetMethodDesc = HandleToObject(pTargetMethod.hMethod); 1083private void AddManagedHelperDependency(MethodDesc helperMethod) 1097private ISymbolNode GetHelperFtnUncached(CorInfoHelpFunc ftnNum, out MethodDesc helperMethod) 1099MethodDesc managedHelper = ReadyToRunJitHelperRootProvider.GetManagedHelper( 1464var method = HandleToObject(ftn); 1484MethodDesc targetMethod = HandleToObject(targetMethodHnd); 1485MethodDesc delegateInvoke = HandleToObject(clsHnd).GetKnownMethod("Invoke"u8, null); 1505private MethodWithToken ComputeMethodWithToken(MethodDesc method, ref CORINFO_RESOLVED_TOKEN pResolvedToken, TypeDesc constrainedType, bool unboxing) 1520ModuleToken _HandleToModuleToken(ref CORINFO_RESOLVED_TOKEN pResolvedToken, MethodDesc methodDesc, out TypeSystemEntity context, ref TypeDesc constrainedType, out bool strippedInstantiation) 1580if (resultDef is MethodDesc resultMethod) 1587var primaryMethod = resultMethod.GetPrimaryMethodDesc(); 1899MethodDesc callerMethod = HandleToObject(callerHandle); 2063out MethodDesc methodToCall, 2064out MethodDesc targetMethod, 2066out MethodDesc originalMethod, 2068out MethodDesc callerMethod, 2096MethodDesc versioningCallerMethod = _compilation.TypeSystemContext.IsUnboxingThunk(callerMethod) 2140MethodDesc methodAfterConstraintResolution = originalMethod; 2155MethodDesc methodOnUnderlyingType = constrainedType.UnderlyingType.FindVirtualFunctionTargetMethodOnObjectType(originalMethod); 2163MethodDesc directMethod = constrainedType.TryResolveConstraintMethodApprox(exactType, originalMethod, out forceUseRuntimeLookup, ref dimResolution); 2255var rawMethod = (MethodDesc)methodIL.GetMethodILScopeDefinition().GetObject((int)pResolvedToken.token); 2347MethodDesc canonMethod = (isArrayConstructor ? null : targetMethod.GetCanonMethodTarget(CanonicalFormKind.Specific)); 2551MethodDesc method = HandleToObject(ftn); 2556private void PrepareForUseAsAFunctionPointer(MethodDesc method) 2607private void UpdateConstLookupWithRequiresRuntimeJitSymbolIfNeeded(ref CORINFO_CONST_LOOKUP constLookup, MethodDesc method) 2629MethodDesc methodToCall; 2630MethodDesc targetMethod; 2632MethodDesc originalMethod; 2634MethodDesc callerMethod; 2744MethodDesc nonUnboxingMethod = methodToCall; 2771MethodDesc compilableTarget = nonUnboxingMethod.GetCanonMethodTarget(CanonicalFormKind.Specific); 2829MethodDesc canonMethod = targetMethod.GetCanonMethodTarget(CanonicalFormKind.Specific); 2912MethodDesc templateMethod, 2913MethodDesc callerHandle, 2931MethodDesc contextMethod = callerHandle; 2998if (helperArg is MethodDesc methodDesc) 3001MethodDesc sharedMethod = methodIL.OwningMethod.GetSharedRuntimeFormMethodTarget(); 3025HandleToObject(pResolvedToken.hMethod) is MethodDesc declaringMethod && 3062MethodDesc templateMethod = null; 3066MethodDesc md = HandleToObject(pResolvedToken.hMethod); 3098MethodDesc declaringMethod = HandleToObject(pResolvedToken.hMethod); 3215MethodDesc md = HandleToObject(pResolvedToken.hMethod); 3249private MethodDesc getUnboxingThunk(MethodDesc method) 3257MethodDesc methodDesc = HandleToObject(handle); 3276private void PreventRecursiveFieldInlinesOutsideVersionBubble(FieldDesc field, MethodDesc callerMethod) 3286private void EncodeFieldBaseOffset(FieldDesc field, ref CORINFO_RESOLVED_TOKEN pResolvedToken, CORINFO_FIELD_INFO* pResult, MethodDesc callerMethod) 3491MethodDesc targetMethod = HandleToObject((CORINFO_METHOD_STRUCT_*)target); 3587MethodDesc methodDesc = HandleToObject(method); 3615var method = HandleToObject(handle); 3750private readonly Stack<HashSet<MethodDesc>> _stashedInlinedMethods = new Stack<HashSet<MethodDesc>>(); 3768MethodDesc inlinee = HandleToObject(inlineeHnd); 3798HashSet<MethodDesc> previouslyStashedInlinees = _stashedInlinedMethods.Pop(); 3801previouslyStashedInlinees = previouslyStashedInlinees ?? new HashSet<MethodDesc>(); 3802foreach (var inlineeInHashSet in _inlinedMethods) 3807_inlinedMethods = _inlinedMethods ?? new HashSet<MethodDesc>(); 3811var typicalMethod = inlinee.GetTypicalMethodDefinition(); 3818_ilBodiesNeeded = _ilBodiesNeeded ?? new List<MethodDesc>(); 3851_ilBodiesNeeded = _ilBodiesNeeded ?? new List<MethodDesc>(); 4013MethodDesc method = HandleToObject(ftn); 4043MethodDesc method = methodHandle is null ? null : HandleToObject(methodHandle);
ObjectWriter\ProfileFileBuilder.cs (9)
33public readonly MethodDesc Caller; 36public readonly MethodDesc Callee; 42public CallInfo(MethodDesc caller, OutputNode callerNode, int callerRVA, MethodDesc callee, OutputNode calleeNode, int calleeRVA, int callCount, CrossPageCall callType) 60private Dictionary<MethodDesc, ISymbolDefinitionNode> _symbolMethodMap; 135_symbolMethodMap = new Dictionary<MethodDesc, ISymbolDefinitionNode>(); 153foreach (KeyValuePair<MethodDesc, Dictionary<MethodDesc, int>> kvpCallerCalleeCount in _callChainProfile.ResolvedProfileData) 163foreach (KeyValuePair<MethodDesc, int> kvpCalleeCount in kvpCallerCalleeCount.Value)
parent\parent\Common\Compiler\AsyncMethodVariant.cs (21)
44public override MethodDesc GetCanonMethodTarget(CanonicalFormKind kind) 49public override MethodDesc GetMethodDefinition() 54public override MethodDesc GetTypicalMethodDefinition() 59public override MethodDesc InstantiateSignature(Instantiation typeInstantiation, Instantiation methodInstantiation) 68protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer) 110public override MethodDesc GetCanonMethodTarget(CanonicalFormKind kind) 115public override MethodDesc GetMethodDefinition() 120public override MethodDesc GetTypicalMethodDefinition() 125public override MethodDesc InstantiateSignature(Instantiation typeInstantiation, Instantiation methodInstantiation) 134protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer) 143public static bool IsAsyncVariant(this MethodDesc method) 148public static bool IsReturnDroppingAsyncThunk(this MethodDesc method) 160public static bool IsAsyncThunk(this MethodDesc method) 169public static bool IsCompilerGeneratedILBodyForAsync(this MethodDesc method) 174public static bool RequiresSaveRestoreOfAsyncContexts(this MethodDesc method) 179public static MethodDesc GetAsyncVariant(this MethodDesc method) 185public static MethodDesc GetTargetOfAsyncVariant(this MethodDesc method) 191public static MethodDesc GetTargetOfReturnDroppingAsyncThunk(this MethodDesc method)
parent\parent\Common\Compiler\AsyncMethodVariant.Mangling.cs (2)
13MethodDesc IPrefixMangledMethod.BaseMethod => _wrappedMethod; 20MethodDesc IPrefixMangledMethod.BaseMethod => _asyncVariant.Target;
parent\parent\Common\Compiler\CachingVirtualMethodAlgorithm.cs (19)
15private readonly ConcurrentDictionary<TypeDesc, (MethodDesc Slot, MethodDesc Implementation)[]> _vtableCache 16= new ConcurrentDictionary<TypeDesc, (MethodDesc Slot, MethodDesc Implementation)[]>(); 18private readonly Func<TypeDesc, (MethodDesc Slot, MethodDesc Implementation)[]> _vtableCreator; 23private (MethodDesc Slot, MethodDesc Implementation)[] ComputeVtable(TypeDesc type) 28var result = new ArrayBuilder<(MethodDesc Slot, MethodDesc Implementation)>(3 /* At least Equals/GetHashCode/ToString */); 30foreach (MethodDesc slotDecl in base.ComputeAllVirtualSlots(type)) 38public override IEnumerable<MethodDesc> ComputeAllVirtualSlots(TypeDesc type) 46static IEnumerable<MethodDesc> GetCachedSlots(CachingVirtualMethodAlgorithm thisObj, TypeDesc type) 48foreach ((MethodDesc slot, _) in thisObj._vtableCache.GetOrAdd(type.GetTypeDefinition(), thisObj._vtableCreator)) 55public override MethodDesc FindVirtualFunctionTargetMethodOnObjectType(MethodDesc targetMethod, TypeDesc objectType) 58MethodDesc targetMethodDefinition = targetMethod.GetMethodDefinition(); 60MethodDesc slotDefiningMethod = targetMethodDefinition; 71MethodDesc result = kvp.Implementation;
parent\parent\Common\Compiler\CodeGenerationFailedException.cs (3)
14public MethodDesc Method { get; } 16public CodeGenerationFailedException(MethodDesc method) 21public CodeGenerationFailedException(MethodDesc method, Exception inner)
parent\parent\Common\Compiler\CompilationModuleGroup.cs (3)
17public abstract bool ContainsMethodBody(MethodDesc method, bool unboxingStub); 23public virtual bool CanInline(MethodDesc callerMethod, MethodDesc calleeMethod) => true;
parent\parent\Common\Compiler\CompilerTypeSystemContext.Async.cs (47)
16public static IEnumerable<MethodDesc> GetAllMethodsAndAsyncVariants(this TypeDesc type) 31private MethodDesc DecomposeAsyncVariant(MethodDesc method, out bool isAsyncVariant) 37private MethodDesc WrapAsAsyncVariant(MethodDesc originalMethod, MethodDesc resolvedMethod) 42MethodDesc asyncVariant = _context.GetAsyncVariantMethod(resolvedMethod); 55public override MethodDesc FindVirtualFunctionTargetMethodOnObjectType(MethodDesc targetMethod, TypeDesc objectType) 58MethodDesc result = base.FindVirtualFunctionTargetMethodOnObjectType(targetMethod, objectType); 65public override DefaultInterfaceMethodResolution ResolveInterfaceMethodToDefaultImplementationOnType(MethodDesc interfaceMethod, TypeDesc currentType, out MethodDesc impl) 75public override MethodDesc ResolveInterfaceMethodToStaticVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType) 78MethodDesc result = base.ResolveInterfaceMethodToStaticVirtualMethodOnType(interfaceMethod, currentType); 84public override MethodDesc ResolveInterfaceMethodToVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType) 87MethodDesc result = base.ResolveInterfaceMethodToVirtualMethodOnType(interfaceMethod, currentType); 93public override DefaultInterfaceMethodResolution ResolveVariantInterfaceMethodToDefaultImplementationOnType(MethodDesc interfaceMethod, TypeDesc currentType, out MethodDesc impl) 102public override MethodDesc ResolveVariantInterfaceMethodToStaticVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType) 105MethodDesc result = base.ResolveVariantInterfaceMethodToStaticVirtualMethodOnType(interfaceMethod, currentType); 111public override MethodDesc ResolveVariantInterfaceMethodToVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType) 114MethodDesc result = base.ResolveVariantInterfaceMethodToVirtualMethodOnType(interfaceMethod, currentType); 121public override IEnumerable<MethodDesc> ComputeAllVirtualSlots(TypeDesc type) 127internal static IEnumerable<MethodDesc> WithAsyncVariants(CompilerTypeSystemContext context, IEnumerable<MethodDesc> methods) 129foreach (MethodDesc method in methods) 172public MethodDesc GetTargetOfAsyncVariantMethod(MethodDesc asyncVariantMethod) 175MethodDesc result = asyncMethodVariantDefinition.Target; 191public MethodDesc GetAsyncVariantMethod(MethodDesc taskReturningMethod) 194MethodDesc taskReturningMethodDefinition = taskReturningMethod.GetTypicalMethodDefinition(); 195MethodDesc result = _asyncVariantHashtable.GetOrCreateValue((EcmaMethod)taskReturningMethodDefinition); 210public MethodDesc GetTargetOfReturnDroppingThunk(MethodDesc returnDroppingThunk) 214MethodDesc result = returnDroppingThunkDefinition.AsyncVariantTarget; 241public MethodDesc GetReturnDroppingAsyncVariantMethod(MethodDesc asyncVariantMethod) 246MethodDesc typicalMethodDefinition = asyncVariantMethod.GetTypicalMethodDefinition(); 247MethodDesc result = _returnDroppingHashtable.GetOrCreateValue((AsyncMethodVariant)typicalMethodDefinition); 273public AsyncResumptionStub GetAsyncResumptionStub(MethodDesc targetMethod, TypeDesc owningType) 280public readonly MethodDesc TargetMethod; 283public AsyncResumptionStubKey(MethodDesc targetMethod, TypeDesc owningType)
parent\parent\Common\Compiler\CompilerTypeSystemContext.BoxedTypes.cs (30)
54public MethodDesc GetSpecialUnboxingThunk(MethodDesc targetMethod, ModuleDesc ownerModuleOfThunk) 71var targetMethodDefinition = targetMethod.GetTypicalMethodDefinition(); 79MethodDesc thunk = GetMethodForInstantiatedType(thunkDefinition, boxedType); 85public MethodDesc GetUnboxingThunk(MethodDesc targetMethod, ModuleDesc ownerModuleOfThunk) 98var targetMethodDefinition = targetMethod.GetTypicalMethodDefinition(); 103MethodDesc thunk; 160public readonly MethodDesc TargetMethod; 163public UnboxingThunkHashtableKey(MethodDesc targetMethod, BoxedValueType owningType) 328public bool IsSpecialUnboxingThunk(MethodDesc method) 333public bool IsUnboxingThunk(MethodDesc method) 341public MethodDesc GetTargetOfSpecialUnboxingThunk(MethodDesc method) 347public MethodDesc GetTargetOfUnboxingThunk(MethodDesc method) 349MethodDesc typicalMethodTarget = method.GetTypicalMethodDefinition() switch 356MethodDesc methodOnInstantiatedType = typicalMethodTarget; 363MethodDesc instantiatedMethod = methodOnInstantiatedType; 377private MethodDesc _targetMethod; 380public GenericUnboxingThunk(BoxedValueType owningType, MethodDesc targetMethod) 395public MethodDesc TargetMethod => _targetMethod; 397MethodDesc IPrefixMangledMethod.BaseMethod => _targetMethod; 479protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer) 490private MethodDesc _targetMethod; 493public UnboxingThunk(BoxedValueType owningType, MethodDesc targetMethod) 508public MethodDesc TargetMethod => _targetMethod; 510MethodDesc IPrefixMangledMethod.BaseMethod => _targetMethod; 571MethodDesc methodToInstantiate = _targetMethod; 603protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
parent\parent\Common\Compiler\CompilerTypeSystemContext.Validation.cs (2)
206public void EnsureLoadableMethod(MethodDesc method) 212MethodDesc methodDef = method.GetMethodDefinition();
parent\parent\Common\Compiler\Dataflow\DynamicallyAccessedMembersBinder.cs (12)
38foreach (var c in typeDefinition.ApplyIncludeInherited(t => t.GetConstructorsOnType(filter: null, bindingFlags: BindingFlags.NonPublic), withInherited)) 45foreach (var c in typeDefinition.ApplyIncludeInherited(t => t.GetConstructorsOnType(filter: null, bindingFlags: BindingFlags.Public), withInherited)) 51foreach (var c in typeDefinition.GetConstructorsOnType(filter: m => m.IsPublic() && !m.HasMetadataParameters())) 58foreach (var m in typeDefinition.ApplyIncludeInherited(t => t.GetMethodsOnTypeHierarchy(filter: null, bindingFlags: BindingFlags.NonPublic | declaredOnlyFlags), withInherited)) 64foreach (var m in typeDefinition.GetMethodsOnTypeHierarchy(filter: null, bindingFlags: BindingFlags.Public | declaredOnlyFlags)) 140public static IEnumerable<MethodDesc> GetConstructorsOnType(this TypeDesc type, Func<MethodDesc, bool> filter, BindingFlags? bindingFlags = null) 148foreach (var method in type.GetMethods()) 172public static IEnumerable<MethodDesc> GetMethodsOnTypeHierarchy(this TypeDesc type, Func<MethodDesc, bool> filter, BindingFlags? bindingFlags = null) 185foreach (var method in type.GetMethods()) 493foreach (var m in type.GetMethods())
parent\parent\Common\Compiler\Dataflow\EcmaExtensions.cs (8)
20public static bool IsPublic(this MethodDesc method) 32public static bool IsPrivate(this MethodDesc method) 71public static ReferenceKind ParameterReferenceKind(this MethodDesc method, int index) 109MethodDesc method => method.OwningType, 119public static ParameterProxyEnumerable GetMetadataParameters(this MethodDesc method) 128public static int GetMetadataParametersCount(this MethodDesc method) => method.Signature.Length; 133public static bool HasMetadataParameters(this MethodDesc method) => method.GetMetadataParametersCount() != 0; 138public static int GetParametersCount(this MethodDesc method)
parent\parent\Common\Compiler\Dataflow\MethodProxy.cs (4)
16public MethodProxy(MethodDesc method) => Method = method; 18public static implicit operator MethodProxy(MethodDesc method) => new(method); 20public readonly MethodDesc Method; 55MethodDesc methodDef = Method.GetMethodDefinition();
parent\parent\Common\Compiler\Dataflow\TypeExtensions.cs (1)
51public static bool IsDeclaredOnType(this MethodDesc method, string fullTypeName)
parent\parent\Common\Compiler\DependencyAnalysis\ExternSymbolNode.cs (1)
75public ExternFunctionSymbolNode(Utf8String name, MethodDesc method, LinkageMetadata linkageMetadata)
parent\parent\Common\Compiler\DependencyAnalysis\GVMDependenciesNode.cs (9)
28private readonly MethodDesc _method; 30public GVMDependenciesNode(MethodDesc method) 137MethodDesc interfaceMethod = _method.GetMethodDefinition(); 142MethodDesc slotDecl = interfaceMethod.Signature.IsStatic ? 157MethodDesc implementingMethodInstantiation = slotDecl 161MethodDesc canonImpl = implementingMethodInstantiation.GetCanonMethodTarget(CanonicalFormKind.Specific); 228MethodDesc methodToResolve; 240MethodDesc instantiatedTargetMethod = potentialOverrideType.FindVirtualFunctionTargetMethodOnObjectType(methodToResolve) 271private static DependencyNodeCore<NodeFactory> GetVirtualMethodImplNode(NodeFactory factory, MethodDesc method)
parent\parent\Common\Compiler\DependencyAnalysis\IMethodBodyNode.cs (2)
20void AddRuntimeDeterminedStaticDependencies(DependencySink sink, NodeFactory factory, MethodDesc concreteMethod); 26void AddRuntimeDeterminedConditionalDependencies(DependencySink sink, NodeFactory factory, MethodDesc concreteMethod);
parent\parent\Common\Compiler\DependencyAnalysis\IMethodNode.cs (1)
13MethodDesc Method { get; }
parent\parent\Common\Compiler\DependencyAnalysis\MethodReadOnlyDataNode.cs (2)
13private MethodDesc _owningMethod; 16public MethodReadOnlyDataNode(MethodDesc owningMethod)
parent\parent\Common\Compiler\DependencyAnalysis\MethodReadWriteDataNode.cs (2)
13private MethodDesc _owningMethod; 16public MethodReadWriteDataNode(MethodDesc owningMethod)
parent\parent\Common\Compiler\DependencyAnalysis\ShadowConcreteMethodNode.cs (1)
21public ShadowConcreteMethodNode(MethodDesc method, IMethodBodyNode canonicalMethod)
parent\parent\Common\Compiler\DependencyAnalysis\ShadowMethodNode.cs (2)
32public MethodDesc Method { get; } 45public ShadowMethodNode(MethodDesc method, IMethodBodyNode canonicalMethod)
parent\parent\Common\Compiler\DependencyAnalysis\VirtualMethodUseNode.cs (3)
24private readonly MethodDesc _decl; 26public MethodDesc Method => _decl; 28public VirtualMethodUseNode(MethodDesc decl)
parent\parent\Common\Compiler\DevirtualizationManager.cs (11)
42public virtual bool IsEffectivelySealed(MethodDesc method) 56public MethodDesc ResolveVirtualMethod(MethodDesc declMethod, TypeDesc implType, out CORINFO_DEVIRTUALIZATION_DETAIL devirtualizationDetail) 65protected virtual MethodDesc ResolveVirtualMethod(MethodDesc declMethod, DefType implType, out CORINFO_DEVIRTUALIZATION_DETAIL devirtualizationDetail) 69MethodDesc originalDeclMethod = declMethod; 70MethodDesc impl; 127MethodDesc defaultInterfaceDispatchDeclMethod = null; 144MethodDesc dimMethod; 211MethodDesc slotDefiningMethodImpl = MetadataVirtualMethodAlgorithm.FindSlotDefiningMethodForVirtualMethod(impl.GetMethodDefinition()); 212MethodDesc slotDefiningMethodDecl = MetadataVirtualMethodAlgorithm.FindSlotDefiningMethodForVirtualMethod(declMethod);
parent\parent\Common\Compiler\DisplayNameHelpers.cs (2)
18MethodDesc method => method.GetDisplayName(), 29public static string GetDisplayName(this MethodDesc method)
parent\parent\Common\Compiler\HardwareIntrinsicHelpers.cs (1)
17public static bool IsHardwareIntrinsic(MethodDesc method)
parent\parent\Common\Compiler\INativeFormatTypeReferenceProvider.cs (1)
12internal Vertex EncodeReferenceToMethod(NativeWriter writer, MethodDesc method);
parent\parent\Common\Compiler\MethodExtensions.cs (4)
146public static bool NotCallableWithoutOwningEEType(this MethodDesc method) 175public static bool IsCallEffectivelyDirect(this MethodDesc method) 203public static bool IsAsyncCall(this MethodDesc method) => method.IsAsyncVariant() || method.IsReturnDroppingAsyncThunk() || (method.IsAsync && !method.GetTypicalMethodDefinition().Signature.ReturnsTaskOrValueTask()); 210public static bool SupportsAsyncVersionCodegen(this MethodDesc method) => method.IsAsyncVariant() && method.IsAsyncThunk() && !method.IsReturnDroppingAsyncThunk();
parent\parent\Common\Compiler\NameMangler.cs (1)
32public abstract Utf8String GetMangledMethodName(MethodDesc method);
parent\parent\Common\Compiler\NativeAotNameMangler.cs (10)
467private Dictionary<MethodDesc, Utf8String> _mangledMethodNames = new Dictionary<MethodDesc, Utf8String>(); 468private Dictionary<MethodDesc, Utf8String> _unqualifiedMangledMethodNames = new Dictionary<MethodDesc, Utf8String>(); 470public override Utf8String GetMangledMethodName(MethodDesc method) 493private Utf8String GetUnqualifiedMangledMethodName(MethodDesc method) 546private Utf8String ComputeUnqualifiedMangledMethodName(MethodDesc method) 558foreach (var m in method.OwningType.GetMethods()) 574var methodDefinition = method.GetMethodDefinition(); 598var typicalMethodDefinition = method.GetTypicalMethodDefinition();
parent\parent\Common\Compiler\ObjectWriter\OutputInfoBuilder.cs (1)
236private static string FormatMethodName(MethodDesc method, TypeNameFormatter typeNameFormatter)
parent\parent\Common\Compiler\ProcessLinkerXmlBase.cs (7)
352MethodDesc? method = GetMethod(type, signature); 368foreach (MethodDesc method in type.GetAllMethods()) 385protected virtual MethodDesc? GetMethod(TypeDesc type, string signature) => null; 387protected virtual void ProcessMethod(TypeDesc type, MethodDesc method, XPathNavigator nav, object? customData) { } 530public static string GetMethodSignature(MethodDesc meth, bool includeGenericParameters) 578private readonly MethodDesc? _method; 580public CecilTypeNameFormatter(MethodDesc? method)
parent\parent\Common\Compiler\PseudoDescExtensions.cs (2)
13public static PropertyPseudoDesc GetPropertyForAccessor(this MethodDesc accessor) 33public static EventPseudoDesc GetEventForAccessor(this MethodDesc accessor)
parent\parent\Common\Compiler\SingleMethodRootProvider.cs (2)
13private MethodDesc _method; 15public SingleMethodRootProvider(MethodDesc method)
parent\parent\Common\Compiler\TypeExtensions.cs (22)
43public static bool RequiresInstArg(this MethodDesc method) 53public static bool RequiresInstMethodDescArg(this MethodDesc method) 62public static bool RequiresInstMethodTableArg(this MethodDesc method) 72public static bool AcquiresInstMethodTableFromThis(this MethodDesc method) 84public static bool IsArrayAddressMethod(this MethodDesc method) 94public static bool IsArrayMethod(this MethodDesc method) 133public static bool IsGenericDepthGreaterThan(this MethodDesc method, int depth) 407public static MethodDesc TryResolveConstraintMethodApprox(this TypeDesc constrainedType, TypeDesc interfaceType, MethodDesc interfaceMethod, out bool forceRuntimeLookup) 419public static MethodDesc TryResolveConstraintMethodApprox(this TypeDesc constrainedType, TypeDesc interfaceType, MethodDesc interfaceMethod, out bool forceRuntimeLookup, ref DefaultInterfaceMethodResolution staticResolution) 469MethodDesc staticMethodDef = interfaceMethod.GetMethodDefinition(); 470MethodDesc exactInterfaceMethod = staticMethodDef; 475MethodDesc result = constrainedType.ResolveVariantInterfaceMethodToStaticVirtualMethodOnType(exactInterfaceMethod); 507MethodDesc genInterfaceMethod = interfaceMethod.GetMethodDefinition(); 508MethodDesc method = null; 528MethodDesc potentialInterfaceMethod = genInterfaceMethod; 569MethodDesc exactInterfaceMethod = context.GetMethodForInstantiatedType( 592MethodDesc exactInterfaceMethod = genInterfaceMethod; 603MethodDesc targetMethod = interfaceType.FindMethodOnTypeWithMatchingTypicalMethod(genInterfaceMethod); 758foreach (MethodDesc method in type.GetVirtualMethods()) 788public static bool IsRawPInvoke(this MethodDesc method)
parent\parent\Common\Compiler\TypeMapMetadata.cs (5)
133MethodDesc ThrowingMethodStub { get; } 139MethodDesc ThrowingMethodStub { get; } 168protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer) 346MethodDesc IExternalTypeMap.ThrowingMethodStub => _externalTypeMapExceptionStub; 350MethodDesc IProxyTypeMap.ThrowingMethodStub => _associatedTypeMapExceptionStub;
parent\parent\Common\JitInterface\CorInfoImpl.cs (82)
81private Dictionary<MethodDesc, PgoInstrumentationResults> _pgoResults = new Dictionary<MethodDesc, PgoInstrumentationResults>(); 319MethodDesc method = (MethodDesc)handleToObject[likelyClassMethods->handle]; 569MethodDesc[] inlineeArray; 572inlineeArray = new MethodDesc[_inlinedMethods.Count]; 578inlineeArray = Array.Empty<MethodDesc>(); 688private MethodDesc MethodBeingCompiled 796private Dictionary<MethodDesc, IntPtr> _methodILScopeToHandle = new Dictionary<MethodDesc, IntPtr>(new JitObjectComparer()); 832private MethodDesc HandleToObject(CORINFO_METHOD_STRUCT_* method) => (MethodDesc)HandleToObject((void*)method); 833private CORINFO_METHOD_STRUCT_* ObjectToHandle(MethodDesc method) => (CORINFO_METHOD_STRUCT_*)ObjectToHandle((object)method); 846MethodDesc owningMethod = methodIL.OwningMethod; 852private bool Get_CORINFO_METHOD_INFO(MethodDesc method, MethodIL methodIL, CORINFO_METHOD_INFO* methodInfo) 921private void Get_CORINFO_SIG_INFO(MethodDesc method, CORINFO_SIG_INFO* sig, MethodILScope scope, bool suppressHiddenArgument = false) 1086private CORINFO_CONTEXT_STRUCT* contextFromMethod(MethodDesc method) 1101private MethodDesc methodFromContext(CORINFO_CONTEXT_STRUCT* contextStruct) 1147MethodDesc method = HandleToObject(ftn); 1153MethodDesc method = HandleToObject(ftn); 1181private uint getMethodAttribsInternal(MethodDesc method) 1302MethodDesc caller = HandleToObject(callerHnd); 1324MethodDesc callee = exactCalleeHnd == null ? null : HandleToObject(exactCalleeHnd); 1336MethodDesc method = HandleToObject(ftn); 1369MethodDesc method = HandleToObject(ftn); 1374if (ctx is MethodDesc methodFromCtx && context != contextFromMethodBeingCompiled()) 1381MethodDesc instantiatedMethod = _compilation.TypeSystemContext.GetMethodForInstantiatedType(method.GetTypicalMethodDefinition(), instantiatedCtxType); 1403MethodDesc meth1 = HandleToObject(methHnd1); 1404MethodDesc meth2 = HandleToObject(methHnd2); 1415MethodDesc callerMethod = HandleToObject(callerHnd); 1416MethodDesc calleeMethod = HandleToObject(calleeHnd); 1491var m = HandleToObject(method); 1512MethodDesc decl = HandleToObject(info->virtualMethod); 1527MethodDesc originalImpl = _compilation.ResolveVirtualMethod(decl, objType, out info->detail); 1550MethodDesc impl = originalImpl.GetCanonMethodTarget(CanonicalFormKind.Specific); 1554MethodDesc nonUnboxingImpl = impl; 1638MethodDesc instArgTarget = unboxingStub ? nonUnboxingImpl : impl; 1720static CORINFO_RESOLVED_TOKEN CreateResolvedTokenFromMethod(CorInfoImpl jitInterface, MethodDesc method 1760MethodDesc method = HandleToObject(ftn); 1816MethodDesc methodDesc = HandleToObject(method); 1828private static CorInfoCallConvExtension GetUnmanagedCallConv(MethodDesc methodDesc, out bool suppressGCTransition) 1912if (result is MethodDesc methodResult) 1930MethodDesc owningMethod = methodIL.OwningMethod; 1951var methodContext = (MethodDesc)typeOrMethodContext; 1994result = _compilation.TypeSystemContext.GetAsyncVariantMethod((MethodDesc)result); 2003if (result is MethodDesc method) 2007MethodDesc sharedMethod = methodIL.OwningMethod.GetSharedRuntimeFormMethodTarget(); 2009Debug.Assert(((MethodDesc)result).IsRuntimeDeterminedExactMethod); 2016MethodDesc sharedMethod = methodIL.OwningMethod.GetSharedRuntimeFormMethodTarget(); 2026MethodDesc sharedMethod = methodIL.OwningMethod.GetSharedRuntimeFormMethodTarget(); 2066if (result is MethodDesc method) 2160private static bool HasCallableAsyncVariant(MethodDesc method) 2201Get_CORINFO_SIG_INFO(((MethodDesc)methodIL.GetObject((int)methTOK)), sig: sig, methodIL); 2967MethodDesc md = method == null ? MethodBeingCompiled : HandleToObject(method); 3752MethodDesc caller = HandleToObject(callerHandle); 3755MethodDesc taskReturningMethod = caller.GetTargetOfAsyncVariant(); 3763MethodDesc runtimeDeterminedCaller = caller.GetSharedRuntimeFormMethodTarget(); 3766MethodDesc result; 3767MethodDesc runtimeDeterminedResult; 3788MethodDesc targetMethod = runtimeDeterminedResult.GetCanonMethodTarget(CanonicalFormKind.Specific); 3830MethodDesc caller = HandleToObject(callerHandle); 3831MethodDesc awaitAwaiterMethod = HandleToObject(pResolvedToken.hMethod); 3837var runtimeDeterminedAwaitAwaiterMethod = (MethodDesc)GetRuntimeDeterminedObjectForToken(ref pResolvedToken); 3848MethodDesc typicalMethod = asyncHelpers.GetKnownMethod( 3851MethodDesc result = typicalMethod.MakeInstantiatedMethod(awaiterType); 3852MethodDesc runtimeDeterminedResult = typicalMethod.MakeInstantiatedMethod(runtimeDeterminedAwaiterType); 3854MethodDesc targetMethod = runtimeDeterminedResult.GetCanonMethodTarget(CanonicalFormKind.Specific); 3914MethodDesc method = HandleToObject(hMethod); 3921MethodDesc methodDefinition = method.GetTypicalMethodDefinition(); 3951MethodDesc method = HandleToObject(ftn); 3955private static string getMethodNameFromMetadataImpl(MethodDesc method, out string className, out string namespaceName, string[] enclosingClassName) 3987MethodDesc method = HandleToObject(ftn); 4152private Dictionary<CorInfoHelpFunc, (ISymbolNode EntryPoint, MethodDesc Method)> _helperCache = 4153new Dictionary<CorInfoHelpFunc, (ISymbolNode EntryPoint, MethodDesc Method)>(); 4162if (!_helperCache.TryGetValue(ftnNum, out (ISymbolNode EntryPoint, MethodDesc Method) helper)) 4164ISymbolNode entryPoint = GetHelperFtnUncached(ftnNum, out MethodDesc method); 4226private static CORINFO_RUNTIME_LOOKUP_KIND GetGenericRuntimeLookupKind(MethodDesc method) 4241MethodDesc method = HandleToObject(context); 5123MethodDesc methodDesc = HandleToObject(ftnHnd); 5133_synthesizedPgoDependencies = new HashSet<MethodDesc>();
parent\parent\Common\JitInterface\UnboxingMethodDesc.cs (14)
20public MethodDesc Target => _wrappedMethod; 22public UnboxingMethodDesc(MethodDesc wrappedMethod, UnboxingMethodDescFactory factory) 31public override MethodDesc GetCanonMethodTarget(CanonicalFormKind kind) 33MethodDesc realCanonTarget = _wrappedMethod.GetCanonMethodTarget(kind); 40public override MethodDesc GetMethodDefinition() 42MethodDesc realMethodDefinition = _wrappedMethod.GetMethodDefinition(); 49public override MethodDesc GetTypicalMethodDefinition() 51MethodDesc realTypicalMethodDefinition = _wrappedMethod.GetTypicalMethodDefinition(); 58public override MethodDesc InstantiateSignature(Instantiation typeInstantiation, Instantiation methodInstantiation) 60MethodDesc realInstantiateSignature = _wrappedMethod.InstantiateSignature(typeInstantiation, methodInstantiation); 75protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer) 91public static bool IsUnboxingThunk(this MethodDesc method) 96public static MethodDesc GetUnboxedMethod(this MethodDesc method)
parent\parent\Common\JitInterface\UnboxingMethodDescFactory.cs (2)
9internal sealed class UnboxingMethodDescFactory : Dictionary<MethodDesc, UnboxingMethodDesc> 11public UnboxingMethodDesc GetUnboxingMethod(MethodDesc method)
parent\parent\Common\JitInterface\WasmLowering.cs (2)
601public static WasmSignature GetSignature(MethodDesc method) 616public static LoweringFlags GetLoweringFlags(MethodDesc method)
parent\parent\Common\Pgo\TypeSystemEntityOrUnknown.cs (3)
21public TypeSystemEntityOrUnknown(MethodDesc method) 28public MethodDesc AsMethod => _data as MethodDesc;
parent\parent\Common\TypeSystem\IL\HelperExtensions.cs (8)
30public static MethodDesc GetHelperEntryPoint(this TypeSystemContext context, ReadOnlySpan<byte> typeName, ReadOnlySpan<byte> methodName) 33MethodDesc helperMethod = helperType.GetKnownMethod(methodName, null); 37public static MethodDesc GetCoreLibEntryPoint(this TypeSystemContext context, ReadOnlySpan<byte> namespaceName, ReadOnlySpan<byte> typeName, ReadOnlySpan<byte> methodName, MethodSignature signature) 43public static MethodDesc GetOptionalHelperEntryPoint(this TypeSystemContext context, ReadOnlySpan<byte> typeName, ReadOnlySpan<byte> methodName) 46MethodDesc helperMethod = helperType?.GetMethod(methodName, null); 55public static void EmitCallThrowHelper(this ILCodeStream codeStream, ILEmitter emitter, MethodDesc method) 74public static MethodDesc GetKnownMethod(this TypeDesc type, ReadOnlySpan<byte> name, MethodSignature signature) 76MethodDesc method = type.GetMethod(name, signature);
parent\parent\Common\TypeSystem\IL\ILProvider.cs (1)
14public abstract MethodIL GetMethodIL(MethodDesc method);
parent\parent\Common\TypeSystem\IL\Stubs\AsyncResumptionStub.cs (4)
18private readonly MethodDesc _targetMethod; 22public AsyncResumptionStub(MethodDesc targetMethod, TypeDesc owningType) 38public MethodDesc TargetMethod => _targetMethod; 108MethodDesc asyncCallContinuation = Context.SystemModule.GetKnownType("System.Runtime.CompilerServices"u8, "AsyncHelpers"u8)
parent\parent\Common\TypeSystem\IL\Stubs\AsyncResumptionStub.Mangling.cs (1)
12MethodDesc IPrefixMangledMethod.BaseMethod => _targetMethod;
parent\parent\Common\TypeSystem\IL\Stubs\AsyncResumptionStub.Sorting.cs (1)
13protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\IL\Stubs\AsyncThunks.cs (9)
17public static MethodIL EmitTaskReturningThunk(MethodDesc taskReturningMethod, MethodDesc asyncMethod) 100MethodDesc asyncCallContinuationMd = asyncHelpersType.GetKnownMethod("AsyncCallContinuation"u8, null); 112MethodDesc fromResultMethod; 132MethodDesc getCompletedTaskMethod; 159MethodDesc fromExceptionMd; 194MethodDesc createRuntimeAsyncTaskMd; 248public static MethodIL EmitReturnDroppingThunk(MethodDesc returnDroppingMethod, MethodDesc asyncVariantTarget)
parent\parent\Common\TypeSystem\IL\Stubs\ComparerIntrinsics.cs (5)
22public static MethodIL EmitComparerCreate(MethodDesc target) 30public static MethodIL EmitEqualityComparerCreate(MethodDesc target) 51private static MethodIL EmitComparerAndEqualityComparerCreateCommon(MethodDesc methodBeingGenerated, ReadOnlySpan<byte> flavor, ReadOnlySpan<byte> interfaceName) 244public static bool CanCompareValueTypeBits(MetadataType type, MethodDesc objectEqualsMethod) 250public static bool CanCompareValueTypeBitsUntilOffset(MetadataType type, MethodDesc objectEqualsMethod, out int lastFieldEndOffset)
parent\parent\Common\TypeSystem\IL\Stubs\InterlockedIntrinsics.cs (2)
21MethodDesc method) 59MethodDesc compareExchangeNonGeneric = method.OwningType.GetKnownMethod("CompareExchange"u8,
parent\parent\Common\TypeSystem\IL\Stubs\RuntimeHelpersIntrinsics.cs (2)
18public static MethodIL EmitIL(MethodDesc method) 71MethodDesc objectEquals = mdType.Context.GetWellKnownType(WellKnownType.Object).GetMethod("Equals"u8, null);
parent\parent\Common\TypeSystem\IL\Stubs\UnsafeIntrinsics.cs (8)
17public static MethodIL EmitIL(MethodDesc method) 99private static MethodIL EmitAdd(MethodDesc method) 117private static MethodIL EmitSubtract(MethodDesc method) 137private static MethodIL EmitReadWrite(MethodDesc method, bool write, bool unaligned = false) 155private static MethodIL EmitCopy(MethodDesc method) 174private static MethodIL EmitCopyBlock(MethodDesc method, bool unaligned) 192private static MethodIL EmitInitBlock(MethodDesc method, bool unaligned) 210private static MethodIL EmitUnbox(MethodDesc method)
parent\parent\Common\TypeSystem\Interop\IL\Marshaller.cs (9)
446public static Marshaller[] GetMarshallersForMethod(MethodDesc targetMethod) 465public static bool IsMarshallingRequired(MethodDesc targetMethod) 1507MethodDesc getArrayDataReferenceGenericMethod = InteropTypes.GetMemoryMarshal(Context).GetKnownMethod("GetArrayDataReference"u8, null); 1508MethodDesc getArrayDataReferenceMethod = getArrayDataReferenceGenericMethod.MakeInstantiatedMethod(ManagedElementType); 1689var helper = Context.GetHelperEntryPoint("InteropHelpers"u8, "StringToUnicodeBuffer"u8); 1701var charPtrConstructor = Context.GetWellKnownType(WellKnownType.String).GetMethod(".ctor"u8, 1757var stringToAnsi = Context.GetHelperEntryPoint("InteropHelpers"u8, "StringToAnsiString"u8); 1770var ansiToString = Context.GetHelperEntryPoint("InteropHelpers"u8, "AnsiStringToString"u8); 1892var ctor = ManagedType.GetParameterlessConstructor();
parent\parent\Common\TypeSystem\Interop\UnmanagedCallingConventions.cs (2)
95public static UnmanagedCallingConventions GetUnmanagedCallersOnlyMethodCallingConventions(this MethodDesc method) 106public static UnmanagedCallingConventions GetPInvokeMethodCallingConventions(this MethodDesc method)
parent\parent\Common\TypeSystem\MetadataEmitter\TypeSystemMetadataEmitter.cs (4)
26private Dictionary<MethodDesc, EntityHandle> _methodRefs = new Dictionary<MethodDesc, EntityHandle>(); 168case MethodDesc method: return GetMethodRef(method); 295public EntityHandle GetMethodRef(MethodDesc method)
PortableCallHelpers\InternalCallSignatureCollector.cs (3)
52private readonly Dictionary<string, MethodDesc> _signatures = []; 54public IReadOnlyDictionary<string, MethodDesc> Signatures => _signatures; 58foreach (MethodDesc method in type.GetMethods())
PortableCallHelpers\InteropSignature.cs (1)
45public static string GetMethodSignature(MethodDesc method, WasmLowering.LoweringFlags flags = WasmLowering.LoweringFlags.None)
PortableCallHelpers\InterpToNativeGenerator.cs (1)
24public static void Emit(TextWriter w, IReadOnlyDictionary<string, MethodDesc> cookies)
PortableCallHelpers\PInvokeCollector.cs (6)
132public void CollectPInvokes(List<PInvokeInfo> pinvokes, List<PInvokeCallback> callbacks, Dictionary<string, MethodDesc> signatures, EcmaType type) 134foreach (MethodDesc methodDesc in type.GetMethods()) 161MethodDesc invokeMethod = type.GetMethod("Invoke"u8, null); 188private void CollectUnmanagedCalliSignatures(Dictionary<string, MethodDesc> signatures, EcmaMethod method) 257private void AddSignature(Dictionary<string, MethodDesc> signatures, MethodDesc method, WasmLowering.LoweringFlags flags, string kind)
PortableCallHelpers\PInvokeTableGenerator.cs (1)
462foreach (MethodDesc candidate in cb.Method.OwningType.GetMethods())
PortableCallHelpers\PortableCallHelpersGenerator.cs (2)
81Dictionary<string, MethodDesc> signatures = []; 128foreach (KeyValuePair<string, MethodDesc> internalCall in internalCallCollector.Signatures)
src\runtime\src\coreclr\tools\Common\Compiler\GenericCycleDetection\GraphBuilder.cs (4)
286foreach (MethodDesc interfaceMethod in interfaceType.GetVirtualMethods()) 296MethodDesc impl = interfaceMethod.Signature.IsStatic ? 411var m = methodIL.GetObject(MetadataTokens.GetToken(accessedMethod), NotFoundBehavior.ReturnNull) as MethodDesc;
src\runtime\src\coreclr\tools\Common\Compiler\GenericCycleDetection\GraphBuilder.MethodCall.cs (1)
19private void ProcessMethodCall(MethodDesc target, Instantiation typeContext, Instantiation methodContext)
src\runtime\src\coreclr\tools\Common\Compiler\GenericCycleDetection\ModuleCycleInfo.cs (6)
129return IsDeepPossiblyCyclicInstantiation((MethodDesc)entity); 211public bool IsDeepPossiblyCyclicInstantiation(MethodDesc method) 255var ownerMethod = owner as MethodDesc; 258var referentMethod = referent as MethodDesc;
TypeSystem\MethodDescExtensions.cs (3)
14public static MethodDesc GetPrimaryMethodDesc(this MethodDesc method) 41public static bool IsPrimaryMethodDesc(this MethodDesc method)
ILCompiler.RyuJit (200)
Compiler\DependencyAnalysis\MethodCodeNode.cs (8)
21private MethodDesc _method; 34public MethodCodeNode(MethodDesc method) 48public MethodDesc Method => _method; 80public void AddRuntimeDeterminedStaticDependencies(DependencySink sink, NodeFactory factory, MethodDesc concreteMethod) 99public void AddRuntimeDeterminedConditionalDependencies(DependencySink sink, NodeFactory factory, MethodDesc concreteMethod) 103private static void AddRuntimeDeterminedDependency(DependencySink sink, NodeFactory factory, MethodDesc concreteMethod, object dependency) 155MethodDesc nonUnboxingMethod = ((CompilerTypeSystemContext)Method.Context).GetTargetOfSpecialUnboxingThunk(_method); 401public MethodDesc Method => _node.Method;
Compiler\DependencyAnalysis\RyuJitNodeFactory.cs (3)
22protected override bool CanFold(MethodDesc method) 28protected override IMethodNode CreateMethodEntrypointNode(MethodDesc method) 56protected override IMethodNode CreateUnboxingStubNode(MethodDesc method)
Compiler\ProfileDataManager.cs (3)
14private readonly Dictionary<MethodDesc, MethodProfileData> _mergedProfileData = new Dictionary<MethodDesc, MethodProfileData>(); 36public MethodProfileData this[MethodDesc method]
Compiler\RyuJitCompilation.cs (3)
136var canonicalMethodsToCompile = new HashSet<MethodDesc>(); 150MethodDesc method = methodCodeNodeNeedingCode.Method; 224MethodDesc method = methodCodeNodeNeedingCode.Method;
JitInterface\CorInfoImpl.RyuJit.cs (47)
52private UnboxingMethodDesc getUnboxingThunk(MethodDesc method) 59MethodDesc asyncResumptionStub = _compilation.TypeSystemContext.GetAsyncResumptionStub(MethodBeingCompiled, _compilation.TypeSystemContext.GeneratedAssembly.GetGlobalModuleType()); 272private void ComputeLookup(ref CORINFO_RESOLVED_TOKEN pResolvedToken, object entity, ReadyToRunHelperId helperId, MethodDesc callerHandle, ref CORINFO_LOOKUP lookup) 277private void ComputeLookup(bool isInlining, object entity, ReadyToRunHelperId helperId, MethodDesc callerHandle, ref CORINFO_LOOKUP lookup) 397MethodDesc expectedTargetMethod = HandleToObject(pTargetMethod.hMethod); 400MethodDesc targetMethod = (MethodDesc)GetRuntimeDeterminedObjectForToken(ref pTargetMethod); 415var interfaceMethod = (MethodDesc)ResolveTokenInScope(methodIL, typeOrMethodContext, pTargetMethod.token); 419MethodDesc directMethod = canonConstrainedType.GetClosestDefType().TryResolveConstraintMethodApprox(interfaceType, interfaceMethod, out bool forceRuntimeLookup, ref staticResolution); 433MethodDesc targetOfLookup; 473MethodDesc contextMethod = HandleToObject(callerHandle); 488private ISymbolNode GetHelperFtnUncached(CorInfoHelpFunc ftnNum, out MethodDesc helperMethod) 833MethodDesc methodDesc = JitHelper.GetEntryPoint(_compilation.TypeSystemContext, id); 842MethodDesc method = HandleToObject(ftn); 1065private ISymbolNode GetGenericLookupHelper(CORINFO_RUNTIME_LOOKUP_KIND runtimeLookupKind, ReadyToRunHelperId helperId, MethodDesc callerHandle, object helperArgument) 1177private IMethodNode GetMethodEntrypoint(CORINFO_MODULE_STRUCT_* pScope, MethodDesc method) 1213MethodDesc method = HandleToObject(pResolvedToken.hMethod); 1237MethodDesc methodAfterConstraintResolution = method; 1261MethodDesc directMethod = constrainedType.GetClosestDefType().TryResolveConstraintMethodApprox(exactType, method, out forceUseRuntimeLookup, ref staticResolution); 1295MethodDesc targetMethod = methodAfterConstraintResolution; 1322var rawMethod = (MethodDesc)methodIL.GetMethodILDefinition().GetObject((int)pResolvedToken.token); 1401MethodDesc runtimeDeterminedInterfaceMethod = (MethodDesc)GetRuntimeDeterminedObjectForToken(ref pResolvedToken); 1411MethodDesc lookupMethod; 1420var methodToGetInstantiation = (MethodDesc)GetRuntimeDeterminedObjectForToken(ref pResolvedToken); 1462MethodDesc caller = HandleToObject(callerHandle); 1532MethodDesc concreteMethod = targetMethod; 1574MethodDesc runtimeDeterminedInterfaceMethod = (MethodDesc)GetRuntimeDeterminedObjectForToken(ref pResolvedToken); 1601MethodDesc targetOfLookup = _compilation.GetTargetOfGenericVirtualMethodCall((MethodDesc)GetRuntimeDeterminedObjectForToken(ref pResolvedToken)); 1700MethodDesc slotDefiningMethod = targetMethod.IsNewSlot ? 1763MethodDesc md = HandleToObject(pResolvedToken.hMethod); 1807if (obj is MethodDesc objAsMethod) 1840MethodDesc callerContextMethod = HandleToObject(callerHandle); 1866MethodDesc method = HandleToObject(handle); 1884MethodDesc methodDesc = HandleToObject(method); 1913MethodDesc method = (MethodDesc)GetRuntimeDeterminedObjectForToken(ref pResolvedToken); 1956MethodDesc md = HandleToObject(method); 1990MethodDesc method = HandleToObject(handle); 2017MethodDesc stub = _compilation.PInvokeILProvider.GetCalliStub( 2028private bool IsPInvokeStubRequired(MethodDesc method) 2154MethodDesc contextMethod = HandleToObject(callerHandle);
parent\ILCompiler.Compiler\Compiler\JitHelper.cs (1)
17public static MethodDesc GetEntryPoint(TypeSystemContext context, ReadyToRunHelper id)
parent\ILCompiler.ReadyToRun\Compiler\FileLayoutOptimizer.cs (6)
280public readonly MethodDesc Caller; 281public readonly MethodDesc Callee; 284public CallerCalleeCount(MethodDesc caller, MethodDesc callee, int count) 353var mdToIndex = new Dictionary<MethodDesc, int>(); 369foreach ((MethodDesc other, int count) in data.CallWeights)
parent\ILCompiler.ReadyToRun\Compiler\ProfileData.cs (10)
37public MethodProfileData(MethodDesc method, MethodProfilingDataFlags flags, double exclusiveWeight, Dictionary<MethodDesc, int> callWeights, uint scenarioMask, PgoSchemaElem[] schemaData) 49public readonly MethodDesc Method; 53public readonly Dictionary<MethodDesc, int> CallWeights; 61public abstract MethodProfileData GetMethodProfileData(MethodDesc m); 63public abstract byte[] GetMethodBlockCount(MethodDesc m); 65public static void MergeProfileData(Dictionary<MethodDesc, MethodProfileData> mergedProfileData, ProfileData profileData) 81mergedCallWeights = new Dictionary<MethodDesc, int>(data.CallWeights); 135public override MethodProfileData GetMethodProfileData(MethodDesc m) 145public override byte[] GetMethodBlockCount(MethodDesc m)
parent\ILCompiler.ReadyToRun\IBC\IBCProfileData.cs (4)
61private readonly Dictionary<MethodDesc, MethodProfileData> _methodData = new Dictionary<MethodDesc, MethodProfileData>(); 69public override MethodProfileData GetMethodProfileData(MethodDesc m) 80public override byte[] GetMethodBlockCount(MethodDesc m)
parent\ILCompiler.ReadyToRun\IBC\MIbcProfileParser.cs (7)
62return new TypeSystemEntityOrUnknown((MethodDesc)null); 68MethodDesc foundMethod = _ilBody.GetObject((int)token, NotFoundBehavior.ReturnNull) as MethodDesc; 371Dictionary<MethodDesc, int> weights = null; 558methodProfileData.Add(new MethodProfileData((MethodDesc)methodInProgress, MethodProfilingDataFlags.ReadMethodCode, exclusiveWeight, weights, 0xFFFFFFFF, pgoSchemaData)); 585weights = new Dictionary<MethodDesc, int>(); 595weights.Add((MethodDesc)metadataObject, intValue);
parent\parent\Common\JitInterface\CorInfoImpl.cs (79)
81private Dictionary<MethodDesc, PgoInstrumentationResults> _pgoResults = new Dictionary<MethodDesc, PgoInstrumentationResults>(); 319MethodDesc method = (MethodDesc)handleToObject[likelyClassMethods->handle]; 688private MethodDesc MethodBeingCompiled 796private Dictionary<MethodDesc, IntPtr> _methodILScopeToHandle = new Dictionary<MethodDesc, IntPtr>(new JitObjectComparer()); 832private MethodDesc HandleToObject(CORINFO_METHOD_STRUCT_* method) => (MethodDesc)HandleToObject((void*)method); 833private CORINFO_METHOD_STRUCT_* ObjectToHandle(MethodDesc method) => (CORINFO_METHOD_STRUCT_*)ObjectToHandle((object)method); 846MethodDesc owningMethod = methodIL.OwningMethod; 852private bool Get_CORINFO_METHOD_INFO(MethodDesc method, MethodIL methodIL, CORINFO_METHOD_INFO* methodInfo) 921private void Get_CORINFO_SIG_INFO(MethodDesc method, CORINFO_SIG_INFO* sig, MethodILScope scope, bool suppressHiddenArgument = false) 1086private CORINFO_CONTEXT_STRUCT* contextFromMethod(MethodDesc method) 1101private MethodDesc methodFromContext(CORINFO_CONTEXT_STRUCT* contextStruct) 1147MethodDesc method = HandleToObject(ftn); 1153MethodDesc method = HandleToObject(ftn); 1181private uint getMethodAttribsInternal(MethodDesc method) 1302MethodDesc caller = HandleToObject(callerHnd); 1324MethodDesc callee = exactCalleeHnd == null ? null : HandleToObject(exactCalleeHnd); 1336MethodDesc method = HandleToObject(ftn); 1369MethodDesc method = HandleToObject(ftn); 1374if (ctx is MethodDesc methodFromCtx && context != contextFromMethodBeingCompiled()) 1381MethodDesc instantiatedMethod = _compilation.TypeSystemContext.GetMethodForInstantiatedType(method.GetTypicalMethodDefinition(), instantiatedCtxType); 1403MethodDesc meth1 = HandleToObject(methHnd1); 1404MethodDesc meth2 = HandleToObject(methHnd2); 1415MethodDesc callerMethod = HandleToObject(callerHnd); 1416MethodDesc calleeMethod = HandleToObject(calleeHnd); 1491var m = HandleToObject(method); 1512MethodDesc decl = HandleToObject(info->virtualMethod); 1527MethodDesc originalImpl = _compilation.ResolveVirtualMethod(decl, objType, out info->detail); 1550MethodDesc impl = originalImpl.GetCanonMethodTarget(CanonicalFormKind.Specific); 1554MethodDesc nonUnboxingImpl = impl; 1638MethodDesc instArgTarget = unboxingStub ? nonUnboxingImpl : impl; 1720static CORINFO_RESOLVED_TOKEN CreateResolvedTokenFromMethod(CorInfoImpl jitInterface, MethodDesc method 1727MethodDesc unboxedMethodDesc = method.IsUnboxingThunk() ? method.GetUnboxedMethod() : method; 1760MethodDesc method = HandleToObject(ftn); 1816MethodDesc methodDesc = HandleToObject(method); 1828private static CorInfoCallConvExtension GetUnmanagedCallConv(MethodDesc methodDesc, out bool suppressGCTransition) 1912if (result is MethodDesc methodResult) 1930MethodDesc owningMethod = methodIL.OwningMethod; 1951var methodContext = (MethodDesc)typeOrMethodContext; 1994result = _compilation.TypeSystemContext.GetAsyncVariantMethod((MethodDesc)result); 2003if (result is MethodDesc method) 2007MethodDesc sharedMethod = methodIL.OwningMethod.GetSharedRuntimeFormMethodTarget(); 2009Debug.Assert(((MethodDesc)result).IsRuntimeDeterminedExactMethod); 2016MethodDesc sharedMethod = methodIL.OwningMethod.GetSharedRuntimeFormMethodTarget(); 2026MethodDesc sharedMethod = methodIL.OwningMethod.GetSharedRuntimeFormMethodTarget(); 2066if (result is MethodDesc method) 2160private static bool HasCallableAsyncVariant(MethodDesc method) 2201Get_CORINFO_SIG_INFO(((MethodDesc)methodIL.GetObject((int)methTOK)), sig: sig, methodIL); 2967MethodDesc md = method == null ? MethodBeingCompiled : HandleToObject(method); 3752MethodDesc caller = HandleToObject(callerHandle); 3755MethodDesc taskReturningMethod = caller.GetTargetOfAsyncVariant(); 3763MethodDesc runtimeDeterminedCaller = caller.GetSharedRuntimeFormMethodTarget(); 3766MethodDesc result; 3767MethodDesc runtimeDeterminedResult; 3788MethodDesc targetMethod = runtimeDeterminedResult.GetCanonMethodTarget(CanonicalFormKind.Specific); 3830MethodDesc caller = HandleToObject(callerHandle); 3831MethodDesc awaitAwaiterMethod = HandleToObject(pResolvedToken.hMethod); 3837var runtimeDeterminedAwaitAwaiterMethod = (MethodDesc)GetRuntimeDeterminedObjectForToken(ref pResolvedToken); 3848MethodDesc typicalMethod = asyncHelpers.GetKnownMethod( 3851MethodDesc result = typicalMethod.MakeInstantiatedMethod(awaiterType); 3852MethodDesc runtimeDeterminedResult = typicalMethod.MakeInstantiatedMethod(runtimeDeterminedAwaiterType); 3854MethodDesc targetMethod = runtimeDeterminedResult.GetCanonMethodTarget(CanonicalFormKind.Specific); 3914MethodDesc method = HandleToObject(hMethod); 3921MethodDesc methodDefinition = method.GetTypicalMethodDefinition(); 3951MethodDesc method = HandleToObject(ftn); 3955private static string getMethodNameFromMetadataImpl(MethodDesc method, out string className, out string namespaceName, string[] enclosingClassName) 3987MethodDesc method = HandleToObject(ftn); 4152private Dictionary<CorInfoHelpFunc, (ISymbolNode EntryPoint, MethodDesc Method)> _helperCache = 4153new Dictionary<CorInfoHelpFunc, (ISymbolNode EntryPoint, MethodDesc Method)>(); 4162if (!_helperCache.TryGetValue(ftnNum, out (ISymbolNode EntryPoint, MethodDesc Method) helper)) 4164ISymbolNode entryPoint = GetHelperFtnUncached(ftnNum, out MethodDesc method); 4226private static CORINFO_RUNTIME_LOOKUP_KIND GetGenericRuntimeLookupKind(MethodDesc method) 4241MethodDesc method = HandleToObject(context); 5123MethodDesc methodDesc = HandleToObject(ftnHnd);
parent\parent\Common\JitInterface\UnboxingMethodDesc.cs (14)
20public MethodDesc Target => _wrappedMethod; 22public UnboxingMethodDesc(MethodDesc wrappedMethod, UnboxingMethodDescFactory factory) 31public override MethodDesc GetCanonMethodTarget(CanonicalFormKind kind) 33MethodDesc realCanonTarget = _wrappedMethod.GetCanonMethodTarget(kind); 40public override MethodDesc GetMethodDefinition() 42MethodDesc realMethodDefinition = _wrappedMethod.GetMethodDefinition(); 49public override MethodDesc GetTypicalMethodDefinition() 51MethodDesc realTypicalMethodDefinition = _wrappedMethod.GetTypicalMethodDefinition(); 58public override MethodDesc InstantiateSignature(Instantiation typeInstantiation, Instantiation methodInstantiation) 60MethodDesc realInstantiateSignature = _wrappedMethod.InstantiateSignature(typeInstantiation, methodInstantiation); 75protected override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer) 91public static bool IsUnboxingThunk(this MethodDesc method) 96public static MethodDesc GetUnboxedMethod(this MethodDesc method)
parent\parent\Common\JitInterface\UnboxingMethodDescFactory.cs (2)
9internal sealed class UnboxingMethodDescFactory : Dictionary<MethodDesc, UnboxingMethodDesc> 11public UnboxingMethodDesc GetUnboxingMethod(MethodDesc method)
parent\parent\Common\Pgo\TypeSystemEntityOrUnknown.cs (3)
21public TypeSystemEntityOrUnknown(MethodDesc method) 28public MethodDesc AsMethod => _data as MethodDesc;
parent\parent\Common\TypeSystem\IL\HelperExtensions.cs (8)
30public static MethodDesc GetHelperEntryPoint(this TypeSystemContext context, ReadOnlySpan<byte> typeName, ReadOnlySpan<byte> methodName) 33MethodDesc helperMethod = helperType.GetKnownMethod(methodName, null); 37public static MethodDesc GetCoreLibEntryPoint(this TypeSystemContext context, ReadOnlySpan<byte> namespaceName, ReadOnlySpan<byte> typeName, ReadOnlySpan<byte> methodName, MethodSignature signature) 43public static MethodDesc GetOptionalHelperEntryPoint(this TypeSystemContext context, ReadOnlySpan<byte> typeName, ReadOnlySpan<byte> methodName) 46MethodDesc helperMethod = helperType?.GetMethod(methodName, null); 55public static void EmitCallThrowHelper(this ILCodeStream codeStream, ILEmitter emitter, MethodDesc method) 74public static MethodDesc GetKnownMethod(this TypeDesc type, ReadOnlySpan<byte> name, MethodSignature signature) 76MethodDesc method = type.GetMethod(name, signature);
parent\parent\Common\TypeSystem\IL\Stubs\TypeSystemThrowingILEmitter.cs (2)
19public static MethodIL EmitIL(MethodDesc methodThatShouldThrow, TypeSystemException exception) 23MethodDesc helper;
ILCompiler.TypeSystem (378)
parent\parent\Common\TypeSystem\Canon\ArrayType.Canon.cs (1)
31public override MethodDesc GetCanonMethodTarget(CanonicalFormKind kind)
parent\parent\Common\TypeSystem\Canon\InstantiatedMethod.Canon.cs (2)
21public override MethodDesc GetCanonMethodTarget(CanonicalFormKind kind) 28MethodDesc openMethodOnCanonicalizedType = _methodDef.GetCanonMethodTarget(kind);
parent\parent\Common\TypeSystem\Canon\MethodDelegator.Canon.cs (1)
14public abstract override MethodDesc GetCanonMethodTarget(CanonicalFormKind kind);
parent\parent\Common\TypeSystem\Canon\MethodDesc.Canon.cs (1)
17public virtual MethodDesc GetCanonMethodTarget(CanonicalFormKind kind)
parent\parent\Common\TypeSystem\Canon\MethodForInstantiatedType.Canon.cs (1)
14public override MethodDesc GetCanonMethodTarget(CanonicalFormKind kind)
parent\parent\Common\TypeSystem\Common\ArrayType.cs (8)
50internal MethodDesc[] _methods; 108MethodDesc[] methods = new MethodDesc[(int)ArrayMethodKind.Ctor + numCtors]; 116public override IEnumerable<MethodDesc> GetMethods() 123public override IEnumerable<MethodDesc> GetVirtualMethods() 125return MethodDesc.EmptyMethods; 128public MethodDesc GetArrayMethod(ArrayMethodKind kind) 328public override MethodDesc InstantiateSignature(Instantiation typeInstantiation, Instantiation methodInstantiation)
parent\parent\Common\TypeSystem\Common\CastingHelper.cs (1)
273if (thisType.AssociatedTypeOrMethod is MethodDesc method)
parent\parent\Common\TypeSystem\Common\CastingHelper.TypeEquivalence.cs (4)
182var invoke1 = type1.GetMethod("Invoke"u8, null); 183var invoke2 = type2.GetMethod("Invoke"u8, null); 196foreach (var method in type1.GetMethods()) 202foreach (var method in type2.GetMethods())
parent\parent\Common\TypeSystem\Common\ConstructedTypeRewritingHelpers.cs (4)
153public static MethodDesc ReplaceTypesInConstructionOfMethod(this MethodDesc method, TypeDesc[] typesToReplace, TypeDesc[] replacementTypes) 156MethodDesc methodOnOwningType; 168MethodDesc result;
parent\parent\Common\TypeSystem\Common\InstantiatedMethod.cs (5)
14private MethodDesc _methodDef; 19internal InstantiatedMethod(MethodDesc methodDef, Instantiation instantiation) 31internal InstantiatedMethod(MethodDesc methodDef, Instantiation instantiation, int hashcode) 161public override MethodDesc GetMethodDefinition() 166public override MethodDesc GetTypicalMethodDefinition()
parent\parent\Common\TypeSystem\Common\InstantiatedType.cs (14)
147public override IEnumerable<MethodDesc> GetMethods() 149foreach (var typicalMethodDef in _typeDef.GetMethods()) 155public override IEnumerable<MethodDesc> GetVirtualMethods() 157foreach (var typicalMethodDef in _typeDef.GetVirtualMethods()) 164public override MethodDesc GetMethod(Utf8Span name, MethodSignature signature, Instantiation substitution) 166MethodDesc typicalMethodDef = _typeDef.GetMethod(name, signature, substitution); 172public override MethodDesc GetMethodWithEquivalentSignature(Utf8Span name, MethodSignature signature, Instantiation substitution) 174MethodDesc typicalMethodDef = _typeDef.GetMethodWithEquivalentSignature(name, signature, substitution); 180public override MethodDesc GetStaticConstructor() 182MethodDesc typicalCctor = _typeDef.GetStaticConstructor(); 188public override MethodDesc GetDefaultConstructor() 190MethodDesc typicalCtor = _typeDef.GetDefaultConstructor(); 196public override MethodDesc GetFinalizer() 198MethodDesc typicalFinalizer = _typeDef.GetFinalizer();
parent\parent\Common\TypeSystem\Common\InstantiatedType.MethodImpls.cs (2)
27MethodDesc decl; 39MethodDesc body = _typeDef.Context.GetMethodForInstantiatedType(uninstMethodImpls[i].Body, this);
parent\parent\Common\TypeSystem\Common\MetadataType.MethodImpls.cs (4)
12public readonly MethodDesc Decl; 13public readonly MethodDesc Body; 15public MethodImplRecord(MethodDesc decl, MethodDesc body)
parent\parent\Common\TypeSystem\Common\MetadataVirtualMethodAlgorithm.cs (134)
14private sealed class MethodDescHashtable : LockFreeReaderHashtable<MethodDesc, MethodDesc> 16protected override int GetKeyHashCode(MethodDesc key) 21protected override int GetValueHashCode(MethodDesc value) 26protected override bool CompareKeyToValue(MethodDesc key, MethodDesc value) 32protected override bool CompareValueToValue(MethodDesc value1, MethodDesc value2) 38protected override MethodDesc CreateValueFromKey(MethodDesc key) 46private MethodDesc[] _members = MethodDesc.EmptyMethods; 49private MethodDesc[] _methodsRequiringSlotUnification = MethodDesc.EmptyMethods; 57private MethodDesc[] _arrayToEnumerate; 59private MethodDesc _current; 61internal Enumerator(MethodDesc[] arrayToEnumerate) 65_current = default(MethodDesc); 80_current = default(MethodDesc); 84public MethodDesc Current 95private readonly MethodDesc[] _arrayToEnumerate; 97public Enumerable(MethodDesc[] arrayToEnumerate) 108public UnificationGroup(MethodDesc definingMethod) 114public MethodDesc DefiningMethod; 120public void AddMethodRequiringSlotUnification(MethodDesc method) 133public bool RequiresSlotUnification(MethodDesc method) 143public void SetDefiningMethod(MethodDesc newDefiningMethod) 151MethodDesc oldDefiningMethod = DefiningMethod; 159public void AddToGroup(MethodDesc method) 182public void RemoveFromGroup(MethodDesc method) 198public bool IsInGroupOrIsDefiningSlot(MethodDesc method) 206public bool IsInGroup(MethodDesc method) 218public override MethodDesc FindVirtualFunctionTargetMethodOnObjectType(MethodDesc targetMethod, TypeDesc objectType) 229private static MethodDesc FindVirtualFunctionTargetMethodOnObjectType(MethodDesc targetMethod, MetadataType objectType) 233MethodDesc initialTargetMethod = targetMethod; 242MethodDesc initialTargetMethodDefinition = targetMethod; 253MethodDesc resolutionTarget = FindNameSigOverrideForVirtualMethod(group.DefiningMethod, uninstantiatedType); 281private static MethodDesc FindImplFromDeclFromMethodImpls(MetadataType type, MethodDesc decl) 293MethodDesc recordDecl = record.Decl; 309private static MethodDesc FindInterfaceImplFromDeclFromMethodImpls(MetadataType type, MethodDesc decl) 322MethodDesc recordDecl = foundMethodImpls[i].Decl; 381private static MethodDesc FindMatchingVirtualMethodOnTypeByNameAndSig(MethodDesc targetMethod, DefType currentType, bool reverseMethodSearch, Func<MethodDesc, MethodDesc, bool> nameSigMatchMethodIsValidCandidate) 386MethodDesc implMethod = null; 387MethodDesc implMethodEquivalent = null; 388foreach (MethodDesc candidate in currentType.GetAllVirtualMethods()) 420private static MethodDesc FindNameSigOverrideForVirtualMethod(MethodDesc targetMethod, MetadataType currentType) 424MethodDesc nameSigOverride = FindMatchingVirtualMethodOnTypeByNameAndSigWithSlotCheck(targetMethod, currentType, reverseMethodSearch:true); 440public static MethodDesc FindSlotDefiningMethodForVirtualMethod(MethodDesc method) 452MethodDesc foundMethod = FindMatchingVirtualMethodOnTypeByNameAndSig(method, currentType, reverseMethodSearch: true, nameSigMatchMethodIsValidCandidate:null); 476private static MethodDesc FindMatchingVirtualMethodOnTypeByNameAndSigWithSlotCheck(MethodDesc method, DefType currentType, bool reverseMethodSearch) 481private static readonly Func<MethodDesc, MethodDesc, bool> s_VerifyMethodsHaveTheSameVirtualSlot = VerifyMethodsHaveTheSameVirtualSlot; 484private static bool VerifyMethodsHaveTheSameVirtualSlot(MethodDesc slotDefiningMethod, MethodDesc methodToVerify) 486MethodDesc slotDefiningMethodOfMethodToVerify = FindSlotDefiningMethodForVirtualMethod(methodToVerify); 490private static readonly Func<MethodDesc, MethodDesc, bool> s_VerifyMethodIsPublic = VerifyMethodIsPublic; 493private static bool VerifyMethodIsPublic(MethodDesc slotDefiningMethod, MethodDesc methodToVerify) 500MethodDesc originalDefiningMethod = unificationGroup.DefiningMethod; 502MethodDesc methodImpl = FindImplFromDeclFromMethodImpls(currentType, unificationGroup.DefiningMethod); 513MethodDesc nameSigMatchMethod = FindMatchingVirtualMethodOnTypeByNameAndSigWithSlotCheck(unificationGroup.DefiningMethod, currentType, reverseMethodSearch: true); 550foreach (MethodDesc memberMethod in unificationGroup.Members) 557MethodDesc nameSigMatchMemberMethod = FindMatchingVirtualMethodOnTypeByNameAndSigWithSlotCheck(memberMethod, currentType, reverseMethodSearch: true); 567foreach (MethodDesc separatedMethod in MethodDescHashtable.Enumerator.Get(separatedMethods)) 576MethodDesc declSlot = FindSlotDefiningMethodForVirtualMethod(methodImplRecord.Decl); 577MethodDesc implSlot = FindSlotDefiningMethodForVirtualMethod(methodImplRecord.Body); 611foreach (MethodDesc methodImplRequiredToRemainInEffect in addDeclGroup.MethodsRequiringSlotUnification) 623foreach (MethodDesc addDeclGroupMemberMethod in addDeclGroup.Members) 653public override MethodDesc ResolveInterfaceMethodToVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType) 658public override MethodDesc ResolveVariantInterfaceMethodToVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType) 663public override MethodDesc ResolveInterfaceMethodToStaticVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType) 668public override MethodDesc ResolveVariantInterfaceMethodToStaticVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType) 698private static MethodDesc ResolveInterfaceMethodToVirtualMethodOnType(MethodDesc interfaceMethod, MetadataType currentType, bool returnRecursive = false) 707MethodDesc methodImpl = FindImplFromDeclFromMethodImpls(currentType, interfaceMethod); 719MethodDesc foundOnCurrentType = FindMatchingVirtualMethodOnTypeByNameAndSig(interfaceMethod, currentType, 750MethodDesc baseClassImplementationOfInterfaceMethod = ResolveInterfaceMethodToVirtualMethodOnTypeRecursive(interfaceMethod, baseType); 757MethodDesc foundOnCurrentType = FindMatchingVirtualMethodOnTypeByNameAndSig(interfaceMethod, currentType, 771public static MethodDesc ResolveVariantInterfaceMethodToVirtualMethodOnType(MethodDesc interfaceMethod, MetadataType currentType) 777MethodDesc implMethod; 802private static MethodDesc ResolveInterfaceMethodToVirtualMethodOnTypeRecursive(MethodDesc interfaceMethod, MetadataType currentType) 817MethodDesc currentTypeInterfaceResolution = ResolveInterfaceMethodToVirtualMethodOnType(interfaceMethod, currentType, returnRecursive: true); 826private static MethodDesc FindNameSigOverrideForInterfaceMethodRecursive(MethodDesc interfaceMethod, MetadataType currentType) 833MethodDesc nameSigOverride = FindMatchingVirtualMethodOnTypeByNameAndSig(interfaceMethod, currentType, 846public override DefaultInterfaceMethodResolution ResolveInterfaceMethodToDefaultImplementationOnType(MethodDesc interfaceMethod, TypeDesc currentType, out MethodDesc impl) 851public override DefaultInterfaceMethodResolution ResolveVariantInterfaceMethodToDefaultImplementationOnType(MethodDesc interfaceMethod, TypeDesc currentType, out MethodDesc impl) 856public static DefaultInterfaceMethodResolution ResolveVariantInterfaceMethodToDefaultImplementationOnType(MethodDesc interfaceMethod, MetadataType currentType, out MethodDesc impl) 867MethodDesc interfaceMethod, 870out MethodDesc candidateMD) 873MethodDesc interfaceMethodDefinition = interfaceMethod.GetMethodDefinition(); 929MethodDesc interfaceMethod, 932out MethodDesc impl) 935MethodDesc interfaceMethodDefinition = interfaceMethod.GetMethodDefinition(); 951MethodDesc[] candidateMethods = new MethodDesc[consideredInterfaces.Length]; 971if (!TryGetCandidateImplementation(currentMT, interfaceMethod, interfaceMT, allowVariance, out MethodDesc currentMD)) 1044MethodDesc bestCandidateMD = null; 1083public override IEnumerable<MethodDesc> ComputeAllVirtualSlots(TypeDesc type) 1089public static IEnumerable<MethodDesc> EnumAllVirtualSlots(MetadataType type) 1093private static IEnumerable<MethodDesc> EnumAllVirtualSlotsOnClass(MetadataType type) 1098foreach (MethodDesc m in type.GetAllVirtualMethods()) 1100MethodDesc possibleVirtual = FindSlotDefiningMethodForVirtualMethod(m); 1118public static MethodDesc ResolveInterfaceMethodToStaticVirtualMethodOnType(MethodDesc interfaceMethod, MetadataType currentType) 1128MethodDesc resolvedMethodOnType = TryResolveVirtualStaticMethodOnThisType(typeToCheck, interfaceMethod); 1143public static MethodDesc ResolveVariantInterfaceMethodToStaticVirtualMethodOnType(MethodDesc interfaceMethod, MetadataType currentType) 1150MethodDesc resolvedMethodOnType = TryResolveVirtualStaticMethodOnThisType(typeToCheck, interfaceMethod); 1175MethodDesc runtimeInterfaceMethod = runtimeInterfaceType.FindMethodOnExactTypeWithMatchingTypicalMethod(interfaceMethod); 1193private static MethodDesc TryResolveVirtualStaticMethodOnThisType(MetadataType constrainedType, MethodDesc interfaceMethod) 1201MethodDesc interfaceMethodDefinition = interfaceMethod.GetMethodDefinition(); 1206MethodDesc resolvedMethodImpl = methodImpl.Body;
parent\parent\Common\TypeSystem\Common\MethodDelegator.cs (5)
15protected readonly MethodDesc _wrappedMethod; 17public MethodDelegator(MethodDesc wrappedMethod) 51public abstract override MethodDesc GetMethodDefinition(); 54public abstract override MethodDesc GetTypicalMethodDefinition(); 57public abstract override MethodDesc InstantiateSignature(Instantiation typeInstantiation, Instantiation methodInstantiation);
parent\parent\Common\TypeSystem\Common\MethodDesc.cs (8)
489public static readonly MethodDesc[] EmptyMethods = new MethodDesc[0]; 536Debug.Assert(o is not MethodDesc || ReferenceEquals(((MethodDesc)o).Context, this.Context)); 709public virtual MethodDesc GetMethodDefinition() 730public virtual MethodDesc GetTypicalMethodDefinition() 767public virtual MethodDesc InstantiateSignature(Instantiation typeInstantiation, Instantiation methodInstantiation) 790MethodDesc method = this;
parent\parent\Common\TypeSystem\Common\MethodForInstantiatedType.cs (4)
14private readonly MethodDesc _typicalMethodDef; 19internal MethodForInstantiatedType(MethodDesc typicalMethodDef, InstantiatedType instantiatedType) 29internal MethodForInstantiatedType(MethodDesc typicalMethodDef, InstantiatedType instantiatedType, int hashcode) 137public override MethodDesc GetTypicalMethodDefinition()
parent\parent\Common\TypeSystem\Common\ThrowHelper.Common.cs (3)
36public static void ThrowTypeLoadException(ExceptionStringID id, MethodDesc method) 55public static string OwningModule(MethodDesc method) 92public static string Method(MethodDesc method)
parent\parent\Common\TypeSystem\Common\ThrowHelper.cs (1)
57public static void ThrowInvalidProgramException(ExceptionStringID id, MethodDesc method)
parent\parent\Common\TypeSystem\Common\TypeDesc.cs (12)
504public virtual IEnumerable<MethodDesc> GetMethods() 506return MethodDesc.EmptyMethods; 512public virtual IEnumerable<MethodDesc> GetVirtualMethods() 514foreach (MethodDesc method in GetMethods()) 525public MethodDesc GetMethod(Utf8Span name, MethodSignature signature) 537public virtual MethodDesc GetMethod(Utf8Span name, MethodSignature signature, Instantiation substitution) 539foreach (var method in GetMethods()) 550public virtual MethodDesc GetMethodWithEquivalentSignature(Utf8Span name, MethodSignature signature, Instantiation substitution) 552foreach (var method in GetMethods()) 567public virtual MethodDesc GetStaticConstructor() 576public virtual MethodDesc GetDefaultConstructor() 654public virtual MethodDesc GetFinalizer()
parent\parent\Common\TypeSystem\Common\TypeDesc.TypeEquivalence.cs (1)
131foreach (var method in GetMethods())
parent\parent\Common\TypeSystem\Common\TypeSystemConstraintsHelpers.cs (2)
208public static bool CheckConstraints(this MethodDesc method, InstantiationContext context = null) 218MethodDesc uninstantiatedMethod = method.GetMethodDefinition();
parent\parent\Common\TypeSystem\Common\TypeSystemContext.cs (11)
354private MethodDesc _methodDef; 358public InstantiatedMethodKey(MethodDesc methodDef, Instantiation instantiation) 366public MethodDesc MethodDef 442public InstantiatedMethod GetInstantiatedMethod(MethodDesc methodDef, Instantiation instantiation) 454private MethodDesc _typicalMethodDef; 458public MethodForInstantiatedTypeKey(MethodDesc typicalMethodDef, InstantiatedType instantiatedType) 465public MethodDesc TypicalMethodDef 515public MethodDesc GetMethodForInstantiatedType(MethodDesc typicalMethodDef, InstantiatedType instantiatedType) 651protected internal virtual IEnumerable<MethodDesc> GetAllMethods(TypeDesc type) 656protected internal virtual IEnumerable<MethodDesc> GetAllVirtualMethods(TypeDesc type)
parent\parent\Common\TypeSystem\Common\TypeSystemHelpers.cs (35)
30public static InstantiatedMethod MakeInstantiatedMethod(this MethodDesc methodDef, Instantiation instantiation) 35public static InstantiatedMethod MakeInstantiatedMethod(this MethodDesc methodDef, params TypeDesc[] genericParameters) 86public static MethodDesc GetParameterlessConstructor(this TypeDesc type) 98internal static MethodDesc FindMethodOnExactTypeWithMatchingTypicalMethod(this TypeDesc type, MethodDesc method) 100MethodDesc methodTypicalDefinition = method.GetTypicalMethodDefinition(); 129public static MethodDesc FindMethodOnTypeWithMatchingTypicalMethod(this TypeDesc targetType, MethodDesc method) 152MethodDesc matchingMethod = targetOrBase.FindMethodOnExactTypeWithMatchingTypicalMethod(method); 165public static IEnumerable<MethodDesc> GetAllMethods(this TypeDesc type) 173public static IEnumerable<MethodDesc> GetAllVirtualMethods(this TypeDesc type) 178public static IEnumerable<MethodDesc> EnumAllVirtualSlots(this TypeDesc type) 187public static MethodDesc ResolveInterfaceMethodToVirtualMethodOnType(this TypeDesc type, MethodDesc interfaceMethod) 192public static MethodDesc ResolveVariantInterfaceMethodToVirtualMethodOnType(this TypeDesc type, MethodDesc interfaceMethod) 197public static MethodDesc ResolveInterfaceMethodToStaticVirtualMethodOnType(this TypeDesc type, MethodDesc interfaceMethod) 202public static MethodDesc ResolveVariantInterfaceMethodToStaticVirtualMethodOnType(this TypeDesc type, MethodDesc interfaceMethod) 207public static DefaultInterfaceMethodResolution ResolveInterfaceMethodToDefaultImplementationOnType(this TypeDesc type, MethodDesc interfaceMethod, out MethodDesc implMethod) 212public static DefaultInterfaceMethodResolution ResolveVariantInterfaceMethodToDefaultImplementationOnType(this TypeDesc type, MethodDesc interfaceMethod, out MethodDesc implMethod) 220public static MethodDesc FindVirtualFunctionTargetMethodOnObjectType(this TypeDesc type, MethodDesc targetMethod) 271public static MethodDesc InstantiateAsOpen(this MethodDesc method) 290public static MethodDesc ResolveInterfaceMethodTarget(this TypeDesc thisType, MethodDesc interfaceMethodToResolve) 294MethodDesc result; 310public static MethodDesc ResolveInterfaceMethodTargetWithVariance(this TypeDesc thisType, MethodDesc interfaceMethodToResolve) 314MethodDesc result; 374public static bool RequiresSlotUnification(this MethodDesc method)
parent\parent\Common\TypeSystem\Common\TypeWithRepeatedFields.cs (2)
126public override IEnumerable<MethodDesc> GetMethods() => MethodDesc.EmptyMethods;
parent\parent\Common\TypeSystem\Common\Utilities\CSharpTypeNameFormatter.cs (1)
16public string FormatName(MethodDesc method)
parent\parent\Common\TypeSystem\Common\VirtualMethodAlgorithm.cs (15)
23public abstract MethodDesc ResolveInterfaceMethodToVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType); 25public abstract MethodDesc ResolveVariantInterfaceMethodToVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType); 27public abstract MethodDesc ResolveInterfaceMethodToStaticVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType); 29public abstract MethodDesc ResolveVariantInterfaceMethodToStaticVirtualMethodOnType(MethodDesc interfaceMethod, TypeDesc currentType); 31public abstract DefaultInterfaceMethodResolution ResolveInterfaceMethodToDefaultImplementationOnType(MethodDesc interfaceMethod, TypeDesc currentType, out MethodDesc impl); 33public abstract DefaultInterfaceMethodResolution ResolveVariantInterfaceMethodToDefaultImplementationOnType(MethodDesc interfaceMethod, TypeDesc currentType, out MethodDesc impl); 38public abstract MethodDesc FindVirtualFunctionTargetMethodOnObjectType(MethodDesc targetMethod, TypeDesc objectType); 43public abstract IEnumerable<MethodDesc> ComputeAllVirtualSlots(TypeDesc type);
parent\parent\Common\TypeSystem\Ecma\EcmaMethod.cs (1)
605public override MethodDesc InstantiateSignature(Instantiation typeInstantiation, Instantiation methodInstantiation) => this;
parent\parent\Common\TypeSystem\Ecma\EcmaMethod.Sorting.cs (1)
13protected internal override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\Ecma\EcmaModule.cs (9)
242public MethodDesc EntryPoint 468public MethodDesc GetMethod(EntityHandle handle) 470MethodDesc method = GetObject(handle, NotFoundBehavior.Throw) as MethodDesc; 543MethodDesc methodDef = resolvedMethod as MethodDesc; 622MethodDesc method = typeDescToInspect.GetMethod(name, sig, substitution); 664else if (parent is MethodDesc) 666ThrowHelper.ThrowInvalidProgramException(ExceptionStringID.InvalidProgramVararg, (MethodDesc)parent);
parent\parent\Common\TypeSystem\Ecma\EcmaType.cs (3)
406public override MethodDesc GetFinalizer() 415MethodDesc decl = objectType.GetMethod("Finalize"u8, null); 419MethodDesc impl = this.FindVirtualFunctionTargetMethodOnObjectType(decl);
parent\parent\Common\TypeSystem\Ecma\EcmaType.MethodImpls.cs (5)
49(MethodDesc)_module.GetObject(methodImpl.MethodDeclaration), 50(MethodDesc)_module.GetObject(methodImpl.MethodBody)); 88owningType = ((MethodDesc)_module.GetObject(methodDeclCheckHandle)).OwningType as MetadataType; 104(MethodDesc)_module.GetObject(methodImpl.MethodDeclaration), 105(MethodDesc)_module.GetObject(methodImpl.MethodBody));
parent\parent\Common\TypeSystem\IL\EcmaMethodIL.cs (4)
148private readonly MethodDesc _method; 150public static EcmaMethodILScope Create(MethodDesc method) 155private EcmaMethodILScope(MethodDesc method) 173public override MethodDesc OwningMethod
parent\parent\Common\TypeSystem\IL\HelperExtensions.cs (8)
30public static MethodDesc GetHelperEntryPoint(this TypeSystemContext context, ReadOnlySpan<byte> typeName, ReadOnlySpan<byte> methodName) 33MethodDesc helperMethod = helperType.GetKnownMethod(methodName, null); 37public static MethodDesc GetCoreLibEntryPoint(this TypeSystemContext context, ReadOnlySpan<byte> namespaceName, ReadOnlySpan<byte> typeName, ReadOnlySpan<byte> methodName, MethodSignature signature) 43public static MethodDesc GetOptionalHelperEntryPoint(this TypeSystemContext context, ReadOnlySpan<byte> typeName, ReadOnlySpan<byte> methodName) 46MethodDesc helperMethod = helperType?.GetMethod(methodName, null); 55public static void EmitCallThrowHelper(this ILCodeStream codeStream, ILEmitter emitter, MethodDesc method) 74public static MethodDesc GetKnownMethod(this TypeDesc type, ReadOnlySpan<byte> name, MethodSignature signature) 76MethodDesc method = type.GetMethod(name, signature);
parent\parent\Common\TypeSystem\IL\ILDisassembler.cs (3)
80private void AppendMethodSignature(StringBuilder sb, MethodDesc method) 171if (obj is MethodDesc) 172AppendMethodSignature(sb, (MethodDesc)obj);
parent\parent\Common\TypeSystem\IL\ILStackHelper.cs (1)
255methodSignature : ((MethodDesc)obj).Signature;
parent\parent\Common\TypeSystem\IL\InstantiatedMethodIL.cs (5)
12private MethodDesc _method; 17public InstantiatedMethodIL(MethodDesc owningMethod, MethodIL methodIL) 29public override MethodDesc OwningMethod 93if (o is MethodDesc) 95o = ((MethodDesc)o).InstantiateSignature(_typeInstantiation, _methodInstantiation);
parent\parent\Common\TypeSystem\IL\MethodIL.cs (1)
59public abstract MethodDesc OwningMethod { get; }
parent\parent\Common\TypeSystem\IL\MethodILDebugView.cs (1)
27MethodDesc owningMethod = _methodIL.OwningMethod;
parent\parent\Common\TypeSystem\IL\Stubs\ILEmitter.cs (6)
557private readonly MethodDesc _method; 565public ILStubMethodIL(MethodDesc owningMethod, byte[] ilBytes, LocalVariableDefinition[] locals, object[] tokens, ILExceptionRegion[] exceptionRegions = null, MethodDebugInformation debugInfo = null, bool stubILHasGeneratedTokens = false) 593public override MethodDesc OwningMethod 715public ILToken NewToken(MethodDesc value) 762public MethodIL Link(MethodDesc owningMethod) 907public abstract MethodIL EmitIL(MethodDesc specializedMethod);
parent\parent\Common\TypeSystem\IL\Stubs\PInvokeTargetNativeMethod.cs (3)
18private readonly MethodDesc _declMethod; 21public MethodDesc Target 29public PInvokeTargetNativeMethod(MethodDesc declMethod, MethodSignature signature)
parent\parent\Common\TypeSystem\IL\Stubs\PInvokeTargetNativeMethod.Mangling.cs (1)
11MethodDesc IPrefixMangledMethod.BaseMethod
parent\parent\Common\TypeSystem\IL\Stubs\PInvokeTargetNativeMethod.Sorting.cs (1)
13protected internal override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\IL\UnsafeAccessors.cs (10)
169private static bool TryParseUnsafeAccessorAttribute(MethodDesc method, CustomAttributeValue<TypeDesc> decodedValue, out UnsafeAccessorKind kind, out string name) 225public MethodDesc TargetMethod; 253private static bool DoesMethodMatchUnsafeAccessorDeclaration(ref GenerationContext context, MethodDesc method, bool ignoreCustomModifiers) 389private static bool VerifyDeclarationSatisfiesTargetConstraints(MethodDesc declaration, TypeDesc targetType, MethodDesc targetMethod) 433MethodDesc targetMaybe = null; 434foreach (MethodDesc md in targetType.GetMethods()) 816MethodDesc thrower; 861private static MethodIL GenerateAccessorBadImageFailure(MethodDesc method) 869MethodDesc thrower = method.Context.GetHelperEntryPoint("ThrowHelpers"u8, "ThrowBadImageFormatException"u8);
parent\parent\Common\TypeSystem\Mangling\IPrefixMangledMethod.cs (1)
17MethodDesc BaseMethod { get; }
parent\parent\Common\TypeSystem\RuntimeDetermined\ArrayType.RuntimeDetermined.cs (1)
22public override MethodDesc GetNonRuntimeDeterminedMethodFromRuntimeDeterminedMethodViaSubstitution(Instantiation typeInstantiation, Instantiation methodInstantiation)
parent\parent\Common\TypeSystem\RuntimeDetermined\MethodDesc.RuntimeDetermined.cs (5)
12public MethodDesc GetSharedRuntimeFormMethodTarget() 14MethodDesc result = this; 30MethodDesc uninstantiatedMethod = result.GetMethodDefinition(); 101public virtual MethodDesc GetNonRuntimeDeterminedMethodFromRuntimeDeterminedMethodViaSubstitution(Instantiation typeInstantiation, Instantiation methodInstantiation) 124MethodDesc method = this;
parent\parent\Common\TypeSystem\RuntimeDetermined\MethodForRuntimeDeterminedType.cs (5)
13private MethodDesc _typicalMethodDef; 16internal MethodForRuntimeDeterminedType(MethodDesc typicalMethodDef, RuntimeDeterminedType rdType) 27internal MethodForRuntimeDeterminedType(MethodDesc typicalMethodDef, RuntimeDeterminedType rdType, int hashcode) 42public override MethodDesc GetTypicalMethodDefinition() => _typicalMethodDef; 58public override MethodDesc GetCanonMethodTarget(CanonicalFormKind kind)
parent\parent\Common\TypeSystem\RuntimeDetermined\MethodForRuntimeDeterminedType.Sorting.cs (1)
11protected internal override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\RuntimeDetermined\RuntimeDeterminedType.cs (8)
112public override IEnumerable<MethodDesc> GetMethods() 114foreach (var method in _rawCanonType.GetMethods()) 120public override IEnumerable<MethodDesc> GetVirtualMethods() 122foreach (var method in _rawCanonType.GetVirtualMethods()) 128public override MethodDesc GetMethod(Utf8Span name, MethodSignature signature, Instantiation substitution) 130MethodDesc method = _rawCanonType.GetMethod(name, signature, substitution); 136public override MethodDesc GetMethodWithEquivalentSignature(Utf8Span name, MethodSignature signature, Instantiation substitution) 138MethodDesc method = _rawCanonType.GetMethodWithEquivalentSignature(name, signature, substitution);
parent\parent\Common\TypeSystem\RuntimeDetermined\TypeSystemContext.RuntimeDetermined.cs (5)
72private MethodDesc _typicalMethodDef; 76public MethodForRuntimeDeterminedTypeKey(MethodDesc typicalMethodDef, RuntimeDeterminedType rdType) 83public MethodDesc TypicalMethodDef 133public MethodDesc GetMethodForRuntimeDeterminedType(MethodDesc typicalMethodDef, RuntimeDeterminedType rdType)
parent\parent\Common\TypeSystem\Sorting\ArrayType.Sorting.cs (1)
26protected internal override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\Sorting\InstantiatedMethod.Sorting.cs (1)
11protected internal override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\Sorting\MethodDesc.Sorting.cs (1)
20protected internal abstract int CompareToImpl(MethodDesc other, TypeSystemComparer comparer);
parent\parent\Common\TypeSystem\Sorting\MethodForInstantiatedType.Sorting.cs (1)
11protected internal override int CompareToImpl(MethodDesc other, TypeSystemComparer comparer)
parent\parent\Common\TypeSystem\Sorting\TypeSystemComparer.cs (3)
28public class TypeSystemComparer : IComparer<TypeDesc>, IComparer<MethodDesc>, IComparer<FieldDesc>, IComparer<MethodSignature>, IComparer<ModuleDesc> 73public int Compare(MethodDesc x, MethodDesc y)