From 4d22f3fcd3bcc1666f518e18fb38a4aae51c9641 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Mon, 26 Mar 2018 11:44:36 +0200 Subject: [PATCH] Add pretty tests for anonymous types for mcs. --- .../PrettyTestRunner.cs | 2 +- .../TestCases/Pretty/AnonymousTypes.cs | 4 +- .../TestCases/Pretty/AnonymousTypes.mcs.il | 879 ++++++++++++++++++ .../Pretty/AnonymousTypes.opt.mcs.il | 879 ++++++++++++++++++ 4 files changed, 1761 insertions(+), 3 deletions(-) create mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Pretty/AnonymousTypes.mcs.il create mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Pretty/AnonymousTypes.opt.mcs.il diff --git a/ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs b/ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs index 0ed770ce5..3eb4a63c0 100644 --- a/ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs +++ b/ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs @@ -123,7 +123,7 @@ namespace ICSharpCode.Decompiler.Tests } [Test] - public void AnonymousTypes([ValueSource("defaultOptions")] CSharpCompilerOptions cscOptions) + public void AnonymousTypes([ValueSource("defaultOptionsWithMcs")] CSharpCompilerOptions cscOptions) { RunForLibrary(cscOptions: cscOptions); } diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/AnonymousTypes.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/AnonymousTypes.cs index 949ef3f07..748559e25 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/AnonymousTypes.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/AnonymousTypes.cs @@ -66,7 +66,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty Console.WriteLine(array[1].X); #endif } - +#if !MCS private void JaggedArray() { var array = new[] { @@ -101,7 +101,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty Console.WriteLine(array2.Length); #endif } - +#endif #if CS70 private void AnonymousTypeOutVar() { diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/AnonymousTypes.mcs.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/AnonymousTypes.mcs.il new file mode 100644 index 000000000..65f9824ae --- /dev/null +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/AnonymousTypes.mcs.il @@ -0,0 +1,879 @@ + + + + +// Metadata version: v2.0.50727 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 2:0:0:0 +} +.assembly AnonymousTypes.mcs +{ + .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. + .permissionset reqmin + bytearray (3C 00 50 00 65 00 72 00 6D 00 69 00 73 00 73 00 // <.P.e.r.m.i.s.s. + 69 00 6F 00 6E 00 53 00 65 00 74 00 20 00 63 00 // i.o.n.S.e.t. .c. + 6C 00 61 00 73 00 73 00 3D 00 22 00 53 00 79 00 // l.a.s.s.=.".S.y. + 73 00 74 00 65 00 6D 00 2E 00 53 00 65 00 63 00 // s.t.e.m...S.e.c. + 75 00 72 00 69 00 74 00 79 00 2E 00 50 00 65 00 // u.r.i.t.y...P.e. + 72 00 6D 00 69 00 73 00 73 00 69 00 6F 00 6E 00 // r.m.i.s.s.i.o.n. + 53 00 65 00 74 00 22 00 0D 00 0A 00 76 00 65 00 // S.e.t.".....v.e. + 72 00 73 00 69 00 6F 00 6E 00 3D 00 22 00 31 00 // r.s.i.o.n.=.".1. + 22 00 3E 00 0D 00 0A 00 3C 00 49 00 50 00 65 00 // ".>.....<.I.P.e. + 72 00 6D 00 69 00 73 00 73 00 69 00 6F 00 6E 00 // r.m.i.s.s.i.o.n. + 20 00 63 00 6C 00 61 00 73 00 73 00 3D 00 22 00 // .c.l.a.s.s.=.". + 53 00 79 00 73 00 74 00 65 00 6D 00 2E 00 53 00 // S.y.s.t.e.m...S. + 65 00 63 00 75 00 72 00 69 00 74 00 79 00 2E 00 // e.c.u.r.i.t.y... + 50 00 65 00 72 00 6D 00 69 00 73 00 73 00 69 00 // P.e.r.m.i.s.s.i. + 6F 00 6E 00 73 00 2E 00 53 00 65 00 63 00 75 00 // o.n.s...S.e.c.u. + 72 00 69 00 74 00 79 00 50 00 65 00 72 00 6D 00 // r.i.t.y.P.e.r.m. + 69 00 73 00 73 00 69 00 6F 00 6E 00 2C 00 20 00 // i.s.s.i.o.n.,. . + 6D 00 73 00 63 00 6F 00 72 00 6C 00 69 00 62 00 // m.s.c.o.r.l.i.b. + 2C 00 20 00 56 00 65 00 72 00 73 00 69 00 6F 00 // ,. .V.e.r.s.i.o. + 6E 00 3D 00 32 00 2E 00 30 00 2E 00 30 00 2E 00 // n.=.2...0...0... + 30 00 2C 00 20 00 43 00 75 00 6C 00 74 00 75 00 // 0.,. .C.u.l.t.u. + 72 00 65 00 3D 00 6E 00 65 00 75 00 74 00 72 00 // r.e.=.n.e.u.t.r. + 61 00 6C 00 2C 00 20 00 50 00 75 00 62 00 6C 00 // a.l.,. .P.u.b.l. + 69 00 63 00 4B 00 65 00 79 00 54 00 6F 00 6B 00 // i.c.K.e.y.T.o.k. + 65 00 6E 00 3D 00 62 00 37 00 37 00 61 00 35 00 // e.n.=.b.7.7.a.5. + 63 00 35 00 36 00 31 00 39 00 33 00 34 00 65 00 // c.5.6.1.9.3.4.e. + 30 00 38 00 39 00 22 00 0D 00 0A 00 76 00 65 00 // 0.8.9.".....v.e. + 72 00 73 00 69 00 6F 00 6E 00 3D 00 22 00 31 00 // r.s.i.o.n.=.".1. + 22 00 0D 00 0A 00 46 00 6C 00 61 00 67 00 73 00 // ".....F.l.a.g.s. + 3D 00 22 00 53 00 6B 00 69 00 70 00 56 00 65 00 // =.".S.k.i.p.V.e. + 72 00 69 00 66 00 69 00 63 00 61 00 74 00 69 00 // r.i.f.i.c.a.t.i. + 6F 00 6E 00 22 00 2F 00 3E 00 0D 00 0A 00 3C 00 // o.n."./.>.....<. + 2F 00 50 00 65 00 72 00 6D 00 69 00 73 00 73 00 // /.P.e.r.m.i.s.s. + 69 00 6F 00 6E 00 53 00 65 00 74 00 3E 00 0D 00 // i.o.n.S.e.t.>... + 0A 00 ) + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module AnonymousTypes.mcs.dll +.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.AnonymousTypes + extends [mscorlib]System.Object +{ + .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 AnonymousTypes::.ctor + + .method private hidebysig instance void + SimpleTypes() cil managed + { + // Code size 58 (0x3a) + .maxstack 11 + .locals init (class '<>__AnonType0' V_0, + class '<>__AnonType1`1' V_1, + class '<>__AnonType2`2' V_2) + IL_0000: newobj instance void '<>__AnonType0'::.ctor() + IL_0005: stloc.0 + IL_0006: ldc.i4.5 + IL_0007: newobj instance void class '<>__AnonType1`1'::.ctor(!0) + IL_000c: stloc.1 + IL_000d: ldc.i4.5 + IL_000e: ldc.i4.s 10 + IL_0010: newobj instance void class '<>__AnonType2`2'::.ctor(!0, + !1) + IL_0015: stloc.2 + IL_0016: ldloc.0 + IL_0017: call void [mscorlib]System.Console::WriteLine(object) + IL_001c: ldloc.1 + IL_001d: callvirt instance !0 class '<>__AnonType1`1'::get_X() + IL_0022: call void [mscorlib]System.Console::WriteLine(int32) + IL_0027: ldloc.2 + IL_0028: callvirt instance !1 class '<>__AnonType2`2'::get_Y() + IL_002d: ldloc.2 + IL_002e: callvirt instance !0 class '<>__AnonType2`2'::get_X() + IL_0033: add + IL_0034: call void [mscorlib]System.Console::WriteLine(int32) + IL_0039: ret + } // end of method AnonymousTypes::SimpleTypes + + .method private hidebysig instance void + SimpleArray() cil managed + { + // Code size 57 (0x39) + .maxstack 7 + .locals init (class '<>__AnonType3`3'[] V_0) + IL_0000: ldc.i4.2 + IL_0001: newarr class '<>__AnonType3`3' + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.i4.5 + IL_0009: ldc.i4.2 + IL_000a: ldc.i4.m1 + IL_000b: newobj instance void class '<>__AnonType3`3'::.ctor(!0, + !1, + !2) + IL_0010: stelem.ref + IL_0011: dup + IL_0012: ldc.i4.1 + IL_0013: ldc.i4.3 + IL_0014: ldc.i4.6 + IL_0015: ldc.i4.s -6 + IL_0017: newobj instance void class '<>__AnonType3`3'::.ctor(!0, + !1, + !2) + IL_001c: stelem.ref + IL_001d: stloc.0 + IL_001e: ldloc.0 + IL_001f: ldc.i4.0 + IL_0020: ldelem.ref + IL_0021: callvirt instance !0 class '<>__AnonType3`3'::get_X() + IL_0026: call void [mscorlib]System.Console::WriteLine(int32) + IL_002b: ldloc.0 + IL_002c: ldc.i4.1 + IL_002d: ldelem.ref + IL_002e: callvirt instance !0 class '<>__AnonType3`3'::get_X() + IL_0033: call void [mscorlib]System.Console::WriteLine(int32) + IL_0038: ret + } // end of method AnonymousTypes::SimpleArray + + .method private hidebysig static void InlineVarDecl([out] !!T& v, + !!T 'init') cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stobj !!T + IL_0007: ret + } // end of method AnonymousTypes::InlineVarDecl + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.AnonymousTypes + +.class private auto ansi sealed beforefieldinit '<>__AnonType0' + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // 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 '<>__AnonType0'::.ctor + + .method public hidebysig virtual instance bool + Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 15 (0xf) + .maxstack 3 + .locals init (class '<>__AnonType0' V_0) + IL_0000: ldarg.1 + IL_0001: isinst '<>__AnonType0' + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: ldnull + IL_0009: ceq + IL_000b: ldc.i4.0 + IL_000c: ceq + IL_000e: ret + } // end of method '<>__AnonType0'::Equals + + .method public hidebysig virtual instance int32 + GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 40 (0x28) + .maxstack 4 + .locals init (int32 V_0) + IL_0000: ldc.i4 0x811c9dc5 + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldloc.0 + IL_0008: ldc.i4.s 13 + IL_000a: shl + IL_000b: add + IL_000c: stloc.0 + IL_000d: ldloc.0 + IL_000e: ldloc.0 + IL_000f: ldc.i4.7 + IL_0010: shr + IL_0011: xor + IL_0012: stloc.0 + IL_0013: ldloc.0 + IL_0014: ldloc.0 + IL_0015: ldc.i4.3 + IL_0016: shl + IL_0017: add + IL_0018: stloc.0 + IL_0019: ldloc.0 + IL_001a: ldloc.0 + IL_001b: ldc.i4.s 17 + IL_001d: shr + IL_001e: xor + IL_001f: stloc.0 + IL_0020: ldloc.0 + IL_0021: ldloc.0 + IL_0022: ldc.i4.5 + IL_0023: shl + IL_0024: add + IL_0025: stloc.0 + IL_0026: ldloc.0 + IL_0027: ret + } // end of method '<>__AnonType0'::GetHashCode + + .method public hidebysig virtual instance string + ToString() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldstr "{ }" + IL_0005: ret + } // end of method '<>__AnonType0'::ToString + +} // end of class '<>__AnonType0' + +.class private auto ansi sealed beforefieldinit '<>__AnonType1`1'<'__T'> + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private initonly !'__T' '' + .method public hidebysig specialname rtspecialname + instance void .ctor(!'__T' X) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld !0 class '<>__AnonType1`1'__T'>::'' + IL_000d: ret + } // end of method '<>__AnonType1`1'::.ctor + + .method public hidebysig specialname instance !'__T' + get_X() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 class '<>__AnonType1`1'__T'>::'' + IL_0006: ret + } // end of method '<>__AnonType1`1'::get_X + + .method public hidebysig virtual instance bool + Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 39 (0x27) + .maxstack 5 + .locals init (class '<>__AnonType1`1'__T'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>__AnonType1`1'__T'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse IL_0025 + + IL_000d: call class [mscorlib]System.Collections.Generic.EqualityComparer`1 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::get_Default() + IL_0012: ldarg.0 + IL_0013: ldfld !0 class '<>__AnonType1`1'__T'>::'' + IL_0018: ldloc.0 + IL_0019: ldfld !0 class '<>__AnonType1`1'__T'>::'' + IL_001e: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::Equals(!0, + !0) + IL_0023: br.s IL_0026 + + IL_0025: ldc.i4.0 + IL_0026: ret + } // end of method '<>__AnonType1`1'::Equals + + .method public hidebysig virtual instance int32 + GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 63 (0x3f) + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldc.i4 0x811c9dc5 + IL_0005: call class [mscorlib]System.Collections.Generic.EqualityComparer`1 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::get_Default() + IL_000a: ldarg.0 + IL_000b: ldfld !0 class '<>__AnonType1`1'__T'>::'' + IL_0010: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::GetHashCode(!0) + IL_0015: xor + IL_0016: ldc.i4 0x1000193 + IL_001b: mul + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: ldloc.0 + IL_001f: ldc.i4.s 13 + IL_0021: shl + IL_0022: add + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldloc.0 + IL_0026: ldc.i4.7 + IL_0027: shr + IL_0028: xor + IL_0029: stloc.0 + IL_002a: ldloc.0 + IL_002b: ldloc.0 + IL_002c: ldc.i4.3 + IL_002d: shl + IL_002e: add + IL_002f: stloc.0 + IL_0030: ldloc.0 + IL_0031: ldloc.0 + IL_0032: ldc.i4.s 17 + IL_0034: shr + IL_0035: xor + IL_0036: stloc.0 + IL_0037: ldloc.0 + IL_0038: ldloc.0 + IL_0039: ldc.i4.5 + IL_003a: shl + IL_003b: add + IL_003c: stloc.0 + IL_003d: ldloc.0 + IL_003e: ret + } // end of method '<>__AnonType1`1'::GetHashCode + + .method public hidebysig virtual instance string + ToString() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 67 (0x43) + .maxstack 8 + .locals init (!'__T' V_0) + IL_0000: ldstr "{" + IL_0005: ldstr " X = " + IL_000a: ldarg.0 + IL_000b: ldfld !0 class '<>__AnonType1`1'__T'>::'' + IL_0010: box !'__T' + IL_0015: brfalse IL_0033 + + IL_001a: ldarg.0 + IL_001b: ldfld !0 class '<>__AnonType1`1'__T'>::'' + IL_0020: stloc.0 + IL_0021: ldloca.s V_0 + IL_0023: constrained. !'__T' + IL_0029: callvirt instance string [mscorlib]System.Object::ToString() + IL_002e: br IL_0038 + + IL_0033: ldstr "" + IL_0038: ldstr " }" + IL_003d: call string [mscorlib]System.String::Concat(string, + string, + string, + string) + IL_0042: ret + } // end of method '<>__AnonType1`1'::ToString + + .property !'__T' X() + { + .get instance !'__T' '<>__AnonType1`1'::get_X() + } // end of property '<>__AnonType1`1'::X +} // end of class '<>__AnonType1`1' + +.class private auto ansi sealed beforefieldinit '<>__AnonType2`2'<'__T','__T'> + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private initonly !'__T' '' + .field private initonly !'__T' '' + .method public hidebysig specialname rtspecialname + instance void .ctor(!'__T' X, + !'__T' Y) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld !0 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld !1 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_0014: ret + } // end of method '<>__AnonType2`2'::.ctor + + .method public hidebysig specialname instance !'__T' + get_X() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_0006: ret + } // end of method '<>__AnonType2`2'::get_X + + .method public hidebysig specialname instance !'__T' + get_Y() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !1 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_0006: ret + } // end of method '<>__AnonType2`2'::get_Y + + .method public hidebysig virtual instance bool + Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 69 (0x45) + .maxstack 9 + .locals init (class '<>__AnonType2`2'__T',!'__T'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>__AnonType2`2'__T',!'__T'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse IL_0043 + + IL_000d: call class [mscorlib]System.Collections.Generic.EqualityComparer`1 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::get_Default() + IL_0012: ldarg.0 + IL_0013: ldfld !0 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_0018: ldloc.0 + IL_0019: ldfld !0 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_001e: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::Equals(!0, + !0) + IL_0023: brfalse IL_0040 + + IL_0028: call class [mscorlib]System.Collections.Generic.EqualityComparer`1 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::get_Default() + IL_002d: ldarg.0 + IL_002e: ldfld !1 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_0033: ldloc.0 + IL_0034: ldfld !1 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_0039: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::Equals(!0, + !0) + IL_003e: br.s IL_0041 + + IL_0040: ldc.i4.0 + IL_0041: br.s IL_0044 + + IL_0043: ldc.i4.0 + IL_0044: ret + } // end of method '<>__AnonType2`2'::Equals + + .method public hidebysig virtual instance int32 + GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 86 (0x56) + .maxstack 10 + .locals init (int32 V_0) + IL_0000: ldc.i4 0x811c9dc5 + IL_0005: call class [mscorlib]System.Collections.Generic.EqualityComparer`1 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::get_Default() + IL_000a: ldarg.0 + IL_000b: ldfld !0 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_0010: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::GetHashCode(!0) + IL_0015: xor + IL_0016: ldc.i4 0x1000193 + IL_001b: mul + IL_001c: call class [mscorlib]System.Collections.Generic.EqualityComparer`1 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::get_Default() + IL_0021: ldarg.0 + IL_0022: ldfld !1 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_0027: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::GetHashCode(!0) + IL_002c: xor + IL_002d: ldc.i4 0x1000193 + IL_0032: mul + IL_0033: stloc.0 + IL_0034: ldloc.0 + IL_0035: ldloc.0 + IL_0036: ldc.i4.s 13 + IL_0038: shl + IL_0039: add + IL_003a: stloc.0 + IL_003b: ldloc.0 + IL_003c: ldloc.0 + IL_003d: ldc.i4.7 + IL_003e: shr + IL_003f: xor + IL_0040: stloc.0 + IL_0041: ldloc.0 + IL_0042: ldloc.0 + IL_0043: ldc.i4.3 + IL_0044: shl + IL_0045: add + IL_0046: stloc.0 + IL_0047: ldloc.0 + IL_0048: ldloc.0 + IL_0049: ldc.i4.s 17 + IL_004b: shr + IL_004c: xor + IL_004d: stloc.0 + IL_004e: ldloc.0 + IL_004f: ldloc.0 + IL_0050: ldc.i4.5 + IL_0051: shl + IL_0052: add + IL_0053: stloc.0 + IL_0054: ldloc.0 + IL_0055: ret + } // end of method '<>__AnonType2`2'::GetHashCode + + .method public hidebysig virtual instance string + ToString() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 142 (0x8e) + .maxstack 10 + .locals init (!'__T' V_0, + !'__T' V_1) + IL_0000: ldc.i4.6 + IL_0001: newarr [mscorlib]System.String + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldstr "{" + IL_000d: stelem.ref + IL_000e: dup + IL_000f: ldc.i4.1 + IL_0010: ldstr " X = " + IL_0015: stelem.ref + IL_0016: dup + IL_0017: ldc.i4.2 + IL_0018: ldarg.0 + IL_0019: ldfld !0 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_001e: box !'__T' + IL_0023: brfalse IL_0041 + + IL_0028: ldarg.0 + IL_0029: ldfld !0 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_002e: stloc.0 + IL_002f: ldloca.s V_0 + IL_0031: constrained. !'__T' + IL_0037: callvirt instance string [mscorlib]System.Object::ToString() + IL_003c: br IL_0046 + + IL_0041: ldstr "" + IL_0046: stelem.ref + IL_0047: dup + IL_0048: ldc.i4.3 + IL_0049: ldstr ", Y = " + IL_004e: stelem.ref + IL_004f: dup + IL_0050: ldc.i4.4 + IL_0051: ldarg.0 + IL_0052: ldfld !1 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_0057: box !'__T' + IL_005c: brfalse IL_007a + + IL_0061: ldarg.0 + IL_0062: ldfld !1 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_0067: stloc.1 + IL_0068: ldloca.s V_1 + IL_006a: constrained. !'__T' + IL_0070: callvirt instance string [mscorlib]System.Object::ToString() + IL_0075: br IL_007f + + IL_007a: ldstr "" + IL_007f: stelem.ref + IL_0080: dup + IL_0081: ldc.i4.5 + IL_0082: ldstr " }" + IL_0087: stelem.ref + IL_0088: call string [mscorlib]System.String::Concat(string[]) + IL_008d: ret + } // end of method '<>__AnonType2`2'::ToString + + .property !'__T' X() + { + .get instance !'__T' '<>__AnonType2`2'::get_X() + } // end of property '<>__AnonType2`2'::X + .property !'__T' Y() + { + .get instance !'__T' '<>__AnonType2`2'::get_Y() + } // end of property '<>__AnonType2`2'::Y +} // end of class '<>__AnonType2`2' + +.class private auto ansi sealed beforefieldinit '<>__AnonType3`3'<'__T','__T','__T'> + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private initonly !'__T' '' + .field private initonly !'__T' '' + .field private initonly !'__T' '' + .method public hidebysig specialname rtspecialname + instance void .ctor(!'__T' X, + !'__T' Y, + !'__T' Z) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld !0 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld !1 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_0014: ldarg.0 + IL_0015: ldarg.3 + IL_0016: stfld !2 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_001b: ret + } // end of method '<>__AnonType3`3'::.ctor + + .method public hidebysig specialname instance !'__T' + get_X() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_0006: ret + } // end of method '<>__AnonType3`3'::get_X + + .method public hidebysig specialname instance !'__T' + get_Y() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !1 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_0006: ret + } // end of method '<>__AnonType3`3'::get_Y + + .method public hidebysig specialname instance !'__T' + get_Z() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !2 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_0006: ret + } // end of method '<>__AnonType3`3'::get_Z + + .method public hidebysig virtual instance bool + Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 96 (0x60) + .maxstack 12 + .locals init (class '<>__AnonType3`3'__T',!'__T',!'__T'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>__AnonType3`3'__T',!'__T',!'__T'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse IL_005e + + IL_000d: call class [mscorlib]System.Collections.Generic.EqualityComparer`1 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::get_Default() + IL_0012: ldarg.0 + IL_0013: ldfld !0 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_0018: ldloc.0 + IL_0019: ldfld !0 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_001e: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::Equals(!0, + !0) + IL_0023: brfalse IL_005b + + IL_0028: call class [mscorlib]System.Collections.Generic.EqualityComparer`1 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::get_Default() + IL_002d: ldarg.0 + IL_002e: ldfld !1 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_0033: ldloc.0 + IL_0034: ldfld !1 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_0039: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::Equals(!0, + !0) + IL_003e: brfalse IL_005b + + IL_0043: call class [mscorlib]System.Collections.Generic.EqualityComparer`1 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::get_Default() + IL_0048: ldarg.0 + IL_0049: ldfld !2 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_004e: ldloc.0 + IL_004f: ldfld !2 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_0054: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::Equals(!0, + !0) + IL_0059: br.s IL_005c + + IL_005b: ldc.i4.0 + IL_005c: br.s IL_005f + + IL_005e: ldc.i4.0 + IL_005f: ret + } // end of method '<>__AnonType3`3'::Equals + + .method public hidebysig virtual instance int32 + GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 109 (0x6d) + .maxstack 13 + .locals init (int32 V_0) + IL_0000: ldc.i4 0x811c9dc5 + IL_0005: call class [mscorlib]System.Collections.Generic.EqualityComparer`1 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::get_Default() + IL_000a: ldarg.0 + IL_000b: ldfld !0 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_0010: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::GetHashCode(!0) + IL_0015: xor + IL_0016: ldc.i4 0x1000193 + IL_001b: mul + IL_001c: call class [mscorlib]System.Collections.Generic.EqualityComparer`1 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::get_Default() + IL_0021: ldarg.0 + IL_0022: ldfld !1 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_0027: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::GetHashCode(!0) + IL_002c: xor + IL_002d: ldc.i4 0x1000193 + IL_0032: mul + IL_0033: call class [mscorlib]System.Collections.Generic.EqualityComparer`1 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::get_Default() + IL_0038: ldarg.0 + IL_0039: ldfld !2 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_003e: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::GetHashCode(!0) + IL_0043: xor + IL_0044: ldc.i4 0x1000193 + IL_0049: mul + IL_004a: stloc.0 + IL_004b: ldloc.0 + IL_004c: ldloc.0 + IL_004d: ldc.i4.s 13 + IL_004f: shl + IL_0050: add + IL_0051: stloc.0 + IL_0052: ldloc.0 + IL_0053: ldloc.0 + IL_0054: ldc.i4.7 + IL_0055: shr + IL_0056: xor + IL_0057: stloc.0 + IL_0058: ldloc.0 + IL_0059: ldloc.0 + IL_005a: ldc.i4.3 + IL_005b: shl + IL_005c: add + IL_005d: stloc.0 + IL_005e: ldloc.0 + IL_005f: ldloc.0 + IL_0060: ldc.i4.s 17 + IL_0062: shr + IL_0063: xor + IL_0064: stloc.0 + IL_0065: ldloc.0 + IL_0066: ldloc.0 + IL_0067: ldc.i4.5 + IL_0068: shl + IL_0069: add + IL_006a: stloc.0 + IL_006b: ldloc.0 + IL_006c: ret + } // end of method '<>__AnonType3`3'::GetHashCode + + .method public hidebysig virtual instance string + ToString() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 199 (0xc7) + .maxstack 13 + .locals init (!'__T' V_0, + !'__T' V_1, + !'__T' V_2) + IL_0000: ldc.i4.8 + IL_0001: newarr [mscorlib]System.String + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldstr "{" + IL_000d: stelem.ref + IL_000e: dup + IL_000f: ldc.i4.1 + IL_0010: ldstr " X = " + IL_0015: stelem.ref + IL_0016: dup + IL_0017: ldc.i4.2 + IL_0018: ldarg.0 + IL_0019: ldfld !0 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_001e: box !'__T' + IL_0023: brfalse IL_0041 + + IL_0028: ldarg.0 + IL_0029: ldfld !0 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_002e: stloc.0 + IL_002f: ldloca.s V_0 + IL_0031: constrained. !'__T' + IL_0037: callvirt instance string [mscorlib]System.Object::ToString() + IL_003c: br IL_0046 + + IL_0041: ldstr "" + IL_0046: stelem.ref + IL_0047: dup + IL_0048: ldc.i4.3 + IL_0049: ldstr ", Y = " + IL_004e: stelem.ref + IL_004f: dup + IL_0050: ldc.i4.4 + IL_0051: ldarg.0 + IL_0052: ldfld !1 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_0057: box !'__T' + IL_005c: brfalse IL_007a + + IL_0061: ldarg.0 + IL_0062: ldfld !1 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_0067: stloc.1 + IL_0068: ldloca.s V_1 + IL_006a: constrained. !'__T' + IL_0070: callvirt instance string [mscorlib]System.Object::ToString() + IL_0075: br IL_007f + + IL_007a: ldstr "" + IL_007f: stelem.ref + IL_0080: dup + IL_0081: ldc.i4.5 + IL_0082: ldstr ", Z = " + IL_0087: stelem.ref + IL_0088: dup + IL_0089: ldc.i4.6 + IL_008a: ldarg.0 + IL_008b: ldfld !2 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_0090: box !'__T' + IL_0095: brfalse IL_00b3 + + IL_009a: ldarg.0 + IL_009b: ldfld !2 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_00a0: stloc.2 + IL_00a1: ldloca.s V_2 + IL_00a3: constrained. !'__T' + IL_00a9: callvirt instance string [mscorlib]System.Object::ToString() + IL_00ae: br IL_00b8 + + IL_00b3: ldstr "" + IL_00b8: stelem.ref + IL_00b9: dup + IL_00ba: ldc.i4.7 + IL_00bb: ldstr " }" + IL_00c0: stelem.ref + IL_00c1: call string [mscorlib]System.String::Concat(string[]) + IL_00c6: ret + } // end of method '<>__AnonType3`3'::ToString + + .property !'__T' X() + { + .get instance !'__T' '<>__AnonType3`3'::get_X() + } // end of property '<>__AnonType3`3'::X + .property !'__T' Y() + { + .get instance !'__T' '<>__AnonType3`3'::get_Y() + } // end of property '<>__AnonType3`3'::Y + .property !'__T' Z() + { + .get instance !'__T' '<>__AnonType3`3'::get_Z() + } // end of property '<>__AnonType3`3'::Z +} // end of class '<>__AnonType3`3' + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/AnonymousTypes.opt.mcs.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/AnonymousTypes.opt.mcs.il new file mode 100644 index 000000000..8ca32173b --- /dev/null +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/AnonymousTypes.opt.mcs.il @@ -0,0 +1,879 @@ + + + + +// Metadata version: v2.0.50727 +.assembly extern mscorlib +{ + .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. + .ver 2:0:0:0 +} +.assembly AnonymousTypes.opt.mcs +{ + .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. + .permissionset reqmin + bytearray (3C 00 50 00 65 00 72 00 6D 00 69 00 73 00 73 00 // <.P.e.r.m.i.s.s. + 69 00 6F 00 6E 00 53 00 65 00 74 00 20 00 63 00 // i.o.n.S.e.t. .c. + 6C 00 61 00 73 00 73 00 3D 00 22 00 53 00 79 00 // l.a.s.s.=.".S.y. + 73 00 74 00 65 00 6D 00 2E 00 53 00 65 00 63 00 // s.t.e.m...S.e.c. + 75 00 72 00 69 00 74 00 79 00 2E 00 50 00 65 00 // u.r.i.t.y...P.e. + 72 00 6D 00 69 00 73 00 73 00 69 00 6F 00 6E 00 // r.m.i.s.s.i.o.n. + 53 00 65 00 74 00 22 00 0D 00 0A 00 76 00 65 00 // S.e.t.".....v.e. + 72 00 73 00 69 00 6F 00 6E 00 3D 00 22 00 31 00 // r.s.i.o.n.=.".1. + 22 00 3E 00 0D 00 0A 00 3C 00 49 00 50 00 65 00 // ".>.....<.I.P.e. + 72 00 6D 00 69 00 73 00 73 00 69 00 6F 00 6E 00 // r.m.i.s.s.i.o.n. + 20 00 63 00 6C 00 61 00 73 00 73 00 3D 00 22 00 // .c.l.a.s.s.=.". + 53 00 79 00 73 00 74 00 65 00 6D 00 2E 00 53 00 // S.y.s.t.e.m...S. + 65 00 63 00 75 00 72 00 69 00 74 00 79 00 2E 00 // e.c.u.r.i.t.y... + 50 00 65 00 72 00 6D 00 69 00 73 00 73 00 69 00 // P.e.r.m.i.s.s.i. + 6F 00 6E 00 73 00 2E 00 53 00 65 00 63 00 75 00 // o.n.s...S.e.c.u. + 72 00 69 00 74 00 79 00 50 00 65 00 72 00 6D 00 // r.i.t.y.P.e.r.m. + 69 00 73 00 73 00 69 00 6F 00 6E 00 2C 00 20 00 // i.s.s.i.o.n.,. . + 6D 00 73 00 63 00 6F 00 72 00 6C 00 69 00 62 00 // m.s.c.o.r.l.i.b. + 2C 00 20 00 56 00 65 00 72 00 73 00 69 00 6F 00 // ,. .V.e.r.s.i.o. + 6E 00 3D 00 32 00 2E 00 30 00 2E 00 30 00 2E 00 // n.=.2...0...0... + 30 00 2C 00 20 00 43 00 75 00 6C 00 74 00 75 00 // 0.,. .C.u.l.t.u. + 72 00 65 00 3D 00 6E 00 65 00 75 00 74 00 72 00 // r.e.=.n.e.u.t.r. + 61 00 6C 00 2C 00 20 00 50 00 75 00 62 00 6C 00 // a.l.,. .P.u.b.l. + 69 00 63 00 4B 00 65 00 79 00 54 00 6F 00 6B 00 // i.c.K.e.y.T.o.k. + 65 00 6E 00 3D 00 62 00 37 00 37 00 61 00 35 00 // e.n.=.b.7.7.a.5. + 63 00 35 00 36 00 31 00 39 00 33 00 34 00 65 00 // c.5.6.1.9.3.4.e. + 30 00 38 00 39 00 22 00 0D 00 0A 00 76 00 65 00 // 0.8.9.".....v.e. + 72 00 73 00 69 00 6F 00 6E 00 3D 00 22 00 31 00 // r.s.i.o.n.=.".1. + 22 00 0D 00 0A 00 46 00 6C 00 61 00 67 00 73 00 // ".....F.l.a.g.s. + 3D 00 22 00 53 00 6B 00 69 00 70 00 56 00 65 00 // =.".S.k.i.p.V.e. + 72 00 69 00 66 00 69 00 63 00 61 00 74 00 69 00 // r.i.f.i.c.a.t.i. + 6F 00 6E 00 22 00 2F 00 3E 00 0D 00 0A 00 3C 00 // o.n."./.>.....<. + 2F 00 50 00 65 00 72 00 6D 00 69 00 73 00 73 00 // /.P.e.r.m.i.s.s. + 69 00 6F 00 6E 00 53 00 65 00 74 00 3E 00 0D 00 // i.o.n.S.e.t.>... + 0A 00 ) + .hash algorithm 0x00008004 + .ver 0:0:0:0 +} +.module AnonymousTypes.opt.mcs.dll +.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) +.imagebase 0x00400000 +.file alignment 0x00000200 +.stackreserve 0x00100000 +.subsystem 0x0003 // WINDOWS_CUI +.corflags 0x00000001 // ILONLY + + +// =============== CLASS MEMBERS DECLARATION =================== + +.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.AnonymousTypes + extends [mscorlib]System.Object +{ + .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 AnonymousTypes::.ctor + + .method private hidebysig instance void + SimpleTypes() cil managed + { + // Code size 58 (0x3a) + .maxstack 11 + .locals init (class '<>__AnonType0' V_0, + class '<>__AnonType1`1' V_1, + class '<>__AnonType2`2' V_2) + IL_0000: newobj instance void '<>__AnonType0'::.ctor() + IL_0005: stloc.0 + IL_0006: ldc.i4.5 + IL_0007: newobj instance void class '<>__AnonType1`1'::.ctor(!0) + IL_000c: stloc.1 + IL_000d: ldc.i4.5 + IL_000e: ldc.i4.s 10 + IL_0010: newobj instance void class '<>__AnonType2`2'::.ctor(!0, + !1) + IL_0015: stloc.2 + IL_0016: ldloc.0 + IL_0017: call void [mscorlib]System.Console::WriteLine(object) + IL_001c: ldloc.1 + IL_001d: callvirt instance !0 class '<>__AnonType1`1'::get_X() + IL_0022: call void [mscorlib]System.Console::WriteLine(int32) + IL_0027: ldloc.2 + IL_0028: callvirt instance !1 class '<>__AnonType2`2'::get_Y() + IL_002d: ldloc.2 + IL_002e: callvirt instance !0 class '<>__AnonType2`2'::get_X() + IL_0033: add + IL_0034: call void [mscorlib]System.Console::WriteLine(int32) + IL_0039: ret + } // end of method AnonymousTypes::SimpleTypes + + .method private hidebysig instance void + SimpleArray() cil managed + { + // Code size 57 (0x39) + .maxstack 7 + .locals init (class '<>__AnonType3`3'[] V_0) + IL_0000: ldc.i4.2 + IL_0001: newarr class '<>__AnonType3`3' + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldc.i4.5 + IL_0009: ldc.i4.2 + IL_000a: ldc.i4.m1 + IL_000b: newobj instance void class '<>__AnonType3`3'::.ctor(!0, + !1, + !2) + IL_0010: stelem.ref + IL_0011: dup + IL_0012: ldc.i4.1 + IL_0013: ldc.i4.3 + IL_0014: ldc.i4.6 + IL_0015: ldc.i4.s -6 + IL_0017: newobj instance void class '<>__AnonType3`3'::.ctor(!0, + !1, + !2) + IL_001c: stelem.ref + IL_001d: stloc.0 + IL_001e: ldloc.0 + IL_001f: ldc.i4.0 + IL_0020: ldelem.ref + IL_0021: callvirt instance !0 class '<>__AnonType3`3'::get_X() + IL_0026: call void [mscorlib]System.Console::WriteLine(int32) + IL_002b: ldloc.0 + IL_002c: ldc.i4.1 + IL_002d: ldelem.ref + IL_002e: callvirt instance !0 class '<>__AnonType3`3'::get_X() + IL_0033: call void [mscorlib]System.Console::WriteLine(int32) + IL_0038: ret + } // end of method AnonymousTypes::SimpleArray + + .method private hidebysig static void InlineVarDecl([out] !!T& v, + !!T 'init') cil managed + { + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stobj !!T + IL_0007: ret + } // end of method AnonymousTypes::InlineVarDecl + +} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.AnonymousTypes + +.class private auto ansi sealed beforefieldinit '<>__AnonType0' + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .method public hidebysig specialname rtspecialname + instance void .ctor() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // 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 '<>__AnonType0'::.ctor + + .method public hidebysig virtual instance bool + Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 15 (0xf) + .maxstack 3 + .locals init (class '<>__AnonType0' V_0) + IL_0000: ldarg.1 + IL_0001: isinst '<>__AnonType0' + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: ldnull + IL_0009: ceq + IL_000b: ldc.i4.0 + IL_000c: ceq + IL_000e: ret + } // end of method '<>__AnonType0'::Equals + + .method public hidebysig virtual instance int32 + GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 40 (0x28) + .maxstack 4 + .locals init (int32 V_0) + IL_0000: ldc.i4 0x811c9dc5 + IL_0005: stloc.0 + IL_0006: ldloc.0 + IL_0007: ldloc.0 + IL_0008: ldc.i4.s 13 + IL_000a: shl + IL_000b: add + IL_000c: stloc.0 + IL_000d: ldloc.0 + IL_000e: ldloc.0 + IL_000f: ldc.i4.7 + IL_0010: shr + IL_0011: xor + IL_0012: stloc.0 + IL_0013: ldloc.0 + IL_0014: ldloc.0 + IL_0015: ldc.i4.3 + IL_0016: shl + IL_0017: add + IL_0018: stloc.0 + IL_0019: ldloc.0 + IL_001a: ldloc.0 + IL_001b: ldc.i4.s 17 + IL_001d: shr + IL_001e: xor + IL_001f: stloc.0 + IL_0020: ldloc.0 + IL_0021: ldloc.0 + IL_0022: ldc.i4.5 + IL_0023: shl + IL_0024: add + IL_0025: stloc.0 + IL_0026: ldloc.0 + IL_0027: ret + } // end of method '<>__AnonType0'::GetHashCode + + .method public hidebysig virtual instance string + ToString() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldstr "{ }" + IL_0005: ret + } // end of method '<>__AnonType0'::ToString + +} // end of class '<>__AnonType0' + +.class private auto ansi sealed beforefieldinit '<>__AnonType1`1'<'__T'> + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private initonly !'__T' '' + .method public hidebysig specialname rtspecialname + instance void .ctor(!'__T' X) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld !0 class '<>__AnonType1`1'__T'>::'' + IL_000d: ret + } // end of method '<>__AnonType1`1'::.ctor + + .method public hidebysig specialname instance !'__T' + get_X() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 class '<>__AnonType1`1'__T'>::'' + IL_0006: ret + } // end of method '<>__AnonType1`1'::get_X + + .method public hidebysig virtual instance bool + Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 39 (0x27) + .maxstack 5 + .locals init (class '<>__AnonType1`1'__T'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>__AnonType1`1'__T'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse IL_0025 + + IL_000d: call class [mscorlib]System.Collections.Generic.EqualityComparer`1 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::get_Default() + IL_0012: ldarg.0 + IL_0013: ldfld !0 class '<>__AnonType1`1'__T'>::'' + IL_0018: ldloc.0 + IL_0019: ldfld !0 class '<>__AnonType1`1'__T'>::'' + IL_001e: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::Equals(!0, + !0) + IL_0023: br.s IL_0026 + + IL_0025: ldc.i4.0 + IL_0026: ret + } // end of method '<>__AnonType1`1'::Equals + + .method public hidebysig virtual instance int32 + GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 63 (0x3f) + .maxstack 7 + .locals init (int32 V_0) + IL_0000: ldc.i4 0x811c9dc5 + IL_0005: call class [mscorlib]System.Collections.Generic.EqualityComparer`1 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::get_Default() + IL_000a: ldarg.0 + IL_000b: ldfld !0 class '<>__AnonType1`1'__T'>::'' + IL_0010: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::GetHashCode(!0) + IL_0015: xor + IL_0016: ldc.i4 0x1000193 + IL_001b: mul + IL_001c: stloc.0 + IL_001d: ldloc.0 + IL_001e: ldloc.0 + IL_001f: ldc.i4.s 13 + IL_0021: shl + IL_0022: add + IL_0023: stloc.0 + IL_0024: ldloc.0 + IL_0025: ldloc.0 + IL_0026: ldc.i4.7 + IL_0027: shr + IL_0028: xor + IL_0029: stloc.0 + IL_002a: ldloc.0 + IL_002b: ldloc.0 + IL_002c: ldc.i4.3 + IL_002d: shl + IL_002e: add + IL_002f: stloc.0 + IL_0030: ldloc.0 + IL_0031: ldloc.0 + IL_0032: ldc.i4.s 17 + IL_0034: shr + IL_0035: xor + IL_0036: stloc.0 + IL_0037: ldloc.0 + IL_0038: ldloc.0 + IL_0039: ldc.i4.5 + IL_003a: shl + IL_003b: add + IL_003c: stloc.0 + IL_003d: ldloc.0 + IL_003e: ret + } // end of method '<>__AnonType1`1'::GetHashCode + + .method public hidebysig virtual instance string + ToString() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 67 (0x43) + .maxstack 8 + .locals init (!'__T' V_0) + IL_0000: ldstr "{" + IL_0005: ldstr " X = " + IL_000a: ldarg.0 + IL_000b: ldfld !0 class '<>__AnonType1`1'__T'>::'' + IL_0010: box !'__T' + IL_0015: brfalse IL_0033 + + IL_001a: ldarg.0 + IL_001b: ldfld !0 class '<>__AnonType1`1'__T'>::'' + IL_0020: stloc.0 + IL_0021: ldloca.s V_0 + IL_0023: constrained. !'__T' + IL_0029: callvirt instance string [mscorlib]System.Object::ToString() + IL_002e: br IL_0038 + + IL_0033: ldsfld string [mscorlib]System.String::Empty + IL_0038: ldstr " }" + IL_003d: call string [mscorlib]System.String::Concat(string, + string, + string, + string) + IL_0042: ret + } // end of method '<>__AnonType1`1'::ToString + + .property !'__T' X() + { + .get instance !'__T' '<>__AnonType1`1'::get_X() + } // end of property '<>__AnonType1`1'::X +} // end of class '<>__AnonType1`1' + +.class private auto ansi sealed beforefieldinit '<>__AnonType2`2'<'__T','__T'> + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private initonly !'__T' '' + .field private initonly !'__T' '' + .method public hidebysig specialname rtspecialname + instance void .ctor(!'__T' X, + !'__T' Y) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld !0 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld !1 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_0014: ret + } // end of method '<>__AnonType2`2'::.ctor + + .method public hidebysig specialname instance !'__T' + get_X() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_0006: ret + } // end of method '<>__AnonType2`2'::get_X + + .method public hidebysig specialname instance !'__T' + get_Y() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !1 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_0006: ret + } // end of method '<>__AnonType2`2'::get_Y + + .method public hidebysig virtual instance bool + Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 69 (0x45) + .maxstack 9 + .locals init (class '<>__AnonType2`2'__T',!'__T'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>__AnonType2`2'__T',!'__T'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse IL_0043 + + IL_000d: call class [mscorlib]System.Collections.Generic.EqualityComparer`1 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::get_Default() + IL_0012: ldarg.0 + IL_0013: ldfld !0 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_0018: ldloc.0 + IL_0019: ldfld !0 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_001e: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::Equals(!0, + !0) + IL_0023: brfalse IL_0040 + + IL_0028: call class [mscorlib]System.Collections.Generic.EqualityComparer`1 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::get_Default() + IL_002d: ldarg.0 + IL_002e: ldfld !1 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_0033: ldloc.0 + IL_0034: ldfld !1 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_0039: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::Equals(!0, + !0) + IL_003e: br.s IL_0041 + + IL_0040: ldc.i4.0 + IL_0041: br.s IL_0044 + + IL_0043: ldc.i4.0 + IL_0044: ret + } // end of method '<>__AnonType2`2'::Equals + + .method public hidebysig virtual instance int32 + GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 86 (0x56) + .maxstack 10 + .locals init (int32 V_0) + IL_0000: ldc.i4 0x811c9dc5 + IL_0005: call class [mscorlib]System.Collections.Generic.EqualityComparer`1 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::get_Default() + IL_000a: ldarg.0 + IL_000b: ldfld !0 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_0010: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::GetHashCode(!0) + IL_0015: xor + IL_0016: ldc.i4 0x1000193 + IL_001b: mul + IL_001c: call class [mscorlib]System.Collections.Generic.EqualityComparer`1 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::get_Default() + IL_0021: ldarg.0 + IL_0022: ldfld !1 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_0027: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::GetHashCode(!0) + IL_002c: xor + IL_002d: ldc.i4 0x1000193 + IL_0032: mul + IL_0033: stloc.0 + IL_0034: ldloc.0 + IL_0035: ldloc.0 + IL_0036: ldc.i4.s 13 + IL_0038: shl + IL_0039: add + IL_003a: stloc.0 + IL_003b: ldloc.0 + IL_003c: ldloc.0 + IL_003d: ldc.i4.7 + IL_003e: shr + IL_003f: xor + IL_0040: stloc.0 + IL_0041: ldloc.0 + IL_0042: ldloc.0 + IL_0043: ldc.i4.3 + IL_0044: shl + IL_0045: add + IL_0046: stloc.0 + IL_0047: ldloc.0 + IL_0048: ldloc.0 + IL_0049: ldc.i4.s 17 + IL_004b: shr + IL_004c: xor + IL_004d: stloc.0 + IL_004e: ldloc.0 + IL_004f: ldloc.0 + IL_0050: ldc.i4.5 + IL_0051: shl + IL_0052: add + IL_0053: stloc.0 + IL_0054: ldloc.0 + IL_0055: ret + } // end of method '<>__AnonType2`2'::GetHashCode + + .method public hidebysig virtual instance string + ToString() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 142 (0x8e) + .maxstack 10 + .locals init (!'__T' V_0, + !'__T' V_1) + IL_0000: ldc.i4.6 + IL_0001: newarr [mscorlib]System.String + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldstr "{" + IL_000d: stelem.ref + IL_000e: dup + IL_000f: ldc.i4.1 + IL_0010: ldstr " X = " + IL_0015: stelem.ref + IL_0016: dup + IL_0017: ldc.i4.2 + IL_0018: ldarg.0 + IL_0019: ldfld !0 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_001e: box !'__T' + IL_0023: brfalse IL_0041 + + IL_0028: ldarg.0 + IL_0029: ldfld !0 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_002e: stloc.0 + IL_002f: ldloca.s V_0 + IL_0031: constrained. !'__T' + IL_0037: callvirt instance string [mscorlib]System.Object::ToString() + IL_003c: br IL_0046 + + IL_0041: ldsfld string [mscorlib]System.String::Empty + IL_0046: stelem.ref + IL_0047: dup + IL_0048: ldc.i4.3 + IL_0049: ldstr ", Y = " + IL_004e: stelem.ref + IL_004f: dup + IL_0050: ldc.i4.4 + IL_0051: ldarg.0 + IL_0052: ldfld !1 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_0057: box !'__T' + IL_005c: brfalse IL_007a + + IL_0061: ldarg.0 + IL_0062: ldfld !1 class '<>__AnonType2`2'__T',!'__T'>::'' + IL_0067: stloc.1 + IL_0068: ldloca.s V_1 + IL_006a: constrained. !'__T' + IL_0070: callvirt instance string [mscorlib]System.Object::ToString() + IL_0075: br IL_007f + + IL_007a: ldsfld string [mscorlib]System.String::Empty + IL_007f: stelem.ref + IL_0080: dup + IL_0081: ldc.i4.5 + IL_0082: ldstr " }" + IL_0087: stelem.ref + IL_0088: call string [mscorlib]System.String::Concat(string[]) + IL_008d: ret + } // end of method '<>__AnonType2`2'::ToString + + .property !'__T' X() + { + .get instance !'__T' '<>__AnonType2`2'::get_X() + } // end of property '<>__AnonType2`2'::X + .property !'__T' Y() + { + .get instance !'__T' '<>__AnonType2`2'::get_Y() + } // end of property '<>__AnonType2`2'::Y +} // end of class '<>__AnonType2`2' + +.class private auto ansi sealed beforefieldinit '<>__AnonType3`3'<'__T','__T','__T'> + extends [mscorlib]System.Object +{ + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private initonly !'__T' '' + .field private initonly !'__T' '' + .field private initonly !'__T' '' + .method public hidebysig specialname rtspecialname + instance void .ctor(!'__T' X, + !'__T' Y, + !'__T' Z) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 28 (0x1c) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: ldarg.0 + IL_0007: ldarg.1 + IL_0008: stfld !0 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_000d: ldarg.0 + IL_000e: ldarg.2 + IL_000f: stfld !1 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_0014: ldarg.0 + IL_0015: ldarg.3 + IL_0016: stfld !2 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_001b: ret + } // end of method '<>__AnonType3`3'::.ctor + + .method public hidebysig specialname instance !'__T' + get_X() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !0 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_0006: ret + } // end of method '<>__AnonType3`3'::get_X + + .method public hidebysig specialname instance !'__T' + get_Y() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !1 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_0006: ret + } // end of method '<>__AnonType3`3'::get_Y + + .method public hidebysig specialname instance !'__T' + get_Z() cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld !2 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_0006: ret + } // end of method '<>__AnonType3`3'::get_Z + + .method public hidebysig virtual instance bool + Equals(object obj) cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 96 (0x60) + .maxstack 12 + .locals init (class '<>__AnonType3`3'__T',!'__T',!'__T'> V_0) + IL_0000: ldarg.1 + IL_0001: isinst class '<>__AnonType3`3'__T',!'__T',!'__T'> + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: brfalse IL_005e + + IL_000d: call class [mscorlib]System.Collections.Generic.EqualityComparer`1 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::get_Default() + IL_0012: ldarg.0 + IL_0013: ldfld !0 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_0018: ldloc.0 + IL_0019: ldfld !0 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_001e: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::Equals(!0, + !0) + IL_0023: brfalse IL_005b + + IL_0028: call class [mscorlib]System.Collections.Generic.EqualityComparer`1 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::get_Default() + IL_002d: ldarg.0 + IL_002e: ldfld !1 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_0033: ldloc.0 + IL_0034: ldfld !1 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_0039: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::Equals(!0, + !0) + IL_003e: brfalse IL_005b + + IL_0043: call class [mscorlib]System.Collections.Generic.EqualityComparer`1 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::get_Default() + IL_0048: ldarg.0 + IL_0049: ldfld !2 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_004e: ldloc.0 + IL_004f: ldfld !2 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_0054: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::Equals(!0, + !0) + IL_0059: br.s IL_005c + + IL_005b: ldc.i4.0 + IL_005c: br.s IL_005f + + IL_005e: ldc.i4.0 + IL_005f: ret + } // end of method '<>__AnonType3`3'::Equals + + .method public hidebysig virtual instance int32 + GetHashCode() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 109 (0x6d) + .maxstack 13 + .locals init (int32 V_0) + IL_0000: ldc.i4 0x811c9dc5 + IL_0005: call class [mscorlib]System.Collections.Generic.EqualityComparer`1 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::get_Default() + IL_000a: ldarg.0 + IL_000b: ldfld !0 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_0010: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::GetHashCode(!0) + IL_0015: xor + IL_0016: ldc.i4 0x1000193 + IL_001b: mul + IL_001c: call class [mscorlib]System.Collections.Generic.EqualityComparer`1 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::get_Default() + IL_0021: ldarg.0 + IL_0022: ldfld !1 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_0027: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::GetHashCode(!0) + IL_002c: xor + IL_002d: ldc.i4 0x1000193 + IL_0032: mul + IL_0033: call class [mscorlib]System.Collections.Generic.EqualityComparer`1 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::get_Default() + IL_0038: ldarg.0 + IL_0039: ldfld !2 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_003e: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1__T'>::GetHashCode(!0) + IL_0043: xor + IL_0044: ldc.i4 0x1000193 + IL_0049: mul + IL_004a: stloc.0 + IL_004b: ldloc.0 + IL_004c: ldloc.0 + IL_004d: ldc.i4.s 13 + IL_004f: shl + IL_0050: add + IL_0051: stloc.0 + IL_0052: ldloc.0 + IL_0053: ldloc.0 + IL_0054: ldc.i4.7 + IL_0055: shr + IL_0056: xor + IL_0057: stloc.0 + IL_0058: ldloc.0 + IL_0059: ldloc.0 + IL_005a: ldc.i4.3 + IL_005b: shl + IL_005c: add + IL_005d: stloc.0 + IL_005e: ldloc.0 + IL_005f: ldloc.0 + IL_0060: ldc.i4.s 17 + IL_0062: shr + IL_0063: xor + IL_0064: stloc.0 + IL_0065: ldloc.0 + IL_0066: ldloc.0 + IL_0067: ldc.i4.5 + IL_0068: shl + IL_0069: add + IL_006a: stloc.0 + IL_006b: ldloc.0 + IL_006c: ret + } // end of method '<>__AnonType3`3'::GetHashCode + + .method public hidebysig virtual instance string + ToString() cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 199 (0xc7) + .maxstack 13 + .locals init (!'__T' V_0, + !'__T' V_1, + !'__T' V_2) + IL_0000: ldc.i4.8 + IL_0001: newarr [mscorlib]System.String + IL_0006: dup + IL_0007: ldc.i4.0 + IL_0008: ldstr "{" + IL_000d: stelem.ref + IL_000e: dup + IL_000f: ldc.i4.1 + IL_0010: ldstr " X = " + IL_0015: stelem.ref + IL_0016: dup + IL_0017: ldc.i4.2 + IL_0018: ldarg.0 + IL_0019: ldfld !0 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_001e: box !'__T' + IL_0023: brfalse IL_0041 + + IL_0028: ldarg.0 + IL_0029: ldfld !0 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_002e: stloc.0 + IL_002f: ldloca.s V_0 + IL_0031: constrained. !'__T' + IL_0037: callvirt instance string [mscorlib]System.Object::ToString() + IL_003c: br IL_0046 + + IL_0041: ldsfld string [mscorlib]System.String::Empty + IL_0046: stelem.ref + IL_0047: dup + IL_0048: ldc.i4.3 + IL_0049: ldstr ", Y = " + IL_004e: stelem.ref + IL_004f: dup + IL_0050: ldc.i4.4 + IL_0051: ldarg.0 + IL_0052: ldfld !1 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_0057: box !'__T' + IL_005c: brfalse IL_007a + + IL_0061: ldarg.0 + IL_0062: ldfld !1 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_0067: stloc.1 + IL_0068: ldloca.s V_1 + IL_006a: constrained. !'__T' + IL_0070: callvirt instance string [mscorlib]System.Object::ToString() + IL_0075: br IL_007f + + IL_007a: ldsfld string [mscorlib]System.String::Empty + IL_007f: stelem.ref + IL_0080: dup + IL_0081: ldc.i4.5 + IL_0082: ldstr ", Z = " + IL_0087: stelem.ref + IL_0088: dup + IL_0089: ldc.i4.6 + IL_008a: ldarg.0 + IL_008b: ldfld !2 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_0090: box !'__T' + IL_0095: brfalse IL_00b3 + + IL_009a: ldarg.0 + IL_009b: ldfld !2 class '<>__AnonType3`3'__T',!'__T',!'__T'>::'' + IL_00a0: stloc.2 + IL_00a1: ldloca.s V_2 + IL_00a3: constrained. !'__T' + IL_00a9: callvirt instance string [mscorlib]System.Object::ToString() + IL_00ae: br IL_00b8 + + IL_00b3: ldsfld string [mscorlib]System.String::Empty + IL_00b8: stelem.ref + IL_00b9: dup + IL_00ba: ldc.i4.7 + IL_00bb: ldstr " }" + IL_00c0: stelem.ref + IL_00c1: call string [mscorlib]System.String::Concat(string[]) + IL_00c6: ret + } // end of method '<>__AnonType3`3'::ToString + + .property !'__T' X() + { + .get instance !'__T' '<>__AnonType3`3'::get_X() + } // end of property '<>__AnonType3`3'::X + .property !'__T' Y() + { + .get instance !'__T' '<>__AnonType3`3'::get_Y() + } // end of property '<>__AnonType3`3'::Y + .property !'__T' Z() + { + .get instance !'__T' '<>__AnonType3`3'::get_Z() + } // end of property '<>__AnonType3`3'::Z +} // end of class '<>__AnonType3`3' + + +// ============================================================= + +// *********** DISASSEMBLY COMPLETE ***********************