Browse Source

Remove IL file from ugly tests

pull/3715/head
Siegfried Pammer 2 weeks ago
parent
commit
9e984a95ff
  1. 577
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/AggressiveScalarReplacementOfAggregates.net40.roslyn.il
  2. 509
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/AggressiveScalarReplacementOfAggregates.opt.net40.roslyn.il
  3. 509
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/AggressiveScalarReplacementOfAggregates.opt.roslyn.il
  4. 577
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/AggressiveScalarReplacementOfAggregates.roslyn.il
  5. 2
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.Expected.cs
  6. 116
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.net40.roslyn.il
  7. 103
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.opt.net40.roslyn.il
  8. 107
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.opt.roslyn.il
  9. 120
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.roslyn.il
  10. 97
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoDecimalConstants.net40.roslyn.il
  11. 95
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoDecimalConstants.opt.net40.roslyn.il
  12. 95
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoDecimalConstants.opt.roslyn.il
  13. 97
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoDecimalConstants.roslyn.il
  14. 117
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoExtensionMethods.net40.roslyn.il
  15. 93
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoExtensionMethods.opt.net40.roslyn.il
  16. 93
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoExtensionMethods.opt.roslyn.il
  17. 117
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoExtensionMethods.roslyn.il
  18. 156
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.il
  19. 145
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.net40.roslyn.il
  20. 128
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.opt.il
  21. 126
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.opt.net40.roslyn.il
  22. 126
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.opt.roslyn.il
  23. 145
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.roslyn.il
  24. 10
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.Expected.cs
  25. 179
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.net40.roslyn.il
  26. 165
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.opt.net40.roslyn.il
  27. 165
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.opt.roslyn.il
  28. 179
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.roslyn.il
  29. 176
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.il
  30. 241
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.net40.roslyn.il
  31. 147
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.opt.il
  32. 205
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.opt.net40.roslyn.il
  33. 115
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.opt.roslyn.il
  34. 145
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.roslyn.il
  35. 136
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.il
  36. 133
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.net40.roslyn.il
  37. 124
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.opt.il
  38. 131
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.opt.net40.roslyn.il
  39. 131
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.opt.roslyn.il
  40. 133
      ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.roslyn.il
  41. 20
      ICSharpCode.Decompiler.Tests/UglyTestRunner.cs

577
ICSharpCode.Decompiler.Tests/TestCases/Ugly/AggressiveScalarReplacementOfAggregates.net40.roslyn.il

@ -1,577 +0,0 @@
// 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 tmp4B37
{
.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 tmp4B37.tmp
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass
extends [mscorlib]System.Object
{
.field public class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program thisField
.field public int32 field1
.field public string field2
.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 DisplayClass::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass
extends [mscorlib]System.Object
{
.field public class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass field3
.field public int32 field1
.field public string field2
.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 NestedDisplayClass::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program
extends [mscorlib]System.Object
{
.method public hidebysig instance int32
Rand() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: nop
IL_0001: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0006: throw
} // end of method Program::Rand
.method public hidebysig instance void
Test1() cil managed
{
// Code size 55 (0x37)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0)
IL_0000: nop
IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0006: dup
IL_0007: ldc.i4.s 42
IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000e: dup
IL_000f: ldstr "Hello World!"
IL_0014: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0019: stloc.0
IL_001a: ldstr "{0} {1}"
IL_001f: ldloc.0
IL_0020: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0025: box [mscorlib]System.Int32
IL_002a: ldloc.0
IL_002b: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0030: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_0035: nop
IL_0036: ret
} // end of method Program::Test1
.method public hidebysig instance void
Test2() cil managed
{
// Code size 60 (0x3c)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0)
IL_0000: nop
IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0006: dup
IL_0007: ldc.i4.s 42
IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000e: dup
IL_000f: ldstr "Hello World!"
IL_0014: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0019: stloc.0
IL_001a: ldstr "{0} {1}"
IL_001f: ldloc.0
IL_0020: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0025: box [mscorlib]System.Int32
IL_002a: ldloc.0
IL_002b: callvirt instance int32 [mscorlib]System.Object::GetHashCode()
IL_0030: box [mscorlib]System.Int32
IL_0035: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_003a: nop
IL_003b: ret
} // end of method Program::Test2
.method public hidebysig instance void
Test3() cil managed
{
// Code size 50 (0x32)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0)
IL_0000: nop
IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0006: dup
IL_0007: ldc.i4.s 42
IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000e: dup
IL_000f: ldstr "Hello World!"
IL_0014: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0019: stloc.0
IL_001a: ldstr "{0} {1}"
IL_001f: ldloc.0
IL_0020: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0025: box [mscorlib]System.Int32
IL_002a: ldloc.0
IL_002b: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_0030: nop
IL_0031: ret
} // end of method Program::Test3
.method public hidebysig instance void
Test4() cil managed
{
// Code size 114 (0x72)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0,
class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass V_1,
bool V_2)
IL_0000: nop
IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0006: dup
IL_0007: ldarg.0
IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::thisField
IL_000d: dup
IL_000e: ldc.i4.s 42
IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0015: dup
IL_0016: ldstr "Hello World!"
IL_001b: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0020: stloc.0
IL_0021: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::.ctor()
IL_0026: dup
IL_0027: ldc.i4 0x1267
IL_002c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1
IL_0031: dup
IL_0032: ldstr "ILSpy"
IL_0037: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2
IL_003c: stloc.1
IL_003d: ldloc.0
IL_003e: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0043: ldc.i4.s 100
IL_0045: cgt
IL_0047: stloc.2
IL_0048: ldloc.2
IL_0049: brfalse.s IL_0056
IL_004b: nop
IL_004c: ldloc.1
IL_004d: ldloc.0
IL_004e: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_0053: nop
IL_0054: br.s IL_005f
IL_0056: nop
IL_0057: ldloc.1
IL_0058: ldnull
IL_0059: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_005e: nop
IL_005f: ldstr "{0} {1}"
IL_0064: ldloc.0
IL_0065: ldloc.1
IL_0066: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_006b: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_0070: nop
IL_0071: ret
} // end of method Program::Test4
.method public hidebysig instance void
Test5() cil managed
{
// Code size 135 (0x87)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0,
class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass V_1,
bool V_2)
IL_0000: nop
IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0006: dup
IL_0007: ldarg.0
IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::thisField
IL_000d: dup
IL_000e: ldc.i4.s 42
IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0015: dup
IL_0016: ldstr "Hello World!"
IL_001b: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0020: stloc.0
IL_0021: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::.ctor()
IL_0026: dup
IL_0027: ldc.i4 0x1267
IL_002c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1
IL_0031: dup
IL_0032: ldstr "ILSpy"
IL_0037: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2
IL_003c: stloc.1
IL_003d: ldloc.0
IL_003e: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0043: ldc.i4.s 100
IL_0045: cgt
IL_0047: stloc.2
IL_0048: ldloc.2
IL_0049: brfalse.s IL_0056
IL_004b: nop
IL_004c: ldloc.1
IL_004d: ldloc.0
IL_004e: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_0053: nop
IL_0054: br.s IL_005f
IL_0056: nop
IL_0057: ldloc.1
IL_0058: ldnull
IL_0059: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_005e: nop
IL_005f: ldstr "{0} {1}"
IL_0064: ldloc.1
IL_0065: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2
IL_006a: ldloc.1
IL_006b: ldflda int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1
IL_0070: call instance string [mscorlib]System.Int32::ToString()
IL_0075: call string [mscorlib]System.String::Concat(string,
string)
IL_007a: ldloc.1
IL_007b: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_0080: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_0085: nop
IL_0086: ret
} // end of method Program::Test5
.method public hidebysig instance void
Issue1898(int32 i) cil managed
{
// Code size 151 (0x97)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0,
class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass V_1,
int32 V_2,
int32 V_3,
int32 V_4,
bool V_5)
IL_0000: nop
IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0006: dup
IL_0007: ldarg.0
IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::thisField
IL_000d: dup
IL_000e: ldarg.1
IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0014: stloc.0
IL_0015: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::.ctor()
IL_001a: stloc.1
IL_001b: br.s IL_0092
IL_001d: nop
IL_001e: ldarg.0
IL_001f: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program::Rand()
IL_0024: stloc.3
IL_0025: ldloc.3
IL_0026: stloc.2
IL_0027: ldloc.2
IL_0028: ldc.i4.1
IL_0029: sub
IL_002a: switch (
IL_003d,
IL_004b,
IL_0062)
IL_003b: br.s IL_006b
IL_003d: ldloc.1
IL_003e: ldarg.0
IL_003f: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program::Rand()
IL_0044: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1
IL_0049: br.s IL_0091
IL_004b: ldloc.1
IL_004c: ldarg.0
IL_004d: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program::Rand()
IL_0052: stloc.s V_4
IL_0054: ldloca.s V_4
IL_0056: call instance string [mscorlib]System.Int32::ToString()
IL_005b: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2
IL_0060: br.s IL_0091
IL_0062: ldloc.1
IL_0063: ldloc.0
IL_0064: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_0069: br.s IL_0091
IL_006b: ldloc.1
IL_006c: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1
IL_0071: call void [mscorlib]System.Console::WriteLine(int32)
IL_0076: nop
IL_0077: ldloc.1
IL_0078: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2
IL_007d: call void [mscorlib]System.Console::WriteLine(string)
IL_0082: nop
IL_0083: ldloc.1
IL_0084: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_0089: call void [mscorlib]System.Console::WriteLine(object)
IL_008e: nop
IL_008f: br.s IL_0091
IL_0091: nop
IL_0092: ldc.i4.1
IL_0093: stloc.s V_5
IL_0095: br.s IL_001d
} // end of method Program::Issue1898
.method public hidebysig instance void
Test6(int32 i) cil managed
{
// Code size 68 (0x44)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0,
bool V_1)
IL_0000: nop
IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0006: dup
IL_0007: ldarg.1
IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000d: dup
IL_000e: ldstr "Hello World!"
IL_0013: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0018: stloc.0
IL_0019: ldarg.1
IL_001a: ldc.i4.0
IL_001b: clt
IL_001d: stloc.1
IL_001e: ldloc.1
IL_001f: brfalse.s IL_0027
IL_0021: nop
IL_0022: ldarg.1
IL_0023: neg
IL_0024: starg.s i
IL_0026: nop
IL_0027: ldstr "{0} {1}"
IL_002c: ldloc.0
IL_002d: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0032: box [mscorlib]System.Int32
IL_0037: ldloc.0
IL_0038: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_003d: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_0042: nop
IL_0043: ret
} // end of method Program::Test6
.method public hidebysig instance void
Test6b(int32 i) cil managed
{
// Code size 69 (0x45)
.maxstack 3
.locals init (int32 V_0,
class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_1,
bool V_2)
IL_0000: nop
IL_0001: ldarg.1
IL_0002: stloc.0
IL_0003: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0008: dup
IL_0009: ldloc.0
IL_000a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000f: dup
IL_0010: ldstr "Hello World!"
IL_0015: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_001a: stloc.1
IL_001b: ldloc.0
IL_001c: ldc.i4.0
IL_001d: clt
IL_001f: stloc.2
IL_0020: ldloc.2
IL_0021: brfalse.s IL_0028
IL_0023: nop
IL_0024: ldloc.0
IL_0025: neg
IL_0026: stloc.0
IL_0027: nop
IL_0028: ldstr "{0} {1}"
IL_002d: ldloc.1
IL_002e: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0033: box [mscorlib]System.Int32
IL_0038: ldloc.1
IL_0039: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_003e: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_0043: nop
IL_0044: ret
} // end of method Program::Test6b
.method public hidebysig instance void
Test7(int32 i) cil managed
{
// Code size 71 (0x47)
.maxstack 4
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0,
int32 V_1)
IL_0000: nop
IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0006: dup
IL_0007: ldarg.1
IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000d: dup
IL_000e: ldstr "Hello World!"
IL_0013: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0018: stloc.0
IL_0019: ldstr "{0} {1} {2}"
IL_001e: ldloc.0
IL_001f: dup
IL_0020: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0025: stloc.1
IL_0026: ldloc.1
IL_0027: ldc.i4.1
IL_0028: add
IL_0029: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_002e: ldloc.1
IL_002f: box [mscorlib]System.Int32
IL_0034: ldloc.0
IL_0035: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_003a: ldarg.1
IL_003b: box [mscorlib]System.Int32
IL_0040: call void [mscorlib]System.Console::WriteLine(string,
object,
object,
object)
IL_0045: nop
IL_0046: ret
} // end of method Program::Test7
.method public hidebysig instance void
Test8(int32 i) cil managed
{
// Code size 58 (0x3a)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0)
IL_0000: nop
IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0006: dup
IL_0007: ldarg.1
IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000d: dup
IL_000e: ldstr "Hello World!"
IL_0013: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0018: stloc.0
IL_0019: ldc.i4.s 42
IL_001b: starg.s i
IL_001d: ldstr "{0} {1}"
IL_0022: ldloc.0
IL_0023: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0028: box [mscorlib]System.Int32
IL_002d: ldloc.0
IL_002e: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0033: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_0038: nop
IL_0039: ret
} // end of method Program::Test8
.method public hidebysig instance void
Test8b(int32 i) cil managed
{
// Code size 59 (0x3b)
.maxstack 3
.locals init (int32 V_0,
class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_1)
IL_0000: nop
IL_0001: ldarg.1
IL_0002: stloc.0
IL_0003: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0008: dup
IL_0009: ldloc.0
IL_000a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000f: dup
IL_0010: ldstr "Hello World!"
IL_0015: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_001a: stloc.1
IL_001b: ldc.i4.s 42
IL_001d: stloc.0
IL_001e: ldstr "{0} {1}"
IL_0023: ldloc.1
IL_0024: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0029: box [mscorlib]System.Int32
IL_002e: ldloc.1
IL_002f: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0034: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_0039: nop
IL_003a: ret
} // end of method Program::Test8b
.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 Program::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

509
ICSharpCode.Decompiler.Tests/TestCases/Ugly/AggressiveScalarReplacementOfAggregates.opt.net40.roslyn.il

