312 references to IsValueType
ILCompiler.Compiler (141)
Compiler\Compilation.cs (2)
308
if (type.
IsValueType
&& type.GetParameterlessConstructor() == null)
366
return type.
IsValueType
? NodeFactory.ExactCallableAddress(ctor) : NodeFactory.CanonicalEntrypoint(ctor);
Compiler\CompilerTypeSystemContext.Aot.cs (3)
96
(elementType.IsDefType && !elementType.
IsValueType
))
137
if (fieldType.
IsValueType
)
217
else if (type.
IsValueType
)
Compiler\CompilerTypeSystemContext.GetFieldMethodOverrides.cs (2)
114
Debug.Assert(type.
IsValueType
);
159
Debug.Assert(Type.
IsValueType
);
Compiler\Dataflow\MethodBodyScanner.cs (1)
892
isByRef |= param.IsImplicitThis && paramType.
IsValueType
;
Compiler\Dataflow\ReflectionMethodBodyScanner.cs (2)
406
if (parameterType.
IsValueType
)
447
if (!method.Signature.IsStatic && !method.HasInstantiation && !method.IsConstructor && !method.OwningType.
IsValueType
)
Compiler\DelegateCreationInfo.cs (1)
66
return TargetMethod.OwningType.
IsValueType
&& !TargetMethod.Signature.IsStatic;
Compiler\DependencyAnalysis\EETypeNode.cs (8)
404
factory.TentativeMethodEntrypoint(canonImpl, impl.OwningType.
IsValueType
) :
405
factory.MethodEntrypoint(canonImpl, impl.OwningType.
IsValueType
);
409
factory.AddressTakenMethodEntrypoint(canonImpl, impl.OwningType.
IsValueType
),
844
if (_type.IsArray && parameterType.
IsValueType
&& !parameterType.IsNullable)
962
bool isAsyncStateMachineValueType = implType.
IsValueType
1022
implSymbol = factory.TentativeMethodEntrypoint(canonImplMethod, implMethod.OwningType.
IsValueType
);
1024
implSymbol = factory.AddressTakenMethodEntrypoint(canonImplMethod, implMethod.OwningType.
IsValueType
);
1026
implSymbol = factory.MethodEntrypoint(canonImplMethod, implMethod.OwningType.
IsValueType
);
Compiler\DependencyAnalysis\ExactMethodInstantiationsNode.cs (2)
55
bool getUnboxingStub = method.OwningType.
IsValueType
&& !method.Signature.IsStatic;
108
bool getUnboxingStub = method.OwningType.
IsValueType
&& !method.Signature.IsStatic;
Compiler\DependencyAnalysis\GenericDictionaryNode.cs (3)
135
if (arg.
IsValueType
|| arg.GetDefaultConstructor() == null || !ConstructedEETypeNode.CreationAllowed(arg))
224
if (arg.
IsValueType
|| arg.GetDefaultConstructor() == null || !ConstructedEETypeNode.CreationAllowed(arg))
234
if (arg.
IsValueType
|| arg.GetDefaultConstructor() == null || !ConstructedEETypeNode.CreationAllowed(arg))
Compiler\DependencyAnalysis\GenericLookupResult.cs (2)
1018
return instantiatedType.
IsValueType
? factory.ExactCallableAddress(defaultCtor) : factory.CanonicalEntrypoint(defaultCtor);
1134
Debug.Assert(instantiatedConstraintType.
IsValueType
|| (instantiatedConstrainedMethod.OwningType.IsInterface && instantiatedConstrainedMethod.Signature.IsStatic));
Compiler\DependencyAnalysis\GenericVirtualMethodImplNode.cs (1)
51
bool getUnboxingStub = _method.OwningType.
IsValueType
&& !_method.Signature.IsStatic;
Compiler\DependencyAnalysis\ManagedDataDescriptorNode.cs (1)
133
if (type.
IsValueType
)
Compiler\DependencyAnalysis\MetadataEETypeNode.cs (1)
48
if (_type.
IsValueType
)
Compiler\DependencyAnalysis\NativeLayoutVertexNode.cs (2)
109
public virtual bool IsUnboxingStub => _method.OwningType.
IsValueType
&& !_method.Signature.IsStatic;
733
if (owningType.IsSzArray || owningType.HasSameTypeDefinition(factory.ArrayOfTClass) || owningType.
IsValueType
|| owningType.IsSealed())
Compiler\DependencyAnalysis\ReflectionInvokeMapNode.cs (3)
60
if (method.OwningType.
IsValueType
&& !method.Signature.IsStatic)
153
bool goesThroughInstantiatingUnboxingThunk = method.OwningType.
IsValueType
&& !method.Signature.IsStatic && !method.HasInstantiation;
193
unboxingStub: method.OwningType.
IsValueType
&& !method.Signature.IsStatic))));
Compiler\DependencyAnalysis\SealedVTableNode.cs (6)
139
node = factory.AddressTakenMethodEntrypoint(implMethod.GetCanonMethodTarget(CanonicalFormKind.Specific), unboxingStub: !implMethod.Signature.IsStatic && declType.
IsValueType
);
141
node = factory.MethodEntrypoint(implMethod.GetCanonMethodTarget(CanonicalFormKind.Specific), unboxingStub: !implMethod.Signature.IsStatic && declType.
IsValueType
);
199
node = factory.AddressTakenMethodEntrypoint(targetMethod.GetCanonMethodTarget(CanonicalFormKind.Specific), unboxingStub: !targetMethod.Signature.IsStatic && declType.
IsValueType
);
201
node = factory.MethodEntrypoint(targetMethod.GetCanonMethodTarget(CanonicalFormKind.Specific), unboxingStub: !targetMethod.Signature.IsStatic && declType.
IsValueType
);
234
node = factory.AddressTakenMethodEntrypoint(canonImplMethod, unboxingStub: implMethod.OwningType.
IsValueType
&& !implMethod.Signature.IsStatic);
236
node = factory.MethodEntrypoint(canonImplMethod, unboxingStub: implMethod.OwningType.
IsValueType
&& !implMethod.Signature.IsStatic);
Compiler\DependencyAnalysis\SerializedFrozenObjectNode.cs (1)
48
: ((DefType)_data.Type).InstanceByteCount.AsInt + (_data.Type.
IsValueType
? _data.Type.Context.Target.PointerSize : 0);
Compiler\DependencyAnalysis\TentativeInstanceMethodNode.cs (1)
28
Debug.Assert(!methodNode.Method.OwningType.
IsValueType
);
Compiler\DependencyAnalysis\UnboxingStubNode.cs (1)
34
Debug.Assert(target.OwningType.
IsValueType
);
Compiler\DependencyAnalysis\VariantInterfaceMethodUseNode.cs (4)
68
if (!variantArgument.
IsValueType
89
(elementType.IsDefType && !elementType.
IsValueType
);
118
if (!variantArgument.
IsValueType
137
(elementType.IsDefType && !elementType.
IsValueType
);
Compiler\JitHelper.cs (1)
357
if (type.
IsValueType
)
Compiler\MetadataManager.cs (1)
708
!method.Signature.IsStatic && method.OwningType.
IsValueType
);
Compiler\SubstitutedILProvider.cs (1)
1007
"get_IsValueType" => type.
IsValueType
? 1 : 0,
Compiler\TypePreinit.cs (19)
294
|| (elementType.
IsValueType
&& ((DefType)elementType).ContainsGCPointers)))
505
&& (method.Signature.IsStatic || method.IsConstructor || owningType.
IsValueType
|| owningType.IsInterface) // ECMA-335 I.8.9.5
528
if (!owningType.
IsValueType
&& (method.IsVirtual || methodParams[0] == null))
641
if (owningType.
IsValueType
)
679
else if (fieldType.
IsValueType
&& ((DefType)fieldType).ContainsGCPointers)
685
} while (allGcPointersAreReadonly && (currentType = currentType.BaseType) != null && !currentType.
IsValueType
);
1688
if (type.
IsValueType
)
1886
Debug.Assert(locationType.
IsValueType
|| locationType.IsPointer || locationType.IsFunctionPointer);
1917
&& method.Instantiation[0].
IsValueType
)
1941
retVal = ValueTypeValue.FromSByte(typeToCheckForValueType.TypeRepresented.
IsValueType
? (sbyte)1 : (sbyte)0);
1986
return method.OwningType.
IsValueType
? method.OwningType.MakeByRefType() : method.OwningType;
2207
if (!locationType.
IsValueType
2330
Debug.Assert(type.
IsValueType
|| type.IsPointer || type.IsFunctionPointer);
2457
if (!type.
IsValueType
2624
if (!type.
IsValueType
3147
if (!type.
IsValueType
3540
if (type.
IsValueType
)
3565
if (!type.
IsValueType
|| type.IsNullable)
3604
if (Type.
IsValueType
)
Compiler\UnixNodeMangler.cs (2)
17
Debug.Assert(type.
IsValueType
);
23
Utf8String mangledJustTypeName = type.
IsValueType
Compiler\UsageBasedMetadataManager.cs (1)
320
if (elementType.
IsValueType
)
Compiler\UserDefinedTypeDescriptor.cs (7)
50
Debug.Assert(type.
IsValueType
);
264
if ((type.IsDefType && !type.
IsValueType
) || type.IsArray)
559
IsStruct = type.
IsValueType
? 1 : 0,
573
if (type.HasBaseType && !type.
IsValueType
)
597
bool hasInstanceFields = defType.
IsValueType
|| NodeFactory.MetadataManager.HasConstructedEEType(defType);
661
catch (TypeSystemException) when (!fieldType.
IsValueType
)
739
LayoutInt instanceSize = defType.
IsValueType
? defType.InstanceFieldSize : defType.InstanceByteCount;
Compiler\WindowsNodeMangler.cs (2)
31
Debug.Assert(type.
IsValueType
);
37
Utf8String mangledJustTypeName = type.
IsValueType
IL\ILImporter.Scanner.cs (8)
141
(_canonMethod.Signature.IsStatic || _canonMethod.IsConstructor || owningType.
IsValueType
|| owningType.IsInterface))
669
_dependencies.Add(type.
IsValueType
? _factory.ExactCallableAddress(ctor) : _factory.CanonicalEntrypoint(ctor), reason);
778
else if (constrained.
IsValueType
)
853
Debug.Assert(targetMethod.OwningType.
IsValueType
|| targetMethod.Signature.IsStatic);
1108
if (!awaiterType.
IsValueType
)
1255
if (!type.
IsValueType
)
1585
if (!type.
IsValueType
)
2046
bool isValueTask = taskReturnType.
IsValueType
;
parent\parent\Common\Compiler\CompilerTypeSystemContext.BoxedTypes.cs (5)
61
Debug.Assert(owningType.
IsValueType
);
88
Debug.Assert(owningType.
IsValueType
);
265
Debug.Assert(valuetype.
IsValueType
);
382
Debug.Assert(targetMethod.OwningType.
IsValueType
);
495
Debug.Assert(targetMethod.OwningType.
IsValueType
);
parent\parent\Common\Compiler\Dataflow\EcmaExtensions.cs (1)
77
return method.OwningType.
IsValueType
? ReferenceKind.Ref : ReferenceKind.None;
parent\parent\Common\Compiler\MethodExtensions.cs (1)
150
!owningType.
IsValueType
&& /* Value type instance methods take a ref to data */
parent\parent\Common\Compiler\TypeExtensions.cs (8)
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)) &&
77
!method.ImplementationType.
IsValueType
&&
496
if (!constrainedType.
IsValueType
)
540
if (method != null && !method.OwningType.
IsValueType
)
622
if (!method.OwningType.
IsValueType
)
639
&& !method.OwningType.
IsValueType
)
847
return firstFieldElementType.
IsValueType
parent\parent\Common\Internal\Runtime\EETypeBuilderHelpers.cs (3)
91
if ((arrayElementType.
IsValueType
&& ((DefType)arrayElementType).ContainsGCPointers) || arrayElementType.IsGCPointer)
136
if (type.
IsValueType
)
221
if (type.
IsValueType
&& type != type.Context.UniversalCanonType)
parent\parent\Common\Internal\Runtime\GCDescEncoder.cs (1)
108
int offs = defType.
IsValueType
? builder.TargetPointerSize : 0;
parent\parent\Common\JitInterface\WasmLowering.cs (3)
60
if (!(type.
IsValueType
&& !type.IsPrimitive))
119
if (type.
IsValueType
&& !type.IsPrimitive)
241
if (type is not DefType || !type.
IsValueType
)
parent\parent\Common\TypeSystem\IL\DelegateInfo.cs (2)
171
return firstParam.IsSignatureVariable || firstParam.
IsValueType
;
180
return !firstParam.
IsValueType
;
parent\parent\Common\TypeSystem\IL\NativeAotILProvider.cs (2)
111
&& activatedType.
IsValueType
235
Debug.Assert(elementType.
IsValueType
);
parent\parent\Common\TypeSystem\IL\Stubs\AsyncResumptionStub.cs (1)
61
if (_targetMethod.OwningType.
IsValueType
)
parent\parent\Common\TypeSystem\IL\Stubs\AsyncThunks.cs (1)
28
bool isValueTask = returnType.
IsValueType
;
parent\parent\Common\TypeSystem\IL\Stubs\ComparerIntrinsics.cs (3)
252
Debug.Assert(type.
IsValueType
);
296
Debug.Assert(fieldType.
IsValueType
);
342
Debug.Assert(fieldType.
IsValueType
);
parent\parent\Common\TypeSystem\IL\Stubs\DynamicInvokeMethodThunk.cs (1)
69
if (type.
IsValueType
)
parent\parent\Common\TypeSystem\IL\Stubs\GetFieldHelperMethodOverride.cs (5)
89
if (_owningType.
IsValueType
&& ComparerIntrinsics.CanCompareValueTypeBitsUntilOffset(_owningType, Context.GetWellKnownType(WellKnownType.Object).GetMethod("Equals"u8, null), out int lastFieldEndOffset))
102
ILToken rawDataToken = owningType.
IsValueType
? default :
134
if (!fieldTypeForOptimizationChecks.
IsValueType
)
153
if (!owningType.
IsValueType
)
167
if (!owningType.
IsValueType
parent\parent\Common\TypeSystem\IL\Stubs\InterlockedIntrinsics.cs (1)
40
if (!tType.
IsValueType
)
parent\parent\Common\TypeSystem\IL\Stubs\RuntimeHelpersIntrinsics.cs (1)
64
else if (mdType.
IsValueType
)
parent\parent\Common\TypeSystem\IL\Stubs\StructMarshallingThunk.cs (2)
84
ManagedType.
IsValueType
? (TypeDesc)ManagedType.MakeByRefType() : ManagedType,
91
ManagedType.
IsValueType
? (TypeDesc)ManagedType.MakeByRefType() : ManagedType
parent\parent\Common\TypeSystem\Interop\IL\InlineArrayType.cs (1)
176
Debug.Assert(elementType.
IsValueType
);
parent\parent\Common\TypeSystem\Interop\IL\MarshalHelpers.Aot.cs (1)
41
if (!type.
IsValueType
)
parent\parent\Common\TypeSystem\Interop\IL\MarshalHelpers.cs (6)
239
if (type.
IsValueType
&& !type.IsPrimitive && !type.IsEnum && !isField
248
if (type.
IsValueType
&&
369
else if (type.
IsValueType
)
517
if (type.
IsValueType
&& !type.IsPrimitive && !type.IsEnum && !isField
752
else if (elementType.
IsValueType
)
932
else if (underlyingType.
IsValueType
)
parent\parent\Common\TypeSystem\Interop\IL\Marshaller.Aot.cs (1)
1230
if (ManagedType.
IsValueType
|| ManagedType.IsPointer || ManagedType.IsFunctionPointer)
parent\parent\Common\TypeSystem\Interop\IL\Marshaller.cs (1)
291
if (parameterType.
IsValueType
|| parameterType.IsString || parameterType.IsPointer || parameterType.IsFunctionPointer)
parent\parent\Common\TypeSystem\MetadataEmitter\TypeSystemMetadataEmitter.cs (1)
475
blobBuilder.WriteByte(type.
IsValueType
? (byte)SignatureTypeKind.ValueType : (byte)SignatureTypeKind.Class);
ILCompiler.ReadyToRun (93)
Compiler\DependencyAnalysis\ReadyToRun\DevirtualizationManager.cs (1)
81
if (firstTypeInImplTypeHierarchyNotInVersionBubble == null || implType.
IsValueType
|| firstTypeInImplTypeHierarchyNotInVersionBubble.IsObject)
Compiler\DependencyAnalysis\ReadyToRun\FieldFixupSignature.cs (1)
51
&& !_fieldWithToken.Field.OwningType.
IsValueType
)
Compiler\DependencyAnalysis\ReadyToRun\GCRefMapBuilder.cs (1)
196
bool interior = method.OwningType.
IsValueType
&& !isUnboxingStub;
Compiler\DependencyAnalysis\ReadyToRun\TypeFixupSignature.cs (2)
54
Debug.Assert(_typeDesc.
IsValueType
);
75
Debug.Assert(type.
IsValueType
);
Compiler\DependencyAnalysis\ReadyToRun\TypeHandle.cs (2)
41
public bool IsValueType() { if (_isByRef) return false; return _type.
IsValueType
; }
162
if ((typeOfEmbeddedField != null) && ((typeOfEmbeddedField.
IsValueType
) || (typeOfEmbeddedField.IsPointer)))
Compiler\DependencyAnalysis\ReadyToRun\TypeValidationChecker.cs (3)
261
if (type.
IsValueType
)
431
if (type.BaseType != null && !type.IsInterface && !type.
IsValueType
)
713
if (typeDef.
IsValueType
|| position == Internal.TypeSystem.GenericVariance.None)
Compiler\DependencyAnalysis\ReadyToRunCodegenNodeFactory.cs (1)
165
&& method.OwningType.
IsValueType
Compiler\R2RTypeExtensions.cs (1)
25
if (!type.
IsValueType
)
Compiler\ReadyToRunCodegenCompilation.cs (2)
645
if (!fieldType.
IsValueType
)
663
Debug.Assert(!type.
IsValueType
);
Compiler\ReadyToRunCompilationModuleGroupBase.cs (5)
338
if ((type.BaseType != null) && !type.BaseType.IsObject && !type.
IsValueType
)
350
if (fieldType.
IsValueType
&&
617
if (metadataType.
IsValueType
)
665
if (!metadataType.
IsValueType
)
680
if (!type.
IsValueType
)
Compiler\ReadyToRunCompilerContext.cs (1)
170
if (fieldType.
IsValueType
)
Compiler\ReadyToRunMetadataFieldLayoutAlgorithm.cs (3)
111
else if (fieldType.
IsValueType
)
619
if (type is {
IsValueType
: false, BaseType.IsSequentialLayout: true })
627
if (type is {
IsValueType
: false, BaseType.IsExplicitLayout: true })
IBC\IBCProfileParser.cs (1)
688
if ((typ == CorElementType.ELEMENT_TYPE_VALUETYPE) != result.
IsValueType
)
IL\ReadyToRunILProvider.cs (1)
58
if (type.
IsValueType
&& type.GetParameterlessConstructor() == null)
JitInterface\CorInfoImpl.ReadyToRun.cs (12)
1707
field.FieldType.
IsValueType
&&
1770
if (field.FieldType.
IsValueType
&& field.HasGCStaticBase && !field.HasRva)
2057
useInstantiatingStub = directMethod.OwningType.
IsValueType
;
2078
else if (constrainedType.
IsValueType
)
2184
devirt = targetMethod.OwningType.
IsValueType
||
2290
DictionaryEntryKind entryKind = (constrainedType != null && (constrainedType.
IsValueType
|| !isCallVirt)
2412
if (type.
IsValueType
)
3058
if ((td.
IsValueType
) && !md.Signature.IsStatic
3101
if (!type.
IsValueType
)
3131
if (pMT.
IsValueType
)
3150
else if (pMT.
IsValueType
)
3762
if (type.
IsValueType
&& type.IsTypeDefEquivalent && !_compilation.CompilationModuleGroup.VersionsWithTypeReference(type))
parent\parent\Common\Compiler\CompilerTypeSystemContext.BoxedTypes.cs (5)
61
Debug.Assert(owningType.
IsValueType
);
88
Debug.Assert(owningType.
IsValueType
);
265
Debug.Assert(valuetype.
IsValueType
);
382
Debug.Assert(targetMethod.OwningType.
IsValueType
);
495
Debug.Assert(targetMethod.OwningType.
IsValueType
);
parent\parent\Common\Compiler\Dataflow\EcmaExtensions.cs (1)
77
return method.OwningType.
IsValueType
? ReferenceKind.Ref : ReferenceKind.None;
parent\parent\Common\Compiler\MethodExtensions.cs (1)
150
!owningType.
IsValueType
&& /* Value type instance methods take a ref to data */
parent\parent\Common\Compiler\TypeExtensions.cs (8)
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)) &&
77
!method.ImplementationType.
IsValueType
&&
496
if (!constrainedType.
IsValueType
)
540
if (method != null && !method.OwningType.
IsValueType
)
622
if (!method.OwningType.
IsValueType
)
639
&& !method.OwningType.
IsValueType
)
847
return firstFieldElementType.
IsValueType
parent\parent\Common\JitInterface\CorInfoImpl.cs (16)
1020
if (type.
IsValueType
)
1504
bool unboxingStub = impl.OwningType.
IsValueType
;
1659
if (!methodWithTokenDecl.Method.OwningType.
IsValueType
|| !methodWithTokenImpl.Method.OwningType.
IsValueType
)
2288
return HandleToObject(cls).
IsValueType
;
2316
if (type.
IsValueType
)
2434
Debug.Assert(!type.
IsValueType
);
2448
Debug.Assert(!type.
IsValueType
);
2501
if ((type.
IsValueType
) && (type.InstanceFieldAlignment.AsInt > 4))
2558
if (fieldType.
IsValueType
)
2618
uint size = type.
IsValueType
? getClassSize(cls) : getHeapClassSize(cls);
2860
if (type is not MetadataType metadataType || !type.
IsValueType
)
2947
else if (!md.IsConstructor && !typeToInit.
IsValueType
&& !typeToInit.IsInterface)
2996
if (!typeToInit.
IsValueType
&& !typeToInit.IsInterface && !typeToInit.IsBeforeFieldInit)
3238
if (type.
IsValueType
)
3705
bool isValueTask = taskReturnType.
IsValueType
;
parent\parent\Common\JitInterface\SwiftPhysicalLowering.cs (2)
104
protected override bool NeedsRecursiveLayout(TypeDesc fieldType) => fieldType.
IsValueType
&& !fieldType.IsPrimitiveNumeric;
215
if (!type.
IsValueType
|| type is DefType { ContainsGCPointers: true })
parent\parent\Common\JitInterface\SystemVStructClassificator.cs (1)
74
if (typeDesc.
IsValueType
&& (typeSize <= CLR_SYSTEMV_MAX_STRUCT_BYTES_TO_PASS_IN_REGISTERS))
parent\parent\Common\JitInterface\UnboxingMethodDesc.cs (1)
25
Debug.Assert(wrappedMethod.OwningType.
IsValueType
);
parent\parent\Common\JitInterface\WasmLowering.cs (3)
60
if (!(type.
IsValueType
&& !type.IsPrimitive))
119
if (type.
IsValueType
&& !type.IsPrimitive)
241
if (type is not DefType || !type.
IsValueType
)
parent\parent\Common\TypeSystem\IL\Stubs\AsyncResumptionStub.cs (1)
61
if (_targetMethod.OwningType.
IsValueType
)
parent\parent\Common\TypeSystem\IL\Stubs\AsyncThunks.cs (1)
28
bool isValueTask = returnType.
IsValueType
;
parent\parent\Common\TypeSystem\IL\Stubs\ComparerIntrinsics.cs (3)
252
Debug.Assert(type.
IsValueType
);
296
Debug.Assert(fieldType.
IsValueType
);
342
Debug.Assert(fieldType.
IsValueType
);
parent\parent\Common\TypeSystem\IL\Stubs\InterlockedIntrinsics.cs (1)
40
if (!tType.
IsValueType
)
parent\parent\Common\TypeSystem\IL\Stubs\RuntimeHelpersIntrinsics.cs (1)
64
else if (mdType.
IsValueType
)
parent\parent\Common\TypeSystem\Interop\IL\MarshalHelpers.cs (6)
239
if (type.
IsValueType
&& !type.IsPrimitive && !type.IsEnum && !isField
248
if (type.
IsValueType
&&
369
else if (type.
IsValueType
)
517
if (type.
IsValueType
&& !type.IsPrimitive && !type.IsEnum && !isField
752
else if (elementType.
IsValueType
)
932
else if (underlyingType.
IsValueType
)
parent\parent\Common\TypeSystem\Interop\IL\Marshaller.cs (1)
291
if (parameterType.
IsValueType
|| parameterType.IsString || parameterType.IsPointer || parameterType.IsFunctionPointer)
parent\parent\Common\TypeSystem\MetadataEmitter\TypeSystemMetadataEmitter.cs (1)
475
blobBuilder.WriteByte(type.
IsValueType
? (byte)SignatureTypeKind.ValueType : (byte)SignatureTypeKind.Class);
PortableCallHelpers\PInvokeTableGenerator.cs (3)
398
if (!type.
IsValueType
|| type.IsPrimitive || type.IsEnum || type is FunctionPointerType)
406
if (!type.
IsValueType
|| type.IsPointer || type.IsByRef || type is FunctionPointerType)
432
if (!type.
IsValueType
|| type.IsPointer || type is FunctionPointerType)
ILCompiler.RyuJit (23)
Compiler\DependencyAnalysis\MethodCodeNode.cs (1)
227
varType = _method.OwningType.
IsValueType
?
JitInterface\CorInfoImpl.RyuJit.cs (3)
426
Debug.Assert(directMethod.OwningType.
IsValueType
|| directMethod.Signature.IsStatic);
1144
if (type.
IsValueType
)
1281
else if (constrainedType.
IsValueType
)
parent\ILCompiler.Compiler\Compiler\JitHelper.cs (1)
357
if (type.
IsValueType
)
parent\parent\Common\JitInterface\CorInfoImpl.cs (14)
1020
if (type.
IsValueType
)
1504
bool unboxingStub = impl.OwningType.
IsValueType
;
2288
return HandleToObject(cls).
IsValueType
;
2316
if (type.
IsValueType
)
2434
Debug.Assert(!type.
IsValueType
);
2448
Debug.Assert(!type.
IsValueType
);
2501
if ((type.
IsValueType
) && (type.InstanceFieldAlignment.AsInt > 4))
2558
if (fieldType.
IsValueType
)
2618
uint size = type.
IsValueType
? getClassSize(cls) : getHeapClassSize(cls);
2860
if (type is not MetadataType metadataType || !type.
IsValueType
)
2947
else if (!md.IsConstructor && !typeToInit.
IsValueType
&& !typeToInit.IsInterface)
2996
if (!typeToInit.
IsValueType
&& !typeToInit.IsInterface && !typeToInit.IsBeforeFieldInit)
3238
if (type.
IsValueType
)
3705
bool isValueTask = taskReturnType.
IsValueType
;
parent\parent\Common\JitInterface\SwiftPhysicalLowering.cs (2)
104
protected override bool NeedsRecursiveLayout(TypeDesc fieldType) => fieldType.
IsValueType
&& !fieldType.IsPrimitiveNumeric;
215
if (!type.
IsValueType
|| type is DefType { ContainsGCPointers: true })
parent\parent\Common\JitInterface\SystemVStructClassificator.cs (1)
74
if (typeDesc.
IsValueType
&& (typeSize <= CLR_SYSTEMV_MAX_STRUCT_BYTES_TO_PASS_IN_REGISTERS))
parent\parent\Common\JitInterface\UnboxingMethodDesc.cs (1)
25
Debug.Assert(wrappedMethod.OwningType.
IsValueType
);
ILCompiler.TypeSystem (55)
parent\parent\Common\TypeSystem\Canon\StandardCanonicalizationAlgorithm.cs (1)
102
if (!typeToConvert.
IsValueType
)
parent\parent\Common\TypeSystem\Canon\TypeDesc.Canon.cs (1)
90
else if (this.
IsValueType
)
parent\parent\Common\TypeSystem\Common\CastingHelper.cs (2)
138
bool isCastFromValueTypeToReferenceType = otherType.
IsValueType
&& !thisType.
IsValueType
;
parent\parent\Common\TypeSystem\Common\CastingHelper.TypeEquivalence.cs (3)
159
if ((type1.IsEnum != type2.IsEnum) || (type1.
IsValueType
!= type2.
IsValueType
))
168
else if (type1.
IsValueType
)
parent\parent\Common\TypeSystem\Common\DefType.FieldLayout.cs (1)
585
if (!
IsValueType
&& HasBaseType && BaseType.ContainsGCPointers)
parent\parent\Common\TypeSystem\Common\ExplicitLayoutValidator.cs (2)
60
else if (fieldType.
IsValueType
)
79
if (!fieldType.
IsValueType
)
parent\parent\Common\TypeSystem\Common\FieldLayoutIntervalCalculator.cs (1)
70
else if (fieldType.
IsValueType
)
parent\parent\Common\TypeSystem\Common\MetadataFieldLayoutAlgorithm.cs (19)
68
if (!type.
IsValueType
&& !type.IsAutoLayout)
209
if (fieldType.IsByRef || (fieldType.
IsValueType
&& ((DefType)fieldType).IsByRefLike))
256
if (fieldType.
IsValueType
)
316
LayoutInt offsetBias = !type.
IsValueType
? new LayoutInt(type.Context.Target.PointerSize) : LayoutInt.Zero;
371
|| (fieldType.
IsValueType
&& ((DefType)fieldType).ContainsGCPointers)
435
LayoutInt offsetBias = !type.
IsValueType
? new LayoutInt(type.Context.Target.PointerSize) : LayoutInt.Zero;
512
if (type.ContainsGCPointers || type.IsByRefLike || !type.
IsValueType
)
601
if (type.ContainsGCPointers || type.IsByRefLike || !type.
IsValueType
)
883
if (!type.
IsValueType
&& cumulativeInstanceFieldPos != LayoutInt.Zero && !type.Context.Target.SupportsAlign8)
1102
return type.
IsValueType
&& !type.IsPrimitive && !type.IsEnum;
1109
if (!type.
IsValueType
&& type.HasBaseType)
1149
if (fieldType.
IsValueType
)
1204
if (type.
IsValueType
&& instanceSize == LayoutInt.Zero)
1211
if (type.
IsValueType
)
1235
if (type.
IsValueType
)
1261
if (!type.
IsValueType
)
1280
Debug.Assert(type.
IsValueType
);
1384
if (!type.
IsValueType
)
1397
if (!fieldType.
IsValueType
|| fieldType.IsPrimitive)
parent\parent\Common\TypeSystem\Common\TypeDesc.TypeEquivalence.cs (2)
87
if (!(IsInterface && (IsComImport || IsComEventInterface)) && !
IsValueType
&& !IsDelegate)
129
if (
IsValueType
)
parent\parent\Common\TypeSystem\Common\TypeSystemConstraintsHelpers.cs (6)
49
if ((!instantiationParam.
IsValueType
|| instantiationParam.IsNullable)
73
if (instantiationParam.
IsValueType
&& instantiatedType.
IsValueType
&& !instantiationParam.IsEquivalentTo(instantiatedType))
112
if (constraint.
IsValueType
&& !constraint.IsNullable)
116
if (!constraint.
IsValueType
)
121
if (constraint.
IsValueType
)
parent\parent\Common\TypeSystem\Common\TypeSystemContext.cs (1)
755
if (!typeDefinition.
IsValueType
)
parent\parent\Common\TypeSystem\Common\TypeSystemHelpers.cs (3)
73
if (type.
IsValueType
)
95
return type.
IsValueType
|| type.GetDefaultConstructor() != null;
415
if (elementType.
IsValueType
)
parent\parent\Common\TypeSystem\Common\Utilities\GCPointerMap.Algorithm.cs (4)
26
if (!type.
IsValueType
&& type.HasBaseType)
52
else if (fieldType.
IsValueType
)
89
Debug.Assert(fieldType.
IsValueType
);
116
else if (fieldType.
IsValueType
)
parent\parent\Common\TypeSystem\Ecma\EcmaSignatureEncoder.cs (2)
163
encoder.GenericInstantiation(_entityHandleProvider.GetTypeDefOrRefHandleForTypeDesc(type.GetTypeDefinition()), type.Instantiation.Length, type.
IsValueType
);
170
encoder.Type(_entityHandleProvider.GetTypeDefOrRefHandleForTypeDesc(type), type.
IsValueType
);
parent\parent\Common\TypeSystem\Ecma\EcmaType.cs (1)
220
bool isValueType =
IsValueType
;
parent\parent\Common\TypeSystem\IL\ILDisassembler.cs (1)
453
string prefix = type.
IsValueType
? "valuetype " : "class ";
parent\parent\Common\TypeSystem\IL\UnsafeAccessors.cs (4)
100
&& firstArgType.
IsValueType
132
&& firstArgType.
IsValueType
539
Debug.Assert(!replacementType.
IsValueType
);
591
if (replacementType.
IsValueType
)
parent\parent\Common\TypeSystem\RuntimeDetermined\RuntimeDeterminedCanonicalizationAlgorithm.cs (1)
92
if (!typeToConvert.
IsValueType
)