Browse Source

Move AllowByRefLike to SRMExtensions.

pull/3529/head
Daniel Grunwald 5 months ago
parent
commit
ccb8887657
  1. 2
      ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs
  2. 2
      ICSharpCode.Decompiler/SRMHacks.cs
  3. 2
      ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataTypeParameter.cs
  4. 2
      ICSharpCode.Decompiler/TypeSystem/TypeUtils.cs

2
ICSharpCode.Decompiler/Disassembler/ReflectionDisassembler.cs

@ -1734,7 +1734,7 @@ namespace ICSharpCode.Decompiler.Disassembler @@ -1734,7 +1734,7 @@ namespace ICSharpCode.Decompiler.Disassembler
{
output.Write("valuetype ");
}
if ((gp.Attributes & TypeUtils.AllowByRefLike) == TypeUtils.AllowByRefLike)
if ((gp.Attributes & SRMExtensions.AllowByRefLike) == SRMExtensions.AllowByRefLike)
{
output.Write("byreflike ");
}

2
ICSharpCode.Decompiler/SRMHacks.cs

@ -14,6 +14,8 @@ namespace ICSharpCode.Decompiler @@ -14,6 +14,8 @@ namespace ICSharpCode.Decompiler
{
public static partial class SRMExtensions
{
internal const GenericParameterAttributes AllowByRefLike = (GenericParameterAttributes)0x0020;
public static ImmutableArray<MethodImplementationHandle> GetMethodImplementations(
this MethodDefinitionHandle handle, MetadataReader reader)
{

2
ICSharpCode.Decompiler/TypeSystem/Implementation/MetadataTypeParameter.cs

@ -119,7 +119,7 @@ namespace ICSharpCode.Decompiler.TypeSystem.Implementation @@ -119,7 +119,7 @@ namespace ICSharpCode.Decompiler.TypeSystem.Implementation
public override bool HasDefaultConstructorConstraint => (attr & GenericParameterAttributes.DefaultConstructorConstraint) != 0;
public override bool HasReferenceTypeConstraint => (attr & GenericParameterAttributes.ReferenceTypeConstraint) != 0;
public override bool HasValueTypeConstraint => (attr & GenericParameterAttributes.NotNullableValueTypeConstraint) != 0;
public override bool AllowsRefLikeType => (attr & TypeUtils.AllowByRefLike) != 0;
public override bool AllowsRefLikeType => (attr & SRMExtensions.AllowByRefLike) != 0;
public override bool HasUnmanagedConstraint {
get {

2
ICSharpCode.Decompiler/TypeSystem/TypeUtils.cs

@ -27,8 +27,6 @@ namespace ICSharpCode.Decompiler.TypeSystem @@ -27,8 +27,6 @@ namespace ICSharpCode.Decompiler.TypeSystem
{
public const int NativeIntSize = 6; // between 4 (Int32) and 8 (Int64)
public const GenericParameterAttributes AllowByRefLike = (GenericParameterAttributes)0x0020;
/// <summary>
/// Gets the size (in bytes) of the input type.
/// Returns <c>NativeIntSize</c> for pointer-sized types.

Loading…
Cancel
Save