@ -1,509 +0,0 @@
// 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 tmp96F5
{
.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 tmp96F5.tmp
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass
extends [mscorlib]System.Object
{
.field public class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program thisField
.field public int32 field1
.field public string field2
.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 DisplayClass::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass
extends [mscorlib]System.Object
{
.field public class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass field3
.field public int32 field1
.field public string field2
.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 NestedDisplayClass::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program
extends [mscorlib]System.Object
{
.method public hidebysig instance int32
Rand() cil managed
{
// Code size 6 (0x6)
.maxstack 8
IL_0000: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0005: throw
} // end of method Program::Rand
.method public hidebysig instance void
Test1() cil managed
{
// Code size 53 (0x35)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0005: dup
IL_0006: ldc.i4.s 42
IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000d: dup
IL_000e: ldstr "Hello World!"
IL_0013: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0018: stloc.0
IL_0019: ldstr "{0} {1}"
IL_001e: ldloc.0
IL_001f: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0024: box [mscorlib]System.Int32
IL_0029: ldloc.0
IL_002a: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_002f: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_0034: ret
} // end of method Program::Test1
.method public hidebysig instance void
Test2() cil managed
{
// Code size 58 (0x3a)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0005: dup
IL_0006: ldc.i4.s 42
IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000d: dup
IL_000e: ldstr "Hello World!"
IL_0013: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0018: stloc.0
IL_0019: ldstr "{0} {1}"
IL_001e: ldloc.0
IL_001f: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0024: box [mscorlib]System.Int32
IL_0029: ldloc.0
IL_002a: callvirt instance int32 [mscorlib]System.Object::GetHashCode()
IL_002f: box [mscorlib]System.Int32
IL_0034: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_0039: ret
} // end of method Program::Test2
.method public hidebysig instance void
Test3() cil managed
{
// Code size 48 (0x30)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0005: dup
IL_0006: ldc.i4.s 42
IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000d: dup
IL_000e: ldstr "Hello World!"
IL_0013: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0018: stloc.0
IL_0019: ldstr "{0} {1}"
IL_001e: ldloc.0
IL_001f: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0024: box [mscorlib]System.Int32
IL_0029: ldloc.0
IL_002a: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_002f: ret
} // end of method Program::Test3
.method public hidebysig instance void
Test4() cil managed
{
// Code size 104 (0x68)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0,
class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass V_1)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0005: dup
IL_0006: ldarg.0
IL_0007: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::thisField
IL_000c: dup
IL_000d: ldc.i4.s 42
IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0014: dup
IL_0015: ldstr "Hello World!"
IL_001a: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_001f: stloc.0
IL_0020: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::.ctor()
IL_0025: dup
IL_0026: ldc.i4 0x1267
IL_002b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1
IL_0030: dup
IL_0031: ldstr "ILSpy"
IL_0036: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2
IL_003b: stloc.1
IL_003c: ldloc.0
IL_003d: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0042: ldc.i4.s 100
IL_0044: ble.s IL_004f
IL_0046: ldloc.1
IL_0047: ldloc.0
IL_0048: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_004d: br.s IL_0056
IL_004f: ldloc.1
IL_0050: ldnull
IL_0051: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_0056: ldstr "{0} {1}"
IL_005b: ldloc.0
IL_005c: ldloc.1
IL_005d: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_0062: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_0067: ret
} // end of method Program::Test4
.method public hidebysig instance void
Test5() cil managed
{
// Code size 125 (0x7d)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0,
class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass V_1)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0005: dup
IL_0006: ldarg.0
IL_0007: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::thisField
IL_000c: dup
IL_000d: ldc.i4.s 42
IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0014: dup
IL_0015: ldstr "Hello World!"
IL_001a: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_001f: stloc.0
IL_0020: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::.ctor()
IL_0025: dup
IL_0026: ldc.i4 0x1267
IL_002b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1
IL_0030: dup
IL_0031: ldstr "ILSpy"
IL_0036: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2
IL_003b: stloc.1
IL_003c: ldloc.0
IL_003d: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0042: ldc.i4.s 100
IL_0044: ble.s IL_004f
IL_0046: ldloc.1
IL_0047: ldloc.0
IL_0048: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_004d: br.s IL_0056
IL_004f: ldloc.1
IL_0050: ldnull
IL_0051: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_0056: ldstr "{0} {1}"
IL_005b: ldloc.1
IL_005c: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2
IL_0061: ldloc.1
IL_0062: ldflda int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1
IL_0067: call instance string [mscorlib]System.Int32::ToString()
IL_006c: call string [mscorlib]System.String::Concat(string,
string)
IL_0071: ldloc.1
IL_0072: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_0077: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_007c: ret
} // end of method Program::Test5
.method public hidebysig instance void
Issue1898(int32 i) cil managed
{
// Code size 135 (0x87)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0,
class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass V_1,
int32 V_2,
int32 V_3)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0005: dup
IL_0006: ldarg.0
IL_0007: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::thisField
IL_000c: dup
IL_000d: ldarg.1
IL_000e: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0013: stloc.0
IL_0014: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::.ctor()
IL_0019: stloc.1
IL_001a: ldarg.0
IL_001b: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program::Rand()
IL_0020: stloc.2
IL_0021: ldloc.2
IL_0022: ldc.i4.1
IL_0023: sub
IL_0024: switch (
IL_0037,
IL_0045,
IL_005b)
IL_0035: br.s IL_0064
IL_0037: ldloc.1
IL_0038: ldarg.0
IL_0039: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program::Rand()
IL_003e: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1
IL_0043: br.s IL_001a
IL_0045: ldloc.1
IL_0046: ldarg.0
IL_0047: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program::Rand()
IL_004c: stloc.3
IL_004d: ldloca.s V_3
IL_004f: call instance string [mscorlib]System.Int32::ToString()
IL_0054: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2
IL_0059: br.s IL_001a
IL_005b: ldloc.1
IL_005c: ldloc.0
IL_005d: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_0062: br.s IL_001a
IL_0064: ldloc.1
IL_0065: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1
IL_006a: call void [mscorlib]System.Console::WriteLine(int32)
IL_006f: ldloc.1
IL_0070: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2
IL_0075: call void [mscorlib]System.Console::WriteLine(string)
IL_007a: ldloc.1
IL_007b: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_0080: call void [mscorlib]System.Console::WriteLine(object)
IL_0085: br.s IL_001a
} // end of method Program::Issue1898
.method public hidebysig instance void
Test6(int32 i) cil managed
{
// Code size 60 (0x3c)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0005: dup
IL_0006: ldarg.1
IL_0007: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000c: dup
IL_000d: ldstr "Hello World!"
IL_0012: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0017: stloc.0
IL_0018: ldarg.1
IL_0019: ldc.i4.0
IL_001a: bge.s IL_0020
IL_001c: ldarg.1
IL_001d: neg
IL_001e: starg.s i
IL_0020: ldstr "{0} {1}"
IL_0025: ldloc.0
IL_0026: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_002b: box [mscorlib]System.Int32
IL_0030: ldloc.0
IL_0031: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0036: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_003b: ret
} // end of method Program::Test6
.method public hidebysig instance void
Test6b(int32 i) cil managed
{
// Code size 61 (0x3d)
.maxstack 3
.locals init (int32 V_0,
class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_1)
IL_0000: ldarg.1
IL_0001: stloc.0
IL_0002: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0007: dup
IL_0008: ldloc.0
IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000e: dup
IL_000f: ldstr "Hello World!"
IL_0014: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0019: stloc.1
IL_001a: ldloc.0
IL_001b: ldc.i4.0
IL_001c: bge.s IL_0021
IL_001e: ldloc.0
IL_001f: neg
IL_0020: stloc.0
IL_0021: ldstr "{0} {1}"
IL_0026: ldloc.1
IL_0027: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_002c: box [mscorlib]System.Int32
IL_0031: ldloc.1
IL_0032: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0037: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_003c: ret
} // end of method Program::Test6b
.method public hidebysig instance void
Test7(int32 i) cil managed
{
// Code size 69 (0x45)
.maxstack 4
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0,
int32 V_1)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0005: dup
IL_0006: ldarg.1
IL_0007: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000c: dup
IL_000d: ldstr "Hello World!"
IL_0012: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0017: stloc.0
IL_0018: ldstr "{0} {1} {2}"
IL_001d: ldloc.0
IL_001e: dup
IL_001f: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0024: stloc.1
IL_0025: ldloc.1
IL_0026: ldc.i4.1
IL_0027: add
IL_0028: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_002d: ldloc.1
IL_002e: box [mscorlib]System.Int32
IL_0033: ldloc.0
IL_0034: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0039: ldarg.1
IL_003a: box [mscorlib]System.Int32
IL_003f: call void [mscorlib]System.Console::WriteLine(string,
object,
object,
object)
IL_0044: ret
} // end of method Program::Test7
.method public hidebysig instance void
Test8(int32 i) cil managed
{
// Code size 56 (0x38)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0005: dup
IL_0006: ldarg.1
IL_0007: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000c: dup
IL_000d: ldstr "Hello World!"
IL_0012: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0017: stloc.0
IL_0018: ldc.i4.s 42
IL_001a: starg.s i
IL_001c: ldstr "{0} {1}"
IL_0021: ldloc.0
IL_0022: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0027: box [mscorlib]System.Int32
IL_002c: ldloc.0
IL_002d: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0032: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_0037: ret
} // end of method Program::Test8
.method public hidebysig instance void
Test8b(int32 i) cil managed
{
// Code size 57 (0x39)
.maxstack 3
.locals init (int32 V_0,
class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_1)
IL_0000: ldarg.1
IL_0001: stloc.0
IL_0002: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0007: dup
IL_0008: ldloc.0
IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000e: dup
IL_000f: ldstr "Hello World!"
IL_0014: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0019: stloc.1
IL_001a: ldc.i4.s 42
IL_001c: stloc.0
IL_001d: ldstr "{0} {1}"
IL_0022: ldloc.1
IL_0023: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0028: box [mscorlib]System.Int32
IL_002d: ldloc.1
IL_002e: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0033: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_0038: ret
} // end of method Program::Test8b
.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 Program::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

509
ICSharpCode.Decompiler.Tests/TestCases/Ugly/AggressiveScalarReplacementOfAggregates.opt.roslyn.il

@ -1,509 +0,0 @@
// 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 AggressiveScalarReplacementOfAggregates
{
.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 AggressiveScalarReplacementOfAggregates.dll
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass
extends [mscorlib]System.Object
{
.field public class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program thisField
.field public int32 field1
.field public string field2
.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 DisplayClass::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass
extends [mscorlib]System.Object
{
.field public class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass field3
.field public int32 field1
.field public string field2
.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 NestedDisplayClass::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program
extends [mscorlib]System.Object
{
.method public hidebysig instance int32
Rand() cil managed
{
// Code size 6 (0x6)
.maxstack 8
IL_0000: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0005: throw
} // end of method Program::Rand
.method public hidebysig instance void
Test1() cil managed
{
// Code size 53 (0x35)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0005: dup
IL_0006: ldc.i4.s 42
IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000d: dup
IL_000e: ldstr "Hello World!"
IL_0013: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0018: stloc.0
IL_0019: ldstr "{0} {1}"
IL_001e: ldloc.0
IL_001f: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0024: box [mscorlib]System.Int32
IL_0029: ldloc.0
IL_002a: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_002f: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_0034: ret
} // end of method Program::Test1
.method public hidebysig instance void
Test2() cil managed
{
// Code size 58 (0x3a)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0005: dup
IL_0006: ldc.i4.s 42
IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000d: dup
IL_000e: ldstr "Hello World!"
IL_0013: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0018: stloc.0
IL_0019: ldstr "{0} {1}"
IL_001e: ldloc.0
IL_001f: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0024: box [mscorlib]System.Int32
IL_0029: ldloc.0
IL_002a: callvirt instance int32 [mscorlib]System.Object::GetHashCode()
IL_002f: box [mscorlib]System.Int32
IL_0034: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_0039: ret
} // end of method Program::Test2
.method public hidebysig instance void
Test3() cil managed
{
// Code size 48 (0x30)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0005: dup
IL_0006: ldc.i4.s 42
IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000d: dup
IL_000e: ldstr "Hello World!"
IL_0013: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0018: stloc.0
IL_0019: ldstr "{0} {1}"
IL_001e: ldloc.0
IL_001f: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0024: box [mscorlib]System.Int32
IL_0029: ldloc.0
IL_002a: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_002f: ret
} // end of method Program::Test3
.method public hidebysig instance void
Test4() cil managed
{
// Code size 104 (0x68)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0,
class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass V_1)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0005: dup
IL_0006: ldarg.0
IL_0007: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::thisField
IL_000c: dup
IL_000d: ldc.i4.s 42
IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0014: dup
IL_0015: ldstr "Hello World!"
IL_001a: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_001f: stloc.0
IL_0020: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::.ctor()
IL_0025: dup
IL_0026: ldc.i4 0x1267
IL_002b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1
IL_0030: dup
IL_0031: ldstr "ILSpy"
IL_0036: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2
IL_003b: stloc.1
IL_003c: ldloc.0
IL_003d: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0042: ldc.i4.s 100
IL_0044: ble.s IL_004f
IL_0046: ldloc.1
IL_0047: ldloc.0
IL_0048: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_004d: br.s IL_0056
IL_004f: ldloc.1
IL_0050: ldnull
IL_0051: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_0056: ldstr "{0} {1}"
IL_005b: ldloc.0
IL_005c: ldloc.1
IL_005d: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_0062: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_0067: ret
} // end of method Program::Test4
.method public hidebysig instance void
Test5() cil managed
{
// Code size 125 (0x7d)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0,
class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass V_1)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0005: dup
IL_0006: ldarg.0
IL_0007: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::thisField
IL_000c: dup
IL_000d: ldc.i4.s 42
IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0014: dup
IL_0015: ldstr "Hello World!"
IL_001a: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_001f: stloc.0
IL_0020: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::.ctor()
IL_0025: dup
IL_0026: ldc.i4 0x1267
IL_002b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1
IL_0030: dup
IL_0031: ldstr "ILSpy"
IL_0036: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2
IL_003b: stloc.1
IL_003c: ldloc.0
IL_003d: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0042: ldc.i4.s 100
IL_0044: ble.s IL_004f
IL_0046: ldloc.1
IL_0047: ldloc.0
IL_0048: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_004d: br.s IL_0056
IL_004f: ldloc.1
IL_0050: ldnull
IL_0051: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_0056: ldstr "{0} {1}"
IL_005b: ldloc.1
IL_005c: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2
IL_0061: ldloc.1
IL_0062: ldflda int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1
IL_0067: call instance string [mscorlib]System.Int32::ToString()
IL_006c: call string [mscorlib]System.String::Concat(string,
string)
IL_0071: ldloc.1
IL_0072: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_0077: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_007c: ret
} // end of method Program::Test5
.method public hidebysig instance void
Issue1898(int32 i) cil managed
{
// Code size 135 (0x87)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0,
class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass V_1,
int32 V_2,
int32 V_3)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0005: dup
IL_0006: ldarg.0
IL_0007: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::thisField
IL_000c: dup
IL_000d: ldarg.1
IL_000e: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0013: stloc.0
IL_0014: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::.ctor()
IL_0019: stloc.1
IL_001a: ldarg.0
IL_001b: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program::Rand()
IL_0020: stloc.2
IL_0021: ldloc.2
IL_0022: ldc.i4.1
IL_0023: sub
IL_0024: switch (
IL_0037,
IL_0045,
IL_005b)
IL_0035: br.s IL_0064
IL_0037: ldloc.1
IL_0038: ldarg.0
IL_0039: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program::Rand()
IL_003e: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1
IL_0043: br.s IL_001a
IL_0045: ldloc.1
IL_0046: ldarg.0
IL_0047: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program::Rand()
IL_004c: stloc.3
IL_004d: ldloca.s V_3
IL_004f: call instance string [mscorlib]System.Int32::ToString()
IL_0054: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2
IL_0059: br.s IL_001a
IL_005b: ldloc.1
IL_005c: ldloc.0
IL_005d: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_0062: br.s IL_001a
IL_0064: ldloc.1
IL_0065: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1
IL_006a: call void [mscorlib]System.Console::WriteLine(int32)
IL_006f: ldloc.1
IL_0070: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2
IL_0075: call void [mscorlib]System.Console::WriteLine(string)
IL_007a: ldloc.1
IL_007b: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_0080: call void [mscorlib]System.Console::WriteLine(object)
IL_0085: br.s IL_001a
} // end of method Program::Issue1898
.method public hidebysig instance void
Test6(int32 i) cil managed
{
// Code size 60 (0x3c)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0005: dup
IL_0006: ldarg.1
IL_0007: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000c: dup
IL_000d: ldstr "Hello World!"
IL_0012: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0017: stloc.0
IL_0018: ldarg.1
IL_0019: ldc.i4.0
IL_001a: bge.s IL_0020
IL_001c: ldarg.1
IL_001d: neg
IL_001e: starg.s i
IL_0020: ldstr "{0} {1}"
IL_0025: ldloc.0
IL_0026: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_002b: box [mscorlib]System.Int32
IL_0030: ldloc.0
IL_0031: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0036: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_003b: ret
} // end of method Program::Test6
.method public hidebysig instance void
Test6b(int32 i) cil managed
{
// Code size 61 (0x3d)
.maxstack 3
.locals init (int32 V_0,
class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_1)
IL_0000: ldarg.1
IL_0001: stloc.0
IL_0002: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0007: dup
IL_0008: ldloc.0
IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000e: dup
IL_000f: ldstr "Hello World!"
IL_0014: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0019: stloc.1
IL_001a: ldloc.0
IL_001b: ldc.i4.0
IL_001c: bge.s IL_0021
IL_001e: ldloc.0
IL_001f: neg
IL_0020: stloc.0
IL_0021: ldstr "{0} {1}"
IL_0026: ldloc.1
IL_0027: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_002c: box [mscorlib]System.Int32
IL_0031: ldloc.1
IL_0032: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0037: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_003c: ret
} // end of method Program::Test6b
.method public hidebysig instance void
Test7(int32 i) cil managed
{
// Code size 69 (0x45)
.maxstack 4
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0,
int32 V_1)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0005: dup
IL_0006: ldarg.1
IL_0007: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000c: dup
IL_000d: ldstr "Hello World!"
IL_0012: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0017: stloc.0
IL_0018: ldstr "{0} {1} {2}"
IL_001d: ldloc.0
IL_001e: dup
IL_001f: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0024: stloc.1
IL_0025: ldloc.1
IL_0026: ldc.i4.1
IL_0027: add
IL_0028: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_002d: ldloc.1
IL_002e: box [mscorlib]System.Int32
IL_0033: ldloc.0
IL_0034: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0039: ldarg.1
IL_003a: box [mscorlib]System.Int32
IL_003f: call void [mscorlib]System.Console::WriteLine(string,
object,
object,
object)
IL_0044: ret
} // end of method Program::Test7
.method public hidebysig instance void
Test8(int32 i) cil managed
{
// Code size 56 (0x38)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0005: dup
IL_0006: ldarg.1
IL_0007: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000c: dup
IL_000d: ldstr "Hello World!"
IL_0012: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0017: stloc.0
IL_0018: ldc.i4.s 42
IL_001a: starg.s i
IL_001c: ldstr "{0} {1}"
IL_0021: ldloc.0
IL_0022: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0027: box [mscorlib]System.Int32
IL_002c: ldloc.0
IL_002d: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0032: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_0037: ret
} // end of method Program::Test8
.method public hidebysig instance void
Test8b(int32 i) cil managed
{
// Code size 57 (0x39)
.maxstack 3
.locals init (int32 V_0,
class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_1)
IL_0000: ldarg.1
IL_0001: stloc.0
IL_0002: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0007: dup
IL_0008: ldloc.0
IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000e: dup
IL_000f: ldstr "Hello World!"
IL_0014: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0019: stloc.1
IL_001a: ldc.i4.s 42
IL_001c: stloc.0
IL_001d: ldstr "{0} {1}"
IL_0022: ldloc.1
IL_0023: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0028: box [mscorlib]System.Int32
IL_002d: ldloc.1
IL_002e: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0033: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_0038: ret
} // end of method Program::Test8b
.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 Program::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

577
ICSharpCode.Decompiler.Tests/TestCases/Ugly/AggressiveScalarReplacementOfAggregates.roslyn.il

