33 overrides of OwningType
ILCompiler.Compiler (22)
Compiler\CompilerTypeSystemContext.InterfaceThunks.cs (1)
190public override TypeDesc OwningType => _owningType;
Compiler\ReachabilityInstrumentationProvider.cs (1)
242public override TypeDesc OwningType => _context.GeneratedAssembly.GetGlobalModuleType();
IL\Stubs\StartupCode\NativeLibraryStartupMethod.cs (1)
36public override TypeDesc OwningType
IL\Stubs\StartupCode\StartupCodeMainMethod.cs (2)
41public override TypeDesc OwningType 229public override TypeDesc OwningType
parent\parent\Common\Compiler\CompilerTypeSystemContext.BoxedTypes.cs (2)
391public override TypeDesc OwningType => _owningType; 504public override TypeDesc OwningType => _owningType;
parent\parent\Common\Compiler\TypeMapMetadata.cs (1)
179public override TypeDesc OwningType { get; }
parent\parent\Common\TypeSystem\IL\Stubs\AssemblyGetExecutingAssemblyMethodThunk.cs (1)
58public override TypeDesc OwningType
parent\parent\Common\TypeSystem\IL\Stubs\AsyncResumptionStub.cs (1)
32public override TypeDesc OwningType => _owningType;
parent\parent\Common\TypeSystem\IL\Stubs\CalliMarshallingMethodThunk.cs (1)
48public override TypeDesc OwningType
parent\parent\Common\TypeSystem\IL\Stubs\DelegateMarshallingMethodThunk.cs (1)
91public override TypeDesc OwningType
parent\parent\Common\TypeSystem\IL\Stubs\DelegateThunks.cs (2)
38public sealed override TypeDesc OwningType 678public override TypeDesc OwningType
parent\parent\Common\TypeSystem\IL\Stubs\DynamicInvokeMethodThunk.cs (1)
84public override TypeDesc OwningType
parent\parent\Common\TypeSystem\IL\Stubs\ForwardDelegateCreationThunk.cs (1)
38public override TypeDesc OwningType
parent\parent\Common\TypeSystem\IL\Stubs\GetFieldHelperMethodOverride.cs (1)
39public override TypeDesc OwningType
parent\parent\Common\TypeSystem\IL\Stubs\MethodBaseGetCurrentMethodThunk.cs (1)
58public override TypeDesc OwningType
parent\parent\Common\TypeSystem\IL\Stubs\StructMarshallingThunk.cs (1)
64public override TypeDesc OwningType
parent\parent\Common\TypeSystem\IL\Stubs\TypeGetTypeMethodThunk.cs (1)
55public override TypeDesc OwningType
parent\parent\Common\TypeSystem\Interop\IL\InlineArrayType.cs (1)
313public override TypeDesc OwningType
parent\parent\Common\TypeSystem\Interop\IL\PInvokeDelegateWrapperConstructor.cs (1)
22public override TypeDesc OwningType
ILCompiler.ReadyToRun (4)
parent\parent\Common\Compiler\CompilerTypeSystemContext.BoxedTypes.cs (2)
391public override TypeDesc OwningType => _owningType; 504public override TypeDesc OwningType => _owningType;
parent\parent\Common\Compiler\TypeMapMetadata.cs (1)
179public override TypeDesc OwningType { get; }
parent\parent\Common\TypeSystem\IL\Stubs\AsyncResumptionStub.cs (1)
32public override TypeDesc OwningType => _owningType;
ILCompiler.TypeSystem (7)
parent\parent\Common\TypeSystem\Common\ArrayType.cs (1)
203public override TypeDesc OwningType
parent\parent\Common\TypeSystem\Common\InstantiatedMethod.cs (1)
50public override TypeDesc OwningType
parent\parent\Common\TypeSystem\Common\MethodDelegator.cs (1)
24public override TypeDesc OwningType => _wrappedMethod.OwningType;
parent\parent\Common\TypeSystem\Common\MethodForInstantiatedType.cs (1)
43public override TypeDesc OwningType
parent\parent\Common\TypeSystem\Ecma\EcmaMethod.cs (1)
74public override EcmaType OwningType
parent\parent\Common\TypeSystem\IL\Stubs\PInvokeTargetNativeMethod.cs (1)
43public override TypeDesc OwningType
parent\parent\Common\TypeSystem\RuntimeDetermined\MethodForRuntimeDeterminedType.cs (1)
34public override TypeDesc OwningType => _rdType;
762 references to OwningType
crossgen2 (2)
Program.cs (2)
854sb.Append($"--singlemethodtypename \"{formatter.FormatName(method.OwningType, true)}\""); 858foreach (var searchMethod in method.OwningType.GetMethods())
ilc (1)
Program.cs (1)
179if (singleMethod.OwningType is MetadataType { Module.Assembly: EcmaAssembly assembly })
ILCompiler.Compiler (411)
Compiler\AnalysisBasedMetadataManager.cs (2)
77|| (_reflectableTypes[refMethod.Entity.OwningType] & MetadataCategory.Description) != 0); 79|| (_reflectableTypes[refMethod.Entity.OwningType] & MetadataCategory.RuntimeMapping) != 0);
Compiler\Compilation.cs (7)
178var intrinsicOwningType = intrinsicMethod.OwningType as MetadataType; 189ModuleDesc callsiteModule = (callsiteMethod.OwningType as MetadataType)?.Module; 201ModuleDesc callsiteModule = (callsiteMethod.OwningType as MetadataType)?.Module; 424dictionaryLayout = _nodeFactory.GenericDictionaryLayout(contextMethod.OwningType); 442int vtableSlot = VirtualMethodSlotHelper.GetGenericDictionarySlot(_nodeFactory, contextMethod.OwningType); 463if (containingMethod.OwningType is MetadataType owningType) 522TypeDesc runtimeDeterminedOwningType = calledMethod.OwningType;
Compiler\CompilerTypeSystemContext.GetFieldMethodOverrides.cs (4)
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;
Compiler\CompilerTypeSystemContext.InterfaceThunks.cs (4)
75Debug.Assert(interfaceOnDefinition.GetTypeDefinition() == targetMethod.OwningType.GetTypeDefinition()); 76Debug.Assert(targetMethod.OwningType.IsInterface); 85if (useContextFromRuntime && targetMethod.OwningType == implementingClass) 176Debug.Assert(targetMethod.OwningType.IsInterface);
Compiler\Dataflow\AttributeDataFlow.cs (1)
67TypeDesc attributeType = method.OwningType;
Compiler\Dataflow\CompilerGeneratedState.cs (9)
141bool isStateMachineMember = CompilerGeneratedNames.IsStateMachineType(((MetadataType)method.OwningType).Name.AsSpan()); 183referencedMethod.OwningType is MetadataType generatedType && 185!IsSameOrNestedType(method.OwningType, generatedType) && 204callGraph.TrackCall((MetadataType)method.OwningType, referencedMethod); 226!IsSameOrNestedType(method.OwningType, generatedType) && 415TypeDesc instantiatedType = typeRef.InstantiateSignature(method.OwningType.Instantiation, method.Instantiation); 435if (method.OwningType is not MetadataType owningType || !CompilerGeneratedNames.IsStateMachineOrDisplayClass(owningType.Name.AsSpan())) 474if (methodOperand is MethodDesc { OwningType: MetadataType owningType } 668if (method.OwningType is not MetadataType owningType)
Compiler\Dataflow\DiagnosticUtilities.cs (2)
103if (method.OwningType is TypeDesc type && TryGetRequiresAttribute(type, requiresAttribute, out attribute)) 130if ((method.Signature.IsStatic || method.IsConstructor) && method.OwningType is TypeDesc owningType &&
Compiler\Dataflow\FlowAnnotations.cs (10)
57TypeAnnotations typeAnnotations = GetAnnotations(method.OwningType); 73return GetAnnotations(method.OwningType).TryGetAnnotation(method, out _); 115return GetAnnotations(method.OwningType).TryGetAnnotation(method, out var annotation) && annotation.GenericParameterAnnotations != null; 127if (GetAnnotations(method.OwningType).TryGetAnnotation(method, out var annotation) && annotation.ParameterAnnotations != null) 139if (GetAnnotations(method.OwningType).TryGetAnnotation(method, out var annotation)) 191if (GetAnnotations(parent.OwningType).TryGetAnnotation(parent, out var methodAnnotation) 205if (!GetAnnotations(method.OwningType).TryGetAnnotation(method, out var annotation)) 715found.OwningType != body.OwningMethod.OwningType || 732GetAnnotations(method.OwningType).TryGetAnnotation(method, out var methodAnnotations); 733GetAnnotations(baseMethod.OwningType).TryGetAnnotation(baseMethod, out var baseMethodAnnotations);
Compiler\Dataflow\GenericArgumentDataFlow.cs (3)
45ProcessGenericArgumentDataFlow(ref dependencies, factory, origin, type, contextMethod.OwningType.Instantiation, contextMethod.Instantiation); 115ProcessGenericArgumentDataFlow(diagnosticContext, reflectionMarker, method.OwningType); 168return RequiresGenericArgumentDataFlow(flowAnnotations, method.OwningType);
Compiler\Dataflow\HandleCallAction.cs (3)
152else if (!methodInstantiated.OwningType.IsGenericDefinition 652TypeDesc contextType = contextMethod.OwningType; 685TypeDesc? type = method.Method.OwningType;
Compiler\Dataflow\InterproceduralState.cs (1)
94if (methodIL.OwningMethod.HasInstantiation || methodIL.OwningMethod.OwningType.HasInstantiation)
Compiler\Dataflow\MethodReturnValue.cs (1)
24StaticType = isNewObj ? method.OwningType : method.Signature.ReturnType;
Compiler\Dataflow\ReflectionMethodBodyScanner.cs (1)
447if (!method.Signature.IsStatic && !method.HasInstantiation && !method.IsConstructor && !method.OwningType.IsValueType)
Compiler\DelegateCreationInfo.cs (2)
66return TargetMethod.OwningType.IsValueType && !TargetMethod.Signature.IsStatic; 271if (targetMethod.OwningType.IsInterface)
Compiler\DependencyAnalysis\CodeBasedDependencyAlgorithm.cs (3)
23if (method.OwningType is MetadataType mdType) 28if (method.OwningType is MetadataType owningType) 72return method.HasInstantiation || method.OwningType.HasInstantiation;
Compiler\DependencyAnalysis\CustomAttributeBasedDependencyAlgorithm.cs (3)
114if (!mdManager.GeneratesAttributeMetadata(constructor.OwningType)) 126caDependencies.Add(factory.ReflectedType(constructor.OwningType), "Attribute type"); 128if (AddDependenciesFromCustomAttributeBlob(caDependencies, factory, constructor.OwningType, decodedValue))
Compiler\DependencyAnalysis\DataflowAnalyzedMethodNode.cs (1)
65foreach (var d in n.Dependency.InstantiateDependencies(factory, method.OwningType.Instantiation, method.Instantiation, isConcreteInstantiation: !method.IsSharedByGenericInstantiations))
Compiler\DependencyAnalysis\DispatchCellNode.cs (1)
30Debug.Assert(targetMethod.HasInstantiation || targetMethod.OwningType.IsInterface);
Compiler\DependencyAnalysis\EETypeNode.cs (15)
162if (slotDecl.OwningType == defType || 378bool implOwnerIsAbstract = ((MetadataType)impl.OwningType).IsAbstract; 390if ((impl.OwningType == defType || implOwnerIsAbstract) && !impl.IsAbstract) 404factory.TentativeMethodEntrypoint(canonImpl, impl.OwningType.IsValueType) : 405factory.MethodEntrypoint(canonImpl, impl.OwningType.IsValueType); 409factory.AddressTakenMethodEntrypoint(canonImpl, impl.OwningType.IsValueType), 413if (impl.OwningType == defType) 470while (!implType.HasSameTypeDefinition(implMethod.OwningType)) 516TypeSystemEntity origin = (implMethod.OwningType != defType) ? defType : null; 529DefType providingInterfaceDefinitionType = (DefType)implMethod.OwningType; 1000if ((declType.IsObject && (declMethod.Name == "Equals"u8 || declMethod.Name == "GetHashCode"u8) && implMethod.OwningType.IsWellKnownType(WellKnownType.ValueType)) 1017&& implMethod.OwningType is MetadataType mdImplMethodType && mdImplMethodType.IsAbstract 1022implSymbol = factory.TentativeMethodEntrypoint(canonImplMethod, implMethod.OwningType.IsValueType); 1024implSymbol = factory.AddressTakenMethodEntrypoint(canonImplMethod, implMethod.OwningType.IsValueType); 1026implSymbol = factory.MethodEntrypoint(canonImplMethod, implMethod.OwningType.IsValueType);
Compiler\DependencyAnalysis\ExactMethodInstantiationsNode.cs (5)
55bool getUnboxingStub = method.OwningType.IsValueType && !method.Signature.IsStatic; 62ISymbolNode declaringTypeNode = factory.NecessaryTypeSymbol(method.OwningType); 94uint hashCode = (uint)method.OwningType.GetHashCode(); 108bool getUnboxingStub = method.OwningType.IsValueType && !method.Signature.IsStatic; 114dependencies.Add(new DependencyListEntry(factory.NecessaryTypeSymbol(method.OwningType), "Exact method instantiation entry"));
Compiler\DependencyAnalysis\FatFunctionPointerNode.cs (1)
88contextParameter = factory.ConstructedTypeSymbol(Method.OwningType);
Compiler\DependencyAnalysis\GenericDictionaryNode.cs (2)
194public override Instantiation TypeInstantiation => _owningMethod.OwningType.Instantiation; 221foreach (var arg in _owningMethod.OwningType.Instantiation)
Compiler\DependencyAnalysis\GenericLookupResult.cs (7)
43TypeDesc owningType = owningMethodDefinition.OwningType; 49Debug.Assert(owningMethodDefinition.OwningType.Instantiation.IsNull 50|| owningMethodDefinition.OwningType.Instantiation.Length == 0); 705Debug.Assert(method.HasInstantiation || method.OwningType.IsInterface); 1074if (!canonMethod.HasInstantiation && !factory.VTable(canonMethod.OwningType).HasKnownVirtualMethodUse) 1101if (instantiatedConstrainedMethod.OwningType.IsInterface) 1134Debug.Assert(instantiatedConstraintType.IsValueType || (instantiatedConstrainedMethod.OwningType.IsInterface && instantiatedConstrainedMethod.Signature.IsStatic));
Compiler\DependencyAnalysis\GenericMethodsHashtableNode.cs (2)
58IEETypeNode containingTypeNode = factory.NecessaryTypeSymbol(method.OwningType); 103IEETypeNode containingTypeNode = factory.NecessaryTypeSymbol(method.OwningType);
Compiler\DependencyAnalysis\GenericVirtualMethodImplNode.cs (2)
46_method.OwningType.Instantiation.CheckValidInstantiationArguments() && 51bool getUnboxingStub = _method.OwningType.IsValueType && !_method.Signature.IsStatic;
Compiler\DependencyAnalysis\GenericVirtualMethodTableNode.cs (8)
48Debug.Assert(!callingMethod.OwningType.IsInterface); 55dependencies.Add(factory.NecessaryTypeSymbol(openCallingMethod.OwningType), "Owning type of GVM declaration"); 57dependencies.Add(factory.NecessaryTypeSymbol(openImplementationMethod.OwningType), "Owning type of GVM implementation"); 62Debug.Assert(!callingMethod.OwningType.IsInterface); 72_gvmImplementations[openCallingMethod][openImplementationMethod.OwningType] = openImplementationMethod; 102Debug.Assert(!gvmEntry.Key.OwningType.IsInterface); 110uint callingTypeId = _externalReferences.GetIndex(factory.NecessaryTypeSymbol(callingMethod.OwningType)); 122int hashCode = callingMethod.OwningType.GetHashCode();
Compiler\DependencyAnalysis\GvmDispatchCellInfoSectionNode.cs (2)
60uint owningTypeIndex = _externalReferences.GetIndex(factory.MaximallyConstructableType(targetMethod.OwningType)); 115result.Add(factory.MaximallyConstructableType(targetMethod.OwningType), "Owning type of GVM decl");
Compiler\DependencyAnalysis\ILScanNodeFactory.cs (1)
27return new ScannedMethodNode(((ArrayType)method.OwningType).GetArrayMethod(ArrayMethodKind.AddressWithHiddenArg));
Compiler\DependencyAnalysis\InlineableStringsResourceNode.cs (1)
63if (method.Name == ResourceAccessorGetStringMethodName && method.OwningType is MetadataType mdType
Compiler\DependencyAnalysis\InterfaceDispatchCellInfoSectionNode.cs (5)
61int targetSlot = VirtualMethodSlotHelper.GetVirtualMethodSlot(factory, targetMethod, targetMethod.OwningType); 96if (!factory.VTable(targetMethod.OwningType).HasKnownVirtualMethodUse) 112if (factory.DevirtualizationManager.CanHaveDynamicInterfaceImplementations(targetMethod.OwningType)) 114return factory.ConstructedTypeSymbol(targetMethod.OwningType); 118return factory.NecessaryTypeSymbol(targetMethod.OwningType);
Compiler\DependencyAnalysis\InterfaceDispatchMapNode.cs (2)
195while (!implType.HasSameTypeDefinition(implMethod.OwningType)) 240providingInterfaceDefinitionType = (DefType)implMethod.OwningType;
Compiler\DependencyAnalysis\InterfaceGenericVirtualMethodTableNode.cs (9)
50Debug.Assert(callingMethod.OwningType.IsInterface); 62dependencies.Add(new DependencyListEntry(factory.NecessaryTypeSymbol(openImplementationMethod.OwningType), "interface gvm table implementation method owning type")); 71if (openImplementationType.RuntimeInterfaces[index] == callingMethod.OwningType) 83Debug.Assert(callingMethod.OwningType.IsInterface); 109if (openImplementationType.RuntimeInterfaces[index] == callingMethod.OwningType) 147Debug.Assert(gvmEntry.Key.OwningType.IsInterface); 152uint typeId = _externalReferences.GetIndex(factory.NecessaryTypeSymbol(callingMethod.OwningType)); 165typeId = _externalReferences.GetIndex(factory.NecessaryTypeSymbol(implementationMethod.OwningType)); 216int hashCode = callingMethod.OwningType.GetHashCode();
Compiler\DependencyAnalysis\MethodAssociatedDataNode.cs (1)
40public override bool IsShareable => _methodNode.Method is InstantiatedMethod || EETypeNode.IsTypeNodeShareable(_methodNode.Method.OwningType);
Compiler\DependencyAnalysis\ModuleInitializerListNode.cs (1)
43if (method.OwningType is MetadataType mdType
Compiler\DependencyAnalysis\NativeLayoutVertexNode.cs (21)
109public virtual bool IsUnboxingStub => _method.OwningType.IsValueType && !_method.Signature.IsStatic; 120_containingTypeSig = factory.NativeLayout.TypeSignatureVertex(method.OwningType); 136dependencies.Add(new DependencyListEntry(context.NecessaryTypeSymbol(_method.OwningType), "NativeLayoutMethodEntryVertexNode containing type")); 237IEETypeNode eetypeNode = factory.NecessaryTypeSymbol(_method.OwningType); 653if (method.Signature.IsStatic && !method.OwningType.IsInterface) 693foreach (var dependency in context.NativeLayout.TemplateConstructableTypes(_method.OwningType)) 817foreach (var dependency in context.NativeLayout.TemplateConstructableTypes(_method.OwningType)) 1244_signature = factory.NativeLayout.TypeSignatureVertex(method.OwningType); 1259if (!factory.VTable(method.OwningType).HasKnownVirtualMethodUse) 1264foreach (var dependency in factory.NativeLayout.TemplateConstructableTypes(method.OwningType)) 1276int slot = VirtualMethodSlotHelper.GetVirtualMethodSlot(factory, method, method.OwningType); 1300foreach (var dependency in factory.NativeLayout.TemplateConstructableTypes(_method.OwningType)) 1341foreach (var dependency in factory.NativeLayout.TemplateConstructableTypes(_method.OwningType)) 1425foreach (var dependency in factory.NativeLayout.TemplateConstructableTypes(_method.OwningType)) 1438if (_method.IsVirtual && _method.HasInstantiation && !_method.IsGenericMethodDefinition && !_method.OwningType.IsGenericDefinition) 1465Debug.Assert(_constrainedMethod.OwningType.IsInterface); 1498constrainedMethodDescriptorNode = factory.NativeLayout.TypeSignatureVertex(_constrainedMethod.OwningType); 1505foreach (var dependency in factory.NativeLayout.TemplateConstructableTypes(_constrainedMethod.OwningType)) 1538Vertex methodType = factory.NativeLayout.TypeSignatureVertex(_constrainedMethod.OwningType).WriteVertex(factory); 1540int interfaceSlot = VirtualMethodSlotHelper.GetVirtualMethodSlot(factory, canonConstrainedMethod, canonConstrainedMethod.OwningType); 1587foreach (var dependency in factory.NativeLayout.TemplateConstructableTypes(_method.OwningType))
Compiler\DependencyAnalysis\NodeFactory.cs (4)
424Debug.Assert(method.OwningType.IsGenericDefinition || !VTable(method.OwningType).HasKnownVirtualMethodUse); 522Debug.Assert(PreinitializationManager.HasEagerStaticConstructor((MetadataType)method.OwningType)); 1399Debug.Assert(!_factory.VTable(key.OwningType).HasKnownVirtualMethodUse);
Compiler\DependencyAnalysis\PInvokeMethodFixupNode.cs (1)
129ModuleDesc declaringModule = ((MetadataType)pInvokeLazyFixupField.TargetMethod.OwningType).Module;
Compiler\DependencyAnalysis\ReadyToRunGenericHelperNode.cs (1)
158if (!factory.VTable(instantiatedTargetMethod.OwningType).HasKnownVirtualMethodUse)
Compiler\DependencyAnalysis\ReadyToRunHelperNode.cs (2)
133if (!factory.VTable(targetMethod.OwningType).HasKnownVirtualMethodUse) 154if (!factory.VTable(info.TargetMethod.OwningType).HasKnownVirtualMethodUse)
Compiler\DependencyAnalysis\ReflectionInvokeMapNode.cs (6)
47dependencies.Add(factory.MaximallyConstructableType(method.OwningType), "Reflection invoke"); 60if (method.OwningType.IsValueType && !method.Signature.IsStatic) 153bool goesThroughInstantiatingUnboxingThunk = method.OwningType.IsValueType && !method.Signature.IsStatic && !method.HasInstantiation; 184IEETypeNode owningTypeSymbol = factory.NecessaryTypeSymbol(method.OwningType); 193unboxingStub: method.OwningType.IsValueType && !method.Signature.IsStatic)))); 214int hashCode = method.OwningType.GetHashCode();
Compiler\DependencyAnalysis\ReflectionVirtualInvokeMapNode.cs (8)
56TypeDesc typeOfDeclaringMethodForSlot = declaringMethodForSlot.OwningType.GetTypeDefinition(); 57TypeDesc currentType = method.OwningType.GetTypeDefinition(); 58TypeDesc containingTypeOfDeclaringMethodForSlot = method.OwningType; 86factory.NecessaryTypeSymbol(method.OwningType.ConvertToCanonForm(CanonicalFormKind.Specific)), 99if (!factory.VTable(slotDefiningMethod.OwningType).HasKnownVirtualMethodUse) 132if (!factory.MetadataManager.TypeGeneratesEEType(method.OwningType)) 156TypeDesc containingTypeKey = method.OwningType.ConvertToCanonForm(CanonicalFormKind.Specific); 189int slot = VirtualMethodSlotHelper.GetVirtualMethodSlot(factory, declaringMethodForSlot, declaringMethodForSlot.OwningType, true);
Compiler\DependencyAnalysis\RuntimeMethodHandleNode.cs (3)
25|| targetMethod.OwningType.IsGenericDefinition 53if (!_targetMethod.IsMethodDefinition && !_targetMethod.OwningType.IsGenericDefinition 80objData.EmitPointerReloc(factory.MaximallyConstructableType(_targetMethod.OwningType));
Compiler\DependencyAnalysis\ScannedMethodNode.cs (2)
65TypeDesc owningType = _method.OwningType; 90public override bool InterestingForDynamicDependencyAnalysis => _method.HasInstantiation || _method.OwningType.HasInstantiation;
Compiler\DependencyAnalysis\SealedVTableNode.cs (7)
185if (implMethod.Signature.IsStatic || !implMethod.OwningType.HasSameTypeDefinition(declType)) 188while (!implType.HasSameTypeDefinition(implMethod.OwningType)) 214DefType providingInterfaceDefinitionType = (DefType)implMethod.OwningType; 234node = factory.AddressTakenMethodEntrypoint(canonImplMethod, unboxingStub: implMethod.OwningType.IsValueType && !implMethod.Signature.IsStatic); 236node = factory.MethodEntrypoint(canonImplMethod, unboxingStub: implMethod.OwningType.IsValueType && !implMethod.Signature.IsStatic); 305Debug.Assert(interfaceDefinition == null || method.GetTypicalMethodDefinition().OwningType == interfaceDefinition.GetTypeDefinition()); 339Debug.Assert(method.GetTypicalMethodDefinition().OwningType == interfaceDefinition.GetTypeDefinition());
Compiler\DependencyAnalysis\StringAllocatorMethodNode.cs (3)
38Debug.Assert(constructorMethod.IsConstructor && constructorMethod.OwningType.IsString); 43signatureBuilder.ReturnType = constructorMethod.OwningType; 45_allocationMethod = constructorMethod.OwningType.GetKnownMethod("Ctor"u8, signatureBuilder.ToSignature());
Compiler\DependencyAnalysis\Target_ARM\ARMReadyToRunHelperNode.cs (3)
103slot = VirtualMethodSlotHelper.GetVirtualMethodSlot(factory, target.TargetMethod, target.TargetMethod.OwningType); 131if (targetMethod.OwningType.IsInterface) 145int slot = VirtualMethodSlotHelper.GetVirtualMethodSlot(factory, targetMethod, targetMethod.OwningType);
Compiler\DependencyAnalysis\Target_ARM64\ARM64ReadyToRunHelperNode.cs (3)
118slot = VirtualMethodSlotHelper.GetVirtualMethodSlot(factory, target.TargetMethod, target.TargetMethod.OwningType); 146if (targetMethod.OwningType.IsInterface) 160int slot = VirtualMethodSlotHelper.GetVirtualMethodSlot(factory, targetMethod, targetMethod.OwningType);
Compiler\DependencyAnalysis\Target_LoongArch64\LoongArch64ReadyToRunHelperNode.cs (3)
110slot = VirtualMethodSlotHelper.GetVirtualMethodSlot(factory, target.TargetMethod, target.TargetMethod.OwningType); 138if (targetMethod.OwningType.IsInterface) 152int slot = VirtualMethodSlotHelper.GetVirtualMethodSlot(factory, targetMethod, targetMethod.OwningType);
Compiler\DependencyAnalysis\Target_RiscV64\RiscV64ReadyToRunHelperNode.cs (3)
108slot = VirtualMethodSlotHelper.GetVirtualMethodSlot(factory, target.TargetMethod, target.TargetMethod.OwningType); 136if (targetMethod.OwningType.IsInterface) 150int slot = VirtualMethodSlotHelper.GetVirtualMethodSlot(factory, targetMethod, targetMethod.OwningType);
Compiler\DependencyAnalysis\Target_X64\X64ReadyToRunHelperNode.cs (3)
123slot = VirtualMethodSlotHelper.GetVirtualMethodSlot(factory, target.TargetMethod, target.TargetMethod.OwningType); 151if (targetMethod.OwningType.IsInterface) 166int slot = VirtualMethodSlotHelper.GetVirtualMethodSlot(factory, targetMethod, targetMethod.OwningType);
Compiler\DependencyAnalysis\Target_X86\X86ReadyToRunHelperNode.cs (3)
127slot = VirtualMethodSlotHelper.GetVirtualMethodSlot(factory, target.TargetMethod, target.TargetMethod.OwningType); 160if (targetMethod.OwningType.IsInterface) 175int slot = VirtualMethodSlotHelper.GetVirtualMethodSlot(factory, targetMethod, targetMethod.OwningType);
Compiler\DependencyAnalysis\TentativeInstanceMethodNode.cs (2)
28Debug.Assert(!methodNode.Method.OwningType.IsValueType); 43TypeDesc owningType = Method.OwningType;
Compiler\DependencyAnalysis\TypeGVMEntriesNode.cs (1)
94if (impl.OwningType == _associatedType)
Compiler\DependencyAnalysis\UnboxingStubNode.cs (1)
34Debug.Assert(target.OwningType.IsValueType);
Compiler\DependencyAnalysis\VariantInterfaceMethodUseNode.cs (2)
30Debug.Assert(decl.OwningType.IsInterface); 99TypeDesc owningType = calledMethod.OwningType;
Compiler\DependencyAnalysis\VTableSliceNode.cs (3)
49if (method.OwningType != defType) 199Debug.Assert(virtualMethod.OwningType == _type); 235if (method.OwningType != defType)
Compiler\HardwareIntrinsicILProvider.cs (1)
39TypeDesc owningType = method.OwningType;
Compiler\ILScanner.cs (3)
717if (method.IsFinal || method.OwningType.IsSealed()) 723if (method.IsAbstract || method.OwningType.IsInterface) 846return _constructedTypes.Contains(callee.OwningType);
Compiler\LazyGenericsPolicy.cs (1)
19if (UsesLazyGenerics(method.OwningType))
Compiler\Logging\DocumentationSignatureParser.cs (1)
382? methodContext.OwningType
Compiler\Logging\MessageContainer.cs (1)
175MethodDesc method => method.OwningType,
Compiler\Logging\UnconditionalSuppressMessageAttributeState.cs (2)
127Debug.Assert(property.OwningType == method.OwningType); 133Debug.Assert(@event.OwningType == method.OwningType);
Compiler\MetadataManager.cs (10)
403TypeDesc owningType = method.OwningType; 460if (!TypeGeneratesEEType(method.OwningType)) 515dependencies.Add(factory.TypeNonGCStaticsSymbol((MetadataType)method.OwningType), "Static constructor is reflection-callable"); 519GenericTypesTemplateMap.GetTemplateTypeDependencies(ref dependencies, factory, method.OwningType); 708!method.Signature.IsStatic && method.OwningType.IsValueType); 874Debug.Assert(!method.IsGenericMethodDefinition && !method.OwningType.IsGenericDefinition); 883writer.GetRecordHandle(transformed.GetTransformedTypeDefinition((MetadataType)method.OwningType.GetTypeDefinition())), 945MetadataRecord owningType = transform.HandleType(methodToGenerateMetadataFor.OwningType); 949TypeDesc owningTypeToGenerateMetadataFor = methodToGenerateMetadataFor.OwningType; 1242if (typicalMethodDefinition != methodDefinition && IsReflectionBlocked(method.OwningType.Instantiation))
Compiler\MethodBodyDeduplicator.cs (1)
26if (!_genericsOnly || method.HasInstantiation || method.OwningType.HasInstantiation)
Compiler\MultiFileCompilationModuleGroup.cs (2)
50return ContainsType(method.OwningType); 116TypeDesc owningType = method.OwningType;
Compiler\RootingHelpers.cs (4)
141if (typicalMethod.IsGenericMethodDefinition || typicalMethod.OwningType.IsGenericDefinition) 151if (method.OwningType.IsGenericDefinition || method.OwningType.ContainsSignatureVariables(treatGenericParameterLikeSignatureVariable: true)) 153TypeDesc owningType = method.OwningType.GetTypeDefinition();
Compiler\StackTraceEmissionPolicy.cs (1)
43|| (method.OwningType is MetadataType mdType && mdType.HasCustomAttribute("System.Diagnostics", "StackTraceHiddenAttribute"))
Compiler\SubstitutedILProvider.cs (1)
826&& method.OwningType is MetadataType mdt
Compiler\TypePreinit.cs (15)
489MethodDesc directMethod = constrainedType.GetClosestDefType().TryResolveConstraintMethodApprox(method.OwningType, method, out bool forceUseRuntimeLookup, ref staticResolution); 497TypeDesc owningType = method.OwningType; 504&& owningType != methodIL.OwningMethod.OwningType 556TypeDesc owningType = ctor.OwningType; 564&& owningType != methodIL.OwningMethod.OwningType 1898if (method.OwningType is MetadataType mdType 1911if (method.OwningType is MetadataType createSpanType 1928case "GetTypeFromHandle" when IsSystemType(method.OwningType) 1938case "get_IsValueType" when IsSystemType(method.OwningType) 1944case "op_Equality" when IsSystemType(method.OwningType) 1951&& method.OwningType is MetadataType isReferenceOrContainsReferencesType 1960&& method.OwningType is MetadataType getArrayDataReferenceType 1986return method.OwningType.IsValueType ? method.OwningType.MakeByRefType() : method.OwningType;
Compiler\UsageBasedInteropStubManager.cs (1)
59TypeDesc owningType = method.OwningType;
Compiler\UsageBasedMetadataManager.cs (6)
200if (!method.IsGenericMethodDefinition && !method.OwningType.IsGenericDefinition) 203if (_compilationModuleGroup.ContainsType(method.GetTypicalMethodDefinition().OwningType)) 818bool baseMethodTypeIsInterface = baseMethod.OwningType.IsInterface; 884if (method.IsGenericMethodDefinition || method.OwningType.IsGenericDefinition) 889if ((reflectableTypes[method.OwningType] & MetadataCategory.RuntimeMapping) != 0) 898reflectableTypes[method.OwningType] |= MetadataCategory.Description;
Compiler\UserDefinedTypeDescriptor.cs (4)
199GetPrimitiveTypeIndex(method.OwningType.Context.GetWellKnownType(WellKnownType.Void)) : 200GetThisTypeIndex(method.OwningType); 201descriptor.ContainingClass = GetTypeIndex(method.OwningType, true); 236descriptor.ParentClass = GetTypeIndex(method.OwningType, true);
Compiler\VirtualMethodCallHelper.cs (2)
15Debug.Assert(method.GetTypicalMethodDefinition().OwningType == interfaceOnDefinition.GetTypeDefinition()); 62TypeDesc owningType = method.OwningType;
IL\ILImporter.Scanner.cs (44)
135TypeDesc owningType = _canonMethod.OwningType; 147if (method.OwningType.IsRuntimeDeterminedSubtype) 149_dependencies.Add(GetGenericLookupHelper(ReadyToRunHelperId.GetNonGCStaticBase, method.OwningType), "Owning type cctor"); 153_dependencies.Add(_factory.ReadyToRunHelper(ReadyToRunHelperId.GetNonGCStaticBase, method.OwningType), "Owning type cctor"); 169if (method.OwningType.IsRuntimeDeterminedSubtype) 171_dependencies.Add(GetGenericLookupHelper(ReadyToRunHelperId.NecessaryTypeHandle, method.OwningType), reason); 175_dependencies.Add(_factory.NecessaryTypeSymbol(method.OwningType), reason); 238return _compilation.NodeFactory.ReadyToRunHelperFromTypeLookup(lookup.HelperId, lookup.HelperObject, _canonMethod.OwningType); 334if (method.HasInstantiation || method.OwningType.HasInstantiation) 573allowAsyncVariant = allowAsyncVariant && !method.OwningType.IsDelegate; 613TypeDesc owningType = runtimeDeterminedMethod.OwningType; 646if (method.OwningType.IsDelegate && method.Name == "Invoke"u8 && 653_dependencies.Add(_factory.VTable(method.OwningType), reason); 724TypeDesc exactType = method.OwningType; 749if (method.OwningType.IsObject && method.Name == "GetHashCode"u8) 755MethodDesc directMethod = constrained.GetClosestDefType().TryResolveConstraintMethodApprox(method.OwningType, method, out forceUseRuntimeLookup, ref staticResolution); 765Debug.Assert(!methodAfterConstraintResolution.OwningType.IsInterface 769exactType = directMethod.OwningType; 775Debug.Assert(method.OwningType.IsInterface); 808Debug.Assert(targetMethod.IsVirtual && targetMethod.OwningType.IsInterface); 853Debug.Assert(targetMethod.OwningType.IsValueType || targetMethod.Signature.IsStatic); 904if (targetMethod.IsConstructor && targetMethod.OwningType.IsString) 925instParam = GetGenericLookupHelper(ReadyToRunHelperId.TypeHandle, runtimeDeterminedMethod.OwningType); 956_dependencies.Add(GetGenericLookupHelper(ReadyToRunHelperId.TypeHandle, runtimeDeterminedMethod.OwningType), reason); 971instParam = _compilation.NodeFactory.ConstructedTypeSymbol(concreteMethod.OwningType); 984Debug.Assert(targetMethod.OwningType.IsInterface && targetMethod.IsVirtual && _constrained != null); 993Debug.Assert(targetMethod.OwningType.IsInterface && targetMethod.IsVirtual && _constrained != null); 1026else if (method.OwningType.IsInterface) 1037else if (_compilation.NeedsSlotUseTracking(method.OwningType)) 1053if (ctorMethod.OwningType.IsDelegate) 1061TypeDesc canonDelegateType = ctorMethod.OwningType.ConvertToCanonForm(CanonicalFormKind.Specific); 1177((MetadataType)_methodIL.OwningMethod.OwningType).Module); 1443bool isInitOnlyWrite = field.OwningType == _methodIL.OwningMethod.OwningType 1844MetadataType owningType = method.OwningType as MetadataType; 1858MetadataType owningType = method.OwningType as MetadataType; 1872MetadataType owningType = method.OwningType as MetadataType; 1886MetadataType owningType = method.OwningType as MetadataType; 1900MetadataType owningType = method.OwningType as MetadataType; 1914MetadataType owningType = method.OwningType as MetadataType; 1928MetadataType owningType = method.OwningType as MetadataType; 1950MetadataType owningType = method.OwningType as MetadataType; 1968MetadataType owningType = method.OwningType as MetadataType; 1988MetadataType owningType = method.OwningType as MetadataType; 2005MetadataType owningType = method.OwningType as MetadataType;
IL\RvaIntrinsicPatternAnalyzer.cs (2)
162if (!constructor.IsConstructor || constructor.OwningType is not ArrayType arrayType) 357&& method.OwningType is MetadataType owningType
IL\Stubs\StartupCode\StartupCodeMainMethod.cs (1)
100ModuleDesc entrypointModule = ((MetadataType)_mainMethod.WrappedMethod.OwningType).Module;
IL\Stubs\StartupCode\StartupCodeMainMethod.Sorting.cs (2)
14return comparer.Compare(OwningType, other.OwningType); 23return comparer.Compare(OwningType, other.OwningType);
IL\TypeEqualityPatternAnalyzer.cs (4)
149&& IsSystemType(method.OwningType); 154&& IsSystemType(method.OwningType); 159&& IsSystemType(method.OwningType); 163&& method.IsIntrinsic && method.Name == "GetType"u8 && method.OwningType.IsObject;
parent\parent\Common\Compiler\CompilerTypeSystemContext.Async.cs (6)
180TypeDesc owningType = asyncVariantMethod.OwningType; 199TypeDesc owningType = taskReturningMethod.OwningType; 200if (owningType != taskReturningMethodDefinition.OwningType) 219TypeDesc owningType = returnDroppingThunk.OwningType; 251TypeDesc owningType = asyncVariantMethod.OwningType; 252if (owningType != typicalMethodDefinition.OwningType)
parent\parent\Common\Compiler\CompilerTypeSystemContext.BoxedTypes.cs (8)
60TypeDesc owningType = targetMethod.OwningType; 87TypeDesc owningType = targetMethod.OwningType; 357if (method.OwningType.HasInstantiation) 359InstantiatedType instantiatedType = GetInstantiatedType((MetadataType)typicalMethodTarget.OwningType, method.OwningType.Instantiation); 382Debug.Assert(targetMethod.OwningType.IsValueType); 495Debug.Assert(targetMethod.OwningType.IsValueType); 570TypeDesc owner = _targetMethod.OwningType;
parent\parent\Common\Compiler\CompilerTypeSystemContext.Validation.cs (1)
208TypeDesc owningType = method.OwningType;
parent\parent\Common\Compiler\Dataflow\EcmaExtensions.cs (2)
77return method.OwningType.IsValueType ? ReferenceKind.Ref : ReferenceKind.None; 109MethodDesc method => method.OwningType,
parent\parent\Common\Compiler\Dataflow\ParameterProxy.cs (2)
17? Method.Method.OwningType 18: Method.Method.Signature[MetadataIndex].InstantiateSignature (Method.Method.OwningType.Instantiation, Method.Method.Instantiation);
parent\parent\Common\Compiler\Dataflow\TypeExtensions.cs (1)
53return method.OwningType.IsTypeOf(fullTypeName);
parent\parent\Common\Compiler\DependencyAnalysis\GVMDependenciesNode.cs (5)
54if (!_method.OwningType.IsInterface) 56yield return new DependencyListEntry(factory.TypeGVMEntries(_method.OwningType.GetTypeDefinition()), "Resolution metadata"); 68TypeDesc methodOwningType = _method.OwningType; 83TypeDesc methodOwningType = _method.OwningType; 190TypeSystemEntity origin = (implementingMethodInstantiation.OwningType != potentialOverrideType) ? potentialOverrideType : null;
parent\parent\Common\Compiler\DependencyAnalysis\ShadowMethodNode.cs (2)
68Instantiation typeInst = Method.OwningType.Instantiation; 91Instantiation typeInst = Method.OwningType.Instantiation;
parent\parent\Common\Compiler\DependencyAnalysis\VirtualMethodUseNode.cs (2)
51var lazyVTableSlice = factory.VTable(_decl.OwningType) as LazilyBuiltVTableSliceNode; 71dependencies.Add(factory.VTable(_decl.OwningType), "VTable of a VirtualMethodUse");
parent\parent\Common\Compiler\DevirtualizationManager.cs (10)
44return method.IsFinal || IsEffectivelySealed(method.OwningType); 72if (declMethod.OwningType.IsInterface) 74if (declMethod.OwningType.IsCanonicalSubtype(CanonicalFormKind.Any) || implType.IsCanonicalSubtype(CanonicalFormKind.Any)) 78DefType canonicalInterfaceType = (DefType)declMethod.OwningType.ConvertToCanonForm(CanonicalFormKind.Specific); 97if (!implType.CanCastTo(declMethod.OwningType)) 130if (iface == declMethod.OwningType) 135if (iface.HasSameTypeDefinition(declMethod.OwningType) && iface.CanCastTo(declMethod.OwningType)) 182for (checkType = implType; checkType != null && !checkType.HasSameTypeDefinition(declMethod.OwningType); checkType = checkType.BaseType) 185if ((checkType == null) || (checkType.ConvertToCanonForm(CanonicalFormKind.Specific) != declMethod.OwningType.ConvertToCanonForm(CanonicalFormKind.Specific)))
parent\parent\Common\Compiler\DisplayNameHelpers.cs (3)
33sb.Append(method.OwningType.GetDisplayName()); 36if (method.IsConstructor && method.OwningType is DefType defType) 92TypeDesc instantiatedType = method.Signature[i].InstantiateSignature(method.OwningType.Instantiation, method.Instantiation);
parent\parent\Common\Compiler\HardwareIntrinsicHelpers.cs (1)
21TypeDesc owningType = method.OwningType;
parent\parent\Common\Compiler\MethodExtensions.cs (5)
110Debug.Assert(!method.OwningType.ContainsSignatureVariables(treatGenericParameterLikeSignatureVariable: true)); 112TypeDesc owningType = method.OwningType; 148TypeDesc owningType = method.OwningType; 183if (method.OwningType.IsInterface) 189if (method.IsFinal || method.OwningType.IsSealed())
parent\parent\Common\Compiler\NativeAotNameMangler.cs (2)
480sb.Append(GetMangledTypeName(method.OwningType)); 558foreach (var m in method.OwningType.GetMethods())
parent\parent\Common\Compiler\ObjectWriter\OutputInfoBuilder.cs (1)
244output.Append(typeNameFormatter.FormatName(method.OwningType));
parent\parent\Common\Compiler\ProcessLinkerXmlBase.cs (2)
641type.Index < _method.OwningType.Instantiation.Length && 642_method.OwningType.Instantiation[type.Index] is GenericParameterDesc genericParameter)
parent\parent\Common\Compiler\TypeExtensions.cs (9)
135if (method.OwningType.IsGenericDepthGreaterThan(depth)) 471if (staticMethodDef.OwningType != interfaceType) 509if (genInterfaceMethod.OwningType.IsInterface) 529if (potentialInterfaceMethod.OwningType != potentialInterfaceType) 540if (method != null && !method.OwningType.IsValueType) 544Debug.Assert(!method.OwningType.IsInterface); 593if (genInterfaceMethod.OwningType != interfaceType) 622if (!method.OwningType.IsValueType) 639&& !method.OwningType.IsValueType)
parent\parent\Common\TypeSystem\IL\NativeAotILProvider.cs (3)
31TypeDesc owningType = method.OwningType; 50MetadataType owningType = method.OwningType as MetadataType; 96MetadataType owningType = method.OwningType.GetTypeDefinition() as MetadataType;
parent\parent\Common\TypeSystem\IL\Stubs\AsyncResumptionStub.cs (1)
61if (_targetMethod.OwningType.IsValueType)
parent\parent\Common\TypeSystem\IL\Stubs\AsyncThunks.cs (4)
77if (asyncMethod.OwningType.HasInstantiation) 79var instantiatedType = (InstantiatedType)TypeSystemHelpers.InstantiateAsOpen(asyncMethod.OwningType); 257if (asyncVariantTarget.OwningType.HasInstantiation) 259var instantiatedType = (InstantiatedType)TypeSystemHelpers.InstantiateAsOpen(asyncVariantTarget.OwningType);
parent\parent\Common\TypeSystem\IL\Stubs\ComparerIntrinsics.cs (2)
56TypeDesc owningType = methodBeingGenerated.OwningType; 299if (fieldType.FindVirtualFunctionTargetMethodOnObjectType(objectEqualsMethod).OwningType == fieldType)
parent\parent\Common\TypeSystem\IL\Stubs\DelegateMethodILEmitter.cs (5)
16Debug.Assert(method.OwningType.IsDelegate); 17Debug.Assert(method.OwningType.IsTypeDefinition); 72if (method.OwningType.HasInstantiation) 76TypeDesc[] typesToReplace = new TypeDesc[method.OwningType.Instantiation.Length]; 80typesToReplace[i] = method.OwningType.Instantiation[i];
parent\parent\Common\TypeSystem\IL\Stubs\GetFieldHelperMethodOverride.cs (1)
129? boxableFieldType.InstantiateSignature(contextMethod.OwningType.Instantiation, default)
parent\parent\Common\TypeSystem\IL\Stubs\InterlockedIntrinsics.cs (2)
23Debug.Assert(((MetadataType)method.OwningType).Name == "Interlocked"u8); 59MethodDesc compareExchangeNonGeneric = method.OwningType.GetKnownMethod("CompareExchange"u8,
parent\parent\Common\TypeSystem\IL\Stubs\MethodBaseGetCurrentMethodThunk.cs (3)
62return Method.OwningType; 79if (Method.OwningType.HasInstantiation) 81codeStream.Emit(ILOpcode.ldtoken, emit.NewToken(Method.OwningType));
parent\parent\Common\TypeSystem\IL\Stubs\PInvokeILEmitter.cs (2)
67runtimeMarshallingEnabled = MarshalHelpers.IsRuntimeMarshallingEnabled(((MetadataType)targetMethod.OwningType).Module); 272bool runtimeMarshallingEnabled = MarshalHelpers.IsRuntimeMarshallingEnabled(((MetadataType)_targetMethod.OwningType).Module);
parent\parent\Common\TypeSystem\IL\Stubs\RuntimeHelpersIntrinsics.cs (2)
20Debug.Assert(((MetadataType)method.OwningType).Name == "RuntimeHelpers"u8); 73mdType.FindVirtualFunctionTargetMethodOnObjectType(objectEquals).OwningType != mdType &&
parent\parent\Common\TypeSystem\IL\Stubs\StreamIntrinsics.cs (2)
19Debug.Assert(((MetadataType)method.OwningType).Name == "Stream"u8); 25TypeDesc streamClass = method.OwningType;
parent\parent\Common\TypeSystem\IL\Stubs\UnsafeIntrinsics.cs (1)
19Debug.Assert(((MetadataType)method.OwningType).Name == "Unsafe"u8);
parent\parent\Common\TypeSystem\Interop\IL\Marshaller.cs (1)
453MarshalHelpers.IsRuntimeMarshallingEnabled(((MetadataType)targetMethod.OwningType).Module));
parent\parent\Common\TypeSystem\Interop\IL\PInvokeDelegateWrapperConstructor.Sorting.cs (1)
14var otherOwningType = (PInvokeDelegateWrapper)other.OwningType;
parent\parent\Common\TypeSystem\MetadataEmitter\TypeSystemMetadataEmitter.cs (1)
318EntityHandle typeHandle = GetTypeRef(method.OwningType);
src\runtime\src\coreclr\tools\Common\Compiler\GenericCycleDetection\GraphBuilder.cs (1)
414ProcessTypeReference(m.OwningType, typeContext, methodContext);
src\runtime\src\coreclr\tools\Common\Compiler\GenericCycleDetection\ModuleCycleInfo.cs (1)
215|| IsDeepPossiblyCyclicInstantiation(method.OwningType, ref breadthCounter, seenTypes: null);
ILCompiler.MetadataTransform (2)
ILCompiler\Metadata\Transform.Method.cs (2)
40EnclosingType = (TypeDefinition)HandleType(method.OwningType), 139record.Parent = HandleType(entity.OwningType);
ILCompiler.ReadyToRun (221)
Compiler\DependencyAnalysis\InheritedVirtualMethodsNode.cs (4)
72if (!impl.OwningType.HasInstantiation || !HasNonCanonicalInstantiationArguments(impl.OwningType)) 75Debug.Assert(!canonImpl.OwningType.IsGenericDefinition); 129if (implMethod.IsVirtual && !implMethod.IsFinal && !implMethod.OwningType.IsInterface)
Compiler\DependencyAnalysis\ReadyToRun\CopiedMethodILNode.cs (1)
77if (method.HasInstantiation || method.OwningType.HasInstantiation)
Compiler\DependencyAnalysis\ReadyToRun\DelegateCtorSignature.cs (1)
50needsInstantiatingStub |= (_targetMethod.Method.OwningType.HasInstantiation || _methodToken.ConstrainedType != null);
Compiler\DependencyAnalysis\ReadyToRun\DevirtualizationManager.cs (9)
54if (!declMethod.OwningType.IsInterface) 56if (_compilationModuleGroup.VersionsWithType(declMethod.OwningType.GetTypeDefinition())) 62if (firstTypeInImplTypeHierarchyNotInVersionBubble != declMethod.OwningType) 75if (_compilationModuleGroup.VersionsWithType(declMethod.OwningType.GetTypeDefinition())) 120if (declMethod.OwningType.IsInterface) 137if (declMethod.OwningType.IsInterface) 165if (resolvedVirtualMethod.OwningType.IsInterface) 189if (declMethod == resolvedVirtualMethod && firstTypeInImplTypeHierarchyNotInVersionBubble == declMethod.OwningType) 196for (TypeDesc typeExamine = resolvedVirtualMethod.OwningType; typeExamine != null; typeExamine = typeExamine.BaseType)
Compiler\DependencyAnalysis\ReadyToRun\GCRefMapBuilder.cs (2)
130methodIsStringConstructor: method.OwningType.IsString && method.IsConstructor, 196bool interior = method.OwningType.IsValueType && !isUnboxingStub;
Compiler\DependencyAnalysis\ReadyToRun\InstanceEntryPointTableNode.cs (1)
120Debug.Assert(method.Method.HasInstantiation || method.Method.OwningType.HasInstantiation || method.Method.IsAsyncVariant() ||
Compiler\DependencyAnalysis\ReadyToRun\MethodFixupSignature.cs (7)
83!Method.OwningType.IsGenericDefinition && 84(Method.OwningType.IsInterface || !Method.OwningType.IsSealed())) 102!Method.OwningType.IsGenericDefinition) 141if (!_method.Method.HasInstantiation && !_method.Method.OwningType.HasInstantiation && !_method.Method.OwningType.IsArray) 170if (method.Method.OwningType.GetTypeDefinition() is EcmaType)
Compiler\DependencyAnalysis\ReadyToRun\TypeValidationChecker.cs (6)
401if (methodBody.OwningType.IsInterface && !isStatic && !methodBody.IsFinal) 504if ((virtualMethod.OwningType != type.BaseType) && (virtualMethod.OwningType != type) && (baseTypeVirtualMethodAlgorithm != null)) 567constraintsOnDecl.Add(constraint.InstantiateSignature(declMethod.OwningType.Instantiation, implMethod.Instantiation).InstantiateSignature(implMethod.OwningType.Instantiation, new Instantiation())); 572if (!constraintsOnDecl.Contains(constraint.InstantiateSignature(implMethod.OwningType.Instantiation, implMethod.Instantiation)))
Compiler\DependencyAnalysis\ReadyToRun\WasmImportThunkPortableEntrypoint.cs (1)
113if (method.IsInternalCall && method.OwningType.IsWellKnownType(WellKnownType.String) && method.IsConstructor)
Compiler\DependencyAnalysis\ReadyToRunCodegenNodeFactory.cs (3)
165&& method.OwningType.IsValueType 180ModuleDesc ownerModule = ((MetadataType)targetMethod.GetTypicalMethodDefinition().OwningType).Module; 190ModuleDesc ownerModule = ((MetadataType)targetMethod.GetTypicalMethodDefinition().OwningType).Module;
Compiler\DependencyAnalysis\ReadyToRunSymbolNodeFactory.cs (1)
684typeArgument = methodWithToken.Method.OwningType;
Compiler\ExternalReferenceTokenManager.cs (2)
125if (methodDesc.HasInstantiation || methodDesc.OwningType.HasInstantiation) 127EnsureTypeDefTokensAreAvailableInVersionBubble(methodDesc.GetMethodDefinition().OwningType);
Compiler\ProfileDataManager.cs (4)
205bool isDelegateInvoke = targetMeth.OwningType.IsDelegate && targetMeth.Name == "Invoke"u8; 220entities = SampleImplementers(targetMeth.OwningType, rand); 366if (_compilationGroup.ContainsType(method.OwningType) && 367(method.OwningType is MetadataType declaringType))
Compiler\ReadyToRunCodegenCompilation.cs (6)
106MethodDesc calleeMethodImpl = callee.OwningType.FindVirtualFunctionTargetMethodOnObjectType(callee); 135if (declMethod.OwningType.IsInterface) 148if (declMethod.OwningType.HasTypeEquivalence) 156if (@interface == declMethod.OwningType) 161if (@interface.IsEquivalentTo(declMethod.OwningType)) 983foreach (var type in method.OwningType.Instantiation)
Compiler\ReadyToRunCompilationModuleGroupBase.cs (8)
149if (!method.HasInstantiation && !method.OwningType.HasInstantiation) 413if (method.OwningType is MetadataType owningType) 466if (!(method.HasInstantiation || method.OwningType.HasInstantiation)) 474EcmaModule methodDefiningModule = ((MetadataType)method.OwningType.GetTypeDefinition()).Module as EcmaModule; 493alternateGenericLocationModule = ComputeAlternateGenericLocationForR2RCodeFromInstantiation(methodDefiningModule, method.OwningType.Instantiation); 544MetadataType owningMetadataType = method.OwningType.GetTypeDefinition() as MetadataType; 559if ((method.GetMethodDefinition() == method) && method.OwningType.IsTypeDefinition) 572foreach (TypeDesc t in method.OwningType.Instantiation)
Compiler\ReadyToRunProfilingRootProvider.cs (2)
38if (method.OwningType.IsGenericDefinition || method.OwningType.ContainsSignatureVariables())
Compiler\ReadyToRunSingleAssemblyCompilationModuleGroup.cs (1)
43return (ContainsType(method.OwningType) && VersionsWithMethodBody(method)) || CompileVersionBubbleGenericsIntoCurrentModule(method) || this.CrossModuleCompileable(method);
Compiler\ReadyToRunTableManager.cs (1)
88if (method.HasInstantiation || method.OwningType.HasInstantiation || method.IsAsyncVariant() || method is AsyncResumptionStub ||
Compiler\RuntimeDeterminedTypeHelper.cs (3)
105if (!Equals(method1.OwningType, method2.OwningType) || 191return unchecked(GetHashCode(method.OwningType) + 97 * (
IL\ReadyToRunILProvider.cs (3)
61MethodDesc createDefaultInstance = method.OwningType.GetKnownMethod("CreateDefaultInstance"u8, method.GetTypicalMethodDefinition().Signature); 76var mdType = method.OwningType as MetadataType; 105var mdType = method.OwningType as MetadataType;
JitInterface\CorInfoImpl.ReadyToRun.cs (39)
164OwningType = method.OwningType; 184return HandleContext(moduleToken.Module, methodDefinition.GetDeclaringType(), methodToken.Method.OwningType, constrainedType, genericContextObject, devirtualizedMethodOwner, ref owningTypeNotDerivedFromToken); 197return HandleContext(moduleToken.Module, memberRef.Parent, methodToken.Method.OwningType, constrainedType, genericContextObject, null, ref owningTypeNotDerivedFromToken); 201return methodToken.Method.OwningType; 220typeInstantiation = methodContext.OwningType.Instantiation; 438public TypeDesc ContextType { get { return (Context is MethodDesc contextAsMethod ? contextAsMethod.OwningType : (TypeDesc)Context); } } 517MethodDesc asyncResumptionStub = _compilation.TypeSystemContext.GetAsyncResumptionStub(MethodBeingCompiled, MethodBeingCompiled.OwningType); 574if (methodNeedingCode.OwningType.IsDelegate && ( 1454if (!_compilation.NodeFactory.CompilationModuleGroup.VersionsWithType(resultMethod.OwningType)) 1501module = (EcmaModule)((MetadataType)methodILDef.OwningMethod.OwningType).Module; 1950useInstantiatingStub = originalMethod.OwningType.IsArray || originalMethod.GetCanonMethodTarget(CanonicalFormKind.Specific).RequiresInstMethodDescArg(); 1962if (originalMethod.OwningType.HasInstantiation && IsGenericTooDeeplyNested(originalMethod.OwningType.Instantiation)) 2057useInstantiatingStub = directMethod.OwningType.IsValueType; 2061Debug.Assert(!methodAfterConstraintResolution.OwningType.IsInterface || (isStaticVirtual && methodAfterConstraintResolution.Signature.IsStatic)); 2066? directMethod.OwningType 2109exactType == MethodBeingCompiled.OwningType) 2113if (IsTypeSpecForTypicalInstantiation(rawMethod.OwningType)) 2159if (targetMethod.OwningType.IsInterface) 2184devirt = targetMethod.OwningType.IsValueType || 2185(targetMethod.OwningType.IsDelegate && targetMethod.Name == "Invoke"u8) || 2186(targetMethod.OwningType.IsObject && targetMethod.Name == "GetType"u8); 2192devirt = !targetMethod.IsVirtual || targetMethod.IsFinal || targetMethod.OwningType.IsSealed(); 2203bool isArrayConstructor = targetMethod.OwningType.IsArray && targetMethod.IsConstructor; 2351targetMethod.OwningType.IsInterface)) 2357else if (!targetMethod.OwningType.IsInterface) 2366useInstantiatingStub = useInstantiatingStub || (targetMethod.OwningType.IsInterface && !originalMethod.IsAbstract); 2369pResult->nullInstanceCheck = callVirtCrossingVersionBubble && !targetMethod.OwningType.IsInterface; 2498if (callerMethod.HasInstantiation || callerMethod.OwningType.HasInstantiation) 2521else if (!originalMethod.IsVirtual && originalMethod.Context.GetWellKnownType(WellKnownType.Object) == originalMethod.OwningType) 2588if (methodToCall.OwningType.IsArray && methodToCall.IsConstructor) 2672if (targetMethod.OwningType == exactType && !CanEncodeTypeInSignature(exactType)) 2840if (helperId == ReadyToRunHelperId.TypeHandle && !CanEncodeTypeInSignature(methodDesc.OwningType)) 2859declaringMethod.OwningType == typeDesc && 2904Debug.Assert(md.OwningType == td); 2932if (declaringMethod.OwningType.GetClosestDefType() != td.GetClosestDefType()) 2940pResult.compileTimeHandle = (CORINFO_GENERIC_STRUCT_*)ObjectToHandle(declaringMethod.OwningType); 3477return Marshaller.IsMarshallingRequired(sig, Array.Empty<ParameterMetadata>(), ((MetadataType)HandleToObject(callSiteSig->scope).OwningMethod.OwningType).Module); 3504Marshaller.IsMarshallingRequired(signature, Array.Empty<ParameterMetadata>(), ((MetadataType)methodIL.OwningMethod.OwningType).Module))
parent\parent\Common\Compiler\CompilerTypeSystemContext.Async.cs (6)
180TypeDesc owningType = asyncVariantMethod.OwningType; 199TypeDesc owningType = taskReturningMethod.OwningType; 200if (owningType != taskReturningMethodDefinition.OwningType) 219TypeDesc owningType = returnDroppingThunk.OwningType; 251TypeDesc owningType = asyncVariantMethod.OwningType; 252if (owningType != typicalMethodDefinition.OwningType)
parent\parent\Common\Compiler\CompilerTypeSystemContext.BoxedTypes.cs (8)
60TypeDesc owningType = targetMethod.OwningType; 87TypeDesc owningType = targetMethod.OwningType; 357if (method.OwningType.HasInstantiation) 359InstantiatedType instantiatedType = GetInstantiatedType((MetadataType)typicalMethodTarget.OwningType, method.OwningType.Instantiation); 382Debug.Assert(targetMethod.OwningType.IsValueType); 495Debug.Assert(targetMethod.OwningType.IsValueType); 570TypeDesc owner = _targetMethod.OwningType;
parent\parent\Common\Compiler\CompilerTypeSystemContext.Validation.cs (1)
208TypeDesc owningType = method.OwningType;
parent\parent\Common\Compiler\Dataflow\EcmaExtensions.cs (2)
77return method.OwningType.IsValueType ? ReferenceKind.Ref : ReferenceKind.None; 109MethodDesc method => method.OwningType,
parent\parent\Common\Compiler\Dataflow\ParameterProxy.cs (2)
17? Method.Method.OwningType 18: Method.Method.Signature[MetadataIndex].InstantiateSignature (Method.Method.OwningType.Instantiation, Method.Method.Instantiation);
parent\parent\Common\Compiler\Dataflow\TypeExtensions.cs (1)
53return method.OwningType.IsTypeOf(fullTypeName);
parent\parent\Common\Compiler\DependencyAnalysis\GVMDependenciesNode.cs (2)
68TypeDesc methodOwningType = _method.OwningType; 83TypeDesc methodOwningType = _method.OwningType;
parent\parent\Common\Compiler\DependencyAnalysis\ShadowMethodNode.cs (2)
68Instantiation typeInst = Method.OwningType.Instantiation; 91Instantiation typeInst = Method.OwningType.Instantiation;
parent\parent\Common\Compiler\DevirtualizationManager.cs (10)
44return method.IsFinal || IsEffectivelySealed(method.OwningType); 72if (declMethod.OwningType.IsInterface) 74if (declMethod.OwningType.IsCanonicalSubtype(CanonicalFormKind.Any) || implType.IsCanonicalSubtype(CanonicalFormKind.Any)) 78DefType canonicalInterfaceType = (DefType)declMethod.OwningType.ConvertToCanonForm(CanonicalFormKind.Specific); 97if (!implType.CanCastTo(declMethod.OwningType)) 130if (iface == declMethod.OwningType) 135if (iface.HasSameTypeDefinition(declMethod.OwningType) && iface.CanCastTo(declMethod.OwningType)) 182for (checkType = implType; checkType != null && !checkType.HasSameTypeDefinition(declMethod.OwningType); checkType = checkType.BaseType) 185if ((checkType == null) || (checkType.ConvertToCanonForm(CanonicalFormKind.Specific) != declMethod.OwningType.ConvertToCanonForm(CanonicalFormKind.Specific)))
parent\parent\Common\Compiler\DisplayNameHelpers.cs (3)
33sb.Append(method.OwningType.GetDisplayName()); 36if (method.IsConstructor && method.OwningType is DefType defType) 92TypeDesc instantiatedType = method.Signature[i].InstantiateSignature(method.OwningType.Instantiation, method.Instantiation);
parent\parent\Common\Compiler\HardwareIntrinsicHelpers.cs (1)
21TypeDesc owningType = method.OwningType;
parent\parent\Common\Compiler\MethodExtensions.cs (3)
148TypeDesc owningType = method.OwningType; 183if (method.OwningType.IsInterface) 189if (method.IsFinal || method.OwningType.IsSealed())
parent\parent\Common\Compiler\NativeAotNameMangler.cs (2)
480sb.Append(GetMangledTypeName(method.OwningType)); 558foreach (var m in method.OwningType.GetMethods())
parent\parent\Common\Compiler\ObjectWriter\OutputInfoBuilder.cs (1)
244output.Append(typeNameFormatter.FormatName(method.OwningType));
parent\parent\Common\Compiler\ProcessLinkerXmlBase.cs (2)
641type.Index < _method.OwningType.Instantiation.Length && 642_method.OwningType.Instantiation[type.Index] is GenericParameterDesc genericParameter)
parent\parent\Common\Compiler\TypeExtensions.cs (9)
135if (method.OwningType.IsGenericDepthGreaterThan(depth)) 471if (staticMethodDef.OwningType != interfaceType) 509if (genInterfaceMethod.OwningType.IsInterface) 529if (potentialInterfaceMethod.OwningType != potentialInterfaceType) 540if (method != null && !method.OwningType.IsValueType) 544Debug.Assert(!method.OwningType.IsInterface); 593if (genInterfaceMethod.OwningType != interfaceType) 622if (!method.OwningType.IsValueType) 639&& !method.OwningType.IsValueType)
parent\parent\Common\JitInterface\CorInfoImpl.cs (40)
906Instantiation owningTypeInst = method.OwningType.Instantiation; 1082return MethodBeingCompiled.OwningType; 1091return HandleToObject((CORINFO_METHOD_STRUCT_*)((nuint)contextStruct & ~(nuint)CorInfoContextFlags.CORINFO_CONTEXTFLAGS_MASK)).OwningType; 1099return MethodBeingCompiled.HasInstantiation ? (TypeSystemEntity)MethodBeingCompiled: (TypeSystemEntity)MethodBeingCompiled.OwningType; 1210if (method.OwningType.IsDelegate && method.Name == "Invoke"u8) 1225DefType owningDefType = method.OwningType as DefType; 1305if (type != method.OwningType) 1313Debug.Assert(type.HasSameTypeDefinition(method.OwningType)); 1388EcmaModule rootModule = (MethodBeingCompiled.OwningType as MetadataType)?.Module as EcmaModule; 1389EcmaModule calleeModule = (calleeMethod.OwningType as MetadataType)?.Module as EcmaModule; 1444return ObjectToHandle(m.OwningType); 1469if ((info->context != null) && decl.OwningType.IsInterface) 1472if (decl.OwningType != ownerTypeDesc) 1499TypeDesc owningType = originalImpl.OwningType; 1504bool unboxingStub = impl.OwningType.IsValueType; 1532if (!_compilation.CompilationModuleGroup.VersionsWithTypeReference(decl.OwningType)) 1537methodWithTokenDecl = new MethodWithToken(decl, declToken, null, false, null, devirtualizedMethodOwner: decl.OwningType); 1563methodWithTokenImpl = new MethodWithToken(nonUnboxingImpl, resolver.GetModuleTokenForMethod(nonUnboxingImpl.GetTypicalMethodDefinition(), allowDynamicallyCreatedReference: false, throwIfNotFound: true), null, unboxingStub, null, devirtualizedMethodOwner: impl.OwningType); 1585bool isArray = decl.OwningType.IsInterface && objType.IsArray; 1598if (originalImpl.OwningType.IsCanonicalSubtype(CanonicalFormKind.Any)) 1647info->instParamLookup.constLookup = CreateConstLookupToSymbol(_compilation.SymbolNodeFactory.CreateReadyToRunHelper(ReadyToRunHelperId.TypeDictionary, originalImpl.OwningType)); 1659if (!methodWithTokenDecl.Method.OwningType.IsValueType || !methodWithTokenImpl.Method.OwningType.IsValueType) 1904Debug.Assert(typeContext.HasSameTypeDefinition(owningMethod.OwningType) || typeContext.IsArray); 1920Debug.Assert(methodContext.OwningType.HasSameTypeDefinition(owningMethod.OwningType)); 1921typeInst = methodContext.OwningType.Instantiation; 1966result = ResolveTokenWithSubstitution(methodIL, token, sharedMethod.OwningType.Instantiation, sharedMethod.Instantiation); 1975result = ResolveTokenWithSubstitution(methodIL, token, sharedMethod.OwningType.Instantiation, sharedMethod.Instantiation); 1985result = ResolveTokenWithSubstitution(methodIL, token, sharedMethod.OwningType.Instantiation, sharedMethod.Instantiation); 2011TypeDesc owningType = methodIL.OwningMethod.GetTypicalMethodDefinition().OwningType; 2053pResolvedToken.hClass = ObjectToHandle(method.OwningType); 2130if (method.OwningType.IsDelegate) 2984if (method != null && typeToInit == MethodBeingCompiled.OwningType) 2998if (typeToInit == typeFromContext(context) || typeToInit == MethodBeingCompiled.OwningType) 3006if (MethodBeingCompiled.OwningType == typeToInit && MethodBeingCompiled.IsStaticConstructor) 3910MetadataType owningType = method.OwningType as MetadataType; 4825TypeDesc owningType = MethodBeingCompiled.OwningType; 4885if (!isFallbackBodyCompilation && (this.MethodBeingCompiled.HasInstantiation || this.MethodBeingCompiled.OwningType.HasInstantiation)) // No generics involved 4895if (!isFallbackBodyCompilation && MarshalHelpers.IsMarshallingRequired(this.MethodBeingCompiled.Signature, ((MetadataType)this.MethodBeingCompiled.OwningType).Module)) // Only blittable arguments
parent\parent\Common\JitInterface\UnboxingMethodDesc.cs (1)
25Debug.Assert(wrappedMethod.OwningType.IsValueType);
parent\parent\Common\TypeSystem\IL\Stubs\AsyncResumptionStub.cs (1)
61if (_targetMethod.OwningType.IsValueType)
parent\parent\Common\TypeSystem\IL\Stubs\AsyncThunks.cs (4)
77if (asyncMethod.OwningType.HasInstantiation) 79var instantiatedType = (InstantiatedType)TypeSystemHelpers.InstantiateAsOpen(asyncMethod.OwningType); 257if (asyncVariantTarget.OwningType.HasInstantiation) 259var instantiatedType = (InstantiatedType)TypeSystemHelpers.InstantiateAsOpen(asyncVariantTarget.OwningType);
parent\parent\Common\TypeSystem\IL\Stubs\ComparerIntrinsics.cs (2)
56TypeDesc owningType = methodBeingGenerated.OwningType; 299if (fieldType.FindVirtualFunctionTargetMethodOnObjectType(objectEqualsMethod).OwningType == fieldType)
parent\parent\Common\TypeSystem\IL\Stubs\InterlockedIntrinsics.cs (3)
23Debug.Assert(((MetadataType)method.OwningType).Name == "Interlocked"u8); 33if (compilationModuleGroup.ContainsType(method.OwningType)) 59MethodDesc compareExchangeNonGeneric = method.OwningType.GetKnownMethod("CompareExchange"u8,
parent\parent\Common\TypeSystem\IL\Stubs\RuntimeHelpersIntrinsics.cs (2)
20Debug.Assert(((MetadataType)method.OwningType).Name == "RuntimeHelpers"u8); 73mdType.FindVirtualFunctionTargetMethodOnObjectType(objectEquals).OwningType != mdType &&
parent\parent\Common\TypeSystem\IL\Stubs\UnsafeIntrinsics.cs (1)
19Debug.Assert(((MetadataType)method.OwningType).Name == "Unsafe"u8);
parent\parent\Common\TypeSystem\Interop\IL\Marshaller.cs (1)
453MarshalHelpers.IsRuntimeMarshallingEnabled(((MetadataType)targetMethod.OwningType).Module));
parent\parent\Common\TypeSystem\MetadataEmitter\TypeSystemMetadataEmitter.cs (1)
318EntityHandle typeHandle = GetTypeRef(method.OwningType);
PortableCallHelpers\InternalCallSignatureCollector.cs (2)
69if (method.IsConstructor && method.OwningType.IsWellKnownType(WellKnownType.String)) 75if (method.HasInstantiation || method.OwningType.HasInstantiation)
PortableCallHelpers\PInvokeCollector.cs (1)
185log.Verbose($"Adding {kind} signature {signature} for method '{method.OwningType}.{method.Name.ToString()}'");
src\runtime\src\coreclr\tools\Common\Compiler\GenericCycleDetection\GraphBuilder.cs (1)
414ProcessTypeReference(m.OwningType, typeContext, methodContext);
src\runtime\src\coreclr\tools\Common\Compiler\GenericCycleDetection\ModuleCycleInfo.cs (1)
215|| IsDeepPossiblyCyclicInstantiation(method.OwningType, ref breadthCounter, seenTypes: null);
ILCompiler.RyuJit (71)
Compiler\DependencyAnalysis\MethodCodeNode.cs (7)
35Debug.Assert(!method.IsGenericMethodDefinition && !method.OwningType.IsGenericDefinition); 58public override bool InterestingForDynamicDependencyAnalysis => _method.HasInstantiation || _method.OwningType.HasInstantiation; 65public override bool IsShareable => _method is InstantiatedMethod || EETypeNode.IsTypeNodeShareable(_method.OwningType); 80TypeDesc owningType = _method.OwningType; 227varType = _method.OwningType.IsValueType ? 228_method.OwningType.MakeByRefType() : 229_method.OwningType;
Compiler\DependencyAnalysis\RyuJitNodeFactory.cs (1)
31return MethodEntrypoint(((ArrayType)method.OwningType).GetArrayMethod(ArrayMethodKind.AddressWithHiddenArg));
Compiler\RyuJitCompilation.cs (1)
245&& method.OwningType is MetadataType mdOwningType
JitInterface\CorInfoImpl.RyuJit.cs (28)
370DefType typeToInitialize = (DefType)HandleToObject(callerHandle).OwningType; 426Debug.Assert(directMethod.OwningType.IsValueType || directMethod.Signature.IsStatic); 842method.OwningType is MetadataType mdType && 1066return _compilation.NodeFactory.ReadyToRunHelperFromTypeLookup(helperId, helperArgument, callerHandle.OwningType); 1181if (method.HasInstantiation || method.OwningType.HasInstantiation) 1251if (method.OwningType.IsObject && method.Name == "GetHashCode"u8) 1267Debug.Assert(!methodAfterConstraintResolution.OwningType.IsInterface 1272exactType = directMethod.OwningType; 1278Debug.Assert(method.OwningType.IsInterface); 1312exactType == MethodBeingCompiled.OwningType && 1319if (IsTypeSpecForTypicalInstantiation(rawMethod.OwningType)) 1338Debug.Assert(targetMethod.IsVirtual && targetMethod.OwningType.IsInterface); 1405Debug.Assert(targetMethod.OwningType.GetTypeDefinition() == constrainedType.GetTypeDefinition()); 1494TypeDesc owningType = targetMethod.OwningType; 1540instParam = _compilation.NodeFactory.ConstructedTypeSymbol(concreteMethod.OwningType); 1557Debug.Assert(targetMethod.OwningType.IsInterface && targetMethod.IsVirtual && constrainedType != null); 1565Debug.Assert(targetMethod.OwningType.IsInterface && targetMethod.IsVirtual && constrainedType != null); 1633&& targetMethod.OwningType.IsInterface) 1675if (pResult->exactContextNeedsRuntimeLookup && targetMethod.OwningType.IsInterface) 1709pResult->classFlags = getClassAttribsInternal(targetMethod.OwningType); 1758Debug.Assert(md.OwningType == td); 1799target = objAsMethod.OwningType; 1832callerContextMethod.RequiresInstMethodDescArg() ? callerContextMethod : callerContextMethod.OwningType); 1887TypeDesc owningType = methodDesc.OwningType; 1990TypeDesc owningType = method.OwningType; 2013((MetadataType)methodIL.OwningMethod.OwningType).Module); 2017pResolvedToken.hClass = ObjectToHandle(stub.OwningType); 2173helperId, runtimeDeterminedField.OwningType, contextMethod.OwningType);
parent\parent\Common\JitInterface\CorInfoImpl.cs (33)
906Instantiation owningTypeInst = method.OwningType.Instantiation; 1082return MethodBeingCompiled.OwningType; 1091return HandleToObject((CORINFO_METHOD_STRUCT_*)((nuint)contextStruct & ~(nuint)CorInfoContextFlags.CORINFO_CONTEXTFLAGS_MASK)).OwningType; 1099return MethodBeingCompiled.HasInstantiation ? (TypeSystemEntity)MethodBeingCompiled: (TypeSystemEntity)MethodBeingCompiled.OwningType; 1210if (method.OwningType.IsDelegate && method.Name == "Invoke"u8) 1305if (type != method.OwningType) 1313Debug.Assert(type.HasSameTypeDefinition(method.OwningType)); 1388EcmaModule rootModule = (MethodBeingCompiled.OwningType as MetadataType)?.Module as EcmaModule; 1389EcmaModule calleeModule = (calleeMethod.OwningType as MetadataType)?.Module as EcmaModule; 1444return ObjectToHandle(m.OwningType); 1469if ((info->context != null) && decl.OwningType.IsInterface) 1472if (decl.OwningType != ownerTypeDesc) 1499TypeDesc owningType = originalImpl.OwningType; 1504bool unboxingStub = impl.OwningType.IsValueType; 1598if (originalImpl.OwningType.IsCanonicalSubtype(CanonicalFormKind.Any)) 1649info->instParamLookup.constLookup = CreateConstLookupToSymbol(_compilation.NodeFactory.ConstructedTypeSymbol(originalImpl.OwningType)); 1683OwningType = unboxedMethodDesc.OwningType, 1904Debug.Assert(typeContext.HasSameTypeDefinition(owningMethod.OwningType) || typeContext.IsArray); 1920Debug.Assert(methodContext.OwningType.HasSameTypeDefinition(owningMethod.OwningType)); 1921typeInst = methodContext.OwningType.Instantiation; 1966result = ResolveTokenWithSubstitution(methodIL, token, sharedMethod.OwningType.Instantiation, sharedMethod.Instantiation); 1975result = ResolveTokenWithSubstitution(methodIL, token, sharedMethod.OwningType.Instantiation, sharedMethod.Instantiation); 1985result = ResolveTokenWithSubstitution(methodIL, token, sharedMethod.OwningType.Instantiation, sharedMethod.Instantiation); 2053pResolvedToken.hClass = ObjectToHandle(method.OwningType); 2130if (method.OwningType.IsDelegate) 2984if (method != null && typeToInit == MethodBeingCompiled.OwningType) 2998if (typeToInit == typeFromContext(context) || typeToInit == MethodBeingCompiled.OwningType) 3006if (MethodBeingCompiled.OwningType == typeToInit && MethodBeingCompiled.IsStaticConstructor) 3910MetadataType owningType = method.OwningType as MetadataType; 4825TypeDesc owningType = MethodBeingCompiled.OwningType; 4885if (!isFallbackBodyCompilation && (this.MethodBeingCompiled.HasInstantiation || this.MethodBeingCompiled.OwningType.HasInstantiation)) // No generics involved 4895if (!isFallbackBodyCompilation && MarshalHelpers.IsMarshallingRequired(this.MethodBeingCompiled.Signature, ((MetadataType)this.MethodBeingCompiled.OwningType).Module)) // Only blittable arguments
parent\parent\Common\JitInterface\UnboxingMethodDesc.cs (1)
25Debug.Assert(wrappedMethod.OwningType.IsValueType);
ILCompiler.TypeSystem (54)
parent\parent\Common\TypeSystem\Common\CastingHelper.cs (1)
275typeInstantiation = method.OwningType.Instantiation;
parent\parent\Common\TypeSystem\Common\ConstructedTypeRewritingHelpers.cs (2)
155TypeDesc newOwningType = method.OwningType.ReplaceTypesInConstructionOfType(typesToReplace, replacementTypes); 158if (newOwningType == method.OwningType)
parent\parent\Common\TypeSystem\Common\InstantiatedMethod.cs (1)
54return _methodDef.OwningType;
parent\parent\Common\TypeSystem\Common\InstantiatedType.cs (2)
209while (typicalFinalizer.OwningType.GetTypeDefinition() != typeInHierarchy.GetTypeDefinition()) 214if (typeInHierarchy == typicalFinalizer.OwningType)
parent\parent\Common\TypeSystem\Common\InstantiatedType.MethodImpls.cs (1)
29var implTypeInstantiated = uninstMethodImpls[i].Decl.OwningType.InstantiateSignature(this.Instantiation, default(Instantiation));
parent\parent\Common\TypeSystem\Common\MetadataVirtualMethodAlgorithm.cs (12)
283if (decl.OwningType.IsInterface) 295if (recordDecl.OwningType.IsInterface) 311Debug.Assert(decl.OwningType.IsInterface); 346int index = Array.IndexOf(interfacesOnDefinition, foundMethodImplsOnDefinition[results[i]].Decl.OwningType); 447DefType currentType = method.OwningType.BaseType; 711MetadataType interfaceType = (MetadataType)interfaceMethod.OwningType; 775MetadataType interfaceType = (MetadataType)interfaceMethod.OwningType; 809MetadataType interfaceType = (MetadataType)interfaceMethod.OwningType; 911|| implRecord.Decl.OwningType == interfaceMT 912|| (allowVariance && implRecord.Decl.OwningType.CanCastTo(interfaceMT))) 934TypeDesc interfaceMT = interfaceMethod.OwningType; 1145TypeDesc interfaceType = interfaceMethod.OwningType;
parent\parent\Common\TypeSystem\Common\MethodDelegator.cs (1)
24public override TypeDesc OwningType => _wrappedMethod.OwningType;
parent\parent\Common\TypeSystem\Common\MethodDesc.cs (5)
530return OwningType.GetHashCode() ^ VersionResilientHashCode.NameHashCode(Name); 603return OwningType.GetDefaultConstructor() == this; 614return this == this.OwningType.GetStaticConstructor(); 762TypeDesc owningType = OwningType; 792TypeDesc owningType = method.OwningType;
parent\parent\Common\TypeSystem\Common\MethodDesc.ToString.cs (1)
49sb.Append(OwningType);
parent\parent\Common\TypeSystem\Common\ThrowHelper.Common.cs (3)
38ThrowTypeLoadException(id, Format.Type(method.OwningType), Format.OwningModule(method), Format.Method(method)); 57return OwningModule(method.OwningType); 94return Method(method.OwningType, method.GetName(), method.Signature);
parent\parent\Common\TypeSystem\Common\TypeSystemConstraintsHelpers.cs (2)
210if (!method.OwningType.CheckConstraints(context)) 217var paramContext = new InstantiationContext(method.OwningType.Instantiation, method.Instantiation);
parent\parent\Common\TypeSystem\Common\TypeSystemContext.cs (1)
362_hashcode = methodDef.OwningType.GetHashCode()
parent\parent\Common\TypeSystem\Common\TypeSystemHelpers.cs (8)
105Debug.Assert(instantiatedType.GetTypeDefinition() == methodTypicalDefinition.OwningType); 110Debug.Assert(method.OwningType.IsArray); 115Debug.Assert(type == methodTypicalDefinition.OwningType); 132if (!method.HasInstantiation && !method.OwningType.HasInstantiation) 140TypeDesc typicalTypeOfTargetMethod = method.GetTypicalMethodDefinition().OwningType; 275TypeDesc owner = method.OwningType; 292Debug.Assert(interfaceMethodToResolve.OwningType.IsInterface); 312Debug.Assert(interfaceMethodToResolve.OwningType.IsInterface);
parent\parent\Common\TypeSystem\Common\Utilities\CSharpTypeNameFormatter.cs (1)
19AppendName(sb, method.OwningType);
parent\parent\Common\TypeSystem\Ecma\EcmaType.cs (1)
426if (impl.OwningType != objectType)
parent\parent\Common\TypeSystem\Ecma\EcmaType.MethodImpls.cs (1)
88owningType = ((MethodDesc)_module.GetObject(methodDeclCheckHandle)).OwningType as MetadataType;
parent\parent\Common\TypeSystem\IL\EcmaMethodIL.cs (1)
162_module = ((EcmaType)method.OwningType).Module;
parent\parent\Common\TypeSystem\IL\ILDisassembler.cs (3)
49TypeDesc owningTypeDefinition = _methodIL.OwningMethod.OwningType; 64_methodIL.OwningMethod.OwningType.Instantiation, _methodIL.OwningMethod.Instantiation); 88AppendOwningType(sb, method.OwningType);
parent\parent\Common\TypeSystem\IL\InstantiatedMethodIL.cs (2)
20Debug.Assert(owningMethod.HasInstantiation || owningMethod.OwningType.HasInstantiation); 25_typeInstantiation = owningMethod.OwningType.Instantiation;
parent\parent\Common\TypeSystem\IL\Stubs\PInvokeTargetNativeMethod.cs (1)
47return _declMethod.OwningType;
parent\parent\Common\TypeSystem\IL\UnsafeAccessors.cs (1)
397Instantiation declClassInst = declaration.OwningType.Instantiation;
parent\parent\Common\TypeSystem\RuntimeDetermined\MethodDesc.RuntimeDetermined.cs (3)
16DefType owningType = OwningType as DefType; 57return OwningType; 126TypeDesc owningType = method.OwningType;