mirror of https://github.com/icsharpcode/ILSpy.git
8 changed files with 334 additions and 1 deletions
@ -0,0 +1,15 @@ |
|||||||
|
namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty |
||||||
|
{ |
||||||
|
internal class RefLocalsAndReturns |
||||||
|
{ |
||||||
|
public ref struct RefStruct |
||||||
|
{ |
||||||
|
private int dummy; |
||||||
|
} |
||||||
|
|
||||||
|
public readonly ref struct ReadOnlyRefStruct |
||||||
|
{ |
||||||
|
private readonly int dummy; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
@ -0,0 +1,138 @@ |
|||||||
|
|
||||||
|
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 |
||||||
|
// Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Metadata version: v4.0.30319 |
||||||
|
.assembly extern mscorlib |
||||||
|
{ |
||||||
|
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. |
||||||
|
.ver 4:0:0:0 |
||||||
|
} |
||||||
|
.assembly RefLocalsAndReturns |
||||||
|
{ |
||||||
|
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) |
||||||
|
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx |
||||||
|
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. |
||||||
|
|
||||||
|
// --- The following custom attribute is added automatically, do not uncomment ------- |
||||||
|
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 ) |
||||||
|
|
||||||
|
.permissionset reqmin |
||||||
|
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} |
||||||
|
.hash algorithm 0x00008004 |
||||||
|
.ver 0:0:0:0 |
||||||
|
} |
||||||
|
.module RefLocalsAndReturns.dll |
||||||
|
// MVID: {88B7B033-A21B-4EB3-8D45-FFCD0934C008} |
||||||
|
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) |
||||||
|
.imagebase 0x10000000 |
||||||
|
.file alignment 0x00000200 |
||||||
|
.stackreserve 0x00100000 |
||||||
|
.subsystem 0x0003 // WINDOWS_CUI |
||||||
|
.corflags 0x00000001 // ILONLY |
||||||
|
// Image base: 0x03430000 |
||||||
|
|
||||||
|
|
||||||
|
// =============== CLASS MEMBERS DECLARATION =================== |
||||||
|
|
||||||
|
.class private auto ansi sealed beforefieldinit Microsoft.CodeAnalysis.EmbeddedAttribute |
||||||
|
extends [mscorlib]System.Attribute |
||||||
|
{ |
||||||
|
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) |
||||||
|
.custom instance void Microsoft.CodeAnalysis.EmbeddedAttribute::.ctor() = ( 01 00 00 00 ) |
||||||
|
.method public hidebysig specialname rtspecialname |
||||||
|
instance void .ctor() cil managed |
||||||
|
{ |
||||||
|
// Code size 7 (0x7) |
||||||
|
.maxstack 8 |
||||||
|
IL_0000: ldarg.0 |
||||||
|
IL_0001: call instance void [mscorlib]System.Attribute::.ctor() |
||||||
|
IL_0006: ret |
||||||
|
} // end of method EmbeddedAttribute::.ctor |
||||||
|
|
||||||
|
} // end of class Microsoft.CodeAnalysis.EmbeddedAttribute |
||||||
|
|
||||||
|
.class private auto ansi sealed beforefieldinit System.Runtime.CompilerServices.IsReadOnlyAttribute |
||||||
|
extends [mscorlib]System.Attribute |
||||||
|
{ |
||||||
|
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) |
||||||
|
.custom instance void Microsoft.CodeAnalysis.EmbeddedAttribute::.ctor() = ( 01 00 00 00 ) |
||||||
|
.method public hidebysig specialname rtspecialname |
||||||
|
instance void .ctor() cil managed |
||||||
|
{ |
||||||
|
// Code size 7 (0x7) |
||||||
|
.maxstack 8 |
||||||
|
IL_0000: ldarg.0 |
||||||
|
IL_0001: call instance void [mscorlib]System.Attribute::.ctor() |
||||||
|
IL_0006: ret |
||||||
|
} // end of method IsReadOnlyAttribute::.ctor |
||||||
|
|
||||||
|
} // end of class System.Runtime.CompilerServices.IsReadOnlyAttribute |
||||||
|
|
||||||
|
.class private auto ansi sealed beforefieldinit System.Runtime.CompilerServices.IsByRefLikeAttribute |
||||||
|
extends [mscorlib]System.Attribute |
||||||
|
{ |
||||||
|
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) |
||||||
|
.custom instance void Microsoft.CodeAnalysis.EmbeddedAttribute::.ctor() = ( 01 00 00 00 ) |
||||||
|
.method public hidebysig specialname rtspecialname |
||||||
|
instance void .ctor() cil managed |
||||||
|
{ |
||||||
|
// Code size 7 (0x7) |
||||||
|
.maxstack 8 |
||||||
|
IL_0000: ldarg.0 |
||||||
|
IL_0001: call instance void [mscorlib]System.Attribute::.ctor() |
||||||
|
IL_0006: ret |
||||||
|
} // end of method IsByRefLikeAttribute::.ctor |
||||||
|
|
||||||
|
} // end of class System.Runtime.CompilerServices.IsByRefLikeAttribute |
||||||
|
|
||||||
|
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.RefLocalsAndReturns |
||||||
|
extends [mscorlib]System.Object |
||||||
|
{ |
||||||
|
.class sequential ansi sealed nested public beforefieldinit RefStruct |
||||||
|
extends [mscorlib]System.ValueType |
||||||
|
{ |
||||||
|
.custom instance void System.Runtime.CompilerServices.IsByRefLikeAttribute::.ctor() = ( 01 00 00 00 ) |
||||||
|
.custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string, |
||||||
|
bool) = ( 01 00 52 54 79 70 65 73 20 77 69 74 68 20 65 6D // ..RTypes with em |
||||||
|
62 65 64 64 65 64 20 72 65 66 65 72 65 6E 63 65 // bedded reference |
||||||
|
73 20 61 72 65 20 6E 6F 74 20 73 75 70 70 6F 72 // s are not suppor |
||||||
|
74 65 64 20 69 6E 20 74 68 69 73 20 76 65 72 73 // ted in this vers |
||||||
|
69 6F 6E 20 6F 66 20 79 6F 75 72 20 63 6F 6D 70 // ion of your comp |
||||||
|
69 6C 65 72 2E 01 00 00 ) // iler.... |
||||||
|
.field private int32 dummy |
||||||
|
} // end of class RefStruct |
||||||
|
|
||||||
|
.class sequential ansi sealed nested public beforefieldinit ReadOnlyRefStruct |
||||||
|
extends [mscorlib]System.ValueType |
||||||
|
{ |
||||||
|
.custom instance void System.Runtime.CompilerServices.IsByRefLikeAttribute::.ctor() = ( 01 00 00 00 ) |
||||||
|
.custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string, |
||||||
|
bool) = ( 01 00 52 54 79 70 65 73 20 77 69 74 68 20 65 6D // ..RTypes with em |
||||||
|
62 65 64 64 65 64 20 72 65 66 65 72 65 6E 63 65 // bedded reference |
||||||
|
73 20 61 72 65 20 6E 6F 74 20 73 75 70 70 6F 72 // s are not suppor |
||||||
|
74 65 64 20 69 6E 20 74 68 69 73 20 76 65 72 73 // ted in this vers |
||||||
|
69 6F 6E 20 6F 66 20 79 6F 75 72 20 63 6F 6D 70 // ion of your comp |
||||||
|
69 6C 65 72 2E 01 00 00 ) // iler.... |
||||||
|
.custom instance void System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 00 00 00 ) |
||||||
|
.field private initonly int32 dummy |
||||||
|
} // end of class ReadOnlyRefStruct |
||||||
|
|
||||||
|
.method public hidebysig specialname rtspecialname |
||||||
|
instance void .ctor() cil managed |
||||||
|
{ |
||||||
|
// Code size 7 (0x7) |
||||||
|
.maxstack 8 |
||||||
|
IL_0000: ldarg.0 |
||||||
|
IL_0001: call instance void [mscorlib]System.Object::.ctor() |
||||||
|
IL_0006: ret |
||||||
|
} // end of method RefLocalsAndReturns::.ctor |
||||||
|
|
||||||
|
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.RefLocalsAndReturns |
||||||
|
|
||||||
|
|
||||||
|
// ============================================================= |
||||||
|
|
||||||
|
// *********** DISASSEMBLY COMPLETE *********************** |
@ -0,0 +1,142 @@ |
|||||||
|
|
||||||
|
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 |
||||||
|
// Copyright (c) Microsoft Corporation. All rights reserved. |
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
// Metadata version: v4.0.30319 |
||||||
|
.assembly extern mscorlib |
||||||
|
{ |
||||||
|
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. |
||||||
|
.ver 4:0:0:0 |
||||||
|
} |
||||||
|
.assembly RefLocalsAndReturns |
||||||
|
{ |
||||||
|
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) |
||||||
|
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx |
||||||
|
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. |
||||||
|
|
||||||
|
// --- The following custom attribute is added automatically, do not uncomment ------- |
||||||
|
// .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) |
||||||
|
|
||||||
|
.permissionset reqmin |
||||||
|
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} |
||||||
|
.hash algorithm 0x00008004 |
||||||
|
.ver 0:0:0:0 |
||||||
|
} |
||||||
|
.module RefLocalsAndReturns.dll |
||||||
|
// MVID: {20DB058A-C93C-4686-AE13-1EA32F00D299} |
||||||
|
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) |
||||||
|
.imagebase 0x10000000 |
||||||
|
.file alignment 0x00000200 |
||||||
|
.stackreserve 0x00100000 |
||||||
|
.subsystem 0x0003 // WINDOWS_CUI |
||||||
|
.corflags 0x00000001 // ILONLY |
||||||
|
// Image base: 0x035D0000 |
||||||
|
|
||||||
|
|
||||||
|
// =============== CLASS MEMBERS DECLARATION =================== |
||||||
|
|
||||||
|
.class private auto ansi sealed beforefieldinit Microsoft.CodeAnalysis.EmbeddedAttribute |
||||||
|
extends [mscorlib]System.Attribute |
||||||
|
{ |
||||||
|
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) |
||||||
|
.custom instance void Microsoft.CodeAnalysis.EmbeddedAttribute::.ctor() = ( 01 00 00 00 ) |
||||||
|
.method public hidebysig specialname rtspecialname |
||||||
|
instance void .ctor() cil managed |
||||||
|
{ |
||||||
|
// Code size 8 (0x8) |
||||||
|
.maxstack 8 |
||||||
|
IL_0000: ldarg.0 |
||||||
|
IL_0001: call instance void [mscorlib]System.Attribute::.ctor() |
||||||
|
IL_0006: nop |
||||||
|
IL_0007: ret |
||||||
|
} // end of method EmbeddedAttribute::.ctor |
||||||
|
|
||||||
|
} // end of class Microsoft.CodeAnalysis.EmbeddedAttribute |
||||||
|
|
||||||
|
.class private auto ansi sealed beforefieldinit System.Runtime.CompilerServices.IsReadOnlyAttribute |
||||||
|
extends [mscorlib]System.Attribute |
||||||
|
{ |
||||||
|
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) |
||||||
|
.custom instance void Microsoft.CodeAnalysis.EmbeddedAttribute::.ctor() = ( 01 00 00 00 ) |
||||||
|
.method public hidebysig specialname rtspecialname |
||||||
|
instance void .ctor() cil managed |
||||||
|
{ |
||||||
|
// Code size 8 (0x8) |
||||||
|
.maxstack 8 |
||||||
|
IL_0000: ldarg.0 |
||||||
|
IL_0001: call instance void [mscorlib]System.Attribute::.ctor() |
||||||
|
IL_0006: nop |
||||||
|
IL_0007: ret |
||||||
|
} // end of method IsReadOnlyAttribute::.ctor |
||||||
|
|
||||||
|
} // end of class System.Runtime.CompilerServices.IsReadOnlyAttribute |
||||||
|
|
||||||
|
.class private auto ansi sealed beforefieldinit System.Runtime.CompilerServices.IsByRefLikeAttribute |
||||||
|
extends [mscorlib]System.Attribute |
||||||
|
{ |
||||||
|
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) |
||||||
|
.custom instance void Microsoft.CodeAnalysis.EmbeddedAttribute::.ctor() = ( 01 00 00 00 ) |
||||||
|
.method public hidebysig specialname rtspecialname |
||||||
|
instance void .ctor() cil managed |
||||||
|
{ |
||||||
|
// Code size 8 (0x8) |
||||||
|
.maxstack 8 |
||||||
|
IL_0000: ldarg.0 |
||||||
|
IL_0001: call instance void [mscorlib]System.Attribute::.ctor() |
||||||
|
IL_0006: nop |
||||||
|
IL_0007: ret |
||||||
|
} // end of method IsByRefLikeAttribute::.ctor |
||||||
|
|
||||||
|
} // end of class System.Runtime.CompilerServices.IsByRefLikeAttribute |
||||||
|
|
||||||
|
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.RefLocalsAndReturns |
||||||
|
extends [mscorlib]System.Object |
||||||
|
{ |
||||||
|
.class sequential ansi sealed nested public beforefieldinit RefStruct |
||||||
|
extends [mscorlib]System.ValueType |
||||||
|
{ |
||||||
|
.custom instance void System.Runtime.CompilerServices.IsByRefLikeAttribute::.ctor() = ( 01 00 00 00 ) |
||||||
|
.custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string, |
||||||
|
bool) = ( 01 00 52 54 79 70 65 73 20 77 69 74 68 20 65 6D // ..RTypes with em |
||||||
|
62 65 64 64 65 64 20 72 65 66 65 72 65 6E 63 65 // bedded reference |
||||||
|
73 20 61 72 65 20 6E 6F 74 20 73 75 70 70 6F 72 // s are not suppor |
||||||
|
74 65 64 20 69 6E 20 74 68 69 73 20 76 65 72 73 // ted in this vers |
||||||
|
69 6F 6E 20 6F 66 20 79 6F 75 72 20 63 6F 6D 70 // ion of your comp |
||||||
|
69 6C 65 72 2E 01 00 00 ) // iler.... |
||||||
|
.field private int32 dummy |
||||||
|
} // end of class RefStruct |
||||||
|
|
||||||
|
.class sequential ansi sealed nested public beforefieldinit ReadOnlyRefStruct |
||||||
|
extends [mscorlib]System.ValueType |
||||||
|
{ |
||||||
|
.custom instance void System.Runtime.CompilerServices.IsByRefLikeAttribute::.ctor() = ( 01 00 00 00 ) |
||||||
|
.custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string, |
||||||
|
bool) = ( 01 00 52 54 79 70 65 73 20 77 69 74 68 20 65 6D // ..RTypes with em |
||||||
|
62 65 64 64 65 64 20 72 65 66 65 72 65 6E 63 65 // bedded reference |
||||||
|
73 20 61 72 65 20 6E 6F 74 20 73 75 70 70 6F 72 // s are not suppor |
||||||
|
74 65 64 20 69 6E 20 74 68 69 73 20 76 65 72 73 // ted in this vers |
||||||
|
69 6F 6E 20 6F 66 20 79 6F 75 72 20 63 6F 6D 70 // ion of your comp |
||||||
|
69 6C 65 72 2E 01 00 00 ) // iler.... |
||||||
|
.custom instance void System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 00 00 00 ) |
||||||
|
.field private initonly int32 dummy |
||||||
|
} // end of class ReadOnlyRefStruct |
||||||
|
|
||||||
|
.method public hidebysig specialname rtspecialname |
||||||
|
instance void .ctor() cil managed |
||||||
|
{ |
||||||
|
// Code size 8 (0x8) |
||||||
|
.maxstack 8 |
||||||
|
IL_0000: ldarg.0 |
||||||
|
IL_0001: call instance void [mscorlib]System.Object::.ctor() |
||||||
|
IL_0006: nop |
||||||
|
IL_0007: ret |
||||||
|
} // end of method RefLocalsAndReturns::.ctor |
||||||
|
|
||||||
|
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.RefLocalsAndReturns |
||||||
|
|
||||||
|
|
||||||
|
// ============================================================= |
||||||
|
|
||||||
|
// *********** DISASSEMBLY COMPLETE *********************** |
Loading…
Reference in new issue