@ -1,577 +0,0 @@
// 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 AggressiveScalarReplacementOfAggregates
{
.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 AggressiveScalarReplacementOfAggregates.dll
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass
extends [mscorlib]System.Object
{
.field public class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program thisField
.field public int32 field1
.field public string field2
.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 DisplayClass::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass
extends [mscorlib]System.Object
{
.field public class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass field3
.field public int32 field1
.field public string field2
.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 NestedDisplayClass::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program
extends [mscorlib]System.Object
{
.method public hidebysig instance int32
Rand() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: nop
IL_0001: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0006: throw
} // end of method Program::Rand
.method public hidebysig instance void
Test1() cil managed
{
// Code size 55 (0x37)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0)
IL_0000: nop
IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0006: dup
IL_0007: ldc.i4.s 42
IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000e: dup
IL_000f: ldstr "Hello World!"
IL_0014: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0019: stloc.0
IL_001a: ldstr "{0} {1}"
IL_001f: ldloc.0
IL_0020: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0025: box [mscorlib]System.Int32
IL_002a: ldloc.0
IL_002b: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0030: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_0035: nop
IL_0036: ret
} // end of method Program::Test1
.method public hidebysig instance void
Test2() cil managed
{
// Code size 60 (0x3c)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0)
IL_0000: nop
IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0006: dup
IL_0007: ldc.i4.s 42
IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000e: dup
IL_000f: ldstr "Hello World!"
IL_0014: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0019: stloc.0
IL_001a: ldstr "{0} {1}"
IL_001f: ldloc.0
IL_0020: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0025: box [mscorlib]System.Int32
IL_002a: ldloc.0
IL_002b: callvirt instance int32 [mscorlib]System.Object::GetHashCode()
IL_0030: box [mscorlib]System.Int32
IL_0035: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_003a: nop
IL_003b: ret
} // end of method Program::Test2
.method public hidebysig instance void
Test3() cil managed
{
// Code size 50 (0x32)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0)
IL_0000: nop
IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0006: dup
IL_0007: ldc.i4.s 42
IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000e: dup
IL_000f: ldstr "Hello World!"
IL_0014: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0019: stloc.0
IL_001a: ldstr "{0} {1}"
IL_001f: ldloc.0
IL_0020: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0025: box [mscorlib]System.Int32
IL_002a: ldloc.0
IL_002b: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_0030: nop
IL_0031: ret
} // end of method Program::Test3
.method public hidebysig instance void
Test4() cil managed
{
// Code size 114 (0x72)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0,
class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass V_1,
bool V_2)
IL_0000: nop
IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0006: dup
IL_0007: ldarg.0
IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::thisField
IL_000d: dup
IL_000e: ldc.i4.s 42
IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0015: dup
IL_0016: ldstr "Hello World!"
IL_001b: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0020: stloc.0
IL_0021: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::.ctor()
IL_0026: dup
IL_0027: ldc.i4 0x1267
IL_002c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1
IL_0031: dup
IL_0032: ldstr "ILSpy"
IL_0037: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2
IL_003c: stloc.1
IL_003d: ldloc.0
IL_003e: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0043: ldc.i4.s 100
IL_0045: cgt
IL_0047: stloc.2
IL_0048: ldloc.2
IL_0049: brfalse.s IL_0056
IL_004b: nop
IL_004c: ldloc.1
IL_004d: ldloc.0
IL_004e: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_0053: nop
IL_0054: br.s IL_005f
IL_0056: nop
IL_0057: ldloc.1
IL_0058: ldnull
IL_0059: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_005e: nop
IL_005f: ldstr "{0} {1}"
IL_0064: ldloc.0
IL_0065: ldloc.1
IL_0066: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_006b: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_0070: nop
IL_0071: ret
} // end of method Program::Test4
.method public hidebysig instance void
Test5() cil managed
{
// Code size 135 (0x87)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0,
class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass V_1,
bool V_2)
IL_0000: nop
IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0006: dup
IL_0007: ldarg.0
IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::thisField
IL_000d: dup
IL_000e: ldc.i4.s 42
IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0015: dup
IL_0016: ldstr "Hello World!"
IL_001b: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0020: stloc.0
IL_0021: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::.ctor()
IL_0026: dup
IL_0027: ldc.i4 0x1267
IL_002c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1
IL_0031: dup
IL_0032: ldstr "ILSpy"
IL_0037: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2
IL_003c: stloc.1
IL_003d: ldloc.0
IL_003e: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0043: ldc.i4.s 100
IL_0045: cgt
IL_0047: stloc.2
IL_0048: ldloc.2
IL_0049: brfalse.s IL_0056
IL_004b: nop
IL_004c: ldloc.1
IL_004d: ldloc.0
IL_004e: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_0053: nop
IL_0054: br.s IL_005f
IL_0056: nop
IL_0057: ldloc.1
IL_0058: ldnull
IL_0059: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_005e: nop
IL_005f: ldstr "{0} {1}"
IL_0064: ldloc.1
IL_0065: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2
IL_006a: ldloc.1
IL_006b: ldflda int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1
IL_0070: call instance string [mscorlib]System.Int32::ToString()
IL_0075: call string [mscorlib]System.String::Concat(string,
string)
IL_007a: ldloc.1
IL_007b: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_0080: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_0085: nop
IL_0086: ret
} // end of method Program::Test5
.method public hidebysig instance void
Issue1898(int32 i) cil managed
{
// Code size 151 (0x97)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0,
class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass V_1,
int32 V_2,
int32 V_3,
int32 V_4,
bool V_5)
IL_0000: nop
IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0006: dup
IL_0007: ldarg.0
IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::thisField
IL_000d: dup
IL_000e: ldarg.1
IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0014: stloc.0
IL_0015: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::.ctor()
IL_001a: stloc.1
IL_001b: br.s IL_0092
IL_001d: nop
IL_001e: ldarg.0
IL_001f: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program::Rand()
IL_0024: stloc.3
IL_0025: ldloc.3
IL_0026: stloc.2
IL_0027: ldloc.2
IL_0028: ldc.i4.1
IL_0029: sub
IL_002a: switch (
IL_003d,
IL_004b,
IL_0062)
IL_003b: br.s IL_006b
IL_003d: ldloc.1
IL_003e: ldarg.0
IL_003f: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program::Rand()
IL_0044: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1
IL_0049: br.s IL_0091
IL_004b: ldloc.1
IL_004c: ldarg.0
IL_004d: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program::Rand()
IL_0052: stloc.s V_4
IL_0054: ldloca.s V_4
IL_0056: call instance string [mscorlib]System.Int32::ToString()
IL_005b: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2
IL_0060: br.s IL_0091
IL_0062: ldloc.1
IL_0063: ldloc.0
IL_0064: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_0069: br.s IL_0091
IL_006b: ldloc.1
IL_006c: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1
IL_0071: call void [mscorlib]System.Console::WriteLine(int32)
IL_0076: nop
IL_0077: ldloc.1
IL_0078: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2
IL_007d: call void [mscorlib]System.Console::WriteLine(string)
IL_0082: nop
IL_0083: ldloc.1
IL_0084: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3
IL_0089: call void [mscorlib]System.Console::WriteLine(object)
IL_008e: nop
IL_008f: br.s IL_0091
IL_0091: nop
IL_0092: ldc.i4.1
IL_0093: stloc.s V_5
IL_0095: br.s IL_001d
} // end of method Program::Issue1898
.method public hidebysig instance void
Test6(int32 i) cil managed
{
// Code size 68 (0x44)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0,
bool V_1)
IL_0000: nop
IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0006: dup
IL_0007: ldarg.1
IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000d: dup
IL_000e: ldstr "Hello World!"
IL_0013: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0018: stloc.0
IL_0019: ldarg.1
IL_001a: ldc.i4.0
IL_001b: clt
IL_001d: stloc.1
IL_001e: ldloc.1
IL_001f: brfalse.s IL_0027
IL_0021: nop
IL_0022: ldarg.1
IL_0023: neg
IL_0024: starg.s i
IL_0026: nop
IL_0027: ldstr "{0} {1}"
IL_002c: ldloc.0
IL_002d: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0032: box [mscorlib]System.Int32
IL_0037: ldloc.0
IL_0038: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_003d: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_0042: nop
IL_0043: ret
} // end of method Program::Test6
.method public hidebysig instance void
Test6b(int32 i) cil managed
{
// Code size 69 (0x45)
.maxstack 3
.locals init (int32 V_0,
class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_1,
bool V_2)
IL_0000: nop
IL_0001: ldarg.1
IL_0002: stloc.0
IL_0003: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0008: dup
IL_0009: ldloc.0
IL_000a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000f: dup
IL_0010: ldstr "Hello World!"
IL_0015: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_001a: stloc.1
IL_001b: ldloc.0
IL_001c: ldc.i4.0
IL_001d: clt
IL_001f: stloc.2
IL_0020: ldloc.2
IL_0021: brfalse.s IL_0028
IL_0023: nop
IL_0024: ldloc.0
IL_0025: neg
IL_0026: stloc.0
IL_0027: nop
IL_0028: ldstr "{0} {1}"
IL_002d: ldloc.1
IL_002e: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0033: box [mscorlib]System.Int32
IL_0038: ldloc.1
IL_0039: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_003e: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_0043: nop
IL_0044: ret
} // end of method Program::Test6b
.method public hidebysig instance void
Test7(int32 i) cil managed
{
// Code size 71 (0x47)
.maxstack 4
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0,
int32 V_1)
IL_0000: nop
IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0006: dup
IL_0007: ldarg.1
IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000d: dup
IL_000e: ldstr "Hello World!"
IL_0013: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0018: stloc.0
IL_0019: ldstr "{0} {1} {2}"
IL_001e: ldloc.0
IL_001f: dup
IL_0020: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0025: stloc.1
IL_0026: ldloc.1
IL_0027: ldc.i4.1
IL_0028: add
IL_0029: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_002e: ldloc.1
IL_002f: box [mscorlib]System.Int32
IL_0034: ldloc.0
IL_0035: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_003a: ldarg.1
IL_003b: box [mscorlib]System.Int32
IL_0040: call void [mscorlib]System.Console::WriteLine(string,
object,
object,
object)
IL_0045: nop
IL_0046: ret
} // end of method Program::Test7
.method public hidebysig instance void
Test8(int32 i) cil managed
{
// Code size 58 (0x3a)
.maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0)
IL_0000: nop
IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0006: dup
IL_0007: ldarg.1
IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000d: dup
IL_000e: ldstr "Hello World!"
IL_0013: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0018: stloc.0
IL_0019: ldc.i4.s 42
IL_001b: starg.s i
IL_001d: ldstr "{0} {1}"
IL_0022: ldloc.0
IL_0023: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0028: box [mscorlib]System.Int32
IL_002d: ldloc.0
IL_002e: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0033: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_0038: nop
IL_0039: ret
} // end of method Program::Test8
.method public hidebysig instance void
Test8b(int32 i) cil managed
{
// Code size 59 (0x3b)
.maxstack 3
.locals init (int32 V_0,
class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_1)
IL_0000: nop
IL_0001: ldarg.1
IL_0002: stloc.0
IL_0003: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor()
IL_0008: dup
IL_0009: ldloc.0
IL_000a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_000f: dup
IL_0010: ldstr "Hello World!"
IL_0015: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_001a: stloc.1
IL_001b: ldc.i4.s 42
IL_001d: stloc.0
IL_001e: ldstr "{0} {1}"
IL_0023: ldloc.1
IL_0024: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1
IL_0029: box [mscorlib]System.Int32
IL_002e: ldloc.1
IL_002f: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2
IL_0034: call void [mscorlib]System.Console::WriteLine(string,
object,
object)
IL_0039: nop
IL_003a: ret
} // end of method Program::Test8b
.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 Program::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

2
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.Expected.cs

