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