182 references to IsInterface
ILCompiler.Compiler (96)
Compiler\Compilation.cs (2)
335if (type.IsInterface) 524Debug.Assert(!runtimeDeterminedOwningType.IsInterface);
Compiler\CompilerTypeSystemContext.Aot.cs (2)
149if (!type.IsInterface || type.Instantiation.Length != 1) 174if (!type.IsInterface || type.Instantiation.Length != 1)
Compiler\CompilerTypeSystemContext.InterfaceThunks.cs (3)
76Debug.Assert(targetMethod.OwningType.IsInterface); 79if (implementingClass.IsInterface) 176Debug.Assert(targetMethod.OwningType.IsInterface);
Compiler\Dataflow\HandleCallAction.cs (1)
575if (constraint.IsInterface)
Compiler\Dataflow\ReflectionMethodBodyScanner.cs (2)
150if (type.IsInterface) 411else if (parameterType.IsInterface)
Compiler\DelegateCreationInfo.cs (1)
271if (targetMethod.OwningType.IsInterface)
Compiler\DependencyAnalysis\DispatchCellNode.cs (1)
30Debug.Assert(targetMethod.HasInstantiation || targetMethod.OwningType.IsInterface);
Compiler\DependencyAnalysis\EETypeNode.cs (8)
106if (type.IsInterface) 367if (!defType.IsInterface) 430bool needsDependenciesForInstanceInterfaceMethodImpls = !defType.IsInterface 445Debug.Assert(interfaceType.IsInterface); 596if (_type.IsInterface) 924bool isInterfaceWithAnEmptySlot = declType.IsInterface && 959if (_type.IsInterface) 1016bool canUseTentativeEntrypoint = implType is MetadataType mdImplType && mdImplType.IsAbstract && !mdImplType.IsInterface
Compiler\DependencyAnalysis\GenericDefinitionEETypeNode.cs (1)
105if (_type.IsInterface)
Compiler\DependencyAnalysis\GenericLookupResult.cs (3)
705Debug.Assert(method.HasInstantiation || method.OwningType.IsInterface); 1101if (instantiatedConstrainedMethod.OwningType.IsInterface) 1134Debug.Assert(instantiatedConstraintType.IsValueType || (instantiatedConstrainedMethod.OwningType.IsInterface && instantiatedConstrainedMethod.Signature.IsStatic));
Compiler\DependencyAnalysis\GenericVirtualMethodTableNode.cs (3)
48Debug.Assert(!callingMethod.OwningType.IsInterface); 62Debug.Assert(!callingMethod.OwningType.IsInterface); 102Debug.Assert(!gvmEntry.Key.OwningType.IsInterface);
Compiler\DependencyAnalysis\InterfaceDispatchMapNode.cs (3)
86bool isInterface = type.IsInterface; 154bool isInterface = declType.IsInterface; 165Debug.Assert(interfaceType.IsInterface);
Compiler\DependencyAnalysis\InterfaceGenericVirtualMethodTableNode.cs (5)
50Debug.Assert(callingMethod.OwningType.IsInterface); 67if (!openImplementationType.IsInterface) 83Debug.Assert(callingMethod.OwningType.IsInterface); 99if (!openImplementationType.IsInterface) 147Debug.Assert(gvmEntry.Key.OwningType.IsInterface);
Compiler\DependencyAnalysis\InterfaceUseNode.cs (1)
26Debug.Assert(type.IsInterface);
Compiler\DependencyAnalysis\NativeLayoutVertexNode.cs (4)
653if (method.Signature.IsStatic && !method.OwningType.IsInterface) 834if (typeConstraint.IsInterface) 960if (typeConstraint.IsInterface) 1465Debug.Assert(_constrainedMethod.OwningType.IsInterface);
Compiler\DependencyAnalysis\SealedVTableNode.cs (3)
118bool isInterface = declType.IsInterface; 271bool isSharedDynamicInterfaceCastableImpl = _type.IsInterface 340Debug.Assert(interfaceDefinition.IsInterface);
Compiler\DependencyAnalysis\Target_ARM\ARMReadyToRunHelperNode.cs (1)
131if (targetMethod.OwningType.IsInterface)
Compiler\DependencyAnalysis\Target_ARM64\ARM64ReadyToRunHelperNode.cs (1)
146if (targetMethod.OwningType.IsInterface)
Compiler\DependencyAnalysis\Target_LoongArch64\LoongArch64ReadyToRunHelperNode.cs (1)
138if (targetMethod.OwningType.IsInterface)
Compiler\DependencyAnalysis\Target_RiscV64\RiscV64ReadyToRunHelperNode.cs (1)
136if (targetMethod.OwningType.IsInterface)
Compiler\DependencyAnalysis\Target_X64\X64ReadyToRunHelperNode.cs (1)
151if (targetMethod.OwningType.IsInterface)
Compiler\DependencyAnalysis\Target_X86\X86ReadyToRunHelperNode.cs (1)
160if (targetMethod.OwningType.IsInterface)
Compiler\DependencyAnalysis\TypeGVMEntriesNode.cs (1)
49Debug.Assert(!associatedType.IsInterface);
Compiler\DependencyAnalysis\TypeMetadataNode.cs (1)
154if (type.IsInterface && ((MetadataType)type).IsDynamicInterfaceCastableImplementation())
Compiler\DependencyAnalysis\VariantInterfaceMethodUseNode.cs (3)
30Debug.Assert(decl.OwningType.IsInterface); 48Debug.Assert(implementedInterface.IsInterface); 101if (!owningType.IsInterface)
Compiler\ILScanner.cs (5)
512if (type.IsInterface) 653if (baseType.IsInterface 678Debug.Assert(!implType.IsInterface); 723if (method.IsAbstract || method.OwningType.IsInterface) 790if (!type.IsInterface && type is not MetadataType { IsAbstract: true })
Compiler\TypePreinit.cs (1)
505&& (method.Signature.IsStatic || method.IsConstructor || owningType.IsValueType || owningType.IsInterface) // ECMA-335 I.8.9.5
Compiler\UsageBasedMetadataManager.cs (3)
415if (type.IsDefType && !type.IsInterface && FlowAnnotations.GetTypeAnnotation(type) != default) 441&& !type.IsInterface /* "IFoo x; x.GetType();" -> this doesn't actually return an interface type */) 818bool baseMethodTypeIsInterface = baseMethod.OwningType.IsInterface;
Compiler\UserDefinedTypeDescriptor.cs (1)
577else if (type.IsInterface)
Compiler\VirtualMethodCallHelper.cs (2)
94if (implType.IsInterface) 196if (type.IsInterface)
IL\ILImporter.Scanner.cs (7)
141(_canonMethod.Signature.IsStatic || _canonMethod.IsConstructor || owningType.IsValueType || owningType.IsInterface)) 765Debug.Assert(!methodAfterConstraintResolution.OwningType.IsInterface 775Debug.Assert(method.OwningType.IsInterface); 808Debug.Assert(targetMethod.IsVirtual && targetMethod.OwningType.IsInterface); 984Debug.Assert(targetMethod.OwningType.IsInterface && targetMethod.IsVirtual && _constrained != null); 993Debug.Assert(targetMethod.OwningType.IsInterface && targetMethod.IsVirtual && _constrained != null); 1026else if (method.OwningType.IsInterface)
parent\parent\Common\Compiler\CachingVirtualMethodAlgorithm.cs (1)
41if (type.IsInterface)
parent\parent\Common\Compiler\DependencyAnalysis\GVMDependenciesNode.cs (4)
54if (!_method.OwningType.IsInterface) 71if (!methodOwningType.IsInterface && 106if (!potentialOverrideType.IsDefType || potentialOverrideType.IsInterface) 122if (methodOwningType.IsInterface)
parent\parent\Common\Compiler\DevirtualizationManager.cs (1)
72if (declMethod.OwningType.IsInterface)
parent\parent\Common\Compiler\MethodExtensions.cs (3)
115if (owningType.IsInterface) 151!owningType.IsInterface && /* Interface MethodTable can be optimized away but the instance method can still be callable (`this` is of a non-interface type) */ 183if (method.OwningType.IsInterface)
parent\parent\Common\Compiler\TypeExtensions.cs (12)
46(method.HasInstantiation || method.Signature.IsStatic || method.ImplementationType.IsValueType || (method.ImplementationType.IsInterface && !method.IsAbstract)); 64return (method.Signature.IsStatic || method.ImplementationType.IsValueType || (method.ImplementationType.IsInterface && !method.IsAbstract)) && 78!(method.ImplementationType.IsInterface && !method.IsAbstract); 241else if (tb.IsInterface) 254if (ta.IsInterface && tb.CanCastTo(ta)) 265if (tb.IsInterface) 267if (ta.IsInterface) 296else if (ta.IsInterface) 509if (genInterfaceMethod.OwningType.IsInterface) 544Debug.Assert(!method.OwningType.IsInterface); 747if (c.IsInterface) 795Debug.Assert(interfaceType.IsInterface);
parent\parent\Common\Internal\Runtime\EETypeBuilderHelpers.cs (1)
113if (type.IsInterface)
parent\parent\Common\TypeSystem\Interop\IL\MarshalHelpers.cs (1)
667else if (type.IsInterface)
ILCompiler.MetadataTransform (1)
ILCompiler\Metadata\Transform.Type.cs (1)
545if (type.IsInterface)
ILCompiler.ReadyToRun (50)
Compiler\DependencyAnalysis\InheritedVirtualMethodsNode.cs (2)
29Debug.Assert(type.IsDefType && !type.IsInterface); 129if (implMethod.IsVirtual && !implMethod.IsFinal && !implMethod.OwningType.IsInterface)
Compiler\DependencyAnalysis\ReadyToRun\DevirtualizationManager.cs (4)
54if (!declMethod.OwningType.IsInterface) 120if (declMethod.OwningType.IsInterface) 137if (declMethod.OwningType.IsInterface) 165if (resolvedVirtualMethod.OwningType.IsInterface)
Compiler\DependencyAnalysis\ReadyToRun\MethodFixupSignature.cs (1)
84(Method.OwningType.IsInterface || !Method.OwningType.IsSealed()))
Compiler\DependencyAnalysis\ReadyToRun\TypeValidationChecker.cs (8)
139if (!interfaceType.IsInterface) 228if (type.IsInterface) 248if (methodDef.Attributes.HasFlag(MethodAttributes.Static) && !type.IsInterface) 313if (type.IsInterface && type.HasInstantiation && (method.IsVirtual || !method.Signature.IsStatic)) 347if (type.HasInstantiation && type.IsInterface) 401if (methodBody.OwningType.IsInterface && !isStatic && !methodBody.IsFinal) 431if (type.BaseType != null && !type.IsInterface && !type.IsValueType) 487if (!type.IsInterface)
Compiler\DependencyAnalysis\ReadyToRunCodegenNodeFactory.cs (1)
238!type.IsInterface &&
Compiler\ProfileDataManager.cs (1)
447if (!type.IsAbstract && !type.IsInterface)
Compiler\ReadyToRunCodegenCompilation.cs (1)
135if (declMethod.OwningType.IsInterface)
JitInterface\CorInfoImpl.ReadyToRun.cs (6)
2061Debug.Assert(!methodAfterConstraintResolution.OwningType.IsInterface || (isStaticVirtual && methodAfterConstraintResolution.Signature.IsStatic)); 2159if (targetMethod.OwningType.IsInterface) 2351targetMethod.OwningType.IsInterface)) 2357else if (!targetMethod.OwningType.IsInterface) 2366useInstantiatingStub = useInstantiatingStub || (targetMethod.OwningType.IsInterface && !originalMethod.IsAbstract); 2369pResult->nullInstanceCheck = callVirtCrossingVersionBubble && !targetMethod.OwningType.IsInterface;
parent\parent\Common\Compiler\CachingVirtualMethodAlgorithm.cs (1)
41if (type.IsInterface)
parent\parent\Common\Compiler\DependencyAnalysis\GVMDependenciesNode.cs (3)
71if (!methodOwningType.IsInterface && 106if (!potentialOverrideType.IsDefType || potentialOverrideType.IsInterface) 122if (methodOwningType.IsInterface)
parent\parent\Common\Compiler\DevirtualizationManager.cs (1)
72if (declMethod.OwningType.IsInterface)
parent\parent\Common\Compiler\MethodExtensions.cs (2)
151!owningType.IsInterface && /* Interface MethodTable can be optimized away but the instance method can still be callable (`this` is of a non-interface type) */ 183if (method.OwningType.IsInterface)
parent\parent\Common\Compiler\TypeExtensions.cs (12)
46(method.HasInstantiation || method.Signature.IsStatic || method.ImplementationType.IsValueType || (method.ImplementationType.IsInterface && !method.IsAbstract)); 64return (method.Signature.IsStatic || method.ImplementationType.IsValueType || (method.ImplementationType.IsInterface && !method.IsAbstract)) && 78!(method.ImplementationType.IsInterface && !method.IsAbstract); 241else if (tb.IsInterface) 254if (ta.IsInterface && tb.CanCastTo(ta)) 265if (tb.IsInterface) 267if (ta.IsInterface) 296else if (ta.IsInterface) 509if (genInterfaceMethod.OwningType.IsInterface) 544Debug.Assert(!method.OwningType.IsInterface); 747if (c.IsInterface) 795Debug.Assert(interfaceType.IsInterface);
parent\parent\Common\JitInterface\CorInfoImpl.cs (6)
1469if ((info->context != null) && decl.OwningType.IsInterface) 1585bool isArray = decl.OwningType.IsInterface && objType.IsArray; 2310if (type.IsInterface) 2947else if (!md.IsConstructor && !typeToInit.IsValueType && !typeToInit.IsInterface) 2996if (!typeToInit.IsValueType && !typeToInit.IsInterface && !typeToInit.IsBeforeFieldInit) 3104if (toType.IsInterface)
parent\parent\Common\TypeSystem\Interop\IL\MarshalHelpers.cs (1)
667else if (type.IsInterface)
ILCompiler.RyuJit (13)
JitInterface\CorInfoImpl.RyuJit.cs (8)
1094else if (type.IsInterface) 1267Debug.Assert(!methodAfterConstraintResolution.OwningType.IsInterface 1278Debug.Assert(method.OwningType.IsInterface); 1338Debug.Assert(targetMethod.IsVirtual && targetMethod.OwningType.IsInterface); 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)
parent\parent\Common\JitInterface\CorInfoImpl.cs (5)
1469if ((info->context != null) && decl.OwningType.IsInterface) 2310if (type.IsInterface) 2947else if (!md.IsConstructor && !typeToInit.IsValueType && !typeToInit.IsInterface) 2996if (!typeToInit.IsValueType && !typeToInit.IsInterface && !typeToInit.IsBeforeFieldInit) 3104if (toType.IsInterface)
ILCompiler.TypeSystem (22)
parent\parent\Common\TypeSystem\Common\CastingHelper.cs (3)
377if (!typeConstraint.IsInterface && typeConstraint.IsGCPointer) 416if (otherType.IsInterface) 539if (curType.IsInterface && otherType.IsObject)
parent\parent\Common\TypeSystem\Common\CastingHelper.TypeEquivalence.cs (5)
73if (!thisType.IsInterface || !otherType.IsInterface) 151if (type1.IsInterface != type2.IsInterface) 155if (type1.IsInterface)
parent\parent\Common\TypeSystem\Common\MetadataVirtualMethodAlgorithm.cs (8)
283if (decl.OwningType.IsInterface) 295if (recordDecl.OwningType.IsInterface) 311Debug.Assert(decl.OwningType.IsInterface); 704if (currentType.IsInterface) 939if (!currentType.IsInterface) 964int totalInterfaces = currentType.IsInterface && pMT == currentType 1091return type.IsInterface ? type.GetAllVirtualMethods() : EnumAllVirtualSlotsOnClass(type); 1122if (currentType.IsInterface)
parent\parent\Common\TypeSystem\Common\TypeDesc.TypeEquivalence.cs (1)
87if (!(IsInterface && (IsComImport || IsComEventInterface)) && !IsValueType && !IsDelegate)
parent\parent\Common\TypeSystem\Common\TypeSystemConstraintsHelpers.cs (1)
106if (constraint.IsGenericParameter || constraint.IsInterface)
parent\parent\Common\TypeSystem\Common\TypeSystemHelpers.cs (2)
292Debug.Assert(interfaceMethodToResolve.OwningType.IsInterface); 312Debug.Assert(interfaceMethodToResolve.OwningType.IsInterface);
parent\parent\Common\TypeSystem\Ecma\EcmaType.MethodImpls.cs (1)
101if (!owningType.IsInterface)
parent\parent\Common\TypeSystem\Ecma\EcmaType.TypeEquivalence.cs (1)
18if (IsInterface && _typeDefinition.Attributes.HasFlag(TypeAttributes.Import))