@ -6,7 +6,7 @@ using System.Runtime.InteropServices;
internal sealed class _003CPrivateImplementationDetails_003E internal sealed class _003CPrivateImplementationDetails_003E
{ {
[StructLayout(LayoutKind.Explicit, Pack = 1, Size = 12)] [StructLayout(LayoutKind.Explicit, Pack = 1, Size = 12)]
private struct __StaticArrayInitTypeSize_003D12 internal struct __StaticArrayInitTypeSize_003D12
{ {
} }
internal static readonly __StaticArrayInitTypeSize_003D12 _4636993D3E1DA4E9D6B8F87B79E8F7C6D018580D52661950EABC3845C5897A4D/* Not supported: data(01 00 00 00 02 00 00 00 03 00 00 00) */; internal static readonly __StaticArrayInitTypeSize_003D12 _4636993D3E1DA4E9D6B8F87B79E8F7C6D018580D52661950EABC3845C5897A4D/* Not supported: data(01 00 00 00 02 00 00 00 03 00 00 00) */;

116
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.net40.roslyn.il

@ -1,116 +0,0 @@
// 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 tmp9704
{
.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 tmp9704.tmp
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoArrayInitializers
extends [mscorlib]System.Object
{
.method public hidebysig instance int32[]
LiteralArray() cil managed
{
// Code size 23 (0x17)
.maxstack 3
.locals init (int32[] V_0)
IL_0000: nop
IL_0001: ldc.i4.3
IL_0002: newarr [mscorlib]System.Int32
IL_0007: dup
IL_0008: ldtoken field valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=12' '<PrivateImplementationDetails>'::'4636993D3E1DA4E9D6B8F87B79E8F7C6D018580D52661950EABC3845C5897A4D'
IL_000d: call void [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray(class [mscorlib]System.Array,
valuetype [mscorlib]System.RuntimeFieldHandle)
IL_0012: stloc.0
IL_0013: br.s IL_0015
IL_0015: ldloc.0
IL_0016: ret
} // end of method NoArrayInitializers::LiteralArray
.method public hidebysig instance int32[]
VariableArray(int32 a,
int32 b) cil managed
{
// Code size 20 (0x14)
.maxstack 4
.locals init (int32[] V_0)
IL_0000: nop
IL_0001: ldc.i4.2
IL_0002: newarr [mscorlib]System.Int32
IL_0007: dup
IL_0008: ldc.i4.0
IL_0009: ldarg.1
IL_000a: stelem.i4
IL_000b: dup
IL_000c: ldc.i4.1
IL_000d: ldarg.2
IL_000e: stelem.i4
IL_000f: stloc.0
IL_0010: br.s IL_0012
IL_0012: ldloc.0
IL_0013: ret
} // end of method NoArrayInitializers::VariableArray
.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 NoArrayInitializers::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoArrayInitializers
.class private auto ansi sealed '<PrivateImplementationDetails>'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.class explicit ansi sealed nested private '__StaticArrayInitTypeSize=12'
extends [mscorlib]System.ValueType
{
.pack 1
.size 12
} // end of class '__StaticArrayInitTypeSize=12'
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=12' '4636993D3E1DA4E9D6B8F87B79E8F7C6D018580D52661950EABC3845C5897A4D' at I_000026C0
} // end of class '<PrivateImplementationDetails>'
// =============================================================
.data cil I_000026C0 = bytearray (
01 00 00 00 02 00 00 00 03 00 00 00)
// *********** DISASSEMBLY COMPLETE ***********************

103
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.opt.net40.roslyn.il

@ -1,103 +0,0 @@
// 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 tmp9705
{
.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 tmp9705.tmp
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoArrayInitializers
extends [mscorlib]System.Object
{
.method public hidebysig instance int32[]
LiteralArray() cil managed
{
// Code size 18 (0x12)
.maxstack 8
IL_0000: ldc.i4.3
IL_0001: newarr [mscorlib]System.Int32
IL_0006: dup
IL_0007: ldtoken field valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=12' '<PrivateImplementationDetails>'::'4636993D3E1DA4E9D6B8F87B79E8F7C6D018580D52661950EABC3845C5897A4D'
IL_000c: call void [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray(class [mscorlib]System.Array,
valuetype [mscorlib]System.RuntimeFieldHandle)
IL_0011: ret
} // end of method NoArrayInitializers::LiteralArray
.method public hidebysig instance int32[]
VariableArray(int32 a,
int32 b) cil managed
{
// Code size 15 (0xf)
.maxstack 8
IL_0000: ldc.i4.2
IL_0001: newarr [mscorlib]System.Int32
IL_0006: dup
IL_0007: ldc.i4.0
IL_0008: ldarg.1
IL_0009: stelem.i4
IL_000a: dup
IL_000b: ldc.i4.1
IL_000c: ldarg.2
IL_000d: stelem.i4
IL_000e: ret
} // end of method NoArrayInitializers::VariableArray
.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 NoArrayInitializers::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoArrayInitializers
.class private auto ansi sealed '<PrivateImplementationDetails>'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.class explicit ansi sealed nested private '__StaticArrayInitTypeSize=12'
extends [mscorlib]System.ValueType
{
.pack 1
.size 12
} // end of class '__StaticArrayInitTypeSize=12'
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=12' '4636993D3E1DA4E9D6B8F87B79E8F7C6D018580D52661950EABC3845C5897A4D' at I_00002690
} // end of class '<PrivateImplementationDetails>'
// =============================================================
.data cil I_00002690 = bytearray (
01 00 00 00 02 00 00 00 03 00 00 00)
// *********** DISASSEMBLY COMPLETE ***********************

107
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.opt.roslyn.il

@ -1,107 +0,0 @@
// 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 NoArrayInitializers
{
.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 NoArrayInitializers.dll
// MVID: {C6AD59A2-7245-425B-A6BB-29F93FAB1116}
.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: 0x00FD0000
// =============== CLASS MEMBERS DECLARATION ===================
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoArrayInitializers
extends [mscorlib]System.Object
{
.method public hidebysig instance int32[]
LiteralArray() cil managed
{
// Code size 18 (0x12)
.maxstack 8
IL_0000: ldc.i4.3
IL_0001: newarr [mscorlib]System.Int32
IL_0006: dup
IL_0007: ldtoken field valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=12' '<PrivateImplementationDetails>'::'4636993D3E1DA4E9D6B8F87B79E8F7C6D018580D52661950EABC3845C5897A4D'
IL_000c: call void [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray(class [mscorlib]System.Array,
valuetype [mscorlib]System.RuntimeFieldHandle)
IL_0011: ret
} // end of method NoArrayInitializers::LiteralArray
.method public hidebysig instance int32[]
VariableArray(int32 a,
int32 b) cil managed
{
// Code size 15 (0xf)
.maxstack 8
IL_0000: ldc.i4.2
IL_0001: newarr [mscorlib]System.Int32
IL_0006: dup
IL_0007: ldc.i4.0
IL_0008: ldarg.1
IL_0009: stelem.i4
IL_000a: dup
IL_000b: ldc.i4.1
IL_000c: ldarg.2
IL_000d: stelem.i4
IL_000e: ret
} // end of method NoArrayInitializers::VariableArray
.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 NoArrayInitializers::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoArrayInitializers
.class private auto ansi sealed '<PrivateImplementationDetails>'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.class explicit ansi sealed nested private '__StaticArrayInitTypeSize=12'
extends [mscorlib]System.ValueType
{
.pack 1
.size 12
} // end of class '__StaticArrayInitTypeSize=12'
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=12' '4636993D3E1DA4E9D6B8F87B79E8F7C6D018580D52661950EABC3845C5897A4D' at I_00002690
} // end of class '<PrivateImplementationDetails>'
// =============================================================
.data cil I_00002690 = bytearray (
01 00 00 00 02 00 00 00 03 00 00 00)
// *********** DISASSEMBLY COMPLETE ***********************

120
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.roslyn.il

@ -1,120 +0,0 @@
// 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 NoArrayInitializers
{
.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 NoArrayInitializers.dll
// MVID: {C1B38171-55C8-4DDA-ACC8-78EFA1168D40}
.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: 0x03D10000
// =============== CLASS MEMBERS DECLARATION ===================
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoArrayInitializers
extends [mscorlib]System.Object
{
.method public hidebysig instance int32[]
LiteralArray() cil managed
{
// Code size 23 (0x17)
.maxstack 3
.locals init (int32[] V_0)
IL_0000: nop
IL_0001: ldc.i4.3
IL_0002: newarr [mscorlib]System.Int32
IL_0007: dup
IL_0008: ldtoken field valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=12' '<PrivateImplementationDetails>'::'4636993D3E1DA4E9D6B8F87B79E8F7C6D018580D52661950EABC3845C5897A4D'
IL_000d: call void [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray(class [mscorlib]System.Array,
valuetype [mscorlib]System.RuntimeFieldHandle)
IL_0012: stloc.0
IL_0013: br.s IL_0015
IL_0015: ldloc.0
IL_0016: ret
} // end of method NoArrayInitializers::LiteralArray
.method public hidebysig instance int32[]
VariableArray(int32 a,
int32 b) cil managed
{
// Code size 20 (0x14)
.maxstack 4
.locals init (int32[] V_0)
IL_0000: nop
IL_0001: ldc.i4.2
IL_0002: newarr [mscorlib]System.Int32
IL_0007: dup
IL_0008: ldc.i4.0
IL_0009: ldarg.1
IL_000a: stelem.i4
IL_000b: dup
IL_000c: ldc.i4.1
IL_000d: ldarg.2
IL_000e: stelem.i4
IL_000f: stloc.0
IL_0010: br.s IL_0012
IL_0012: ldloc.0
IL_0013: ret
} // end of method NoArrayInitializers::VariableArray
.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 NoArrayInitializers::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoArrayInitializers
.class private auto ansi sealed '<PrivateImplementationDetails>'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.class explicit ansi sealed nested private '__StaticArrayInitTypeSize=12'
extends [mscorlib]System.ValueType
{
.pack 1
.size 12
} // end of class '__StaticArrayInitTypeSize=12'
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=12' '4636993D3E1DA4E9D6B8F87B79E8F7C6D018580D52661950EABC3845C5897A4D' at I_000026C0
} // end of class '<PrivateImplementationDetails>'
// =============================================================
.data cil I_000026C0 = bytearray (
01 00 00 00 02 00 00 00 03 00 00 00)
// *********** DISASSEMBLY COMPLETE ***********************

97
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoDecimalConstants.net40.roslyn.il

@ -1,97 +0,0 @@
// 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 tmpA278
{
.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 tmpA278.tmp
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoDecimalConstants
extends [mscorlib]System.Object
{
.field private static initonly valuetype [mscorlib]System.Decimal constant
.custom instance void [mscorlib]System.Runtime.CompilerServices.DecimalConstantAttribute::.ctor(uint8,
uint8,
uint32,
uint32,
uint32) = ( 01 00 01 00 00 00 00 00 00 00 00 00 0A 00 00 00
00 00 )
.method private hidebysig instance void
MethodWithOptionalParameter([opt] valuetype [mscorlib]System.Decimal parameter) cil managed
{
.param [1]
.custom instance void [mscorlib]System.Runtime.CompilerServices.DecimalConstantAttribute::.ctor(uint8,
uint8,
uint32,
uint32,
uint32) = ( 01 00 01 00 00 00 00 00 00 00 00 00 0A 00 00 00
00 00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method NoDecimalConstants::MethodWithOptionalParameter
.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 NoDecimalConstants::.ctor
.method private hidebysig specialname rtspecialname static
void .cctor() cil managed
{
// Code size 17 (0x11)
.maxstack 8
IL_0000: ldc.i4.s 10
IL_0002: ldc.i4.0
IL_0003: ldc.i4.0
IL_0004: ldc.i4.0
IL_0005: ldc.i4.1
IL_0006: newobj instance void [mscorlib]System.Decimal::.ctor(int32,
int32,
int32,
bool,
uint8)
IL_000b: stsfld valuetype [mscorlib]System.Decimal ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoDecimalConstants::constant
IL_0010: ret
} // end of method NoDecimalConstants::.cctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoDecimalConstants
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

95
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoDecimalConstants.opt.net40.roslyn.il

@ -1,95 +0,0 @@
// 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 tmpA279
{
.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 tmpA279.tmp
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoDecimalConstants
extends [mscorlib]System.Object
{
.field private static initonly valuetype [mscorlib]System.Decimal constant
.custom instance void [mscorlib]System.Runtime.CompilerServices.DecimalConstantAttribute::.ctor(uint8,
uint8,
uint32,
uint32,
uint32) = ( 01 00 01 00 00 00 00 00 00 00 00 00 0A 00 00 00
00 00 )
.method private hidebysig instance void
MethodWithOptionalParameter([opt] valuetype [mscorlib]System.Decimal parameter) cil managed
{
.param [1]
.custom instance void [mscorlib]System.Runtime.CompilerServices.DecimalConstantAttribute::.ctor(uint8,
uint8,
uint32,
uint32,
uint32) = ( 01 00 01 00 00 00 00 00 00 00 00 00 0A 00 00 00
00 00 )
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method NoDecimalConstants::MethodWithOptionalParameter
.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 NoDecimalConstants::.ctor
.method private hidebysig specialname rtspecialname static
void .cctor() cil managed
{
// Code size 17 (0x11)
.maxstack 8
IL_0000: ldc.i4.s 10
IL_0002: ldc.i4.0
IL_0003: ldc.i4.0
IL_0004: ldc.i4.0
IL_0005: ldc.i4.1
IL_0006: newobj instance void [mscorlib]System.Decimal::.ctor(int32,
int32,
int32,
bool,
uint8)
IL_000b: stsfld valuetype [mscorlib]System.Decimal ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoDecimalConstants::constant
IL_0010: ret
} // end of method NoDecimalConstants::.cctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoDecimalConstants
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

95
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoDecimalConstants.opt.roslyn.il

@ -1,95 +0,0 @@
// 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 NoDecimalConstants
{
.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 NoDecimalConstants.dll
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoDecimalConstants
extends [mscorlib]System.Object
{
.field private static initonly valuetype [mscorlib]System.Decimal constant
.custom instance void [mscorlib]System.Runtime.CompilerServices.DecimalConstantAttribute::.ctor(uint8,
uint8,
uint32,
uint32,
uint32) = ( 01 00 01 00 00 00 00 00 00 00 00 00 0A 00 00 00
00 00 )
.method private hidebysig instance void
MethodWithOptionalParameter([opt] valuetype [mscorlib]System.Decimal parameter) cil managed
{
.param [1]
.custom instance void [mscorlib]System.Runtime.CompilerServices.DecimalConstantAttribute::.ctor(uint8,
uint8,
uint32,
uint32,
uint32) = ( 01 00 01 00 00 00 00 00 00 00 00 00 0A 00 00 00
00 00 )
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method NoDecimalConstants::MethodWithOptionalParameter
.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 NoDecimalConstants::.ctor
.method private hidebysig specialname rtspecialname static
void .cctor() cil managed
{
// Code size 17 (0x11)
.maxstack 8
IL_0000: ldc.i4.s 10
IL_0002: ldc.i4.0
IL_0003: ldc.i4.0
IL_0004: ldc.i4.0
IL_0005: ldc.i4.1
IL_0006: newobj instance void [mscorlib]System.Decimal::.ctor(int32,
int32,
int32,
bool,
uint8)
IL_000b: stsfld valuetype [mscorlib]System.Decimal ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoDecimalConstants::constant
IL_0010: ret
} // end of method NoDecimalConstants::.cctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoDecimalConstants
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

97
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoDecimalConstants.roslyn.il

@ -1,97 +0,0 @@
// 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 NoDecimalConstants
{
.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 NoDecimalConstants.dll
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoDecimalConstants
extends [mscorlib]System.Object
{
.field private static initonly valuetype [mscorlib]System.Decimal constant
.custom instance void [mscorlib]System.Runtime.CompilerServices.DecimalConstantAttribute::.ctor(uint8,
uint8,
uint32,
uint32,
uint32) = ( 01 00 01 00 00 00 00 00 00 00 00 00 0A 00 00 00
00 00 )
.method private hidebysig instance void
MethodWithOptionalParameter([opt] valuetype [mscorlib]System.Decimal parameter) cil managed
{
.param [1]
.custom instance void [mscorlib]System.Runtime.CompilerServices.DecimalConstantAttribute::.ctor(uint8,
uint8,
uint32,
uint32,
uint32) = ( 01 00 01 00 00 00 00 00 00 00 00 00 0A 00 00 00
00 00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method NoDecimalConstants::MethodWithOptionalParameter
.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 NoDecimalConstants::.ctor
.method private hidebysig specialname rtspecialname static
void .cctor() cil managed
{
// Code size 17 (0x11)
.maxstack 8
IL_0000: ldc.i4.s 10
IL_0002: ldc.i4.0
IL_0003: ldc.i4.0
IL_0004: ldc.i4.0
IL_0005: ldc.i4.1
IL_0006: newobj instance void [mscorlib]System.Decimal::.ctor(int32,
int32,
int32,
bool,
uint8)
IL_000b: stsfld valuetype [mscorlib]System.Decimal ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoDecimalConstants::constant
IL_0010: ret
} // end of method NoDecimalConstants::.cctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoDecimalConstants
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

117
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoExtensionMethods.net40.roslyn.il

@ -1,117 +0,0 @@
// 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 tmpA29B
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
.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 tmpA29B.tmp
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class private abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
.method assembly hidebysig static class [mscorlib]System.Func`1<!!T>
AsFunc<class T>(!!T 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
// Code size 23 (0x17)
.maxstack 2
.locals init (class [mscorlib]System.Func`1<!!T> V_0)
IL_0000: nop
IL_0001: ldarg.0
IL_0002: box !!T
IL_0007: ldftn !!0 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods::Return<!!0>(!!0)
IL_000d: newobj instance void class [mscorlib]System.Func`1<!!T>::.ctor(object,
native int)
IL_0012: stloc.0
IL_0013: br.s IL_0015
IL_0015: ldloc.0
IL_0016: ret
} // end of method NoExtensionMethods::AsFunc
.method private hidebysig static !!T Return<T>(!!T 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
// Code size 7 (0x7)
.maxstack 1
.locals init (!!T V_0)
IL_0000: nop
IL_0001: ldarg.0
IL_0002: stloc.0
IL_0003: br.s IL_0005
IL_0005: ldloc.0
IL_0006: ret
} // end of method NoExtensionMethods::Return
.method assembly hidebysig static class [mscorlib]System.Func`2<int32,int32>
ExtensionMethodAsStaticFunc() cil managed
{
// Code size 18 (0x12)
.maxstack 2
.locals init (class [mscorlib]System.Func`2<int32,int32> V_0)
IL_0000: nop
IL_0001: ldnull
IL_0002: ldftn !!0 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods::Return<int32>(!!0)
IL_0008: newobj instance void class [mscorlib]System.Func`2<int32,int32>::.ctor(object,
native int)
IL_000d: stloc.0
IL_000e: br.s IL_0010
IL_0010: ldloc.0
IL_0011: ret
} // end of method NoExtensionMethods::ExtensionMethodAsStaticFunc
.method assembly hidebysig static class [mscorlib]System.Func`1<object>
ExtensionMethodBoundToNull() cil managed
{
// Code size 18 (0x12)
.maxstack 2
.locals init (class [mscorlib]System.Func`1<object> V_0)
IL_0000: nop
IL_0001: ldnull
IL_0002: ldftn !!0 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods::Return<object>(!!0)
IL_0008: newobj instance void class [mscorlib]System.Func`1<object>::.ctor(object,
native int)
IL_000d: stloc.0
IL_000e: br.s IL_0010
IL_0010: ldloc.0
IL_0011: ret
} // end of method NoExtensionMethods::ExtensionMethodBoundToNull
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

93
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoExtensionMethods.opt.net40.roslyn.il

@ -1,93 +0,0 @@
// 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 tmpA29A
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
.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 tmpA29A.tmp
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class private abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
.method assembly hidebysig static class [mscorlib]System.Func`1<!!T>
AsFunc<class T>(!!T 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
// Code size 18 (0x12)
.maxstack 8
IL_0000: ldarg.0
IL_0001: box !!T
IL_0006: ldftn !!0 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods::Return<!!0>(!!0)
IL_000c: newobj instance void class [mscorlib]System.Func`1<!!T>::.ctor(object,
native int)
IL_0011: ret
} // end of method NoExtensionMethods::AsFunc
.method private hidebysig static !!T Return<T>(!!T 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ret
} // end of method NoExtensionMethods::Return
.method assembly hidebysig static class [mscorlib]System.Func`2<int32,int32>
ExtensionMethodAsStaticFunc() cil managed
{
// Code size 13 (0xd)
.maxstack 8
IL_0000: ldnull
IL_0001: ldftn !!0 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods::Return<int32>(!!0)
IL_0007: newobj instance void class [mscorlib]System.Func`2<int32,int32>::.ctor(object,
native int)
IL_000c: ret
} // end of method NoExtensionMethods::ExtensionMethodAsStaticFunc
.method assembly hidebysig static class [mscorlib]System.Func`1<object>
ExtensionMethodBoundToNull() cil managed
{
// Code size 13 (0xd)
.maxstack 8
IL_0000: ldnull
IL_0001: ldftn !!0 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods::Return<object>(!!0)
IL_0007: newobj instance void class [mscorlib]System.Func`1<object>::.ctor(object,
native int)
IL_000c: ret
} // end of method NoExtensionMethods::ExtensionMethodBoundToNull
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

93
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoExtensionMethods.opt.roslyn.il

@ -1,93 +0,0 @@
// 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 NoExtensionMethods
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
.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 NoExtensionMethods.dll
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class private abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
.method assembly hidebysig static class [mscorlib]System.Func`1<!!T>
AsFunc<class T>(!!T 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
// Code size 18 (0x12)
.maxstack 8
IL_0000: ldarg.0
IL_0001: box !!T
IL_0006: ldftn !!0 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods::Return<!!0>(!!0)
IL_000c: newobj instance void class [mscorlib]System.Func`1<!!T>::.ctor(object,
native int)
IL_0011: ret
} // end of method NoExtensionMethods::AsFunc
.method private hidebysig static !!T Return<T>(!!T 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ret
} // end of method NoExtensionMethods::Return
.method assembly hidebysig static class [mscorlib]System.Func`2<int32,int32>
ExtensionMethodAsStaticFunc() cil managed
{
// Code size 13 (0xd)
.maxstack 8
IL_0000: ldnull
IL_0001: ldftn !!0 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods::Return<int32>(!!0)
IL_0007: newobj instance void class [mscorlib]System.Func`2<int32,int32>::.ctor(object,
native int)
IL_000c: ret
} // end of method NoExtensionMethods::ExtensionMethodAsStaticFunc
.method assembly hidebysig static class [mscorlib]System.Func`1<object>
ExtensionMethodBoundToNull() cil managed
{
// Code size 13 (0xd)
.maxstack 8
IL_0000: ldnull
IL_0001: ldftn !!0 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods::Return<object>(!!0)
IL_0007: newobj instance void class [mscorlib]System.Func`1<object>::.ctor(object,
native int)
IL_000c: ret
} // end of method NoExtensionMethods::ExtensionMethodBoundToNull
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

117
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoExtensionMethods.roslyn.il

@ -1,117 +0,0 @@
// 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 NoExtensionMethods
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
.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 NoExtensionMethods.dll
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class private abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
.method assembly hidebysig static class [mscorlib]System.Func`1<!!T>
AsFunc<class T>(!!T 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
// Code size 23 (0x17)
.maxstack 2
.locals init (class [mscorlib]System.Func`1<!!T> V_0)
IL_0000: nop
IL_0001: ldarg.0
IL_0002: box !!T
IL_0007: ldftn !!0 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods::Return<!!0>(!!0)
IL_000d: newobj instance void class [mscorlib]System.Func`1<!!T>::.ctor(object,
native int)
IL_0012: stloc.0
IL_0013: br.s IL_0015
IL_0015: ldloc.0
IL_0016: ret
} // end of method NoExtensionMethods::AsFunc
.method private hidebysig static !!T Return<T>(!!T 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
// Code size 7 (0x7)
.maxstack 1
.locals init (!!T V_0)
IL_0000: nop
IL_0001: ldarg.0
IL_0002: stloc.0
IL_0003: br.s IL_0005
IL_0005: ldloc.0
IL_0006: ret
} // end of method NoExtensionMethods::Return
.method assembly hidebysig static class [mscorlib]System.Func`2<int32,int32>
ExtensionMethodAsStaticFunc() cil managed
{
// Code size 18 (0x12)
.maxstack 2
.locals init (class [mscorlib]System.Func`2<int32,int32> V_0)
IL_0000: nop
IL_0001: ldnull
IL_0002: ldftn !!0 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods::Return<int32>(!!0)
IL_0008: newobj instance void class [mscorlib]System.Func`2<int32,int32>::.ctor(object,
native int)
IL_000d: stloc.0
IL_000e: br.s IL_0010
IL_0010: ldloc.0
IL_0011: ret
} // end of method NoExtensionMethods::ExtensionMethodAsStaticFunc
.method assembly hidebysig static class [mscorlib]System.Func`1<object>
ExtensionMethodBoundToNull() cil managed
{
// Code size 18 (0x12)
.maxstack 2
.locals init (class [mscorlib]System.Func`1<object> V_0)
IL_0000: nop
IL_0001: ldnull
IL_0002: ldftn !!0 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods::Return<object>(!!0)
IL_0008: newobj instance void class [mscorlib]System.Func`1<object>::.ctor(object,
native int)
IL_000d: stloc.0
IL_000e: br.s IL_0010
IL_0010: ldloc.0
IL_0011: ret
} // end of method NoExtensionMethods::ExtensionMethodBoundToNull
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

156
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.il

@ -1,156 +0,0 @@
// 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 rerff2f0
{
.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.
.permissionset reqmin
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}}
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module rerff2f0.dll
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoForEachStatement
extends [mscorlib]System.Object
{
.method public hidebysig static void SimpleNonGenericForeach(class [mscorlib]System.Collections.IEnumerable enumerable) cil managed
{
// Code size 64 (0x40)
.maxstack 2
.locals init (object V_0,
class [mscorlib]System.Collections.IEnumerator V_1,
bool V_2,
class [mscorlib]System.IDisposable V_3)
IL_0000: nop
IL_0001: nop
IL_0002: ldarg.0
IL_0003: callvirt instance class [mscorlib]System.Collections.IEnumerator [mscorlib]System.Collections.IEnumerable::GetEnumerator()
IL_0008: stloc.1
.try
{
IL_0009: br.s IL_001b
IL_000b: ldloc.1
IL_000c: callvirt instance object [mscorlib]System.Collections.IEnumerator::get_Current()
IL_0011: stloc.0
IL_0012: nop
IL_0013: ldloc.0
IL_0014: call void [mscorlib]System.Console::WriteLine(object)
IL_0019: nop
IL_001a: nop
IL_001b: ldloc.1
IL_001c: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext()
IL_0021: stloc.2
IL_0022: ldloc.2
IL_0023: brtrue.s IL_000b
IL_0025: leave.s IL_003e
} // end .try
finally
{
IL_0027: ldloc.1
IL_0028: isinst [mscorlib]System.IDisposable
IL_002d: stloc.3
IL_002e: ldloc.3
IL_002f: ldnull
IL_0030: ceq
IL_0032: stloc.2
IL_0033: ldloc.2
IL_0034: brtrue.s IL_003d
IL_0036: ldloc.3
IL_0037: callvirt instance void [mscorlib]System.IDisposable::Dispose()
IL_003c: nop
IL_003d: endfinally
} // end handler
IL_003e: nop
IL_003f: ret
} // end of method NoForEachStatement::SimpleNonGenericForeach
.method public hidebysig static void SimpleForeachOverInts(class [mscorlib]System.Collections.Generic.IEnumerable`1<int32> enumerable) cil managed
{
// Code size 57 (0x39)
.maxstack 2
.locals init (int32 V_0,
class [mscorlib]System.Collections.Generic.IEnumerator`1<int32> V_1,
bool V_2)
IL_0000: nop
IL_0001: nop
IL_0002: ldarg.0
IL_0003: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1<!0> class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator()
IL_0008: stloc.1
.try
{
IL_0009: br.s IL_001b
IL_000b: ldloc.1
IL_000c: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
IL_0011: stloc.0
IL_0012: nop
IL_0013: ldloc.0
IL_0014: call void [mscorlib]System.Console::WriteLine(int32)
IL_0019: nop
IL_001a: nop
IL_001b: ldloc.1
IL_001c: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext()
IL_0021: stloc.2
IL_0022: ldloc.2
IL_0023: brtrue.s IL_000b
IL_0025: leave.s IL_0037
} // end .try
finally
{
IL_0027: ldloc.1
IL_0028: ldnull
IL_0029: ceq
IL_002b: stloc.2
IL_002c: ldloc.2
IL_002d: brtrue.s IL_0036
IL_002f: ldloc.1
IL_0030: callvirt instance void [mscorlib]System.IDisposable::Dispose()
IL_0035: nop
IL_0036: endfinally
} // end handler
IL_0037: nop
IL_0038: ret
} // end of method NoForEachStatement::SimpleForeachOverInts
.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 NoForEachStatement::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoForEachStatement
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

145
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.net40.roslyn.il

@ -1,145 +0,0 @@
// 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 tmpA7E1
{
.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 tmpA7E1.tmp
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoForEachStatement
extends [mscorlib]System.Object
{
.method public hidebysig static void SimpleNonGenericForeach(class [mscorlib]System.Collections.IEnumerable enumerable) cil managed
{
// Code size 56 (0x38)
.maxstack 1
.locals init (class [mscorlib]System.Collections.IEnumerator V_0,
object V_1,
class [mscorlib]System.IDisposable V_2)
IL_0000: nop
IL_0001: nop
IL_0002: ldarg.0
IL_0003: callvirt instance class [mscorlib]System.Collections.IEnumerator [mscorlib]System.Collections.IEnumerable::GetEnumerator()
IL_0008: stloc.0
.try
{
IL_0009: br.s IL_001b
IL_000b: ldloc.0
IL_000c: callvirt instance object [mscorlib]System.Collections.IEnumerator::get_Current()
IL_0011: stloc.1
IL_0012: nop
IL_0013: ldloc.1
IL_0014: call void [mscorlib]System.Console::WriteLine(object)
IL_0019: nop
IL_001a: nop
IL_001b: ldloc.0
IL_001c: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext()
IL_0021: brtrue.s IL_000b
IL_0023: leave.s IL_0037
} // end .try
finally
{
IL_0025: ldloc.0
IL_0026: isinst [mscorlib]System.IDisposable
IL_002b: stloc.2
IL_002c: ldloc.2
IL_002d: brfalse.s IL_0036
IL_002f: ldloc.2
IL_0030: callvirt instance void [mscorlib]System.IDisposable::Dispose()
IL_0035: nop
IL_0036: endfinally
} // end handler
IL_0037: ret
} // end of method NoForEachStatement::SimpleNonGenericForeach
.method public hidebysig static void SimpleForeachOverInts(class [mscorlib]System.Collections.Generic.IEnumerable`1<int32> enumerable) cil managed
{
// Code size 49 (0x31)
.maxstack 1
.locals init (class [mscorlib]System.Collections.Generic.IEnumerator`1<int32> V_0,
int32 V_1)
IL_0000: nop
IL_0001: nop
IL_0002: ldarg.0
IL_0003: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1<!0> class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator()
IL_0008: stloc.0
.try
{
IL_0009: br.s IL_001b
IL_000b: ldloc.0
IL_000c: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
IL_0011: stloc.1
IL_0012: nop
IL_0013: ldloc.1
IL_0014: call void [mscorlib]System.Console::WriteLine(int32)
IL_0019: nop
IL_001a: nop
IL_001b: ldloc.0
IL_001c: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext()
IL_0021: brtrue.s IL_000b
IL_0023: leave.s IL_0030
} // end .try
finally
{
IL_0025: ldloc.0
IL_0026: brfalse.s IL_002f
IL_0028: ldloc.0
IL_0029: callvirt instance void [mscorlib]System.IDisposable::Dispose()
IL_002e: nop
IL_002f: endfinally
} // end handler
IL_0030: ret
} // end of method NoForEachStatement::SimpleForeachOverInts
.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 NoForEachStatement::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoForEachStatement
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

128
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.opt.il

@ -1,128 +0,0 @@
// 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 prqfqkbt
{
.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.
.permissionset reqmin
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}}
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module prqfqkbt.dll
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoForEachStatement
extends [mscorlib]System.Object
{
.method public hidebysig static void SimpleNonGenericForeach(class [mscorlib]System.Collections.IEnumerable enumerable) cil managed
{
// Code size 50 (0x32)
.maxstack 1
.locals init (object V_0,
class [mscorlib]System.Collections.IEnumerator V_1,
class [mscorlib]System.IDisposable V_2)
IL_0000: ldarg.0
IL_0001: callvirt instance class [mscorlib]System.Collections.IEnumerator [mscorlib]System.Collections.IEnumerable::GetEnumerator()
IL_0006: stloc.1
.try
{
IL_0007: br.s IL_0016
IL_0009: ldloc.1
IL_000a: callvirt instance object [mscorlib]System.Collections.IEnumerator::get_Current()
IL_000f: stloc.0
IL_0010: ldloc.0
IL_0011: call void [mscorlib]System.Console::WriteLine(object)
IL_0016: ldloc.1
IL_0017: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext()
IL_001c: brtrue.s IL_0009
IL_001e: leave.s IL_0031
} // end .try
finally
{
IL_0020: ldloc.1
IL_0021: isinst [mscorlib]System.IDisposable
IL_0026: stloc.2
IL_0027: ldloc.2
IL_0028: brfalse.s IL_0030
IL_002a: ldloc.2
IL_002b: callvirt instance void [mscorlib]System.IDisposable::Dispose()
IL_0030: endfinally
} // end handler
IL_0031: ret
} // end of method NoForEachStatement::SimpleNonGenericForeach
.method public hidebysig static void SimpleForeachOverInts(class [mscorlib]System.Collections.Generic.IEnumerable`1<int32> enumerable) cil managed
{
// Code size 43 (0x2b)
.maxstack 1
.locals init (int32 V_0,
class [mscorlib]System.Collections.Generic.IEnumerator`1<int32> V_1)
IL_0000: ldarg.0
IL_0001: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1<!0> class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator()
IL_0006: stloc.1
.try
{
IL_0007: br.s IL_0016
IL_0009: ldloc.1
IL_000a: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
IL_000f: stloc.0
IL_0010: ldloc.0
IL_0011: call void [mscorlib]System.Console::WriteLine(int32)
IL_0016: ldloc.1
IL_0017: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext()
IL_001c: brtrue.s IL_0009
IL_001e: leave.s IL_002a
} // end .try
finally
{
IL_0020: ldloc.1
IL_0021: brfalse.s IL_0029
IL_0023: ldloc.1
IL_0024: callvirt instance void [mscorlib]System.IDisposable::Dispose()
IL_0029: endfinally
} // end handler
IL_002a: ret
} // end of method NoForEachStatement::SimpleForeachOverInts
.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 NoForEachStatement::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoForEachStatement
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

126
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.opt.net40.roslyn.il

@ -1,126 +0,0 @@
// 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 tmpAA15
{
.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 tmpAA15.tmp
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoForEachStatement
extends [mscorlib]System.Object
{
.method public hidebysig static void SimpleNonGenericForeach(class [mscorlib]System.Collections.IEnumerable enumerable) cil managed
{
// Code size 48 (0x30)
.maxstack 1
.locals init (class [mscorlib]System.Collections.IEnumerator V_0,
class [mscorlib]System.IDisposable V_1)
IL_0000: ldarg.0
IL_0001: callvirt instance class [mscorlib]System.Collections.IEnumerator [mscorlib]System.Collections.IEnumerable::GetEnumerator()
IL_0006: stloc.0
.try
{
IL_0007: br.s IL_0014
IL_0009: ldloc.0
IL_000a: callvirt instance object [mscorlib]System.Collections.IEnumerator::get_Current()
IL_000f: call void [mscorlib]System.Console::WriteLine(object)
IL_0014: ldloc.0
IL_0015: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext()
IL_001a: brtrue.s IL_0009
IL_001c: leave.s IL_002f
} // end .try
finally
{
IL_001e: ldloc.0
IL_001f: isinst [mscorlib]System.IDisposable
IL_0024: stloc.1
IL_0025: ldloc.1
IL_0026: brfalse.s IL_002e
IL_0028: ldloc.1
IL_0029: callvirt instance void [mscorlib]System.IDisposable::Dispose()
IL_002e: endfinally
} // end handler
IL_002f: ret
} // end of method NoForEachStatement::SimpleNonGenericForeach
.method public hidebysig static void SimpleForeachOverInts(class [mscorlib]System.Collections.Generic.IEnumerable`1<int32> enumerable) cil managed
{
// Code size 41 (0x29)
.maxstack 1
.locals init (class [mscorlib]System.Collections.Generic.IEnumerator`1<int32> V_0)
IL_0000: ldarg.0
IL_0001: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1<!0> class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator()
IL_0006: stloc.0
.try
{
IL_0007: br.s IL_0014
IL_0009: ldloc.0
IL_000a: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
IL_000f: call void [mscorlib]System.Console::WriteLine(int32)
IL_0014: ldloc.0
IL_0015: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext()
IL_001a: brtrue.s IL_0009
IL_001c: leave.s IL_0028
} // end .try
finally
{
IL_001e: ldloc.0
IL_001f: brfalse.s IL_0027
IL_0021: ldloc.0
IL_0022: callvirt instance void [mscorlib]System.IDisposable::Dispose()
IL_0027: endfinally
} // end handler
IL_0028: ret
} // end of method NoForEachStatement::SimpleForeachOverInts
.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 NoForEachStatement::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoForEachStatement
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

126
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.opt.roslyn.il

@ -1,126 +0,0 @@
// 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 NoForEachStatement
{
.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 NoForEachStatement.dll
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoForEachStatement
extends [mscorlib]System.Object
{
.method public hidebysig static void SimpleNonGenericForeach(class [mscorlib]System.Collections.IEnumerable enumerable) cil managed
{
// Code size 48 (0x30)
.maxstack 1
.locals init (class [mscorlib]System.Collections.IEnumerator V_0,
class [mscorlib]System.IDisposable V_1)
IL_0000: ldarg.0
IL_0001: callvirt instance class [mscorlib]System.Collections.IEnumerator [mscorlib]System.Collections.IEnumerable::GetEnumerator()
IL_0006: stloc.0
.try
{
IL_0007: br.s IL_0014
IL_0009: ldloc.0
IL_000a: callvirt instance object [mscorlib]System.Collections.IEnumerator::get_Current()
IL_000f: call void [mscorlib]System.Console::WriteLine(object)
IL_0014: ldloc.0
IL_0015: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext()
IL_001a: brtrue.s IL_0009
IL_001c: leave.s IL_002f
} // end .try
finally
{
IL_001e: ldloc.0
IL_001f: isinst [mscorlib]System.IDisposable
IL_0024: stloc.1
IL_0025: ldloc.1
IL_0026: brfalse.s IL_002e
IL_0028: ldloc.1
IL_0029: callvirt instance void [mscorlib]System.IDisposable::Dispose()
IL_002e: endfinally
} // end handler
IL_002f: ret
} // end of method NoForEachStatement::SimpleNonGenericForeach
.method public hidebysig static void SimpleForeachOverInts(class [mscorlib]System.Collections.Generic.IEnumerable`1<int32> enumerable) cil managed
{
// Code size 41 (0x29)
.maxstack 1
.locals init (class [mscorlib]System.Collections.Generic.IEnumerator`1<int32> V_0)
IL_0000: ldarg.0
IL_0001: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1<!0> class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator()
IL_0006: stloc.0
.try
{
IL_0007: br.s IL_0014
IL_0009: ldloc.0
IL_000a: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
IL_000f: call void [mscorlib]System.Console::WriteLine(int32)
IL_0014: ldloc.0
IL_0015: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext()
IL_001a: brtrue.s IL_0009
IL_001c: leave.s IL_0028
} // end .try
finally
{
IL_001e: ldloc.0
IL_001f: brfalse.s IL_0027
IL_0021: ldloc.0
IL_0022: callvirt instance void [mscorlib]System.IDisposable::Dispose()
IL_0027: endfinally
} // end handler
IL_0028: ret
} // end of method NoForEachStatement::SimpleForeachOverInts
.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 NoForEachStatement::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoForEachStatement
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

145
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.roslyn.il

@ -1,145 +0,0 @@
// 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 NoForEachStatement
{
.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 NoForEachStatement.dll
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoForEachStatement
extends [mscorlib]System.Object
{
.method public hidebysig static void SimpleNonGenericForeach(class [mscorlib]System.Collections.IEnumerable enumerable) cil managed
{
// Code size 56 (0x38)
.maxstack 1
.locals init (class [mscorlib]System.Collections.IEnumerator V_0,
object V_1,
class [mscorlib]System.IDisposable V_2)
IL_0000: nop
IL_0001: nop
IL_0002: ldarg.0
IL_0003: callvirt instance class [mscorlib]System.Collections.IEnumerator [mscorlib]System.Collections.IEnumerable::GetEnumerator()
IL_0008: stloc.0
.try
{
IL_0009: br.s IL_001b
IL_000b: ldloc.0
IL_000c: callvirt instance object [mscorlib]System.Collections.IEnumerator::get_Current()
IL_0011: stloc.1
IL_0012: nop
IL_0013: ldloc.1
IL_0014: call void [mscorlib]System.Console::WriteLine(object)
IL_0019: nop
IL_001a: nop
IL_001b: ldloc.0
IL_001c: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext()
IL_0021: brtrue.s IL_000b
IL_0023: leave.s IL_0037
} // end .try
finally
{
IL_0025: ldloc.0
IL_0026: isinst [mscorlib]System.IDisposable
IL_002b: stloc.2
IL_002c: ldloc.2
IL_002d: brfalse.s IL_0036
IL_002f: ldloc.2
IL_0030: callvirt instance void [mscorlib]System.IDisposable::Dispose()
IL_0035: nop
IL_0036: endfinally
} // end handler
IL_0037: ret
} // end of method NoForEachStatement::SimpleNonGenericForeach
.method public hidebysig static void SimpleForeachOverInts(class [mscorlib]System.Collections.Generic.IEnumerable`1<int32> enumerable) cil managed
{
// Code size 49 (0x31)
.maxstack 1
.locals init (class [mscorlib]System.Collections.Generic.IEnumerator`1<int32> V_0,
int32 V_1)
IL_0000: nop
IL_0001: nop
IL_0002: ldarg.0
IL_0003: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1<!0> class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator()
IL_0008: stloc.0
.try
{
IL_0009: br.s IL_001b
IL_000b: ldloc.0
IL_000c: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
IL_0011: stloc.1
IL_0012: nop
IL_0013: ldloc.1
IL_0014: call void [mscorlib]System.Console::WriteLine(int32)
IL_0019: nop
IL_001a: nop
IL_001b: ldloc.0
IL_001c: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext()
IL_0021: brtrue.s IL_000b
IL_0023: leave.s IL_0030
} // end .try
finally
{
IL_0025: ldloc.0
IL_0026: brfalse.s IL_002f
IL_0028: ldloc.0
IL_0029: callvirt instance void [mscorlib]System.IDisposable::Dispose()
IL_002e: nop
IL_002f: endfinally
} // end handler
IL_0030: ret
} // end of method NoForEachStatement::SimpleForeachOverInts
.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 NoForEachStatement::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoForEachStatement
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

10
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.Expected.cs

@ -44,9 +44,9 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Ugly
private static void SimpleCapture() private static void SimpleCapture()
{ {
_003C_003Ec__DisplayClass1_0 A_ = default(_003C_003Ec__DisplayClass1_0); _003C_003Ec__DisplayClass1_0 _003C_003Ec__DisplayClass1_1 = default(_003C_003Ec__DisplayClass1_0);
A_.x = 1; _003C_003Ec__DisplayClass1_1.x = 1;
_003CSimpleCapture_003Eg__F_007C1_0(ref A_); _003CSimpleCapture_003Eg__F_007C1_0(ref _003C_003Ec__DisplayClass1_1);
} }
private static void SimpleCaptureWithRef() private static void SimpleCaptureWithRef()
@ -69,9 +69,9 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Ugly
} }
[CompilerGenerated] [CompilerGenerated]
private static int _003CSimpleCapture_003Eg__F_007C1_0(ref _003C_003Ec__DisplayClass1_0 A_0) private static int _003CSimpleCapture_003Eg__F_007C1_0(ref _003C_003Ec__DisplayClass1_0 P_0)
{ {
return 42 + A_0.x; return 42 + P_0.x;
} }
} }
} }

179
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.net40.roslyn.il

@ -1,179 +0,0 @@
// 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 tmpADF1
{
.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 tmpADF1.tmp
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class public auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle
extends [mscorlib]System.Object
{
.field private initonly class [mscorlib]System.Func`1<int32> _func
.method public hidebysig specialname rtspecialname
instance void .ctor(class [mscorlib]System.Func`1<int32> func) cil managed
{
// Code size 16 (0x10)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop
IL_0007: nop
IL_0008: ldarg.0
IL_0009: ldarg.1
IL_000a: stfld class [mscorlib]System.Func`1<int32> ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle::_func
IL_000f: ret
} // end of method Handle::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle
.class public abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions
extends [mscorlib]System.Object
{
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass1_0'
extends [mscorlib]System.ValueType
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public int32 x
} // end of class '<>c__DisplayClass1_0'
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass2_0'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public int32 x
.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 '<>c__DisplayClass2_0'::.ctor
.method assembly hidebysig instance int32
'<SimpleCaptureWithRef>g__F|0'() cil managed
{
// Code size 10 (0xa)
.maxstack 8
IL_0000: ldc.i4.s 42
IL_0002: ldarg.0
IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::x
IL_0008: add
IL_0009: ret
} // end of method '<>c__DisplayClass2_0'::'<SimpleCaptureWithRef>g__F|0'
} // end of class '<>c__DisplayClass2_0'
.method private hidebysig static void UseLocalFunctionReference() cil managed
{
// Code size 21 (0x15)
.maxstack 2
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle V_0)
IL_0000: nop
IL_0001: nop
IL_0002: ldnull
IL_0003: ldftn int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions::'<UseLocalFunctionReference>g__F|0_0'()
IL_0009: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object,
native int)
IL_000e: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle::.ctor(class [mscorlib]System.Func`1<int32>)
IL_0013: stloc.0
IL_0014: ret
} // end of method NoLocalFunctions::UseLocalFunctionReference
.method private hidebysig static void SimpleCapture() cil managed
{
// Code size 19 (0x13)
.maxstack 2
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0' V_0)
IL_0000: nop
IL_0001: ldloca.s V_0
IL_0003: ldc.i4.1
IL_0004: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'::x
IL_0009: nop
IL_000a: ldloca.s V_0
IL_000c: call int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions::'<SimpleCapture>g__F|1_0'(valuetype ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'&)
IL_0011: pop
IL_0012: ret
} // end of method NoLocalFunctions::SimpleCapture
.method private hidebysig static void SimpleCaptureWithRef() cil managed
{
// Code size 34 (0x22)
.maxstack 2
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0' V_0,
class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle V_1)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::.ctor()
IL_0005: stloc.0
IL_0006: nop
IL_0007: ldloc.0
IL_0008: ldc.i4.1
IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::x
IL_000e: nop
IL_000f: ldloc.0
IL_0010: ldftn instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::'<SimpleCaptureWithRef>g__F|0'()
IL_0016: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object,
native int)
IL_001b: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle::.ctor(class [mscorlib]System.Func`1<int32>)
IL_0020: stloc.1
IL_0021: ret
} // end of method NoLocalFunctions::SimpleCaptureWithRef
.method assembly hidebysig static int32
'<UseLocalFunctionReference>g__F|0_0'() cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 3 (0x3)
.maxstack 8
IL_0000: ldc.i4.s 42
IL_0002: ret
} // end of method NoLocalFunctions::'<UseLocalFunctionReference>g__F|0_0'
.method assembly hidebysig static int32
'<SimpleCapture>g__F|1_0'(valuetype ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'& A_0) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 10 (0xa)
.maxstack 8
IL_0000: ldc.i4.s 42
IL_0002: ldarg.0
IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'::x
IL_0008: add
IL_0009: ret
} // end of method NoLocalFunctions::'<SimpleCapture>g__F|1_0'
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

165
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.opt.net40.roslyn.il

@ -1,165 +0,0 @@
// 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 tmpAE03
{
.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 tmpAE03.tmp
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class public auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle
extends [mscorlib]System.Object
{
.field private initonly class [mscorlib]System.Func`1<int32> _func
.method public hidebysig specialname rtspecialname
instance void .ctor(class [mscorlib]System.Func`1<int32> func) cil managed
{
// 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 class [mscorlib]System.Func`1<int32> ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle::_func
IL_000d: ret
} // end of method Handle::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle
.class public abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions
extends [mscorlib]System.Object
{
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass1_0'
extends [mscorlib]System.ValueType
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public int32 x
} // end of class '<>c__DisplayClass1_0'
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass2_0'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public int32 x
.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 '<>c__DisplayClass2_0'::.ctor
.method assembly hidebysig instance int32
'<SimpleCaptureWithRef>g__F|0'() cil managed
{
// Code size 10 (0xa)
.maxstack 8
IL_0000: ldc.i4.s 42
IL_0002: ldarg.0
IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::x
IL_0008: add
IL_0009: ret
} // end of method '<>c__DisplayClass2_0'::'<SimpleCaptureWithRef>g__F|0'
} // end of class '<>c__DisplayClass2_0'
.method private hidebysig static void UseLocalFunctionReference() cil managed
{
// Code size 19 (0x13)
.maxstack 8
IL_0000: ldnull
IL_0001: ldftn int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions::'<UseLocalFunctionReference>g__F|0_0'()
IL_0007: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object,
native int)
IL_000c: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle::.ctor(class [mscorlib]System.Func`1<int32>)
IL_0011: pop
IL_0012: ret
} // end of method NoLocalFunctions::UseLocalFunctionReference
.method private hidebysig static void SimpleCapture() cil managed
{
// Code size 17 (0x11)
.maxstack 2
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0' V_0)
IL_0000: ldloca.s V_0
IL_0002: ldc.i4.1
IL_0003: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'::x
IL_0008: ldloca.s V_0
IL_000a: call int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions::'<SimpleCapture>g__F|1_0'(valuetype ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'&)
IL_000f: pop
IL_0010: ret
} // end of method NoLocalFunctions::SimpleCapture
.method private hidebysig static void SimpleCaptureWithRef() cil managed
{
// Code size 30 (0x1e)
.maxstack 8
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::.ctor()
IL_0005: dup
IL_0006: ldc.i4.1
IL_0007: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::x
IL_000c: ldftn instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::'<SimpleCaptureWithRef>g__F|0'()
IL_0012: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object,
native int)
IL_0017: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle::.ctor(class [mscorlib]System.Func`1<int32>)
IL_001c: pop
IL_001d: ret
} // end of method NoLocalFunctions::SimpleCaptureWithRef
.method assembly hidebysig static int32
'<UseLocalFunctionReference>g__F|0_0'() cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 3 (0x3)
.maxstack 8
IL_0000: ldc.i4.s 42
IL_0002: ret
} // end of method NoLocalFunctions::'<UseLocalFunctionReference>g__F|0_0'
.method assembly hidebysig static int32
'<SimpleCapture>g__F|1_0'(valuetype ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'& A_0) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 10 (0xa)
.maxstack 8
IL_0000: ldc.i4.s 42
IL_0002: ldarg.0
IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'::x
IL_0008: add
IL_0009: ret
} // end of method NoLocalFunctions::'<SimpleCapture>g__F|1_0'
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

165
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.opt.roslyn.il

@ -1,165 +0,0 @@
// 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 NoLocalFunctions
{
.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 NoLocalFunctions.dll
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class public auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle
extends [mscorlib]System.Object
{
.field private initonly class [mscorlib]System.Func`1<int32> _func
.method public hidebysig specialname rtspecialname
instance void .ctor(class [mscorlib]System.Func`1<int32> func) cil managed
{
// 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 class [mscorlib]System.Func`1<int32> ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle::_func
IL_000d: ret
} // end of method Handle::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle
.class public abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions
extends [mscorlib]System.Object
{
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass1_0'
extends [mscorlib]System.ValueType
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public int32 x
} // end of class '<>c__DisplayClass1_0'
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass2_0'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public int32 x
.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 '<>c__DisplayClass2_0'::.ctor
.method assembly hidebysig instance int32
'<SimpleCaptureWithRef>g__F|0'() cil managed
{
// Code size 10 (0xa)
.maxstack 8
IL_0000: ldc.i4.s 42
IL_0002: ldarg.0
IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::x
IL_0008: add
IL_0009: ret
} // end of method '<>c__DisplayClass2_0'::'<SimpleCaptureWithRef>g__F|0'
} // end of class '<>c__DisplayClass2_0'
.method private hidebysig static void UseLocalFunctionReference() cil managed
{
// Code size 19 (0x13)
.maxstack 8
IL_0000: ldnull
IL_0001: ldftn int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions::'<UseLocalFunctionReference>g__F|0_0'()
IL_0007: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object,
native int)
IL_000c: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle::.ctor(class [mscorlib]System.Func`1<int32>)
IL_0011: pop
IL_0012: ret
} // end of method NoLocalFunctions::UseLocalFunctionReference
.method private hidebysig static void SimpleCapture() cil managed
{
// Code size 17 (0x11)
.maxstack 2
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0' V_0)
IL_0000: ldloca.s V_0
IL_0002: ldc.i4.1
IL_0003: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'::x
IL_0008: ldloca.s V_0
IL_000a: call int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions::'<SimpleCapture>g__F|1_0'(valuetype ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'&)
IL_000f: pop
IL_0010: ret
} // end of method NoLocalFunctions::SimpleCapture
.method private hidebysig static void SimpleCaptureWithRef() cil managed
{
// Code size 30 (0x1e)
.maxstack 8
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::.ctor()
IL_0005: dup
IL_0006: ldc.i4.1
IL_0007: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::x
IL_000c: ldftn instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::'<SimpleCaptureWithRef>g__F|0'()
IL_0012: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object,
native int)
IL_0017: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle::.ctor(class [mscorlib]System.Func`1<int32>)
IL_001c: pop
IL_001d: ret
} // end of method NoLocalFunctions::SimpleCaptureWithRef
.method assembly hidebysig static int32
'<UseLocalFunctionReference>g__F|0_0'() cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 3 (0x3)
.maxstack 8
IL_0000: ldc.i4.s 42
IL_0002: ret
} // end of method NoLocalFunctions::'<UseLocalFunctionReference>g__F|0_0'
.method assembly hidebysig static int32
'<SimpleCapture>g__F|1_0'(valuetype ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'& A_0) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 10 (0xa)
.maxstack 8
IL_0000: ldc.i4.s 42
IL_0002: ldarg.0
IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'::x
IL_0008: add
IL_0009: ret
} // end of method NoLocalFunctions::'<SimpleCapture>g__F|1_0'
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

179
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.roslyn.il

@ -1,179 +0,0 @@
// 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 NoLocalFunctions
{
.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 NoLocalFunctions.dll
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class public auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle
extends [mscorlib]System.Object
{
.field private initonly class [mscorlib]System.Func`1<int32> _func
.method public hidebysig specialname rtspecialname
instance void .ctor(class [mscorlib]System.Func`1<int32> func) cil managed
{
// Code size 16 (0x10)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop
IL_0007: nop
IL_0008: ldarg.0
IL_0009: ldarg.1
IL_000a: stfld class [mscorlib]System.Func`1<int32> ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle::_func
IL_000f: ret
} // end of method Handle::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle
.class public abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions
extends [mscorlib]System.Object
{
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass1_0'
extends [mscorlib]System.ValueType
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public int32 x
} // end of class '<>c__DisplayClass1_0'
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass2_0'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public int32 x
.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 '<>c__DisplayClass2_0'::.ctor
.method assembly hidebysig instance int32
'<SimpleCaptureWithRef>g__F|0'() cil managed
{
// Code size 10 (0xa)
.maxstack 8
IL_0000: ldc.i4.s 42
IL_0002: ldarg.0
IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::x
IL_0008: add
IL_0009: ret
} // end of method '<>c__DisplayClass2_0'::'<SimpleCaptureWithRef>g__F|0'
} // end of class '<>c__DisplayClass2_0'
.method private hidebysig static void UseLocalFunctionReference() cil managed
{
// Code size 21 (0x15)
.maxstack 2
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle V_0)
IL_0000: nop
IL_0001: nop
IL_0002: ldnull
IL_0003: ldftn int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions::'<UseLocalFunctionReference>g__F|0_0'()
IL_0009: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object,
native int)
IL_000e: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle::.ctor(class [mscorlib]System.Func`1<int32>)
IL_0013: stloc.0
IL_0014: ret
} // end of method NoLocalFunctions::UseLocalFunctionReference
.method private hidebysig static void SimpleCapture() cil managed
{
// Code size 19 (0x13)
.maxstack 2
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0' V_0)
IL_0000: nop
IL_0001: ldloca.s V_0
IL_0003: ldc.i4.1
IL_0004: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'::x
IL_0009: nop
IL_000a: ldloca.s V_0
IL_000c: call int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions::'<SimpleCapture>g__F|1_0'(valuetype ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'&)
IL_0011: pop
IL_0012: ret
} // end of method NoLocalFunctions::SimpleCapture
.method private hidebysig static void SimpleCaptureWithRef() cil managed
{
// Code size 34 (0x22)
.maxstack 2
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0' V_0,
class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle V_1)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::.ctor()
IL_0005: stloc.0
IL_0006: nop
IL_0007: ldloc.0
IL_0008: ldc.i4.1
IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::x
IL_000e: nop
IL_000f: ldloc.0
IL_0010: ldftn instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::'<SimpleCaptureWithRef>g__F|0'()
IL_0016: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object,
native int)
IL_001b: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle::.ctor(class [mscorlib]System.Func`1<int32>)
IL_0020: stloc.1
IL_0021: ret
} // end of method NoLocalFunctions::SimpleCaptureWithRef
.method assembly hidebysig static int32
'<UseLocalFunctionReference>g__F|0_0'() cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 3 (0x3)
.maxstack 8
IL_0000: ldc.i4.s 42
IL_0002: ret
} // end of method NoLocalFunctions::'<UseLocalFunctionReference>g__F|0_0'
.method assembly hidebysig static int32
'<SimpleCapture>g__F|1_0'(valuetype ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'& A_0) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 10 (0xa)
.maxstack 8
IL_0000: ldc.i4.s 42
IL_0002: ldarg.0
IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'::x
IL_0008: add
IL_0009: ret
} // end of method NoLocalFunctions::'<SimpleCapture>g__F|1_0'
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

176
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.il

@ -1,176 +0,0 @@
// .NET IL Disassembler. Version 9.0.4
// 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 tmpvpdwr1
{
.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.
.permissionset reqmin
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}}
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module tmpvpdwr1.tmp
// MVID: {8447adbb-757d-4626-b7b7-846d745d90d0}
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoNewOfT`1<.ctor TOnType>
extends [mscorlib]System.Object
{
.method public hidebysig static !TOnType
CreateTOnType() cil managed
{
// Code size 39 (0x27)
.maxstack 1
.locals init (!TOnType V_0,
!TOnType V_1)
IL_0000: nop
IL_0001: ldloca.s V_1
IL_0003: initobj !TOnType
IL_0009: ldloc.1
IL_000a: box !TOnType
IL_000f: brfalse.s IL_001c
IL_0011: ldloca.s V_1
IL_0013: initobj !TOnType
IL_0019: ldloc.1
IL_001a: br.s IL_0021
IL_001c: call !!0 [mscorlib]System.Activator::CreateInstance<!TOnType>()
IL_0021: nop
IL_0022: stloc.0
IL_0023: br.s IL_0025
IL_0025: ldloc.0
IL_0026: ret
} // end of method NoNewOfT`1::CreateTOnType
.method public hidebysig static !!T CreateUnconstrainedT<.ctor T>() cil managed
{
// Code size 39 (0x27)
.maxstack 1
.locals init (!!T V_0,
!!T V_1)
IL_0000: nop
IL_0001: ldloca.s V_1
IL_0003: initobj !!T
IL_0009: ldloc.1
IL_000a: box !!T
IL_000f: brfalse.s IL_001c
IL_0011: ldloca.s V_1
IL_0013: initobj !!T
IL_0019: ldloc.1
IL_001a: br.s IL_0021
IL_001c: call !!0 [mscorlib]System.Activator::CreateInstance<!!0>()
IL_0021: nop
IL_0022: stloc.0
IL_0023: br.s IL_0025
IL_0025: ldloc.0
IL_0026: ret
} // end of method NoNewOfT`1::CreateUnconstrainedT
.method public hidebysig static !!T CreateClassT<class .ctor T>() cil managed
{
// Code size 11 (0xb)
.maxstack 1
.locals init (!!T V_0)
IL_0000: nop
IL_0001: call !!0 [mscorlib]System.Activator::CreateInstance<!!0>()
IL_0006: stloc.0
IL_0007: br.s IL_0009
IL_0009: ldloc.0
IL_000a: ret
} // end of method NoNewOfT`1::CreateClassT
.method public hidebysig static !!T CollectionInitializer<.ctor (class [mscorlib]System.Collections.Generic.IList`1<int32>) T>() cil managed
{
// Code size 106 (0x6a)
.maxstack 2
.locals init (!!T V_0,
!!T V_1,
!!T V_2)
IL_0000: nop
IL_0001: ldloca.s V_2
IL_0003: initobj !!T
IL_0009: ldloc.2
IL_000a: box !!T
IL_000f: brfalse.s IL_001c
IL_0011: ldloca.s V_2
IL_0013: initobj !!T
IL_0019: ldloc.2
IL_001a: br.s IL_0021
IL_001c: call !!0 [mscorlib]System.Activator::CreateInstance<!!0>()
IL_0021: nop
IL_0022: stloc.0
IL_0023: ldloc.0
IL_0024: box !!T
IL_0029: ldc.i4.1
IL_002a: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_002f: nop
IL_0030: ldloc.0
IL_0031: box !!T
IL_0036: ldc.i4.2
IL_0037: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_003c: nop
IL_003d: ldloc.0
IL_003e: box !!T
IL_0043: ldc.i4.3
IL_0044: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_0049: nop
IL_004a: ldloc.0
IL_004b: box !!T
IL_0050: ldc.i4.4
IL_0051: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_0056: nop
IL_0057: ldloc.0
IL_0058: box !!T
IL_005d: ldc.i4.5
IL_005e: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_0063: nop
IL_0064: ldloc.0
IL_0065: stloc.1
IL_0066: br.s IL_0068
IL_0068: ldloc.1
IL_0069: ret
} // end of method NoNewOfT`1::CollectionInitializer
.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 NoNewOfT`1::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoNewOfT`1
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

241
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.net40.roslyn.il

@ -1,241 +0,0 @@
// .NET IL Disassembler. Version 9.0.4
// 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 tmpyccvci
{
.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 tmpyccvci.tmp
// MVID: {ff6a33b6-7f19-447b-b168-f5c528dc4b6f}
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void System.Runtime.CompilerServices.RefSafetyRulesAttribute::.ctor(int32) = ( 01 00 0B 00 00 00 00 00 )
.imagebase 0x10000000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// =============== 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.RefSafetyRulesAttribute
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 )
.custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 02 00 00 00 02 00 54 02 0D 41 6C 6C 6F 77 // ........T..Allow
4D 75 6C 74 69 70 6C 65 00 54 02 09 49 6E 68 65 // Multiple.T..Inhe
72 69 74 65 64 00 ) // rited.
.field public initonly int32 Version
.method public hidebysig specialname rtspecialname
instance void .ctor(int32 A_1) cil managed
{
// Code size 15 (0xf)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Attribute::.ctor()
IL_0006: nop
IL_0007: ldarg.0
IL_0008: ldarg.1
IL_0009: stfld int32 System.Runtime.CompilerServices.RefSafetyRulesAttribute::Version
IL_000e: ret
} // end of method RefSafetyRulesAttribute::.ctor
} // end of class System.Runtime.CompilerServices.RefSafetyRulesAttribute
.class private auto ansi sealed beforefieldinit System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute
extends [mscorlib]System.Attribute
{
.custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 02 00 54 02 0D 41 6C 6C 6F 77 // ........T..Allow
4D 75 6C 74 69 70 6C 65 01 54 02 09 49 6E 68 65 // Multiple.T..Inhe
72 69 74 65 64 00 ) // rited.
.method public hidebysig specialname rtspecialname
instance void .ctor(string featureName) cil managed
{
// Code size 9 (0x9)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Attribute::.ctor()
IL_0006: nop
IL_0007: nop
IL_0008: ret
} // end of method CompilerFeatureRequiredAttribute::.ctor
} // end of class System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute
.class private auto ansi beforefieldinit System.Runtime.CompilerServices.IsExternalInit
extends [mscorlib]System.Object
{
.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 IsExternalInit::.ctor
} // end of class System.Runtime.CompilerServices.IsExternalInit
.class private auto ansi sealed beforefieldinit System.Runtime.CompilerServices.RequiredMemberAttribute
extends [mscorlib]System.Attribute
{
.custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 8C 01 00 00 02 00 54 02 0D 41 6C 6C 6F 77 // ........T..Allow
4D 75 6C 74 69 70 6C 65 00 54 02 09 49 6E 68 65 // Multiple.T..Inhe
72 69 74 65 64 00 ) // rited.
.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 RequiredMemberAttribute::.ctor
} // end of class System.Runtime.CompilerServices.RequiredMemberAttribute
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoNewOfT`1<.ctor TOnType>
extends [mscorlib]System.Object
{
.method public hidebysig static !TOnType
CreateTOnType() cil managed
{
// Code size 11 (0xb)
.maxstack 1
.locals init (!TOnType V_0)
IL_0000: nop
IL_0001: call !!0 [mscorlib]System.Activator::CreateInstance<!TOnType>()
IL_0006: stloc.0
IL_0007: br.s IL_0009
IL_0009: ldloc.0
IL_000a: ret
} // end of method NoNewOfT`1::CreateTOnType
.method public hidebysig static !!T CreateUnconstrainedT<.ctor T>() cil managed
{
// Code size 11 (0xb)
.maxstack 1
.locals init (!!T V_0)
IL_0000: nop
IL_0001: call !!0 [mscorlib]System.Activator::CreateInstance<!!0>()
IL_0006: stloc.0
IL_0007: br.s IL_0009
IL_0009: ldloc.0
IL_000a: ret
} // end of method NoNewOfT`1::CreateUnconstrainedT
.method public hidebysig static !!T CreateClassT<class .ctor T>() cil managed
{
// Code size 11 (0xb)
.maxstack 1
.locals init (!!T V_0)
IL_0000: nop
IL_0001: call !!0 [mscorlib]System.Activator::CreateInstance<!!0>()
IL_0006: stloc.0
IL_0007: br.s IL_0009
IL_0009: ldloc.0
IL_000a: ret
} // end of method NoNewOfT`1::CreateClassT
.method public hidebysig static !!T CollectionInitializer<.ctor (class [mscorlib]System.Collections.Generic.IList`1<int32>) T>() cil managed
{
// Code size 88 (0x58)
.maxstack 2
.locals init (!!T V_0,
!!T V_1)
IL_0000: nop
IL_0001: call !!0 [mscorlib]System.Activator::CreateInstance<!!0>()
IL_0006: stloc.0
IL_0007: ldloca.s V_0
IL_0009: ldc.i4.1
IL_000a: constrained. !!T
IL_0010: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_0015: nop
IL_0016: ldloca.s V_0
IL_0018: ldc.i4.2
IL_0019: constrained. !!T
IL_001f: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_0024: nop
IL_0025: ldloca.s V_0
IL_0027: ldc.i4.3
IL_0028: constrained. !!T
IL_002e: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_0033: nop
IL_0034: ldloca.s V_0
IL_0036: ldc.i4.4
IL_0037: constrained. !!T
IL_003d: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_0042: nop
IL_0043: ldloca.s V_0
IL_0045: ldc.i4.5
IL_0046: constrained. !!T
IL_004c: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_0051: nop
IL_0052: ldloc.0
IL_0053: stloc.1
IL_0054: br.s IL_0056
IL_0056: ldloc.1
IL_0057: ret
} // end of method NoNewOfT`1::CollectionInitializer
.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 NoNewOfT`1::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoNewOfT`1
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

147
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.opt.il

@ -1,147 +0,0 @@
// .NET IL Disassembler. Version 9.0.4
// 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 tmp1ekgox
{
.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.
.permissionset reqmin
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}}
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module tmp1ekgox.tmp
// MVID: {67ce32bd-0144-4136-a198-2fc9f941f624}
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoNewOfT`1<.ctor TOnType>
extends [mscorlib]System.Object
{
.method public hidebysig static !TOnType
CreateTOnType() cil managed
{
// Code size 32 (0x20)
.maxstack 1
.locals init (!TOnType V_0,
!TOnType V_1)
IL_0000: ldloca.s V_0
IL_0002: initobj !TOnType
IL_0008: ldloc.0
IL_0009: box !TOnType
IL_000e: brfalse.s IL_001a
IL_0010: ldloca.s V_1
IL_0012: initobj !TOnType
IL_0018: ldloc.1
IL_0019: ret
IL_001a: call !!0 [mscorlib]System.Activator::CreateInstance<!TOnType>()
IL_001f: ret
} // end of method NoNewOfT`1::CreateTOnType
.method public hidebysig static !!T CreateUnconstrainedT<.ctor T>() cil managed
{
// Code size 32 (0x20)
.maxstack 1
.locals init (!!T V_0,
!!T V_1)
IL_0000: ldloca.s V_0
IL_0002: initobj !!T
IL_0008: ldloc.0
IL_0009: box !!T
IL_000e: brfalse.s IL_001a
IL_0010: ldloca.s V_1
IL_0012: initobj !!T
IL_0018: ldloc.1
IL_0019: ret
IL_001a: call !!0 [mscorlib]System.Activator::CreateInstance<!!0>()
IL_001f: ret
} // end of method NoNewOfT`1::CreateUnconstrainedT
.method public hidebysig static !!T CreateClassT<class .ctor T>() cil managed
{
// Code size 6 (0x6)
.maxstack 8
IL_0000: call !!0 [mscorlib]System.Activator::CreateInstance<!!0>()
IL_0005: ret
} // end of method NoNewOfT`1::CreateClassT
.method public hidebysig static !!T CollectionInitializer<.ctor (class [mscorlib]System.Collections.Generic.IList`1<int32>) T>() cil managed
{
// Code size 95 (0x5f)
.maxstack 2
.locals init (!!T V_0,
!!T V_1,
!!T V_2)
IL_0000: ldloca.s V_1
IL_0002: initobj !!T
IL_0008: ldloc.1
IL_0009: box !!T
IL_000e: brfalse.s IL_001b
IL_0010: ldloca.s V_2
IL_0012: initobj !!T
IL_0018: ldloc.2
IL_0019: br.s IL_0020
IL_001b: call !!0 [mscorlib]System.Activator::CreateInstance<!!0>()
IL_0020: stloc.0
IL_0021: ldloc.0
IL_0022: box !!T
IL_0027: ldc.i4.1
IL_0028: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_002d: ldloc.0
IL_002e: box !!T
IL_0033: ldc.i4.2
IL_0034: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_0039: ldloc.0
IL_003a: box !!T
IL_003f: ldc.i4.3
IL_0040: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_0045: ldloc.0
IL_0046: box !!T
IL_004b: ldc.i4.4
IL_004c: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_0051: ldloc.0
IL_0052: box !!T
IL_0057: ldc.i4.5
IL_0058: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_005d: ldloc.0
IL_005e: ret
} // end of method NoNewOfT`1::CollectionInitializer
.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 NoNewOfT`1::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoNewOfT`1
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

205
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.opt.net40.roslyn.il

@ -1,205 +0,0 @@
// .NET IL Disassembler. Version 9.0.4
// 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 tmp4xstme
{
.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 tmp4xstme.tmp
// MVID: {a031faef-fcb2-420c-9cd3-6e9b01e7f81e}
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void System.Runtime.CompilerServices.RefSafetyRulesAttribute::.ctor(int32) = ( 01 00 0B 00 00 00 00 00 )
.imagebase 0x10000000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// =============== 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.RefSafetyRulesAttribute
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 )
.custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 02 00 00 00 02 00 54 02 0D 41 6C 6C 6F 77 // ........T..Allow
4D 75 6C 74 69 70 6C 65 00 54 02 09 49 6E 68 65 // Multiple.T..Inhe
72 69 74 65 64 00 ) // rited.
.field public initonly int32 Version
.method public hidebysig specialname rtspecialname
instance void .ctor(int32 A_1) cil managed
{
// Code size 14 (0xe)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Attribute::.ctor()
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld int32 System.Runtime.CompilerServices.RefSafetyRulesAttribute::Version
IL_000d: ret
} // end of method RefSafetyRulesAttribute::.ctor
} // end of class System.Runtime.CompilerServices.RefSafetyRulesAttribute
.class private auto ansi sealed beforefieldinit System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute
extends [mscorlib]System.Attribute
{
.custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 02 00 54 02 0D 41 6C 6C 6F 77 // ........T..Allow
4D 75 6C 74 69 70 6C 65 01 54 02 09 49 6E 68 65 // Multiple.T..Inhe
72 69 74 65 64 00 ) // rited.
.method public hidebysig specialname rtspecialname
instance void .ctor(string featureName) 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 CompilerFeatureRequiredAttribute::.ctor
} // end of class System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute
.class private auto ansi beforefieldinit System.Runtime.CompilerServices.IsExternalInit
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 IsExternalInit::.ctor
} // end of class System.Runtime.CompilerServices.IsExternalInit
.class private auto ansi sealed beforefieldinit System.Runtime.CompilerServices.RequiredMemberAttribute
extends [mscorlib]System.Attribute
{
.custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 8C 01 00 00 02 00 54 02 0D 41 6C 6C 6F 77 // ........T..Allow
4D 75 6C 74 69 70 6C 65 00 54 02 09 49 6E 68 65 // Multiple.T..Inhe
72 69 74 65 64 00 ) // rited.
.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 RequiredMemberAttribute::.ctor
} // end of class System.Runtime.CompilerServices.RequiredMemberAttribute
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoNewOfT`1<.ctor TOnType>
extends [mscorlib]System.Object
{
.method public hidebysig static !TOnType
CreateTOnType() cil managed
{
// Code size 6 (0x6)
.maxstack 8
IL_0000: call !!0 [mscorlib]System.Activator::CreateInstance<!TOnType>()
IL_0005: ret
} // end of method NoNewOfT`1::CreateTOnType
.method public hidebysig static !!T CreateUnconstrainedT<.ctor T>() cil managed
{
// Code size 6 (0x6)
.maxstack 8
IL_0000: call !!0 [mscorlib]System.Activator::CreateInstance<!!0>()
IL_0005: ret
} // end of method NoNewOfT`1::CreateUnconstrainedT
.method public hidebysig static !!T CreateClassT<class .ctor T>() cil managed
{
// Code size 6 (0x6)
.maxstack 8
IL_0000: call !!0 [mscorlib]System.Activator::CreateInstance<!!0>()
IL_0005: ret
} // end of method NoNewOfT`1::CreateClassT
.method public hidebysig static !!T CollectionInitializer<.ctor (class [mscorlib]System.Collections.Generic.IList`1<int32>) T>() cil managed
{
// Code size 78 (0x4e)
.maxstack 2
.locals init (!!T V_0)
IL_0000: call !!0 [mscorlib]System.Activator::CreateInstance<!!0>()
IL_0005: stloc.0
IL_0006: ldloca.s V_0
IL_0008: ldc.i4.1
IL_0009: constrained. !!T
IL_000f: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_0014: ldloca.s V_0
IL_0016: ldc.i4.2
IL_0017: constrained. !!T
IL_001d: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_0022: ldloca.s V_0
IL_0024: ldc.i4.3
IL_0025: constrained. !!T
IL_002b: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_0030: ldloca.s V_0
IL_0032: ldc.i4.4
IL_0033: constrained. !!T
IL_0039: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_003e: ldloca.s V_0
IL_0040: ldc.i4.5
IL_0041: constrained. !!T
IL_0047: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_004c: ldloc.0
IL_004d: ret
} // end of method NoNewOfT`1::CollectionInitializer
.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 NoNewOfT`1::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoNewOfT`1
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

115
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.opt.roslyn.il

@ -1,115 +0,0 @@
// .NET IL Disassembler. Version 9.0.4
// Metadata version: v4.0.30319
.assembly extern System.Runtime
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
.ver 10:0:0:0
}
.assembly tmpauzspg
{
.custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.custom instance void [System.Runtime]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 [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 )
.custom instance void [System.Runtime]System.Runtime.Versioning.TargetFrameworkAttribute::.ctor(string) = ( 01 00 19 2E 4E 45 54 43 6F 72 65 41 70 70 2C 56 // ....NETCoreApp,V
65 72 73 69 6F 6E 3D 76 31 30 2E 30 00 00 ) // ersion=v10.0..
.permissionset reqmin
= {[System.Runtime]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}}
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module tmpauzspg.tmp
// MVID: {6d3a3b63-d01c-49f7-9515-565421f78266}
.custom instance void [System.Runtime]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [System.Runtime]System.Runtime.CompilerServices.RefSafetyRulesAttribute::.ctor(int32) = ( 01 00 0B 00 00 00 00 00 )
.imagebase 0x10000000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// =============== CLASS MEMBERS DECLARATION ===================
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoNewOfT`1<.ctor TOnType>
extends [System.Runtime]System.Object
{
.method public hidebysig static !TOnType
CreateTOnType() cil managed
{
// Code size 6 (0x6)
.maxstack 8
IL_0000: call !!0 [System.Runtime]System.Activator::CreateInstance<!TOnType>()
IL_0005: ret
} // end of method NoNewOfT`1::CreateTOnType
.method public hidebysig static !!T CreateUnconstrainedT<.ctor T>() cil managed
{
// Code size 6 (0x6)
.maxstack 8
IL_0000: call !!0 [System.Runtime]System.Activator::CreateInstance<!!0>()
IL_0005: ret
} // end of method NoNewOfT`1::CreateUnconstrainedT
.method public hidebysig static !!T CreateClassT<class .ctor T>() cil managed
{
// Code size 6 (0x6)
.maxstack 8
IL_0000: call !!0 [System.Runtime]System.Activator::CreateInstance<!!0>()
IL_0005: ret
} // end of method NoNewOfT`1::CreateClassT
.method public hidebysig static !!T CollectionInitializer<.ctor (class [System.Runtime]System.Collections.Generic.IList`1<int32>) T>() cil managed
{
// Code size 78 (0x4e)
.maxstack 2
.locals init (!!T V_0)
IL_0000: call !!0 [System.Runtime]System.Activator::CreateInstance<!!0>()
IL_0005: stloc.0
IL_0006: ldloca.s V_0
IL_0008: ldc.i4.1
IL_0009: constrained. !!T
IL_000f: callvirt instance void class [System.Runtime]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_0014: ldloca.s V_0
IL_0016: ldc.i4.2
IL_0017: constrained. !!T
IL_001d: callvirt instance void class [System.Runtime]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_0022: ldloca.s V_0
IL_0024: ldc.i4.3
IL_0025: constrained. !!T
IL_002b: callvirt instance void class [System.Runtime]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_0030: ldloca.s V_0
IL_0032: ldc.i4.4
IL_0033: constrained. !!T
IL_0039: callvirt instance void class [System.Runtime]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_003e: ldloca.s V_0
IL_0040: ldc.i4.5
IL_0041: constrained. !!T
IL_0047: callvirt instance void class [System.Runtime]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_004c: ldloc.0
IL_004d: ret
} // end of method NoNewOfT`1::CollectionInitializer
.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 [System.Runtime]System.Object::.ctor()
IL_0006: ret
} // end of method NoNewOfT`1::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoNewOfT`1
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

145
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.roslyn.il

@ -1,145 +0,0 @@
// .NET IL Disassembler. Version 9.0.4
// Metadata version: v4.0.30319
.assembly extern System.Runtime
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
.ver 10:0:0:0
}
.assembly tmpybdlca
{
.custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.custom instance void [System.Runtime]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 [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 )
.custom instance void [System.Runtime]System.Runtime.Versioning.TargetFrameworkAttribute::.ctor(string) = ( 01 00 19 2E 4E 45 54 43 6F 72 65 41 70 70 2C 56 // ....NETCoreApp,V
65 72 73 69 6F 6E 3D 76 31 30 2E 30 00 00 ) // ersion=v10.0..
.permissionset reqmin
= {[System.Runtime]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}}
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module tmpybdlca.tmp
// MVID: {b57f13a4-d291-42ea-b595-3766c1f1470c}
.custom instance void [System.Runtime]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [System.Runtime]System.Runtime.CompilerServices.RefSafetyRulesAttribute::.ctor(int32) = ( 01 00 0B 00 00 00 00 00 )
.imagebase 0x10000000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// =============== CLASS MEMBERS DECLARATION ===================
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoNewOfT`1<.ctor TOnType>
extends [System.Runtime]System.Object
{
.method public hidebysig static !TOnType
CreateTOnType() cil managed
{
// Code size 11 (0xb)
.maxstack 1
.locals init (!TOnType V_0)
IL_0000: nop
IL_0001: call !!0 [System.Runtime]System.Activator::CreateInstance<!TOnType>()
IL_0006: stloc.0
IL_0007: br.s IL_0009
IL_0009: ldloc.0
IL_000a: ret
} // end of method NoNewOfT`1::CreateTOnType
.method public hidebysig static !!T CreateUnconstrainedT<.ctor T>() cil managed
{
// Code size 11 (0xb)
.maxstack 1
.locals init (!!T V_0)
IL_0000: nop
IL_0001: call !!0 [System.Runtime]System.Activator::CreateInstance<!!0>()
IL_0006: stloc.0
IL_0007: br.s IL_0009
IL_0009: ldloc.0
IL_000a: ret
} // end of method NoNewOfT`1::CreateUnconstrainedT
.method public hidebysig static !!T CreateClassT<class .ctor T>() cil managed
{
// Code size 11 (0xb)
.maxstack 1
.locals init (!!T V_0)
IL_0000: nop
IL_0001: call !!0 [System.Runtime]System.Activator::CreateInstance<!!0>()
IL_0006: stloc.0
IL_0007: br.s IL_0009
IL_0009: ldloc.0
IL_000a: ret
} // end of method NoNewOfT`1::CreateClassT
.method public hidebysig static !!T CollectionInitializer<.ctor (class [System.Runtime]System.Collections.Generic.IList`1<int32>) T>() cil managed
{
// Code size 88 (0x58)
.maxstack 2
.locals init (!!T V_0,
!!T V_1)
IL_0000: nop
IL_0001: call !!0 [System.Runtime]System.Activator::CreateInstance<!!0>()
IL_0006: stloc.0
IL_0007: ldloca.s V_0
IL_0009: ldc.i4.1
IL_000a: constrained. !!T
IL_0010: callvirt instance void class [System.Runtime]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_0015: nop
IL_0016: ldloca.s V_0
IL_0018: ldc.i4.2
IL_0019: constrained. !!T
IL_001f: callvirt instance void class [System.Runtime]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_0024: nop
IL_0025: ldloca.s V_0
IL_0027: ldc.i4.3
IL_0028: constrained. !!T
IL_002e: callvirt instance void class [System.Runtime]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_0033: nop
IL_0034: ldloca.s V_0
IL_0036: ldc.i4.4
IL_0037: constrained. !!T
IL_003d: callvirt instance void class [System.Runtime]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_0042: nop
IL_0043: ldloca.s V_0
IL_0045: ldc.i4.5
IL_0046: constrained. !!T
IL_004c: callvirt instance void class [System.Runtime]System.Collections.Generic.ICollection`1<int32>::Add(!0)
IL_0051: nop
IL_0052: ldloc.0
IL_0053: stloc.1
IL_0054: br.s IL_0056
IL_0056: ldloc.1
IL_0057: ret
} // end of method NoNewOfT`1::CollectionInitializer
.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 [System.Runtime]System.Object::.ctor()
IL_0006: nop
IL_0007: ret
} // end of method NoNewOfT`1::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoNewOfT`1
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

136
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.il

@ -1,136 +0,0 @@
// 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 tmp8FA
{
.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.
.permissionset reqmin
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}}
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module tmp8FA.tmp
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents
extends [mscorlib]System.Object
{
.field private class [mscorlib]System.EventHandler MyEvent
.method public hidebysig specialname instance void
add_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed
{
// Code size 48 (0x30)
.maxstack 3
.locals init (class [mscorlib]System.EventHandler V_0,
class [mscorlib]System.EventHandler V_1,
class [mscorlib]System.EventHandler V_2,
bool V_3)
IL_0000: ldarg.0
IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: stloc.1
IL_0009: ldloc.1
IL_000a: ldarg.1
IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Combine(class [mscorlib]System.Delegate,
class [mscorlib]System.Delegate)
IL_0010: castclass [mscorlib]System.EventHandler
IL_0015: stloc.2
IL_0016: ldarg.0
IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent
IL_001c: ldloc.2
IL_001d: ldloc.1
IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange<class [mscorlib]System.EventHandler>(!!0&,
!!0,
!!0)
IL_0023: stloc.0
IL_0024: ldloc.0
IL_0025: ldloc.1
IL_0026: ceq
IL_0028: ldc.i4.0
IL_0029: ceq
IL_002b: stloc.3
IL_002c: ldloc.3
IL_002d: brtrue.s IL_0007
IL_002f: ret
} // end of method NoPropertiesAndEvents::add_MyEvent
.method public hidebysig specialname instance void
remove_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed
{
// Code size 48 (0x30)
.maxstack 3
.locals init (class [mscorlib]System.EventHandler V_0,
class [mscorlib]System.EventHandler V_1,
class [mscorlib]System.EventHandler V_2,
bool V_3)
IL_0000: ldarg.0
IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: stloc.1
IL_0009: ldloc.1
IL_000a: ldarg.1
IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Remove(class [mscorlib]System.Delegate,
class [mscorlib]System.Delegate)
IL_0010: castclass [mscorlib]System.EventHandler
IL_0015: stloc.2
IL_0016: ldarg.0
IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent
IL_001c: ldloc.2
IL_001d: ldloc.1
IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange<class [mscorlib]System.EventHandler>(!!0&,
!!0,
!!0)
IL_0023: stloc.0
IL_0024: ldloc.0
IL_0025: ldloc.1
IL_0026: ceq
IL_0028: ldc.i4.0
IL_0029: ceq
IL_002b: stloc.3
IL_002c: ldloc.3
IL_002d: brtrue.s IL_0007
IL_002f: ret
} // end of method NoPropertiesAndEvents::remove_MyEvent
.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 NoPropertiesAndEvents::.ctor
.event [mscorlib]System.EventHandler MyEvent
{
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::add_MyEvent(class [mscorlib]System.EventHandler)
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::remove_MyEvent(class [mscorlib]System.EventHandler)
} // end of event NoPropertiesAndEvents::MyEvent
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

133
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.net40.roslyn.il

@ -1,133 +0,0 @@
// 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 tmpB115
{
.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 tmpB115.tmp
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents
extends [mscorlib]System.Object
{
.field private class [mscorlib]System.EventHandler MyEvent
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.method public hidebysig specialname instance void
add_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 41 (0x29)
.maxstack 3
.locals init (class [mscorlib]System.EventHandler V_0,
class [mscorlib]System.EventHandler V_1,
class [mscorlib]System.EventHandler V_2)
IL_0000: ldarg.0
IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: stloc.1
IL_0009: ldloc.1
IL_000a: ldarg.1
IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Combine(class [mscorlib]System.Delegate,
class [mscorlib]System.Delegate)
IL_0010: castclass [mscorlib]System.EventHandler
IL_0015: stloc.2
IL_0016: ldarg.0
IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent
IL_001c: ldloc.2
IL_001d: ldloc.1
IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange<class [mscorlib]System.EventHandler>(!!0&,
!!0,
!!0)
IL_0023: stloc.0
IL_0024: ldloc.0
IL_0025: ldloc.1
IL_0026: bne.un.s IL_0007
IL_0028: ret
} // end of method NoPropertiesAndEvents::add_MyEvent
.method public hidebysig specialname instance void
remove_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 41 (0x29)
.maxstack 3
.locals init (class [mscorlib]System.EventHandler V_0,
class [mscorlib]System.EventHandler V_1,
class [mscorlib]System.EventHandler V_2)
IL_0000: ldarg.0
IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: stloc.1
IL_0009: ldloc.1
IL_000a: ldarg.1
IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Remove(class [mscorlib]System.Delegate,
class [mscorlib]System.Delegate)
IL_0010: castclass [mscorlib]System.EventHandler
IL_0015: stloc.2
IL_0016: ldarg.0
IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent
IL_001c: ldloc.2
IL_001d: ldloc.1
IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange<class [mscorlib]System.EventHandler>(!!0&,
!!0,
!!0)
IL_0023: stloc.0
IL_0024: ldloc.0
IL_0025: ldloc.1
IL_0026: bne.un.s IL_0007
IL_0028: ret
} // end of method NoPropertiesAndEvents::remove_MyEvent
.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 NoPropertiesAndEvents::.ctor
.event [mscorlib]System.EventHandler MyEvent
{
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::add_MyEvent(class [mscorlib]System.EventHandler)
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::remove_MyEvent(class [mscorlib]System.EventHandler)
} // end of event NoPropertiesAndEvents::MyEvent
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

124
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.opt.il

@ -1,124 +0,0 @@
// 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 tmp8FB
{
.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.
.permissionset reqmin
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}}
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module tmp8FB.tmp
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents
extends [mscorlib]System.Object
{
.field private class [mscorlib]System.EventHandler MyEvent
.method public hidebysig specialname instance void
add_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed
{
// Code size 41 (0x29)
.maxstack 3
.locals init (class [mscorlib]System.EventHandler V_0,
class [mscorlib]System.EventHandler V_1,
class [mscorlib]System.EventHandler V_2)
IL_0000: ldarg.0
IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: stloc.1
IL_0009: ldloc.1
IL_000a: ldarg.1
IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Combine(class [mscorlib]System.Delegate,
class [mscorlib]System.Delegate)
IL_0010: castclass [mscorlib]System.EventHandler
IL_0015: stloc.2
IL_0016: ldarg.0
IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent
IL_001c: ldloc.2
IL_001d: ldloc.1
IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange<class [mscorlib]System.EventHandler>(!!0&,
!!0,
!!0)
IL_0023: stloc.0
IL_0024: ldloc.0
IL_0025: ldloc.1
IL_0026: bne.un.s IL_0007
IL_0028: ret
} // end of method NoPropertiesAndEvents::add_MyEvent
.method public hidebysig specialname instance void
remove_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed
{
// Code size 41 (0x29)
.maxstack 3
.locals init (class [mscorlib]System.EventHandler V_0,
class [mscorlib]System.EventHandler V_1,
class [mscorlib]System.EventHandler V_2)
IL_0000: ldarg.0
IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: stloc.1
IL_0009: ldloc.1
IL_000a: ldarg.1
IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Remove(class [mscorlib]System.Delegate,
class [mscorlib]System.Delegate)
IL_0010: castclass [mscorlib]System.EventHandler
IL_0015: stloc.2
IL_0016: ldarg.0
IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent
IL_001c: ldloc.2
IL_001d: ldloc.1
IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange<class [mscorlib]System.EventHandler>(!!0&,
!!0,
!!0)
IL_0023: stloc.0
IL_0024: ldloc.0
IL_0025: ldloc.1
IL_0026: bne.un.s IL_0007
IL_0028: ret
} // end of method NoPropertiesAndEvents::remove_MyEvent
.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 NoPropertiesAndEvents::.ctor
.event [mscorlib]System.EventHandler MyEvent
{
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::add_MyEvent(class [mscorlib]System.EventHandler)
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::remove_MyEvent(class [mscorlib]System.EventHandler)
} // end of event NoPropertiesAndEvents::MyEvent
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

131
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.opt.net40.roslyn.il

@ -1,131 +0,0 @@
// 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 tmpB126
{
.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 tmpB126.tmp
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents
extends [mscorlib]System.Object
{
.field private class [mscorlib]System.EventHandler MyEvent
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.method public hidebysig specialname instance void
add_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 41 (0x29)
.maxstack 3
.locals init (class [mscorlib]System.EventHandler V_0,
class [mscorlib]System.EventHandler V_1,
class [mscorlib]System.EventHandler V_2)
IL_0000: ldarg.0
IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: stloc.1
IL_0009: ldloc.1
IL_000a: ldarg.1
IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Combine(class [mscorlib]System.Delegate,
class [mscorlib]System.Delegate)
IL_0010: castclass [mscorlib]System.EventHandler
IL_0015: stloc.2
IL_0016: ldarg.0
IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent
IL_001c: ldloc.2
IL_001d: ldloc.1
IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange<class [mscorlib]System.EventHandler>(!!0&,
!!0,
!!0)
IL_0023: stloc.0
IL_0024: ldloc.0
IL_0025: ldloc.1
IL_0026: bne.un.s IL_0007
IL_0028: ret
} // end of method NoPropertiesAndEvents::add_MyEvent
.method public hidebysig specialname instance void
remove_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 41 (0x29)
.maxstack 3
.locals init (class [mscorlib]System.EventHandler V_0,
class [mscorlib]System.EventHandler V_1,
class [mscorlib]System.EventHandler V_2)
IL_0000: ldarg.0
IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: stloc.1
IL_0009: ldloc.1
IL_000a: ldarg.1
IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Remove(class [mscorlib]System.Delegate,
class [mscorlib]System.Delegate)
IL_0010: castclass [mscorlib]System.EventHandler
IL_0015: stloc.2
IL_0016: ldarg.0
IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent
IL_001c: ldloc.2
IL_001d: ldloc.1
IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange<class [mscorlib]System.EventHandler>(!!0&,
!!0,
!!0)
IL_0023: stloc.0
IL_0024: ldloc.0
IL_0025: ldloc.1
IL_0026: bne.un.s IL_0007
IL_0028: ret
} // end of method NoPropertiesAndEvents::remove_MyEvent
.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 NoPropertiesAndEvents::.ctor
.event [mscorlib]System.EventHandler MyEvent
{
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::add_MyEvent(class [mscorlib]System.EventHandler)
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::remove_MyEvent(class [mscorlib]System.EventHandler)
} // end of event NoPropertiesAndEvents::MyEvent
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

131
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.opt.roslyn.il

@ -1,131 +0,0 @@
// 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 tmp8F9
{
.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 tmp8F9.tmp
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents
extends [mscorlib]System.Object
{
.field private class [mscorlib]System.EventHandler MyEvent
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.method public hidebysig specialname instance void
add_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 41 (0x29)
.maxstack 3
.locals init (class [mscorlib]System.EventHandler V_0,
class [mscorlib]System.EventHandler V_1,
class [mscorlib]System.EventHandler V_2)
IL_0000: ldarg.0
IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: stloc.1
IL_0009: ldloc.1
IL_000a: ldarg.1
IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Combine(class [mscorlib]System.Delegate,
class [mscorlib]System.Delegate)
IL_0010: castclass [mscorlib]System.EventHandler
IL_0015: stloc.2
IL_0016: ldarg.0
IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent
IL_001c: ldloc.2
IL_001d: ldloc.1
IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange<class [mscorlib]System.EventHandler>(!!0&,
!!0,
!!0)
IL_0023: stloc.0
IL_0024: ldloc.0
IL_0025: ldloc.1
IL_0026: bne.un.s IL_0007
IL_0028: ret
} // end of method NoPropertiesAndEvents::add_MyEvent
.method public hidebysig specialname instance void
remove_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 41 (0x29)
.maxstack 3
.locals init (class [mscorlib]System.EventHandler V_0,
class [mscorlib]System.EventHandler V_1,
class [mscorlib]System.EventHandler V_2)
IL_0000: ldarg.0
IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: stloc.1
IL_0009: ldloc.1
IL_000a: ldarg.1
IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Remove(class [mscorlib]System.Delegate,
class [mscorlib]System.Delegate)
IL_0010: castclass [mscorlib]System.EventHandler
IL_0015: stloc.2
IL_0016: ldarg.0
IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent
IL_001c: ldloc.2
IL_001d: ldloc.1
IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange<class [mscorlib]System.EventHandler>(!!0&,
!!0,
!!0)
IL_0023: stloc.0
IL_0024: ldloc.0
IL_0025: ldloc.1
IL_0026: bne.un.s IL_0007
IL_0028: ret
} // end of method NoPropertiesAndEvents::remove_MyEvent
.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 NoPropertiesAndEvents::.ctor
.event [mscorlib]System.EventHandler MyEvent
{
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::add_MyEvent(class [mscorlib]System.EventHandler)
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::remove_MyEvent(class [mscorlib]System.EventHandler)
} // end of event NoPropertiesAndEvents::MyEvent
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

133
ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.roslyn.il

@ -1,133 +0,0 @@
// 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 tmp8F8
{
.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 tmp8F8.tmp
.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
// =============== CLASS MEMBERS DECLARATION ===================
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents
extends [mscorlib]System.Object
{
.field private class [mscorlib]System.EventHandler MyEvent
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.method public hidebysig specialname instance void
add_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 41 (0x29)
.maxstack 3
.locals init (class [mscorlib]System.EventHandler V_0,
class [mscorlib]System.EventHandler V_1,
class [mscorlib]System.EventHandler V_2)
IL_0000: ldarg.0
IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: stloc.1
IL_0009: ldloc.1
IL_000a: ldarg.1
IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Combine(class [mscorlib]System.Delegate,
class [mscorlib]System.Delegate)
IL_0010: castclass [mscorlib]System.EventHandler
IL_0015: stloc.2
IL_0016: ldarg.0
IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent
IL_001c: ldloc.2
IL_001d: ldloc.1
IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange<class [mscorlib]System.EventHandler>(!!0&,
!!0,
!!0)
IL_0023: stloc.0
IL_0024: ldloc.0
IL_0025: ldloc.1
IL_0026: bne.un.s IL_0007
IL_0028: ret
} // end of method NoPropertiesAndEvents::add_MyEvent
.method public hidebysig specialname instance void
remove_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 41 (0x29)
.maxstack 3
.locals init (class [mscorlib]System.EventHandler V_0,
class [mscorlib]System.EventHandler V_1,
class [mscorlib]System.EventHandler V_2)
IL_0000: ldarg.0
IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: stloc.1
IL_0009: ldloc.1
IL_000a: ldarg.1
IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Remove(class [mscorlib]System.Delegate,
class [mscorlib]System.Delegate)
IL_0010: castclass [mscorlib]System.EventHandler
IL_0015: stloc.2
IL_0016: ldarg.0
IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent
IL_001c: ldloc.2
IL_001d: ldloc.1
IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange<class [mscorlib]System.EventHandler>(!!0&,
!!0,
!!0)
IL_0023: stloc.0
IL_0024: ldloc.0
IL_0025: ldloc.1
IL_0026: bne.un.s IL_0007
IL_0028: ret
} // end of method NoPropertiesAndEvents::remove_MyEvent
.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 NoPropertiesAndEvents::.ctor
.event [mscorlib]System.EventHandler MyEvent
{
.addon instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::add_MyEvent(class [mscorlib]System.EventHandler)
.removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::remove_MyEvent(class [mscorlib]System.EventHandler)
} // end of event NoPropertiesAndEvents::MyEvent
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

20
ICSharpCode.Decompiler.Tests/UglyTestRunner.cs

@ -141,35 +141,29 @@ namespace ICSharpCode.Decompiler.Tests
await RunForLibrary(cscOptions: cscOptions, decompilerSettings: new DecompilerSettings(CSharp.LanguageVersion.CSharp1)); await RunForLibrary(cscOptions: cscOptions, decompilerSettings: new DecompilerSettings(CSharp.LanguageVersion.CSharp1));
} }
async Task RunForLibrary([CallerMemberName] string testName = null, AssemblerOptions asmOptions = AssemblerOptions.None, CompilerOptions cscOptions = CompilerOptions.None, DecompilerSettings decompilerSettings = null) async Task RunForLibrary([CallerMemberName] string testName = null, CompilerOptions cscOptions = CompilerOptions.None, DecompilerSettings decompilerSettings = null)
{ {
await Run(testName, asmOptions | AssemblerOptions.Library, cscOptions | CompilerOptions.Library, decompilerSettings); await Run(testName, cscOptions | CompilerOptions.Library, decompilerSettings);
} }
async Task Run([CallerMemberName] string testName = null, AssemblerOptions asmOptions = AssemblerOptions.None, CompilerOptions cscOptions = CompilerOptions.None, DecompilerSettings decompilerSettings = null) async Task Run([CallerMemberName] string testName = null, CompilerOptions cscOptions = CompilerOptions.None, DecompilerSettings decompilerSettings = null)
{ {
var ilFile = Path.Combine(TestCasePath, testName) + Tester.GetSuffix(cscOptions) + ".il";
var csFile = Path.Combine(TestCasePath, testName + ".cs"); var csFile = Path.Combine(TestCasePath, testName + ".cs");
var expectedFile = Path.Combine(TestCasePath, testName + ".Expected.cs"); var expectedFile = Path.Combine(TestCasePath, testName + ".Expected.cs");
var exeFile = TestsAssemblyOutput.GetFilePath(TestCasePath, testName, Tester.GetSuffix(cscOptions) + ".exe");
if (!File.Exists(ilFile)) CompilerResults output = null;
{
// re-create .il file if necessary
Helpers.CompilerResults output = null;
try try
{ {
output = await Tester.CompileCSharp(csFile, cscOptions).ConfigureAwait(false); output = await Tester.CompileCSharp(csFile, cscOptions, exeFile).ConfigureAwait(false);
await Tester.Disassemble(output.PathToAssembly, ilFile, asmOptions).ConfigureAwait(false);
} }
finally finally
{ {
if (output != null) if (output != null)
output.DeleteTempFiles(); output.DeleteTempFiles();
} }
}
var executable = await Tester.AssembleIL(ilFile, asmOptions).ConfigureAwait(false); var decompiled = await Tester.DecompileCSharp(exeFile, decompilerSettings).ConfigureAwait(false);
var decompiled = await Tester.DecompileCSharp(executable, decompilerSettings).ConfigureAwait(false);
CodeAssert.FilesAreEqual(expectedFile, decompiled, Tester.GetPreprocessorSymbols(cscOptions).ToArray()); CodeAssert.FilesAreEqual(expectedFile, decompiled, Tester.GetPreprocessorSymbols(cscOptions).ToArray());
Tester.RepeatOnIOError(() => File.Delete(decompiled)); Tester.RepeatOnIOError(() => File.Delete(decompiled));

Loading…
Cancel
Save