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