Browse Source

Merge branch 'master' into srm

pull/1198/head
Daniel Grunwald 7 years ago
parent
commit
de2eac5e89
  1. 10
      ICSharpCode.Decompiler.Tests/Helpers/Tester.cs
  2. 4
      ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj
  3. 66
      ICSharpCode.Decompiler.Tests/TestCases/Correctness/CompoundAssignment.cs
  4. 22
      ICSharpCode.Decompiler.Tests/TestCases/Correctness/MemberLookup.cs
  5. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/AnonymousTypes.il
  6. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/AnonymousTypes.opt.il
  7. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.il
  8. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.opt.il
  9. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CheckedUnchecked.il
  10. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CheckedUnchecked.opt.il
  11. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.il
  12. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.opt.il
  13. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/DelegateConstruction.il
  14. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/DelegateConstruction.opt.il
  15. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/ExceptionHandling.il
  16. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/ExceptionHandling.opt.il
  17. 2
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/ExpressionTrees.cs
  18. 21
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/ExpressionTrees.il
  19. 21
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/ExpressionTrees.opt.il
  20. 170
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/ExpressionTrees.opt.roslyn.il
  21. 170
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/ExpressionTrees.roslyn.il
  22. 2
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/FixProxyCalls.cs
  23. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/FixProxyCalls.il
  24. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/FixProxyCalls.opt.il
  25. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/Generics.il
  26. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/Generics.opt.il
  27. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/HelloWorld.il
  28. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.il
  29. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.opt.il
  30. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/InlineAssignmentTest.il
  31. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/InlineAssignmentTest.opt.il
  32. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/LiftedOperators.il
  33. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/LiftedOperators.opt.il
  34. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/Lock.il
  35. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/Lock.mcs.il
  36. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/Lock.opt.il
  37. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/Lock.opt.mcs.il
  38. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/Loops.il
  39. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/Loops.mcs.il
  40. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/Loops.opt.il
  41. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/Loops.opt.mcs.il
  42. 3
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/PInvoke.il
  43. 3
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/PInvoke.opt.il
  44. 1
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/PInvoke.opt.roslyn.il
  45. 1
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/PInvoke.roslyn.il
  46. 63
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.il
  47. 63
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.opt.il
  48. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/ShortCircuit.il
  49. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/ShortCircuit.opt.il
  50. 31
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/Switch.il
  51. 31
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/Switch.opt.il
  52. 5
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/TypeAnalysisTests.cs
  53. 28
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/TypeAnalysisTests.il
  54. 22
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/TypeAnalysisTests.opt.il
  55. 13
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/TypeAnalysisTests.opt.roslyn.il
  56. 19
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/TypeAnalysisTests.roslyn.il
  57. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/UnsafeCode.il
  58. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/UnsafeCode.opt.il
  59. 51
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/UnsafeCode.opt.roslyn.il
  60. 59
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/UnsafeCode.roslyn.il
  61. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/Using.il
  62. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/Using.opt.il
  63. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/VariableNaming.il
  64. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/VariableNaming.opt.il
  65. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/VariableNamingWithoutSymbols.il
  66. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/VariableNamingWithoutSymbols.opt.il
  67. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/WellKnownConstants.il
  68. 9
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/WellKnownConstants.opt.il
  69. 9
      ICSharpCode.Decompiler/CSharp/CallBuilder.cs
  70. 27
      ICSharpCode.Decompiler/CSharp/Transforms/AddCheckedBlocks.cs
  71. 10
      ICSharpCode.Decompiler/CSharp/TranslatedExpression.cs
  72. 2
      ICSharpCode.Decompiler/IL/Instructions/BinaryNumericInstruction.cs
  73. 46
      ICSharpCode.Decompiler/IL/Instructions/CompoundAssignmentInstruction.cs
  74. 8
      ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs

10
ICSharpCode.Decompiler.Tests/Helpers/Tester.cs

@ -112,7 +112,7 @@ namespace ICSharpCode.Decompiler.Tests.Helpers @@ -112,7 +112,7 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
{
if (asmOptions.HasFlag(AssemblerOptions.UseOwnDisassembler)) {
using (var module = new PEReader(new FileStream(sourceFileName, FileMode.Open)))
using (var writer = new StreamWriter(outputFile)) {
using (var writer = new StringWriter()) {
//module.Name = Path.GetFileNameWithoutExtension(outputFile);
var output = new PlainTextOutput(writer);
ReflectionDisassembler rd = new ReflectionDisassembler(output, CancellationToken.None);
@ -124,6 +124,8 @@ namespace ICSharpCode.Decompiler.Tests.Helpers @@ -124,6 +124,8 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
rd.WriteModuleHeader(module, skipMVID: true);
output.WriteLine();
rd.WriteModuleContents(module);*/
File.WriteAllText(outputFile, ReplacePrivImplDetails(writer.ToString()));
}
return outputFile;
}
@ -159,11 +161,17 @@ namespace ICSharpCode.Decompiler.Tests.Helpers @@ -159,11 +161,17 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
il = Regex.Replace(il, @"^// +Copyright .* Microsoft.*\r?\n", "", RegexOptions.Multiline);
// filename may contain full path
il = Regex.Replace(il, @"^// WARNING: Created Win32 resource file.*\r?\n", "", RegexOptions.Multiline);
il = ReplacePrivImplDetails(il);
File.WriteAllText(outputFile, il);
return outputFile;
}
private static string ReplacePrivImplDetails(string il)
{
return Regex.Replace(il, @"'<PrivateImplementationDetails>\{[0-9A-F-]+\}'", "'<PrivateImplementationDetails>'");
}
static readonly Lazy<IEnumerable<MetadataReference>> defaultReferences = new Lazy<IEnumerable<MetadataReference>>(delegate {
string refAsmPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86),
@"Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5");

4
ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj

@ -37,8 +37,8 @@ @@ -37,8 +37,8 @@
<ItemGroup>
<PackageReference Include="DiffLib" Version="1.0.0.55" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="2.7.0" />
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic" Version="2.7.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="2.8.0" />
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic" Version="2.8.0" />
<PackageReference Include="NUnit3TestAdapter" Version="3.9.0" />
<PackageReference Include="System.Collections.Immutable" Version="1.3.1" />
<PackageReference Include="NUnit" Version="3.9.0" />

66
ICSharpCode.Decompiler.Tests/TestCases/Correctness/CompoundAssignment.cs

@ -31,6 +31,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness @@ -31,6 +31,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness
UnsignedShiftRightInstanceField();
UnsignedShiftRightStaticProperty();
DivideByBigValue();
Overflow();
}
static void Test(int a, int b)
@ -77,9 +78,9 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness @@ -77,9 +78,9 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness
}
}
static ushort shortField;
static short shortField;
public static ushort ShortProperty {
public static short ShortProperty {
get {
Console.WriteLine("In get_ShortProperty");
return shortField;
@ -90,6 +91,19 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness @@ -90,6 +91,19 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness
}
}
static byte byteField;
public static byte ByteProperty {
get {
Console.WriteLine("In get_ByteProperty");
return byteField;
}
set {
Console.WriteLine("In set_ByteProperty, value={0}", value);
byteField = value;
}
}
public static Dictionary<string, int> GetDict()
{
Console.WriteLine("In GetDict()");
@ -144,15 +158,55 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness @@ -144,15 +158,55 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness
static void UnsignedShiftRightStaticProperty()
{
Console.WriteLine("UnsignedShiftRightStaticProperty:");
StaticProperty = -15;
Test(X(), StaticProperty = (int)((uint)StaticProperty >> 2));
ShortProperty = -20;
ShortProperty = (short)((uint)StaticProperty >> 2);
ShortProperty = -30;
ShortProperty = (short)((ushort)StaticProperty >> 2);
}
static void DivideByBigValue()
{
ShortProperty = 5;
// can't use "ShortProperty /= (ushort)(ushort.MaxValue + 3)" because that would be division by 2.
ShortProperty = (ushort)(ShortProperty / (ushort.MaxValue + 3));
Console.WriteLine("DivideByBigValue:");
ByteProperty = 5;
// can't use "ByteProperty /= (byte)(byte.MaxValue + 3)" because that would be division by 2.
ByteProperty = (byte)(ByteProperty / (byte.MaxValue + 3));
ByteProperty = 200;
ByteProperty = (byte)(ByteProperty / Id(byte.MaxValue + 3));
ShortProperty = short.MaxValue;
ShortProperty = (short)(ShortProperty / (short.MaxValue + 3));
}
static void Overflow()
{
Console.WriteLine("Overflow:");
ByteProperty = 0;
ByteProperty = (byte)checked(ByteProperty + 300);
try {
ByteProperty = checked((byte)(ByteProperty + 300));
} catch (OverflowException) {
Console.WriteLine("Overflow OK");
}
ByteProperty = 200;
ByteProperty = (byte)checked(ByteProperty + 100);
ByteProperty = 201;
try {
ByteProperty = checked((byte)(ByteProperty + 100));
} catch (OverflowException) {
Console.WriteLine("Overflow OK");
}
}
static T Id<T>(T val)
{
return val;
}
}
}

22
ICSharpCode.Decompiler.Tests/TestCases/Correctness/MemberLookup.cs

@ -29,6 +29,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness @@ -29,6 +29,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness
Console.WriteLine((new Child1() as Base1).Field);
Child1.Test();
delegateConstruction();
new Child2b().CallTestMethod();
return 0;
}
@ -82,6 +83,8 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness @@ -82,6 +83,8 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness
child.TestMethod();
Console.WriteLine("Child1.TestMethod()");
Console.WriteLine("Property = " + Property + " " + base.Property);
Console.WriteLine("Field = " + Field);
Console.WriteLine("base.Field = " + base.Field);
}
new public void TestAction()
@ -97,5 +100,24 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness @@ -97,5 +100,24 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness
}
}
}
class Child2 : Base1
{
public void CallTestMethod()
{
Console.WriteLine("Child2 calling this.TestMethod():");
this.TestMethod();
Console.WriteLine("Child2 calling base.TestMethod():");
base.TestMethod();
}
}
class Child2b : Child2
{
protected override void TestMethod()
{
Console.WriteLine("Child2b.TestMethod");
}
}
}
}

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/AnonymousTypes.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly '1xvbqrhn'
.assembly AnonymousTypes
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module '1xvbqrhn.dll'
// MVID: {FBEE2A5E-0EA6-4D81-AF17-0E675B5AAF7A}
.module AnonymousTypes.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
// Image base: 0x02CF0000
// =============== CLASS MEMBERS DECLARATION ===================
@ -851,4 +847,3 @@ @@ -851,4 +847,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file C:\work\ILSpy\ICSharpCode.Decompiler.Tests\bin\Debug\net46\../../../TestCases/Pretty\AnonymousTypes.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/AnonymousTypes.opt.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly ikebg3tc
.assembly AnonymousTypes.opt
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module ikebg3tc.dll
// MVID: {9F96FB3A-745D-4BC1-8552-8ECB86372E2A}
.module AnonymousTypes.opt.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
// Image base: 0x03680000
// =============== CLASS MEMBERS DECLARATION ===================
@ -746,4 +742,3 @@ @@ -746,4 +742,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file C:\work\ILSpy\ICSharpCode.Decompiler.Tests\bin\Debug\net46\../../../TestCases/Pretty\AnonymousTypes.opt.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.17929
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly '0bl3wgec'
.assembly Async
{
.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.
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module '0bl3wgec.dll'
// MVID: {D5634CE0-620A-4F18-AC07-9132CB05EFF7}
.module Async.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
// Image base: 0x00930000
// =============== CLASS MEMBERS DECLARATION ===================
@ -1604,4 +1600,3 @@ @@ -1604,4 +1600,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\Async.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.opt.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.17929
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly '5wwmyl42'
.assembly Async.opt
{
.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.
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module '5wwmyl42.dll'
// MVID: {91D59E53-2AA6-427F-B57D-0FC8808BA12D}
.module Async.opt.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
// Image base: 0x00A20000
// =============== CLASS MEMBERS DECLARATION ===================
@ -1433,4 +1429,3 @@ @@ -1433,4 +1429,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\Async.opt.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CheckedUnchecked.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.18020
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly rbj4xpgi
.assembly CheckedUnchecked
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module rbj4xpgi.dll
// MVID: {45787808-282D-44B8-BFE5-F8F3EF6DDA83}
.module CheckedUnchecked.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
// Image base: 0x005F0000
// =============== CLASS MEMBERS DECLARATION ===================
@ -634,4 +630,3 @@ @@ -634,4 +630,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\CheckedUnchecked.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CheckedUnchecked.opt.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.18020
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly j4foxgdl
.assembly CheckedUnchecked.opt
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module j4foxgdl.dll
// MVID: {C884AA00-D1B2-4593-9A69-3DBFE92E25C4}
.module CheckedUnchecked.opt.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
// Image base: 0x02F90000
// =============== CLASS MEMBERS DECLARATION ===================
@ -548,4 +544,3 @@ @@ -548,4 +544,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\CheckedUnchecked.opt.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly '2caluqpm'
.assembly CompoundAssignmentTest
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module '2caluqpm.dll'
// MVID: {7839A86C-BE29-4CFE-BC36-763505CDFB63}
.module CompoundAssignmentTest.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
// Image base: 0x03060000
// =============== CLASS MEMBERS DECLARATION ===================
@ -2046,4 +2042,3 @@ @@ -2046,4 +2042,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\CompoundAssignmentTest.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.opt.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly eoamkle2
.assembly CompoundAssignmentTest.opt
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module eoamkle2.dll
// MVID: {61ABCA72-03C4-4AE8-9DF9-464B253BB877}
.module CompoundAssignmentTest.opt.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
// Image base: 0x030A0000
// =============== CLASS MEMBERS DECLARATION ===================
@ -1697,4 +1693,3 @@ @@ -1697,4 +1693,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\CompoundAssignmentTest.opt.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/DelegateConstruction.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -15,7 +13,7 @@ @@ -15,7 +13,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly awc2kjfz
.assembly DelegateConstruction
{
.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.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
@ -26,15 +24,13 @@ @@ -26,15 +24,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module awc2kjfz.dll
// MVID: {49C8B10E-CA57-40C1-9484-BC8636C38817}
.module DelegateConstruction.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
// Image base: 0x04D50000
// =============== CLASS MEMBERS DECLARATION ===================
@ -1763,4 +1759,3 @@ @@ -1763,4 +1759,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\DelegateConstruction.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/DelegateConstruction.opt.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -15,7 +13,7 @@ @@ -15,7 +13,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly ci3jaj4f
.assembly DelegateConstruction.opt
{
.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.ExtensionAttribute::.ctor() = ( 01 00 00 00 )
@ -26,15 +24,13 @@ @@ -26,15 +24,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module ci3jaj4f.dll
// MVID: {F860E23B-9B90-453A-A3A5-49C4D5AA91F8}
.module DelegateConstruction.opt.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
// Image base: 0x05340000
// =============== CLASS MEMBERS DECLARATION ===================
@ -1460,4 +1456,3 @@ @@ -1460,4 +1456,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\DelegateConstruction.opt.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/ExceptionHandling.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly vicbdq3v
.assembly ExceptionHandling
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module vicbdq3v.dll
// MVID: {5E2AA050-D333-4323-8C5A-29B86C8D98BB}
.module ExceptionHandling.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
// Image base: 0x01160000
// =============== CLASS MEMBERS DECLARATION ===================
@ -431,4 +427,3 @@ @@ -431,4 +427,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\ExceptionHandling.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/ExceptionHandling.opt.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly uidw4n1e
.assembly ExceptionHandling.opt
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module uidw4n1e.dll
// MVID: {A6A100AA-2C72-4B40-9C9F-50DA438D4727}
.module ExceptionHandling.opt.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
// Image base: 0x00380000
// =============== CLASS MEMBERS DECLARATION ===================
@ -338,4 +334,3 @@ @@ -338,4 +334,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\ExceptionHandling.opt.res

2
ICSharpCode.Decompiler.Tests/TestCases/Pretty/ExpressionTrees.cs

@ -218,7 +218,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -218,7 +218,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
public void MembersBuiltin()
{
ToCode(X(), () => 1.23m.ToString());
ToCode(X(), () => ((Enum)(object)AttributeTargets.All).HasFlag((Enum)AttributeTargets.Assembly));
ToCode(X(), () => AttributeTargets.All.HasFlag((Enum)AttributeTargets.Assembly));
ToCode(X(), () => "abc".Length == 3);
ToCode(X(), () => 'a'.CompareTo('b') < 0);
}

21
ICSharpCode.Decompiler.Tests/TestCases/Pretty/ExpressionTrees.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -20,7 +18,7 @@ @@ -20,7 +18,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly '3qhjq0hu'
.assembly ExpressionTrees
{
.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.
@ -30,15 +28,13 @@ @@ -30,15 +28,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module '3qhjq0hu.dll'
// MVID: {426C7905-90B3-4EA8-8585-F907E00CBDB7}
.module ExpressionTrees.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
// Image base: 0x02FC0000
// =============== CLASS MEMBERS DECLARATION ===================
@ -9909,7 +9905,7 @@ @@ -9909,7 +9905,7 @@
IL_0000: ldc.i4.3
IL_0001: newarr [mscorlib]System.Int32
IL_0006: dup
IL_0007: ldtoken field valuetype '<PrivateImplementationDetails>{426C7905-90B3-4EA8-8585-F907E00CBDB7}'/'__StaticArrayInitTypeSize=12' '<PrivateImplementationDetails>{426C7905-90B3-4EA8-8585-F907E00CBDB7}'::'$$method0x60000bc-1'
IL_0007: ldtoken field valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=12' '<PrivateImplementationDetails>'::'$$method0x60000bc-1'
IL_000c: call void [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray(class [mscorlib]System.Array,
valuetype [mscorlib]System.RuntimeFieldHandle)
IL_0011: stloc.0
@ -9985,7 +9981,7 @@ @@ -9985,7 +9981,7 @@
IL_0009: ldc.i4.3
IL_000a: newarr [mscorlib]System.Int32
IL_000f: dup
IL_0010: ldtoken field valuetype '<PrivateImplementationDetails>{426C7905-90B3-4EA8-8585-F907E00CBDB7}'/'__StaticArrayInitTypeSize=12' '<PrivateImplementationDetails>{426C7905-90B3-4EA8-8585-F907E00CBDB7}'::'$$method0x60000c0-1'
IL_0010: ldtoken field valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=12' '<PrivateImplementationDetails>'::'$$method0x60000c0-1'
IL_0015: call void [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray(class [mscorlib]System.Array,
valuetype [mscorlib]System.RuntimeFieldHandle)
IL_001a: stelem.ref
@ -10676,7 +10672,7 @@ @@ -10676,7 +10672,7 @@
} // end of property '<>f__AnonymousType1`2'::Y
} // end of class '<>f__AnonymousType1`2'
.class private auto ansi '<PrivateImplementationDetails>{426C7905-90B3-4EA8-8585-F907E00CBDB7}'
.class private auto ansi '<PrivateImplementationDetails>'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
@ -10687,9 +10683,9 @@ @@ -10687,9 +10683,9 @@
.size 12
} // end of class '__StaticArrayInitTypeSize=12'
.field static assembly valuetype '<PrivateImplementationDetails>{426C7905-90B3-4EA8-8585-F907E00CBDB7}'/'__StaticArrayInitTypeSize=12' '$$method0x60000bc-1' at I_00007A38
.field static assembly valuetype '<PrivateImplementationDetails>{426C7905-90B3-4EA8-8585-F907E00CBDB7}'/'__StaticArrayInitTypeSize=12' '$$method0x60000c0-1' at I_00007AB0
} // end of class '<PrivateImplementationDetails>{426C7905-90B3-4EA8-8585-F907E00CBDB7}'
.field static assembly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=12' '$$method0x60000bc-1' at I_00007A38
.field static assembly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=12' '$$method0x60000c0-1' at I_00007AB0
} // end of class '<PrivateImplementationDetails>'
.class private auto ansi sealed beforefieldinit '<>f__AnonymousType2`2'<'<A>j__TPar','<B>j__TPar'>
extends [mscorlib]System.Object
@ -10886,4 +10882,3 @@ @@ -10886,4 +10882,3 @@
.data cil I_00007AB0 = bytearray (
01 00 00 00 02 00 00 00 03 00 00 00)
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\ExpressionTrees.res

21
ICSharpCode.Decompiler.Tests/TestCases/Pretty/ExpressionTrees.opt.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -20,7 +18,7 @@ @@ -20,7 +18,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly tngduxjw
.assembly ExpressionTrees.opt
{
.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.
@ -30,15 +28,13 @@ @@ -30,15 +28,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module tngduxjw.dll
// MVID: {416BD71B-B506-4355-8604-9F8C6A2FDEE6}
.module ExpressionTrees.opt.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
// Image base: 0x04A60000
// =============== CLASS MEMBERS DECLARATION ===================
@ -9453,7 +9449,7 @@ @@ -9453,7 +9449,7 @@
IL_0000: ldc.i4.3
IL_0001: newarr [mscorlib]System.Int32
IL_0006: dup
IL_0007: ldtoken field valuetype '<PrivateImplementationDetails>{416BD71B-B506-4355-8604-9F8C6A2FDEE6}'/'__StaticArrayInitTypeSize=12' '<PrivateImplementationDetails>{416BD71B-B506-4355-8604-9F8C6A2FDEE6}'::'$$method0x60000bc-1'
IL_0007: ldtoken field valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=12' '<PrivateImplementationDetails>'::'$$method0x60000bc-1'
IL_000c: call void [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray(class [mscorlib]System.Array,
valuetype [mscorlib]System.RuntimeFieldHandle)
IL_0011: ret
@ -9509,7 +9505,7 @@ @@ -9509,7 +9505,7 @@
IL_0009: ldc.i4.3
IL_000a: newarr [mscorlib]System.Int32
IL_000f: dup
IL_0010: ldtoken field valuetype '<PrivateImplementationDetails>{416BD71B-B506-4355-8604-9F8C6A2FDEE6}'/'__StaticArrayInitTypeSize=12' '<PrivateImplementationDetails>{416BD71B-B506-4355-8604-9F8C6A2FDEE6}'::'$$method0x60000c0-1'
IL_0010: ldtoken field valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=12' '<PrivateImplementationDetails>'::'$$method0x60000c0-1'
IL_0015: call void [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray(class [mscorlib]System.Array,
valuetype [mscorlib]System.RuntimeFieldHandle)
IL_001a: stelem.ref
@ -10095,7 +10091,7 @@ @@ -10095,7 +10091,7 @@
} // end of property '<>f__AnonymousType1`2'::Y
} // end of class '<>f__AnonymousType1`2'
.class private auto ansi '<PrivateImplementationDetails>{416BD71B-B506-4355-8604-9F8C6A2FDEE6}'
.class private auto ansi '<PrivateImplementationDetails>'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
@ -10106,9 +10102,9 @@ @@ -10106,9 +10102,9 @@
.size 12
} // end of class '__StaticArrayInitTypeSize=12'
.field static assembly valuetype '<PrivateImplementationDetails>{416BD71B-B506-4355-8604-9F8C6A2FDEE6}'/'__StaticArrayInitTypeSize=12' '$$method0x60000bc-1' at I_00007670
.field static assembly valuetype '<PrivateImplementationDetails>{416BD71B-B506-4355-8604-9F8C6A2FDEE6}'/'__StaticArrayInitTypeSize=12' '$$method0x60000c0-1' at I_000076A8
} // end of class '<PrivateImplementationDetails>{416BD71B-B506-4355-8604-9F8C6A2FDEE6}'
.field static assembly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=12' '$$method0x60000bc-1' at I_00007670
.field static assembly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=12' '$$method0x60000c0-1' at I_000076A8
} // end of class '<PrivateImplementationDetails>'
.class private auto ansi sealed beforefieldinit '<>f__AnonymousType2`2'<'<A>j__TPar','<B>j__TPar'>
extends [mscorlib]System.Object
@ -10279,4 +10275,3 @@ @@ -10279,4 +10275,3 @@
.data cil I_000076A8 = bytearray (
01 00 00 00 02 00 00 00 03 00 00 00)
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\ExpressionTrees.opt.res

170
ICSharpCode.Decompiler.Tests/TestCases/Pretty/ExpressionTrees.opt.roslyn.il

@ -3117,7 +3117,7 @@ @@ -3117,7 +3117,7 @@
.method public hidebysig instance void
MembersBuiltin() cil managed
{
// Code size 431 (0x1af)
// Code size 401 (0x191)
.maxstack 8
IL_0000: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.ExpressionTrees::X()
IL_0005: ldc.i4.s 123
@ -3157,108 +3157,100 @@ @@ -3157,108 +3157,100 @@
IL_0063: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_0068: call class [System.Core]System.Linq.Expressions.ConstantExpression [System.Core]System.Linq.Expressions.Expression::Constant(object,
class [mscorlib]System.Type)
IL_006d: ldtoken [mscorlib]System.Object
IL_0072: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_0077: call class [System.Core]System.Linq.Expressions.UnaryExpression [System.Core]System.Linq.Expressions.Expression::Convert(class [System.Core]System.Linq.Expressions.Expression,
class [mscorlib]System.Type)
IL_007c: ldtoken [mscorlib]System.Enum
IL_0081: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_0086: call class [System.Core]System.Linq.Expressions.UnaryExpression [System.Core]System.Linq.Expressions.Expression::Convert(class [System.Core]System.Linq.Expressions.Expression,
class [mscorlib]System.Type)
IL_008b: ldtoken method instance bool [mscorlib]System.Enum::HasFlag(class [mscorlib]System.Enum)
IL_0090: call class [mscorlib]System.Reflection.MethodBase [mscorlib]System.Reflection.MethodBase::GetMethodFromHandle(valuetype [mscorlib]System.RuntimeMethodHandle)
IL_0095: castclass [mscorlib]System.Reflection.MethodInfo
IL_009a: ldc.i4.1
IL_009b: newarr [System.Core]System.Linq.Expressions.Expression
IL_00a0: dup
IL_00a1: ldc.i4.0
IL_00a2: ldc.i4.1
IL_00a3: box [mscorlib]System.AttributeTargets
IL_00a8: ldtoken [mscorlib]System.AttributeTargets
IL_00ad: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_00b2: call class [System.Core]System.Linq.Expressions.ConstantExpression [System.Core]System.Linq.Expressions.Expression::Constant(object,
class [mscorlib]System.Type)
IL_00b7: ldtoken [mscorlib]System.Enum
IL_00bc: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_00c1: call class [System.Core]System.Linq.Expressions.UnaryExpression [System.Core]System.Linq.Expressions.Expression::Convert(class [System.Core]System.Linq.Expressions.Expression,
IL_006d: ldtoken method instance bool [mscorlib]System.Enum::HasFlag(class [mscorlib]System.Enum)
IL_0072: call class [mscorlib]System.Reflection.MethodBase [mscorlib]System.Reflection.MethodBase::GetMethodFromHandle(valuetype [mscorlib]System.RuntimeMethodHandle)
IL_0077: castclass [mscorlib]System.Reflection.MethodInfo
IL_007c: ldc.i4.1
IL_007d: newarr [System.Core]System.Linq.Expressions.Expression
IL_0082: dup
IL_0083: ldc.i4.0
IL_0084: ldc.i4.1
IL_0085: box [mscorlib]System.AttributeTargets
IL_008a: ldtoken [mscorlib]System.AttributeTargets
IL_008f: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_0094: call class [System.Core]System.Linq.Expressions.ConstantExpression [System.Core]System.Linq.Expressions.Expression::Constant(object,
class [mscorlib]System.Type)
IL_0099: ldtoken [mscorlib]System.Enum
IL_009e: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_00a3: call class [System.Core]System.Linq.Expressions.UnaryExpression [System.Core]System.Linq.Expressions.Expression::Convert(class [System.Core]System.Linq.Expressions.Expression,
class [mscorlib]System.Type)
IL_00c6: stelem.ref
IL_00c7: call class [System.Core]System.Linq.Expressions.MethodCallExpression [System.Core]System.Linq.Expressions.Expression::Call(class [System.Core]System.Linq.Expressions.Expression,
IL_00a8: stelem.ref
IL_00a9: call class [System.Core]System.Linq.Expressions.MethodCallExpression [System.Core]System.Linq.Expressions.Expression::Call(class [System.Core]System.Linq.Expressions.Expression,
class [mscorlib]System.Reflection.MethodInfo,
class [System.Core]System.Linq.Expressions.Expression[])
IL_00cc: ldc.i4.0
IL_00cd: newarr [System.Core]System.Linq.Expressions.ParameterExpression
IL_00d2: call class [System.Core]System.Linq.Expressions.Expression`1<!!0> [System.Core]System.Linq.Expressions.Expression::Lambda<class [mscorlib]System.Func`1<bool>>(class [System.Core]System.Linq.Expressions.Expression,
IL_00ae: ldc.i4.0
IL_00af: newarr [System.Core]System.Linq.Expressions.ParameterExpression
IL_00b4: call class [System.Core]System.Linq.Expressions.Expression`1<!!0> [System.Core]System.Linq.Expressions.Expression::Lambda<class [mscorlib]System.Func`1<bool>>(class [System.Core]System.Linq.Expressions.Expression,
class [System.Core]System.Linq.Expressions.ParameterExpression[])
IL_00d7: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.ExpressionTrees::ToCode<bool>(object,
IL_00b9: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.ExpressionTrees::ToCode<bool>(object,
class [System.Core]System.Linq.Expressions.Expression`1<class [mscorlib]System.Func`1<!!0>>)
IL_00dc: pop
IL_00dd: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.ExpressionTrees::X()
IL_00e2: ldstr "abc"
IL_00e7: ldtoken [mscorlib]System.String
IL_00ec: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_00f1: call class [System.Core]System.Linq.Expressions.ConstantExpression [System.Core]System.Linq.Expressions.Expression::Constant(object,
class [mscorlib]System.Type)
IL_00f6: ldtoken method instance int32 [mscorlib]System.String::get_Length()
IL_00fb: call class [mscorlib]System.Reflection.MethodBase [mscorlib]System.Reflection.MethodBase::GetMethodFromHandle(valuetype [mscorlib]System.RuntimeMethodHandle)
IL_0100: castclass [mscorlib]System.Reflection.MethodInfo
IL_0105: call class [System.Core]System.Linq.Expressions.MemberExpression [System.Core]System.Linq.Expressions.Expression::Property(class [System.Core]System.Linq.Expressions.Expression,
IL_00be: pop
IL_00bf: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.ExpressionTrees::X()
IL_00c4: ldstr "abc"
IL_00c9: ldtoken [mscorlib]System.String
IL_00ce: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_00d3: call class [System.Core]System.Linq.Expressions.ConstantExpression [System.Core]System.Linq.Expressions.Expression::Constant(object,
class [mscorlib]System.Type)
IL_00d8: ldtoken method instance int32 [mscorlib]System.String::get_Length()
IL_00dd: call class [mscorlib]System.Reflection.MethodBase [mscorlib]System.Reflection.MethodBase::GetMethodFromHandle(valuetype [mscorlib]System.RuntimeMethodHandle)
IL_00e2: castclass [mscorlib]System.Reflection.MethodInfo
IL_00e7: call class [System.Core]System.Linq.Expressions.MemberExpression [System.Core]System.Linq.Expressions.Expression::Property(class [System.Core]System.Linq.Expressions.Expression,
class [mscorlib]System.Reflection.MethodInfo)
IL_010a: ldc.i4.3
IL_010b: box [mscorlib]System.Int32
IL_0110: ldtoken [mscorlib]System.Int32
IL_0115: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_011a: call class [System.Core]System.Linq.Expressions.ConstantExpression [System.Core]System.Linq.Expressions.Expression::Constant(object,
IL_00ec: ldc.i4.3
IL_00ed: box [mscorlib]System.Int32
IL_00f2: ldtoken [mscorlib]System.Int32
IL_00f7: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_00fc: call class [System.Core]System.Linq.Expressions.ConstantExpression [System.Core]System.Linq.Expressions.Expression::Constant(object,
class [mscorlib]System.Type)
IL_011f: call class [System.Core]System.Linq.Expressions.BinaryExpression [System.Core]System.Linq.Expressions.Expression::Equal(class [System.Core]System.Linq.Expressions.Expression,
IL_0101: call class [System.Core]System.Linq.Expressions.BinaryExpression [System.Core]System.Linq.Expressions.Expression::Equal(class [System.Core]System.Linq.Expressions.Expression,
class [System.Core]System.Linq.Expressions.Expression)
IL_0124: ldc.i4.0
IL_0125: newarr [System.Core]System.Linq.Expressions.ParameterExpression
IL_012a: call class [System.Core]System.Linq.Expressions.Expression`1<!!0> [System.Core]System.Linq.Expressions.Expression::Lambda<class [mscorlib]System.Func`1<bool>>(class [System.Core]System.Linq.Expressions.Expression,
IL_0106: ldc.i4.0
IL_0107: newarr [System.Core]System.Linq.Expressions.ParameterExpression
IL_010c: call class [System.Core]System.Linq.Expressions.Expression`1<!!0> [System.Core]System.Linq.Expressions.Expression::Lambda<class [mscorlib]System.Func`1<bool>>(class [System.Core]System.Linq.Expressions.Expression,
class [System.Core]System.Linq.Expressions.ParameterExpression[])
IL_012f: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.ExpressionTrees::ToCode<bool>(object,
IL_0111: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.ExpressionTrees::ToCode<bool>(object,
class [System.Core]System.Linq.Expressions.Expression`1<class [mscorlib]System.Func`1<!!0>>)
IL_0134: pop
IL_0135: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.ExpressionTrees::X()
IL_013a: ldc.i4.s 97
IL_013c: box [mscorlib]System.Char
IL_0141: ldtoken [mscorlib]System.Char
IL_0146: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_014b: call class [System.Core]System.Linq.Expressions.ConstantExpression [System.Core]System.Linq.Expressions.Expression::Constant(object,
class [mscorlib]System.Type)
IL_0150: ldtoken method instance int32 [mscorlib]System.Char::CompareTo(char)
IL_0155: call class [mscorlib]System.Reflection.MethodBase [mscorlib]System.Reflection.MethodBase::GetMethodFromHandle(valuetype [mscorlib]System.RuntimeMethodHandle)
IL_015a: castclass [mscorlib]System.Reflection.MethodInfo
IL_015f: ldc.i4.1
IL_0160: newarr [System.Core]System.Linq.Expressions.Expression
IL_0165: dup
IL_0166: ldc.i4.0
IL_0167: ldc.i4.s 98
IL_0169: box [mscorlib]System.Char
IL_016e: ldtoken [mscorlib]System.Char
IL_0173: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_0178: call class [System.Core]System.Linq.Expressions.ConstantExpression [System.Core]System.Linq.Expressions.Expression::Constant(object,
class [mscorlib]System.Type)
IL_017d: stelem.ref
IL_017e: call class [System.Core]System.Linq.Expressions.MethodCallExpression [System.Core]System.Linq.Expressions.Expression::Call(class [System.Core]System.Linq.Expressions.Expression,
IL_0116: pop
IL_0117: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.ExpressionTrees::X()
IL_011c: ldc.i4.s 97
IL_011e: box [mscorlib]System.Char
IL_0123: ldtoken [mscorlib]System.Char
IL_0128: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_012d: call class [System.Core]System.Linq.Expressions.ConstantExpression [System.Core]System.Linq.Expressions.Expression::Constant(object,
class [mscorlib]System.Type)
IL_0132: ldtoken method instance int32 [mscorlib]System.Char::CompareTo(char)
IL_0137: call class [mscorlib]System.Reflection.MethodBase [mscorlib]System.Reflection.MethodBase::GetMethodFromHandle(valuetype [mscorlib]System.RuntimeMethodHandle)
IL_013c: castclass [mscorlib]System.Reflection.MethodInfo
IL_0141: ldc.i4.1
IL_0142: newarr [System.Core]System.Linq.Expressions.Expression
IL_0147: dup
IL_0148: ldc.i4.0
IL_0149: ldc.i4.s 98
IL_014b: box [mscorlib]System.Char
IL_0150: ldtoken [mscorlib]System.Char
IL_0155: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_015a: call class [System.Core]System.Linq.Expressions.ConstantExpression [System.Core]System.Linq.Expressions.Expression::Constant(object,
class [mscorlib]System.Type)
IL_015f: stelem.ref
IL_0160: call class [System.Core]System.Linq.Expressions.MethodCallExpression [System.Core]System.Linq.Expressions.Expression::Call(class [System.Core]System.Linq.Expressions.Expression,
class [mscorlib]System.Reflection.MethodInfo,
class [System.Core]System.Linq.Expressions.Expression[])
IL_0183: ldc.i4.0
IL_0184: box [mscorlib]System.Int32
IL_0189: ldtoken [mscorlib]System.Int32
IL_018e: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_0193: call class [System.Core]System.Linq.Expressions.ConstantExpression [System.Core]System.Linq.Expressions.Expression::Constant(object,
IL_0165: ldc.i4.0
IL_0166: box [mscorlib]System.Int32
IL_016b: ldtoken [mscorlib]System.Int32
IL_0170: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_0175: call class [System.Core]System.Linq.Expressions.ConstantExpression [System.Core]System.Linq.Expressions.Expression::Constant(object,
class [mscorlib]System.Type)
IL_0198: call class [System.Core]System.Linq.Expressions.BinaryExpression [System.Core]System.Linq.Expressions.Expression::LessThan(class [System.Core]System.Linq.Expressions.Expression,
IL_017a: call class [System.Core]System.Linq.Expressions.BinaryExpression [System.Core]System.Linq.Expressions.Expression::LessThan(class [System.Core]System.Linq.Expressions.Expression,
class [System.Core]System.Linq.Expressions.Expression)
IL_019d: ldc.i4.0
IL_019e: newarr [System.Core]System.Linq.Expressions.ParameterExpression
IL_01a3: call class [System.Core]System.Linq.Expressions.Expression`1<!!0> [System.Core]System.Linq.Expressions.Expression::Lambda<class [mscorlib]System.Func`1<bool>>(class [System.Core]System.Linq.Expressions.Expression,
IL_017f: ldc.i4.0
IL_0180: newarr [System.Core]System.Linq.Expressions.ParameterExpression
IL_0185: call class [System.Core]System.Linq.Expressions.Expression`1<!!0> [System.Core]System.Linq.Expressions.Expression::Lambda<class [mscorlib]System.Func`1<bool>>(class [System.Core]System.Linq.Expressions.Expression,
class [System.Core]System.Linq.Expressions.ParameterExpression[])
IL_01a8: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.ExpressionTrees::ToCode<bool>(object,
IL_018a: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.ExpressionTrees::ToCode<bool>(object,
class [System.Core]System.Linq.Expressions.Expression`1<class [mscorlib]System.Func`1<!!0>>)
IL_01ad: pop
IL_01ae: ret
IL_018f: pop
IL_0190: ret
} // end of method ExpressionTrees::MembersBuiltin
.method public hidebysig instance void
@ -9680,12 +9672,12 @@ @@ -9680,12 +9672,12 @@
.size 12
} // end of class '__StaticArrayInitTypeSize=12'
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=12' E429CCA3F703A39CC5954A6572FEC9086135B34E at I_0000BDA0
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=12' E429CCA3F703A39CC5954A6572FEC9086135B34E at I_0000BD84
} // end of class '<PrivateImplementationDetails>'
// =============================================================
.data cil I_0000BDA0 = bytearray (
.data cil I_0000BD84 = bytearray (
01 00 00 00 02 00 00 00 03 00 00 00)
// *********** DISASSEMBLY COMPLETE ***********************

170
ICSharpCode.Decompiler.Tests/TestCases/Pretty/ExpressionTrees.roslyn.il

@ -3201,7 +3201,7 @@ @@ -3201,7 +3201,7 @@
.method public hidebysig instance void
MembersBuiltin() cil managed
{
// Code size 432 (0x1b0)
// Code size 402 (0x192)
.maxstack 8
IL_0000: nop
IL_0001: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.ExpressionTrees::X()
@ -3242,108 +3242,100 @@ @@ -3242,108 +3242,100 @@
IL_0064: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_0069: call class [System.Core]System.Linq.Expressions.ConstantExpression [System.Core]System.Linq.Expressions.Expression::Constant(object,
class [mscorlib]System.Type)
IL_006e: ldtoken [mscorlib]System.Object
IL_0073: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_0078: call class [System.Core]System.Linq.Expressions.UnaryExpression [System.Core]System.Linq.Expressions.Expression::Convert(class [System.Core]System.Linq.Expressions.Expression,
class [mscorlib]System.Type)
IL_007d: ldtoken [mscorlib]System.Enum
IL_0082: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_0087: call class [System.Core]System.Linq.Expressions.UnaryExpression [System.Core]System.Linq.Expressions.Expression::Convert(class [System.Core]System.Linq.Expressions.Expression,
class [mscorlib]System.Type)
IL_008c: ldtoken method instance bool [mscorlib]System.Enum::HasFlag(class [mscorlib]System.Enum)
IL_0091: call class [mscorlib]System.Reflection.MethodBase [mscorlib]System.Reflection.MethodBase::GetMethodFromHandle(valuetype [mscorlib]System.RuntimeMethodHandle)
IL_0096: castclass [mscorlib]System.Reflection.MethodInfo
IL_009b: ldc.i4.1
IL_009c: newarr [System.Core]System.Linq.Expressions.Expression
IL_00a1: dup
IL_00a2: ldc.i4.0
IL_00a3: ldc.i4.1
IL_00a4: box [mscorlib]System.AttributeTargets
IL_00a9: ldtoken [mscorlib]System.AttributeTargets
IL_00ae: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_00b3: call class [System.Core]System.Linq.Expressions.ConstantExpression [System.Core]System.Linq.Expressions.Expression::Constant(object,
class [mscorlib]System.Type)
IL_00b8: ldtoken [mscorlib]System.Enum
IL_00bd: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_00c2: call class [System.Core]System.Linq.Expressions.UnaryExpression [System.Core]System.Linq.Expressions.Expression::Convert(class [System.Core]System.Linq.Expressions.Expression,
IL_006e: ldtoken method instance bool [mscorlib]System.Enum::HasFlag(class [mscorlib]System.Enum)
IL_0073: call class [mscorlib]System.Reflection.MethodBase [mscorlib]System.Reflection.MethodBase::GetMethodFromHandle(valuetype [mscorlib]System.RuntimeMethodHandle)
IL_0078: castclass [mscorlib]System.Reflection.MethodInfo
IL_007d: ldc.i4.1
IL_007e: newarr [System.Core]System.Linq.Expressions.Expression
IL_0083: dup
IL_0084: ldc.i4.0
IL_0085: ldc.i4.1
IL_0086: box [mscorlib]System.AttributeTargets
IL_008b: ldtoken [mscorlib]System.AttributeTargets
IL_0090: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_0095: call class [System.Core]System.Linq.Expressions.ConstantExpression [System.Core]System.Linq.Expressions.Expression::Constant(object,
class [mscorlib]System.Type)
IL_009a: ldtoken [mscorlib]System.Enum
IL_009f: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_00a4: call class [System.Core]System.Linq.Expressions.UnaryExpression [System.Core]System.Linq.Expressions.Expression::Convert(class [System.Core]System.Linq.Expressions.Expression,
class [mscorlib]System.Type)
IL_00c7: stelem.ref
IL_00c8: call class [System.Core]System.Linq.Expressions.MethodCallExpression [System.Core]System.Linq.Expressions.Expression::Call(class [System.Core]System.Linq.Expressions.Expression,
IL_00a9: stelem.ref
IL_00aa: call class [System.Core]System.Linq.Expressions.MethodCallExpression [System.Core]System.Linq.Expressions.Expression::Call(class [System.Core]System.Linq.Expressions.Expression,
class [mscorlib]System.Reflection.MethodInfo,
class [System.Core]System.Linq.Expressions.Expression[])
IL_00cd: ldc.i4.0
IL_00ce: newarr [System.Core]System.Linq.Expressions.ParameterExpression
IL_00d3: call class [System.Core]System.Linq.Expressions.Expression`1<!!0> [System.Core]System.Linq.Expressions.Expression::Lambda<class [mscorlib]System.Func`1<bool>>(class [System.Core]System.Linq.Expressions.Expression,
IL_00af: ldc.i4.0
IL_00b0: newarr [System.Core]System.Linq.Expressions.ParameterExpression
IL_00b5: call class [System.Core]System.Linq.Expressions.Expression`1<!!0> [System.Core]System.Linq.Expressions.Expression::Lambda<class [mscorlib]System.Func`1<bool>>(class [System.Core]System.Linq.Expressions.Expression,
class [System.Core]System.Linq.Expressions.ParameterExpression[])
IL_00d8: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.ExpressionTrees::ToCode<bool>(object,
IL_00ba: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.ExpressionTrees::ToCode<bool>(object,
class [System.Core]System.Linq.Expressions.Expression`1<class [mscorlib]System.Func`1<!!0>>)
IL_00dd: pop
IL_00de: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.ExpressionTrees::X()
IL_00e3: ldstr "abc"
IL_00e8: ldtoken [mscorlib]System.String
IL_00ed: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_00f2: call class [System.Core]System.Linq.Expressions.ConstantExpression [System.Core]System.Linq.Expressions.Expression::Constant(object,
class [mscorlib]System.Type)
IL_00f7: ldtoken method instance int32 [mscorlib]System.String::get_Length()
IL_00fc: call class [mscorlib]System.Reflection.MethodBase [mscorlib]System.Reflection.MethodBase::GetMethodFromHandle(valuetype [mscorlib]System.RuntimeMethodHandle)
IL_0101: castclass [mscorlib]System.Reflection.MethodInfo
IL_0106: call class [System.Core]System.Linq.Expressions.MemberExpression [System.Core]System.Linq.Expressions.Expression::Property(class [System.Core]System.Linq.Expressions.Expression,
IL_00bf: pop
IL_00c0: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.ExpressionTrees::X()
IL_00c5: ldstr "abc"
IL_00ca: ldtoken [mscorlib]System.String
IL_00cf: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_00d4: call class [System.Core]System.Linq.Expressions.ConstantExpression [System.Core]System.Linq.Expressions.Expression::Constant(object,
class [mscorlib]System.Type)
IL_00d9: ldtoken method instance int32 [mscorlib]System.String::get_Length()
IL_00de: call class [mscorlib]System.Reflection.MethodBase [mscorlib]System.Reflection.MethodBase::GetMethodFromHandle(valuetype [mscorlib]System.RuntimeMethodHandle)
IL_00e3: castclass [mscorlib]System.Reflection.MethodInfo
IL_00e8: call class [System.Core]System.Linq.Expressions.MemberExpression [System.Core]System.Linq.Expressions.Expression::Property(class [System.Core]System.Linq.Expressions.Expression,
class [mscorlib]System.Reflection.MethodInfo)
IL_010b: ldc.i4.3
IL_010c: box [mscorlib]System.Int32
IL_0111: ldtoken [mscorlib]System.Int32
IL_0116: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_011b: call class [System.Core]System.Linq.Expressions.ConstantExpression [System.Core]System.Linq.Expressions.Expression::Constant(object,
IL_00ed: ldc.i4.3
IL_00ee: box [mscorlib]System.Int32
IL_00f3: ldtoken [mscorlib]System.Int32
IL_00f8: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_00fd: call class [System.Core]System.Linq.Expressions.ConstantExpression [System.Core]System.Linq.Expressions.Expression::Constant(object,
class [mscorlib]System.Type)
IL_0120: call class [System.Core]System.Linq.Expressions.BinaryExpression [System.Core]System.Linq.Expressions.Expression::Equal(class [System.Core]System.Linq.Expressions.Expression,
IL_0102: call class [System.Core]System.Linq.Expressions.BinaryExpression [System.Core]System.Linq.Expressions.Expression::Equal(class [System.Core]System.Linq.Expressions.Expression,
class [System.Core]System.Linq.Expressions.Expression)
IL_0125: ldc.i4.0
IL_0126: newarr [System.Core]System.Linq.Expressions.ParameterExpression
IL_012b: call class [System.Core]System.Linq.Expressions.Expression`1<!!0> [System.Core]System.Linq.Expressions.Expression::Lambda<class [mscorlib]System.Func`1<bool>>(class [System.Core]System.Linq.Expressions.Expression,
IL_0107: ldc.i4.0
IL_0108: newarr [System.Core]System.Linq.Expressions.ParameterExpression
IL_010d: call class [System.Core]System.Linq.Expressions.Expression`1<!!0> [System.Core]System.Linq.Expressions.Expression::Lambda<class [mscorlib]System.Func`1<bool>>(class [System.Core]System.Linq.Expressions.Expression,
class [System.Core]System.Linq.Expressions.ParameterExpression[])
IL_0130: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.ExpressionTrees::ToCode<bool>(object,
IL_0112: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.ExpressionTrees::ToCode<bool>(object,
class [System.Core]System.Linq.Expressions.Expression`1<class [mscorlib]System.Func`1<!!0>>)
IL_0135: pop
IL_0136: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.ExpressionTrees::X()
IL_013b: ldc.i4.s 97
IL_013d: box [mscorlib]System.Char
IL_0142: ldtoken [mscorlib]System.Char
IL_0147: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_014c: call class [System.Core]System.Linq.Expressions.ConstantExpression [System.Core]System.Linq.Expressions.Expression::Constant(object,
class [mscorlib]System.Type)
IL_0151: ldtoken method instance int32 [mscorlib]System.Char::CompareTo(char)
IL_0156: call class [mscorlib]System.Reflection.MethodBase [mscorlib]System.Reflection.MethodBase::GetMethodFromHandle(valuetype [mscorlib]System.RuntimeMethodHandle)
IL_015b: castclass [mscorlib]System.Reflection.MethodInfo
IL_0160: ldc.i4.1
IL_0161: newarr [System.Core]System.Linq.Expressions.Expression
IL_0166: dup
IL_0167: ldc.i4.0
IL_0168: ldc.i4.s 98
IL_016a: box [mscorlib]System.Char
IL_016f: ldtoken [mscorlib]System.Char
IL_0174: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_0179: call class [System.Core]System.Linq.Expressions.ConstantExpression [System.Core]System.Linq.Expressions.Expression::Constant(object,
class [mscorlib]System.Type)
IL_017e: stelem.ref
IL_017f: call class [System.Core]System.Linq.Expressions.MethodCallExpression [System.Core]System.Linq.Expressions.Expression::Call(class [System.Core]System.Linq.Expressions.Expression,
IL_0117: pop
IL_0118: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.ExpressionTrees::X()
IL_011d: ldc.i4.s 97
IL_011f: box [mscorlib]System.Char
IL_0124: ldtoken [mscorlib]System.Char
IL_0129: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_012e: call class [System.Core]System.Linq.Expressions.ConstantExpression [System.Core]System.Linq.Expressions.Expression::Constant(object,
class [mscorlib]System.Type)
IL_0133: ldtoken method instance int32 [mscorlib]System.Char::CompareTo(char)
IL_0138: call class [mscorlib]System.Reflection.MethodBase [mscorlib]System.Reflection.MethodBase::GetMethodFromHandle(valuetype [mscorlib]System.RuntimeMethodHandle)
IL_013d: castclass [mscorlib]System.Reflection.MethodInfo
IL_0142: ldc.i4.1
IL_0143: newarr [System.Core]System.Linq.Expressions.Expression
IL_0148: dup
IL_0149: ldc.i4.0
IL_014a: ldc.i4.s 98
IL_014c: box [mscorlib]System.Char
IL_0151: ldtoken [mscorlib]System.Char
IL_0156: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_015b: call class [System.Core]System.Linq.Expressions.ConstantExpression [System.Core]System.Linq.Expressions.Expression::Constant(object,
class [mscorlib]System.Type)
IL_0160: stelem.ref
IL_0161: call class [System.Core]System.Linq.Expressions.MethodCallExpression [System.Core]System.Linq.Expressions.Expression::Call(class [System.Core]System.Linq.Expressions.Expression,
class [mscorlib]System.Reflection.MethodInfo,
class [System.Core]System.Linq.Expressions.Expression[])
IL_0184: ldc.i4.0
IL_0185: box [mscorlib]System.Int32
IL_018a: ldtoken [mscorlib]System.Int32
IL_018f: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_0194: call class [System.Core]System.Linq.Expressions.ConstantExpression [System.Core]System.Linq.Expressions.Expression::Constant(object,
IL_0166: ldc.i4.0
IL_0167: box [mscorlib]System.Int32
IL_016c: ldtoken [mscorlib]System.Int32
IL_0171: call class [mscorlib]System.Type [mscorlib]System.Type::GetTypeFromHandle(valuetype [mscorlib]System.RuntimeTypeHandle)
IL_0176: call class [System.Core]System.Linq.Expressions.ConstantExpression [System.Core]System.Linq.Expressions.Expression::Constant(object,
class [mscorlib]System.Type)
IL_0199: call class [System.Core]System.Linq.Expressions.BinaryExpression [System.Core]System.Linq.Expressions.Expression::LessThan(class [System.Core]System.Linq.Expressions.Expression,
IL_017b: call class [System.Core]System.Linq.Expressions.BinaryExpression [System.Core]System.Linq.Expressions.Expression::LessThan(class [System.Core]System.Linq.Expressions.Expression,
class [System.Core]System.Linq.Expressions.Expression)
IL_019e: ldc.i4.0
IL_019f: newarr [System.Core]System.Linq.Expressions.ParameterExpression
IL_01a4: call class [System.Core]System.Linq.Expressions.Expression`1<!!0> [System.Core]System.Linq.Expressions.Expression::Lambda<class [mscorlib]System.Func`1<bool>>(class [System.Core]System.Linq.Expressions.Expression,
IL_0180: ldc.i4.0
IL_0181: newarr [System.Core]System.Linq.Expressions.ParameterExpression
IL_0186: call class [System.Core]System.Linq.Expressions.Expression`1<!!0> [System.Core]System.Linq.Expressions.Expression::Lambda<class [mscorlib]System.Func`1<bool>>(class [System.Core]System.Linq.Expressions.Expression,
class [System.Core]System.Linq.Expressions.ParameterExpression[])
IL_01a9: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.ExpressionTrees::ToCode<bool>(object,
IL_018b: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.ExpressionTrees::ToCode<bool>(object,
class [System.Core]System.Linq.Expressions.Expression`1<class [mscorlib]System.Func`1<!!0>>)
IL_01ae: pop
IL_01af: ret
IL_0190: pop
IL_0191: ret
} // end of method ExpressionTrees::MembersBuiltin
.method public hidebysig instance void
@ -9927,12 +9919,12 @@ @@ -9927,12 +9919,12 @@
.size 12
} // end of class '__StaticArrayInitTypeSize=12'
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=12' E429CCA3F703A39CC5954A6572FEC9086135B34E at I_0000C030
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=12' E429CCA3F703A39CC5954A6572FEC9086135B34E at I_0000C014
} // end of class '<PrivateImplementationDetails>'
// =============================================================
.data cil I_0000C030 = bytearray (
.data cil I_0000C014 = bytearray (
01 00 00 00 02 00 00 00 03 00 00 00)
// *********** DISASSEMBLY COMPLETE ***********************

2
ICSharpCode.Decompiler.Tests/TestCases/Pretty/FixProxyCalls.cs

@ -32,7 +32,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.ILPretty @@ -32,7 +32,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.ILPretty
{
protected internal IEnumerable<string> Test2(string test)
{
yield return Test(test);
yield return base.Test(test);
}
}

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/FixProxyCalls.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly kjibydgt
.assembly FixProxyCalls
{
.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.
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module kjibydgt.dll
// MVID: {7F7E319E-D28C-421B-B3A6-A5F71C1BC3A5}
.module FixProxyCalls.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
// Image base: 0x02700000
// =============== CLASS MEMBERS DECLARATION ===================
@ -1576,4 +1572,3 @@ @@ -1576,4 +1572,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// Warnung: Win32-Ressourcendatei "../../../TestCases/Pretty\FixProxyCalls.res" wurde erstellt.

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/FixProxyCalls.opt.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. Alle Rechte vorbehalten.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly b0rqcnnq
.assembly FixProxyCalls.opt
{
.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.
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module b0rqcnnq.dll
// MVID: {D8989CD1-06F3-4E8C-8C4C-7F7B95ACB488}
.module FixProxyCalls.opt.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
// Image base: 0x00810000
// =============== CLASS MEMBERS DECLARATION ===================
@ -1320,4 +1316,3 @@ @@ -1320,4 +1316,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// Warnung: Win32-Ressourcendatei "../../../TestCases/Pretty\FixProxyCalls.opt.res" wurde erstellt.

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/Generics.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly hdkktc2j
.assembly Generics
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module hdkktc2j.dll
// MVID: {E1E1D350-F9F6-4498-A05D-8F728F6F95CE}
.module Generics.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
// Image base: 0x04410000
// =============== CLASS MEMBERS DECLARATION ===================
@ -310,4 +306,3 @@ @@ -310,4 +306,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file C:\work\ILSpy\ICSharpCode.Decompiler.Tests\bin\Debug\net46\../../../TestCases/Pretty\Generics.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/Generics.opt.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly qmjsj0bc
.assembly Generics.opt
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module qmjsj0bc.dll
// MVID: {A13EDBC1-FA83-4831-BCEB-F1A730B462DC}
.module Generics.opt.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
// Image base: 0x03640000
// =============== CLASS MEMBERS DECLARATION ===================
@ -243,4 +239,3 @@ @@ -243,4 +239,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file C:\work\ILSpy\ICSharpCode.Decompiler.Tests\bin\Debug\net46\../../../TestCases/Pretty\Generics.opt.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/HelloWorld.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.17929
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly '5iai3vtm'
.assembly HelloWorld
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module '5iai3vtm.dll'
// MVID: {66BA676E-A1AF-4531-9C09-198436A0A184}
.module HelloWorld.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
// Image base: 0x00CC0000
// =============== CLASS MEMBERS DECLARATION ===================
@ -63,4 +59,3 @@ @@ -63,4 +59,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../Tests/TestCases/Pretty\HelloWorld.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -15,7 +13,7 @@ @@ -15,7 +13,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly rzivg0mq
.assembly InitializerTests
{
.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
@ -25,15 +23,13 @@ @@ -25,15 +23,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module rzivg0mq.dll
// MVID: {66592AAC-07E3-4F52-A96F-0428775E7A0F}
.module InitializerTests.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
// Image base: 0x00E00000
// =============== CLASS MEMBERS DECLARATION ===================
@ -1549,4 +1545,3 @@ @@ -1549,4 +1545,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\InitializerTests.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.opt.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -15,7 +13,7 @@ @@ -15,7 +13,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly n52bfodk
.assembly InitializerTests.opt
{
.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
@ -25,15 +23,13 @@ @@ -25,15 +23,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module n52bfodk.dll
// MVID: {2B30E2AC-D797-4A69-ACEC-93251C343504}
.module InitializerTests.opt.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
// Image base: 0x037A0000
// =============== CLASS MEMBERS DECLARATION ===================
@ -1304,4 +1300,3 @@ @@ -1304,4 +1300,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\InitializerTests.opt.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/InlineAssignmentTest.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly cljdpn4p
.assembly InlineAssignmentTest
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module cljdpn4p.dll
// MVID: {4E91830C-4968-4AA2-B516-7FDA32452515}
.module InlineAssignmentTest.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
// Image base: 0x006A0000
// =============== CLASS MEMBERS DECLARATION ===================
@ -527,4 +523,3 @@ @@ -527,4 +523,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\InlineAssignmentTest.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/InlineAssignmentTest.opt.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly jfxjxuqt
.assembly InlineAssignmentTest.opt
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module jfxjxuqt.dll
// MVID: {862986C8-F9C1-4FF3-8646-A3CA63D29744}
.module InlineAssignmentTest.opt.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
// Image base: 0x010B0000
// =============== CLASS MEMBERS DECLARATION ===================
@ -428,4 +424,3 @@ @@ -428,4 +424,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\InlineAssignmentTest.opt.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/LiftedOperators.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.18020
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly '35ltrsak'
.assembly LiftedOperators
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module '35ltrsak.dll'
// MVID: {E2680319-4EDA-4756-B327-523DC92BF0AB}
.module LiftedOperators.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
// Image base: 0x00ED0000
// =============== CLASS MEMBERS DECLARATION ===================
@ -6936,4 +6932,3 @@ @@ -6936,4 +6932,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\LiftedOperators.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/LiftedOperators.opt.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.18020
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly n45w5r1e
.assembly LiftedOperators.opt
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module n45w5r1e.dll
// MVID: {A02D3ECA-E4C6-46ED-A628-8A99594A9C16}
.module LiftedOperators.opt.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
// Image base: 0x02DA0000
// =============== CLASS MEMBERS DECLARATION ===================
@ -6377,4 +6373,3 @@ @@ -6377,4 +6373,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\LiftedOperators.opt.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/Lock.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.17929
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly '1c2baaro'
.assembly Lock
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module '1c2baaro.dll'
// MVID: {5FC5B58D-AAD7-4436-A58F-6F3D75486C66}
.module Lock.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
// Image base: 0x00C60000
// =============== CLASS MEMBERS DECLARATION ===================
@ -143,4 +139,3 @@ @@ -143,4 +139,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\Lock.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/Lock.mcs.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 2:0:0:0
}
.assembly tmpE10E
.assembly Lock.mcs
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
@ -53,15 +51,13 @@ @@ -53,15 +51,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module tmpE10E.tmp
// MVID: {0300BC49-B2EF-4506-8B74-DF85DD4F91E4}
.module Lock.mcs.dll
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x04DB0000
// =============== CLASS MEMBERS DECLARATION ===================
@ -136,4 +132,3 @@ @@ -136,4 +132,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\Lock.mcs.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/Lock.opt.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.17929
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly titpuxma
.assembly Lock.opt
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module titpuxma.dll
// MVID: {8B90EB29-A139-4376-848E-C5D4D42952F1}
.module Lock.opt.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
// Image base: 0x02AF0000
// =============== CLASS MEMBERS DECLARATION ===================
@ -119,4 +115,3 @@ @@ -119,4 +115,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\Lock.opt.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/Lock.opt.mcs.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 2:0:0:0
}
.assembly tmpE3DF
.assembly Lock.opt.mcs
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
@ -53,15 +51,13 @@ @@ -53,15 +51,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module tmpE3DF.tmp
// MVID: {2EBA312B-EF3B-4364-91A6-0062C2105169}
.module Lock.opt.mcs.dll
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x03960000
// =============== CLASS MEMBERS DECLARATION ===================
@ -136,4 +132,3 @@ @@ -136,4 +132,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\Lock.opt.mcs.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/Loops.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly '50bjvac5'
.assembly Loops
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module '50bjvac5.dll'
// MVID: {7EA9F0A8-B896-4F84-BCD8-AC7B4D44BBC0}
.module Loops.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
// Image base: 0x03450000
// =============== CLASS MEMBERS DECLARATION ===================
@ -2692,4 +2688,3 @@ @@ -2692,4 +2688,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\Loops.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/Loops.mcs.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -15,7 +13,7 @@ @@ -15,7 +13,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 3:5:0:0
}
.assembly tmp92BB
.assembly Loops.mcs
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
@ -58,15 +56,13 @@ @@ -58,15 +56,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module tmp92BB.tmp
// MVID: {C1A55351-8EB8-4535-855C-2DDA0B7B97CF}
.module Loops.mcs.dll
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x03820000
// =============== CLASS MEMBERS DECLARATION ===================
@ -1943,4 +1939,3 @@ @@ -1943,4 +1939,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file C:\Users\Siegfried\Projects\ILSpy master\ICSharpCode.Decompiler.Tests\bin\Debug\net46\../../../TestCases/Pretty\Loops.mcs.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/Loops.opt.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly ca3webe1
.assembly Loops.opt
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module ca3webe1.dll
// MVID: {3674B35A-51F1-4E0A-A67E-D7FEBA11373B}
.module Loops.opt.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
// Image base: 0x02DA0000
// =============== CLASS MEMBERS DECLARATION ===================
@ -2089,4 +2085,3 @@ @@ -2089,4 +2085,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\Loops.opt.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/Loops.opt.mcs.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -15,7 +13,7 @@ @@ -15,7 +13,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 3:5:0:0
}
.assembly tmpC964
.assembly Loops.opt.mcs
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
@ -58,15 +56,13 @@ @@ -58,15 +56,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module tmpC964.tmp
// MVID: {E309B5C7-312B-4338-9E32-97629EBB582F}
.module Loops.opt.mcs.dll
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x04B70000
// =============== CLASS MEMBERS DECLARATION ===================
@ -1943,4 +1939,3 @@ @@ -1943,4 +1939,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file C:\Users\Siegfried\Projects\ILSpy master\ICSharpCode.Decompiler.Tests\bin\Debug\net46\../../../TestCases/Pretty\Loops.opt.mcs.res

3
ICSharpCode.Decompiler.Tests/TestCases/Pretty/PInvoke.il

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
)
.ver 4:0:0:0
}
.assembly c0d101lq
.assembly PInvoke
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = (
01 00 08 00 00 00 00 00
@ -26,7 +26,6 @@ @@ -26,7 +26,6 @@
}
.module PInvoke
// MVID: {F608732B-D0A2-45AE-9706-B0B2379F8AAE}
.corflags 0x00000001 // ILOnly
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = (
01 00 00 00

3
ICSharpCode.Decompiler.Tests/TestCases/Pretty/PInvoke.opt.il

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
)
.ver 4:0:0:0
}
.assembly jfi2am5n
.assembly PInvoke.opt
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = (
01 00 08 00 00 00 00 00
@ -26,7 +26,6 @@ @@ -26,7 +26,6 @@
}
.module PInvoke.opt
// MVID: {8A131D15-EAC0-48F2-A958-1AF6CBD25557}
.corflags 0x00000001 // ILOnly
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = (
01 00 00 00

1
ICSharpCode.Decompiler.Tests/TestCases/Pretty/PInvoke.opt.roslyn.il

@ -29,7 +29,6 @@ @@ -29,7 +29,6 @@
}
.module PInvoke.opt.roslyn
// MVID: {63CD2985-0EDA-4C6F-91E0-BFDEBA4905D5}
.corflags 0x00000001 // ILOnly
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = (
01 00 00 00

1
ICSharpCode.Decompiler.Tests/TestCases/Pretty/PInvoke.roslyn.il

@ -29,7 +29,6 @@ @@ -29,7 +29,6 @@
}
.module PInvoke.roslyn
// MVID: {86F00A7C-01D7-4EA0-AFE1-EB3A06A0C1FD}
.corflags 0x00000001 // ILOnly
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = (
01 00 00 00

63
ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.17929
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly l2f5cj2d
.assembly PropertiesAndEvents
{
.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.
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module l2f5cj2d.dll
// MVID: {B40A9FBE-DEAE-43DA-970B-68C48E122E20}
.module PropertiesAndEvents.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
// Image base: 0x00DC0000
// =============== CLASS MEMBERS DECLARATION ===================
@ -39,24 +35,24 @@ @@ -39,24 +35,24 @@
.class interface abstract auto ansi nested private IBase
{
.method public hidebysig newslot specialname abstract virtual
instance void add_Event(class [mscorlib]System.Action 'value') cil managed
instance int32 get_Test() cil managed
{
} // end of method IBase::add_Event
} // end of method IBase::get_Test
.method public hidebysig newslot specialname abstract virtual
instance void remove_Event(class [mscorlib]System.Action 'value') cil managed
instance void set_Test(int32 'value') cil managed
{
} // end of method IBase::remove_Event
} // end of method IBase::set_Test
.method public hidebysig newslot specialname abstract virtual
instance int32 get_Test() cil managed
instance void add_Event(class [mscorlib]System.Action 'value') cil managed
{
} // end of method IBase::get_Test
} // end of method IBase::add_Event
.method public hidebysig newslot specialname abstract virtual
instance void set_Test(int32 'value') cil managed
instance void remove_Event(class [mscorlib]System.Action 'value') cil managed
{
} // end of method IBase::set_Test
} // end of method IBase::remove_Event
.event [mscorlib]System.Action Event
{
@ -75,45 +71,45 @@ @@ -75,45 +71,45 @@
implements ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase
{
.method private hidebysig newslot specialname virtual final
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event(class [mscorlib]System.Action 'value') cil managed
instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_Test() cil managed
{
.override ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::add_Event
// Code size 2 (0x2)
.override ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::get_Test
// Code size 7 (0x7)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event
IL_0001: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0006: throw
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_Test
.method private hidebysig newslot specialname virtual final
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event(class [mscorlib]System.Action 'value') cil managed
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test(int32 'value') cil managed
{
.override ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::remove_Event
.override ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::set_Test
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test
.method private hidebysig newslot specialname virtual final
instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_Test() cil managed
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event(class [mscorlib]System.Action 'value') cil managed
{
.override ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::get_Test
// Code size 7 (0x7)
.override ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::add_Event
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0006: throw
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_Test
IL_0001: ret
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event
.method private hidebysig newslot specialname virtual final
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test(int32 'value') cil managed
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event(class [mscorlib]System.Action 'value') cil managed
{
.override ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::set_Test
.override ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::remove_Event
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
@ -382,8 +378,8 @@ @@ -382,8 +378,8 @@
IL_002c: ret
} // end of method PropertiesAndEvents::.ctor
.method private hidebysig static void '<.ctor>b__0'(object sender,
class [mscorlib]System.EventArgs e) cil managed
.method private hidebysig static void '<.ctor>b__0'(object param0,
class [mscorlib]System.EventArgs param1) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 2 (0x2)
@ -418,4 +414,3 @@ @@ -418,4 +414,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\PropertiesAndEvents.res

63
ICSharpCode.Decompiler.Tests/TestCases/Pretty/PropertiesAndEvents.opt.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.17929
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly sagvhpmx
.assembly PropertiesAndEvents.opt
{
.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.
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module sagvhpmx.dll
// MVID: {01D434AD-9489-4A19-81AE-3BC2177A09C3}
.module PropertiesAndEvents.opt.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
// Image base: 0x02850000
// =============== CLASS MEMBERS DECLARATION ===================
@ -39,24 +35,24 @@ @@ -39,24 +35,24 @@
.class interface abstract auto ansi nested private IBase
{
.method public hidebysig newslot specialname abstract virtual
instance void add_Event(class [mscorlib]System.Action 'value') cil managed
instance int32 get_Test() cil managed
{
} // end of method IBase::add_Event
} // end of method IBase::get_Test
.method public hidebysig newslot specialname abstract virtual
instance void remove_Event(class [mscorlib]System.Action 'value') cil managed
instance void set_Test(int32 'value') cil managed
{
} // end of method IBase::remove_Event
} // end of method IBase::set_Test
.method public hidebysig newslot specialname abstract virtual
instance int32 get_Test() cil managed
instance void add_Event(class [mscorlib]System.Action 'value') cil managed
{
} // end of method IBase::get_Test
} // end of method IBase::add_Event
.method public hidebysig newslot specialname abstract virtual
instance void set_Test(int32 'value') cil managed
instance void remove_Event(class [mscorlib]System.Action 'value') cil managed
{
} // end of method IBase::set_Test
} // end of method IBase::remove_Event
.event [mscorlib]System.Action Event
{
@ -75,41 +71,41 @@ @@ -75,41 +71,41 @@
implements ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase
{
.method private hidebysig newslot specialname virtual final
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event(class [mscorlib]System.Action 'value') cil managed
instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_Test() cil managed
{
.override ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::add_Event
// Code size 1 (0x1)
.override ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::get_Test
// Code size 6 (0x6)
.maxstack 8
IL_0000: ret
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event
IL_0000: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0005: throw
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_Test
.method private hidebysig newslot specialname virtual final
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event(class [mscorlib]System.Action 'value') cil managed
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test(int32 'value') cil managed
{
.override ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::remove_Event
.override ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::set_Test
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test
.method private hidebysig newslot specialname virtual final
instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_Test() cil managed
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event(class [mscorlib]System.Action 'value') cil managed
{
.override ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::get_Test
// Code size 6 (0x6)
.override ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::add_Event
// Code size 1 (0x1)
.maxstack 8
IL_0000: newobj instance void [mscorlib]System.NotImplementedException::.ctor()
IL_0005: throw
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.get_Test
IL_0000: ret
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.add_Event
.method private hidebysig newslot specialname virtual final
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test(int32 'value') cil managed
instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event(class [mscorlib]System.Action 'value') cil managed
{
.override ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::set_Test
.override ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents/IBase::remove_Event
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.set_Test
} // end of method Impl::ICSharpCode.Decompiler.Tests.TestCases.Pretty.PropertiesAndEvents.IBase.remove_Event
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
@ -342,8 +338,8 @@ @@ -342,8 +338,8 @@
IL_0029: ret
} // end of method PropertiesAndEvents::.ctor
.method private hidebysig static void '<.ctor>b__0'(object sender,
class [mscorlib]System.EventArgs e) cil managed
.method private hidebysig static void '<.ctor>b__0'(object param0,
class [mscorlib]System.EventArgs param1) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 1 (0x1)
@ -377,4 +373,3 @@ @@ -377,4 +373,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\PropertiesAndEvents.opt.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/ShortCircuit.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly bqtfnoxz
.assembly ShortCircuit
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module bqtfnoxz.dll
// MVID: {E41D831E-089A-4F86-AA5D-FD2CB6D7C452}
.module ShortCircuit.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
// Image base: 0x03120000
// =============== CLASS MEMBERS DECLARATION ===================
@ -636,4 +632,3 @@ @@ -636,4 +632,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\ShortCircuit.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/ShortCircuit.opt.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly '4yyrmwig'
.assembly ShortCircuit.opt
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module '4yyrmwig.dll'
// MVID: {A53FB590-72B6-46AB-809D-9F6F92B64475}
.module ShortCircuit.opt.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
// Image base: 0x015D0000
// =============== CLASS MEMBERS DECLARATION ===================
@ -464,4 +460,3 @@ @@ -464,4 +460,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\ShortCircuit.opt.res

31
ICSharpCode.Decompiler.Tests/TestCases/Pretty/Switch.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly eo05gpu0
.assembly Switch
{
.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.
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module eo05gpu0.dll
// MVID: {9D56DD8F-56CC-4AA5-939D-F5DC041F1927}
.module Switch.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
// Image base: 0x04BA0000
// =============== CLASS MEMBERS DECLARATION ===================
@ -880,7 +876,7 @@ @@ -880,7 +876,7 @@
IL_0015: brfalse IL_00e9
IL_001a: volatile.
IL_001c: ldsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>{9D56DD8F-56CC-4AA5-939D-F5DC041F1927}'::'$$method0x600000d-1'
IL_001c: ldsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>'::'$$method0x600000d-1'
IL_0021: brtrue.s IL_0084
IL_0023: ldc.i4.7
@ -921,9 +917,9 @@ @@ -921,9 +917,9 @@
IL_0078: call instance void class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32>::Add(!0,
!1)
IL_007d: volatile.
IL_007f: stsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>{9D56DD8F-56CC-4AA5-939D-F5DC041F1927}'::'$$method0x600000d-1'
IL_007f: stsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>'::'$$method0x600000d-1'
IL_0084: volatile.
IL_0086: ldsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>{9D56DD8F-56CC-4AA5-939D-F5DC041F1927}'::'$$method0x600000d-1'
IL_0086: ldsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>'::'$$method0x600000d-1'
IL_008b: ldloc.1
IL_008c: ldloca.s V_2
IL_008e: call instance bool class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32>::TryGetValue(!0,
@ -995,7 +991,7 @@ @@ -995,7 +991,7 @@
IL_0013: brfalse IL_0158
IL_0018: volatile.
IL_001a: ldsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>{9D56DD8F-56CC-4AA5-939D-F5DC041F1927}'::'$$method0x600000e-1'
IL_001a: ldsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>'::'$$method0x600000e-1'
IL_001f: brtrue IL_00b8
IL_0024: ldc.i4.s 11
@ -1056,9 +1052,9 @@ @@ -1056,9 +1052,9 @@
IL_00ac: call instance void class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32>::Add(!0,
!1)
IL_00b1: volatile.
IL_00b3: stsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>{9D56DD8F-56CC-4AA5-939D-F5DC041F1927}'::'$$method0x600000e-1'
IL_00b3: stsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>'::'$$method0x600000e-1'
IL_00b8: volatile.
IL_00ba: ldsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>{9D56DD8F-56CC-4AA5-939D-F5DC041F1927}'::'$$method0x600000e-1'
IL_00ba: ldsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>'::'$$method0x600000e-1'
IL_00bf: ldloc.1
IL_00c0: ldloca.s V_2
IL_00c2: call instance bool class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32>::TryGetValue(!0,
@ -1346,7 +1342,7 @@ @@ -1346,7 +1342,7 @@
IL_003b: brfalse IL_012c
IL_0040: volatile.
IL_0042: ldsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>{9D56DD8F-56CC-4AA5-939D-F5DC041F1927}'::'$$method0x6000013-1'
IL_0042: ldsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>'::'$$method0x6000013-1'
IL_0047: brtrue.s IL_009e
IL_0049: ldc.i4.6
@ -1382,9 +1378,9 @@ @@ -1382,9 +1378,9 @@
IL_0092: call instance void class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32>::Add(!0,
!1)
IL_0097: volatile.
IL_0099: stsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>{9D56DD8F-56CC-4AA5-939D-F5DC041F1927}'::'$$method0x6000013-1'
IL_0099: stsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>'::'$$method0x6000013-1'
IL_009e: volatile.
IL_00a0: ldsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>{9D56DD8F-56CC-4AA5-939D-F5DC041F1927}'::'$$method0x6000013-1'
IL_00a0: ldsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>'::'$$method0x6000013-1'
IL_00a5: ldloc.s V_5
IL_00a7: ldloca.s V_6
IL_00a9: call instance bool class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32>::TryGetValue(!0,
@ -1611,17 +1607,16 @@ @@ -1611,17 +1607,16 @@
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch
.class private auto ansi '<PrivateImplementationDetails>{9D56DD8F-56CC-4AA5-939D-F5DC041F1927}'
.class private auto ansi '<PrivateImplementationDetails>'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field static assembly class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '$$method0x600000d-1'
.field static assembly class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '$$method0x600000e-1'
.field static assembly class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '$$method0x6000013-1'
} // end of class '<PrivateImplementationDetails>{9D56DD8F-56CC-4AA5-939D-F5DC041F1927}'
} // end of class '<PrivateImplementationDetails>'
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file C:\Users\Siegfried\Projects\ILSpy master\ICSharpCode.Decompiler.Tests\bin\Debug\net46\../../../TestCases/Pretty\Switch.res

31
ICSharpCode.Decompiler.Tests/TestCases/Pretty/Switch.opt.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly '1cqmq4ya'
.assembly Switch.opt
{
.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.
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module '1cqmq4ya.dll'
// MVID: {F6D6A0F8-249B-42E0-A06F-7A75134FD239}
.module Switch.opt.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
// Image base: 0x05550000
// =============== CLASS MEMBERS DECLARATION ===================
@ -749,7 +745,7 @@ @@ -749,7 +745,7 @@
IL_0013: brfalse IL_00db
IL_0018: volatile.
IL_001a: ldsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>{F6D6A0F8-249B-42E0-A06F-7A75134FD239}'::'$$method0x600000d-1'
IL_001a: ldsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>'::'$$method0x600000d-1'
IL_001f: brtrue.s IL_0082
IL_0021: ldc.i4.7
@ -790,9 +786,9 @@ @@ -790,9 +786,9 @@
IL_0076: call instance void class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32>::Add(!0,
!1)
IL_007b: volatile.
IL_007d: stsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>{F6D6A0F8-249B-42E0-A06F-7A75134FD239}'::'$$method0x600000d-1'
IL_007d: stsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>'::'$$method0x600000d-1'
IL_0082: volatile.
IL_0084: ldsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>{F6D6A0F8-249B-42E0-A06F-7A75134FD239}'::'$$method0x600000d-1'
IL_0084: ldsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>'::'$$method0x600000d-1'
IL_0089: ldloc.0
IL_008a: ldloca.s V_1
IL_008c: call instance bool class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32>::TryGetValue(!0,
@ -850,7 +846,7 @@ @@ -850,7 +846,7 @@
IL_0011: brfalse IL_013d
IL_0016: volatile.
IL_0018: ldsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>{F6D6A0F8-249B-42E0-A06F-7A75134FD239}'::'$$method0x600000e-1'
IL_0018: ldsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>'::'$$method0x600000e-1'
IL_001d: brtrue IL_00b6
IL_0022: ldc.i4.s 11
@ -911,9 +907,9 @@ @@ -911,9 +907,9 @@
IL_00aa: call instance void class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32>::Add(!0,
!1)
IL_00af: volatile.
IL_00b1: stsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>{F6D6A0F8-249B-42E0-A06F-7A75134FD239}'::'$$method0x600000e-1'
IL_00b1: stsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>'::'$$method0x600000e-1'
IL_00b6: volatile.
IL_00b8: ldsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>{F6D6A0F8-249B-42E0-A06F-7A75134FD239}'::'$$method0x600000e-1'
IL_00b8: ldsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>'::'$$method0x600000e-1'
IL_00bd: ldloc.0
IL_00be: ldloca.s V_1
IL_00c0: call instance bool class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32>::TryGetValue(!0,
@ -1139,7 +1135,7 @@ @@ -1139,7 +1135,7 @@
IL_0037: brfalse IL_011f
IL_003c: volatile.
IL_003e: ldsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>{F6D6A0F8-249B-42E0-A06F-7A75134FD239}'::'$$method0x6000013-1'
IL_003e: ldsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>'::'$$method0x6000013-1'
IL_0043: brtrue.s IL_009a
IL_0045: ldc.i4.6
@ -1175,9 +1171,9 @@ @@ -1175,9 +1171,9 @@
IL_008e: call instance void class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32>::Add(!0,
!1)
IL_0093: volatile.
IL_0095: stsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>{F6D6A0F8-249B-42E0-A06F-7A75134FD239}'::'$$method0x6000013-1'
IL_0095: stsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>'::'$$method0x6000013-1'
IL_009a: volatile.
IL_009c: ldsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>{F6D6A0F8-249B-42E0-A06F-7A75134FD239}'::'$$method0x6000013-1'
IL_009c: ldsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '<PrivateImplementationDetails>'::'$$method0x6000013-1'
IL_00a1: ldloc.s V_5
IL_00a3: ldloca.s V_6
IL_00a5: call instance bool class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32>::TryGetValue(!0,
@ -1371,17 +1367,16 @@ @@ -1371,17 +1367,16 @@
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Switch
.class private auto ansi '<PrivateImplementationDetails>{F6D6A0F8-249B-42E0-A06F-7A75134FD239}'
.class private auto ansi '<PrivateImplementationDetails>'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field static assembly class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '$$method0x600000d-1'
.field static assembly class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '$$method0x600000e-1'
.field static assembly class [mscorlib]System.Collections.Generic.Dictionary`2<string,int32> '$$method0x6000013-1'
} // end of class '<PrivateImplementationDetails>{F6D6A0F8-249B-42E0-A06F-7A75134FD239}'
} // end of class '<PrivateImplementationDetails>'
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file C:\Users\Siegfried\Projects\ILSpy master\ICSharpCode.Decompiler.Tests\bin\Debug\net46\../../../TestCases/Pretty\Switch.opt.res

5
ICSharpCode.Decompiler.Tests/TestCases/Pretty/TypeAnalysisTests.cs

@ -244,5 +244,10 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -244,5 +244,10 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
{
return string.Equals("", "", b ? StringComparison.Ordinal : StringComparison.OrdinalIgnoreCase);
}
public bool MethodCallOnEnumConstant()
{
return AttributeTargets.All.HasFlag(AttributeTargets.Assembly);
}
}
}

28
ICSharpCode.Decompiler.Tests/TestCases/Pretty/TypeAnalysisTests.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly mu5mxl5m
.assembly TypeAnalysisTests
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module mu5mxl5m.dll
// MVID: {DBFE6CB1-ED58-473D-986E-A633C15C8AEE}
.module TypeAnalysisTests.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
// Image base: 0x04E10000
// =============== CLASS MEMBERS DECLARATION ===================
@ -848,6 +844,25 @@ @@ -848,6 +844,25 @@
IL_001c: ret
} // end of method TypeAnalysisTests::EnumInConditionalOperator
.method public hidebysig instance bool
MethodCallOnEnumConstant() cil managed
{
// Code size 27 (0x1b)
.maxstack 2
.locals init (bool V_0)
IL_0000: nop
IL_0001: ldc.i4 0x7fff
IL_0006: box [mscorlib]System.AttributeTargets
IL_000b: ldc.i4.1
IL_000c: box [mscorlib]System.AttributeTargets
IL_0011: call instance bool [mscorlib]System.Enum::HasFlag(class [mscorlib]System.Enum)
IL_0016: stloc.0
IL_0017: br.s IL_0019
IL_0019: ldloc.0
IL_001a: ret
} // end of method TypeAnalysisTests::MethodCallOnEnumConstant
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
@ -864,4 +879,3 @@ @@ -864,4 +879,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\TypeAnalysisTests.res

22
ICSharpCode.Decompiler.Tests/TestCases/Pretty/TypeAnalysisTests.opt.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly tbojr2zd
.assembly TypeAnalysisTests.opt
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module tbojr2zd.dll
// MVID: {A417EC21-8726-4629-9E82-47FE9895CD81}
.module TypeAnalysisTests.opt.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
// Image base: 0x05150000
// =============== CLASS MEMBERS DECLARATION ===================
@ -586,6 +582,19 @@ @@ -586,6 +582,19 @@
IL_0016: ret
} // end of method TypeAnalysisTests::EnumInConditionalOperator
.method public hidebysig instance bool
MethodCallOnEnumConstant() cil managed
{
// Code size 22 (0x16)
.maxstack 8
IL_0000: ldc.i4 0x7fff
IL_0005: box [mscorlib]System.AttributeTargets
IL_000a: ldc.i4.1
IL_000b: box [mscorlib]System.AttributeTargets
IL_0010: call instance bool [mscorlib]System.Enum::HasFlag(class [mscorlib]System.Enum)
IL_0015: ret
} // end of method TypeAnalysisTests::MethodCallOnEnumConstant
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
@ -602,4 +611,3 @@ @@ -602,4 +611,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\TypeAnalysisTests.opt.res

13
ICSharpCode.Decompiler.Tests/TestCases/Pretty/TypeAnalysisTests.opt.roslyn.il

@ -584,6 +584,19 @@ @@ -584,6 +584,19 @@
IL_0016: ret
} // end of method TypeAnalysisTests::EnumInConditionalOperator
.method public hidebysig instance bool
MethodCallOnEnumConstant() cil managed
{
// Code size 22 (0x16)
.maxstack 8
IL_0000: ldc.i4 0x7fff
IL_0005: box [mscorlib]System.AttributeTargets
IL_000a: ldc.i4.1
IL_000b: box [mscorlib]System.AttributeTargets
IL_0010: call instance bool [mscorlib]System.Enum::HasFlag(class [mscorlib]System.Enum)
IL_0015: ret
} // end of method TypeAnalysisTests::MethodCallOnEnumConstant
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{

19
ICSharpCode.Decompiler.Tests/TestCases/Pretty/TypeAnalysisTests.roslyn.il

@ -842,6 +842,25 @@ @@ -842,6 +842,25 @@
IL_001b: ret
} // end of method TypeAnalysisTests::EnumInConditionalOperator
.method public hidebysig instance bool
MethodCallOnEnumConstant() cil managed
{
// Code size 27 (0x1b)
.maxstack 2
.locals init (bool V_0)
IL_0000: nop
IL_0001: ldc.i4 0x7fff
IL_0006: box [mscorlib]System.AttributeTargets
IL_000b: ldc.i4.1
IL_000c: box [mscorlib]System.AttributeTargets
IL_0011: call instance bool [mscorlib]System.Enum::HasFlag(class [mscorlib]System.Enum)
IL_0016: stloc.0
IL_0017: br.s IL_0019
IL_0019: ldloc.0
IL_001a: ret
} // end of method TypeAnalysisTests::MethodCallOnEnumConstant
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/UnsafeCode.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly wbbysi3m
.assembly UnsafeCode
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module wbbysi3m.dll
// MVID: {8A733FFA-BF2C-4A07-BAE8-CC2DB20691C0}
.module UnsafeCode.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
// Image base: 0x04D30000
// =============== CLASS MEMBERS DECLARATION ===================
@ -1445,4 +1441,3 @@ @@ -1445,4 +1441,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file C:\work\ILSpy\ICSharpCode.Decompiler.Tests\bin\Debug\net46\../../../TestCases/Pretty\UnsafeCode.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/UnsafeCode.opt.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly apfrp3oh
.assembly UnsafeCode.opt
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module apfrp3oh.dll
// MVID: {18CFEE2F-79CA-4464-BA60-BA8E54BE2D99}
.module UnsafeCode.opt.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
// Image base: 0x04CA0000
// =============== CLASS MEMBERS DECLARATION ===================
@ -1165,4 +1161,3 @@ @@ -1165,4 +1161,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file C:\work\ILSpy\ICSharpCode.Decompiler.Tests\bin\Debug\net46\../../../TestCases/Pretty\UnsafeCode.opt.res

51
ICSharpCode.Decompiler.Tests/TestCases/Pretty/UnsafeCode.opt.roslyn.il

@ -841,31 +841,29 @@ @@ -841,31 +841,29 @@
FixedMemberAccess(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers* m,
int32 i) cil managed
{
// Code size 39 (0x27)
// Code size 37 (0x25)
.maxstack 8
IL_0000: ldarg.1
IL_0001: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers/'<Integers>e__FixedBuffer' ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers::Integers
IL_0006: ldflda int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers/'<Integers>e__FixedBuffer'::FixedElementField
IL_000b: conv.u
IL_000c: ldarg.2
IL_000d: conv.i
IL_000e: ldc.i4.4
IL_000f: mul
IL_0010: add
IL_0011: ldind.i4
IL_0012: conv.r8
IL_0013: ldarg.1
IL_0014: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers/'<Doubles>e__FixedBuffer' ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers::Doubles
IL_0019: ldflda float64 ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers/'<Doubles>e__FixedBuffer'::FixedElementField
IL_001e: conv.u
IL_001f: ldarg.2
IL_0020: conv.i
IL_0021: ldc.i4.8
IL_0022: mul
IL_000b: ldarg.2
IL_000c: conv.i
IL_000d: ldc.i4.4
IL_000e: mul
IL_000f: add
IL_0010: ldind.i4
IL_0011: conv.r8
IL_0012: ldarg.1
IL_0013: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers/'<Doubles>e__FixedBuffer' ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers::Doubles
IL_0018: ldflda float64 ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers/'<Doubles>e__FixedBuffer'::FixedElementField
IL_001d: ldarg.2
IL_001e: conv.i
IL_001f: ldc.i4.8
IL_0020: mul
IL_0021: add
IL_0022: ldind.r8
IL_0023: add
IL_0024: ldind.r8
IL_0025: add
IL_0026: ret
IL_0024: ret
} // end of method UnsafeCode::FixedMemberAccess
.method public hidebysig instance float64*
@ -898,7 +896,7 @@ @@ -898,7 +896,7 @@
.method public hidebysig instance void
UseFixedMemberAsReference(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers* m) cil managed
{
// Code size 39 (0x27)
// Code size 38 (0x26)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
@ -910,11 +908,10 @@ @@ -910,11 +908,10 @@
IL_0013: ldarg.1
IL_0014: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers/'<Integers>e__FixedBuffer' ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers::Integers
IL_0019: ldflda int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers/'<Integers>e__FixedBuffer'::FixedElementField
IL_001e: conv.u
IL_001f: ldc.i4.4
IL_0020: add
IL_0021: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode::UseReference(int32&)
IL_0026: ret
IL_001e: ldc.i4.4
IL_001f: add
IL_0020: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode::UseReference(int32&)
IL_0025: ret
} // end of method UnsafeCode::UseFixedMemberAsReference
.method public hidebysig instance void
@ -923,7 +920,7 @@ @@ -923,7 +920,7 @@
// Code size 27 (0x1b)
.maxstack 2
.locals init (int32* V_0,
int32*& pinned V_1)
int32& pinned V_1)
IL_0000: ldarg.1
IL_0001: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers/'<Integers>e__FixedBuffer' ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers::Integers
IL_0006: ldflda int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers/'<Integers>e__FixedBuffer'::FixedElementField

59
ICSharpCode.Decompiler.Tests/TestCases/Pretty/UnsafeCode.roslyn.il

@ -1053,37 +1053,35 @@ @@ -1053,37 +1053,35 @@
FixedMemberAccess(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers* m,
int32 i) cil managed
{
// Code size 44 (0x2c)
// Code size 42 (0x2a)
.maxstack 4
.locals init (float64 V_0)
IL_0000: nop
IL_0001: ldarg.1
IL_0002: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers/'<Integers>e__FixedBuffer' ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers::Integers
IL_0007: ldflda int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers/'<Integers>e__FixedBuffer'::FixedElementField
IL_000c: conv.u
IL_000d: ldarg.2
IL_000e: conv.i
IL_000f: ldc.i4.4
IL_0010: mul
IL_0011: add
IL_0012: ldind.i4
IL_0013: conv.r8
IL_0014: ldarg.1
IL_0015: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers/'<Doubles>e__FixedBuffer' ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers::Doubles
IL_001a: ldflda float64 ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers/'<Doubles>e__FixedBuffer'::FixedElementField
IL_001f: conv.u
IL_0020: ldarg.2
IL_0021: conv.i
IL_0022: ldc.i4.8
IL_0023: mul
IL_000c: ldarg.2
IL_000d: conv.i
IL_000e: ldc.i4.4
IL_000f: mul
IL_0010: add
IL_0011: ldind.i4
IL_0012: conv.r8
IL_0013: ldarg.1
IL_0014: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers/'<Doubles>e__FixedBuffer' ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers::Doubles
IL_0019: ldflda float64 ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers/'<Doubles>e__FixedBuffer'::FixedElementField
IL_001e: ldarg.2
IL_001f: conv.i
IL_0020: ldc.i4.8
IL_0021: mul
IL_0022: add
IL_0023: ldind.r8
IL_0024: add
IL_0025: ldind.r8
IL_0026: add
IL_0027: stloc.0
IL_0028: br.s IL_002a
IL_0025: stloc.0
IL_0026: br.s IL_0028
IL_002a: ldloc.0
IL_002b: ret
IL_0028: ldloc.0
IL_0029: ret
} // end of method UnsafeCode::FixedMemberAccess
.method public hidebysig instance float64*
@ -1123,7 +1121,7 @@ @@ -1123,7 +1121,7 @@
.method public hidebysig instance void
UseFixedMemberAsReference(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers* m) cil managed
{
// Code size 42 (0x2a)
// Code size 41 (0x29)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.0
@ -1137,12 +1135,11 @@ @@ -1137,12 +1135,11 @@
IL_0015: ldarg.1
IL_0016: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers/'<Integers>e__FixedBuffer' ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers::Integers
IL_001b: ldflda int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers/'<Integers>e__FixedBuffer'::FixedElementField
IL_0020: conv.u
IL_0021: ldc.i4.4
IL_0022: add
IL_0023: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode::UseReference(int32&)
IL_0028: nop
IL_0029: ret
IL_0020: ldc.i4.4
IL_0021: add
IL_0022: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode::UseReference(int32&)
IL_0027: nop
IL_0028: ret
} // end of method UnsafeCode::UseFixedMemberAsReference
.method public hidebysig instance void
@ -1151,7 +1148,7 @@ @@ -1151,7 +1148,7 @@
// Code size 30 (0x1e)
.maxstack 2
.locals init (int32* V_0,
int32*& pinned V_1)
int32& pinned V_1)
IL_0000: nop
IL_0001: ldarg.1
IL_0002: ldflda valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers/'<Integers>e__FixedBuffer' ICSharpCode.Decompiler.Tests.TestCases.Pretty.UnsafeCode/StructWithFixedSizeMembers::Integers

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/Using.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.17929
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly wgewqkaz
.assembly Using
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module wgewqkaz.dll
// MVID: {298A3373-9EF1-4D76-BCEC-2E82A945AF55}
.module Using.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
// Image base: 0x00550000
// =============== CLASS MEMBERS DECLARATION ===================
@ -519,4 +515,3 @@ @@ -519,4 +515,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\Using.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/Using.opt.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.17929
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly ms0npdxf
.assembly Using.opt
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module ms0npdxf.dll
// MVID: {060FC94F-8DAE-4720-AF67-48BEEC70FFC8}
.module Using.opt.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
// Image base: 0x030B0000
// =============== CLASS MEMBERS DECLARATION ===================
@ -408,4 +404,3 @@ @@ -408,4 +404,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\Using.opt.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/VariableNaming.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly sw5i42xa
.assembly VariableNaming
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module sw5i42xa.dll
// MVID: {863C0756-F3DB-4C0E-BC40-5DDA3E7F1B18}
.module VariableNaming.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
// Image base: 0x02C40000
// =============== CLASS MEMBERS DECLARATION ===================
@ -97,4 +93,3 @@ @@ -97,4 +93,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\VariableNaming.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/VariableNaming.opt.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly kt4vyfax
.assembly VariableNaming.opt
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module kt4vyfax.dll
// MVID: {2FDC68D5-1FEC-45A6-BADC-43373DBD141E}
.module VariableNaming.opt.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
// Image base: 0x05090000
// =============== CLASS MEMBERS DECLARATION ===================
@ -93,4 +89,3 @@ @@ -93,4 +89,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\VariableNaming.opt.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/VariableNamingWithoutSymbols.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly guxeth2f
.assembly VariableNamingWithoutSymbols
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module guxeth2f.dll
// MVID: {D7E12634-3178-4FDA-B3F4-CE4846CACB94}
.module VariableNamingWithoutSymbols.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
// Image base: 0x04ED0000
// =============== CLASS MEMBERS DECLARATION ===================
@ -97,4 +93,3 @@ @@ -97,4 +93,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\VariableNamingWithoutSymbols.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/VariableNamingWithoutSymbols.opt.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly wl1juwwv
.assembly VariableNamingWithoutSymbols.opt
{
.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
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module wl1juwwv.dll
// MVID: {F60C4045-F949-4857-AE4D-AD0ED806A44F}
.module VariableNamingWithoutSymbols.opt.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
// Image base: 0x03250000
// =============== CLASS MEMBERS DECLARATION ===================
@ -93,4 +89,3 @@ @@ -93,4 +89,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file ../../../TestCases/Pretty\VariableNamingWithoutSymbols.opt.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/WellKnownConstants.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly '44dbunlx'
.assembly WellKnownConstants
{
.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.
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module '44dbunlx.dll'
// MVID: {084D6FE7-6C94-46BC-9CF1-21040E4EE5EA}
.module WellKnownConstants.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
// Image base: 0x03200000
// =============== CLASS MEMBERS DECLARATION ===================
@ -128,4 +124,3 @@ @@ -128,4 +124,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file C:\Users\Siegfried\Projects\ILSpy master\ICSharpCode.Decompiler.Tests\bin\Debug\net46\../../../TestCases/Pretty\WellKnownConstants.res

9
ICSharpCode.Decompiler.Tests/TestCases/Pretty/WellKnownConstants.opt.il

@ -1,6 +1,4 @@ @@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -10,7 +8,7 @@ @@ -10,7 +8,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly '2a1zmun4'
.assembly WellKnownConstants.opt
{
.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.
@ -20,15 +18,13 @@ @@ -20,15 +18,13 @@
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module '2a1zmun4.dll'
// MVID: {68191A55-6426-48F1-B0FE-6B515D64B18A}
.module WellKnownConstants.opt.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
// Image base: 0x03170000
// =============== CLASS MEMBERS DECLARATION ===================
@ -128,4 +124,3 @@ @@ -128,4 +124,3 @@
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file C:\Users\Siegfried\Projects\ILSpy master\ICSharpCode.Decompiler.Tests\bin\Debug\net46\../../../TestCases/Pretty\WellKnownConstants.opt.res

9
ICSharpCode.Decompiler/CSharp/CallBuilder.cs

@ -71,8 +71,7 @@ namespace ICSharpCode.Decompiler.CSharp @@ -71,8 +71,7 @@ namespace ICSharpCode.Decompiler.CSharp
target = default(TranslatedExpression); // no target
} else {
target = expressionBuilder.TranslateTarget(method, callArguments.FirstOrDefault(), callOpCode == OpCode.Call, constrainedTo);
if (callOpCode == OpCode.CallVirt
&& constrainedTo == null
if (constrainedTo == null
&& target.Expression is CastExpression cast
&& target.ResolveResult is ConversionResolveResult conversion
&& target.Type.IsKnownType(KnownTypeCode.Object)
@ -209,8 +208,12 @@ namespace ICSharpCode.Decompiler.CSharp @@ -209,8 +208,12 @@ namespace ICSharpCode.Decompiler.CSharp
} else {
if (method.IsStatic)
requireTarget = !expressionBuilder.IsCurrentOrContainingType(method.DeclaringTypeDefinition) || method.Name == ".cctor";
else if (method.Name == ".ctor")
requireTarget = true; // always use target for base/this-ctor-call, the constructor initializer pattern depends on this
else if (target.Expression is BaseReferenceExpression)
requireTarget = (callOpCode != OpCode.CallVirt && method.IsVirtual);
else
requireTarget = !(target.Expression is ThisReferenceExpression || target.Expression is BaseReferenceExpression) || method.Name == ".ctor";
requireTarget = !(target.Expression is ThisReferenceExpression);
}
bool targetCasted = false;
bool argumentsCasted = false;

27
ICSharpCode.Decompiler/CSharp/Transforms/AddCheckedBlocks.cs

@ -16,6 +16,7 @@ @@ -16,6 +16,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Linq;
using ICSharpCode.Decompiler.CSharp.Syntax;
@ -107,6 +108,22 @@ namespace ICSharpCode.Decompiler.CSharp.Transforms @@ -107,6 +108,22 @@ namespace ICSharpCode.Decompiler.CSharp.Transforms
{
return string.Format("[{0} + {1}]", Blocks, Expressions);
}
/// <summary>
/// Gets the new cost if an expression with this cost is wrapped in a checked/unchecked expression.
/// </summary>
/// <returns></returns>
internal Cost WrapInCheckedExpr()
{
if (Expressions == 0) {
return new Cost(Blocks, 1);
} else {
// hack: penalize multiple layers of nested expressions
// This doesn't really fit into the original idea of minimizing the number of block+expressions;
// but tends to produce better-looking results due to less nesting.
return new Cost(Blocks, Expressions + 2);
}
}
}
#endregion
@ -324,11 +341,13 @@ namespace ICSharpCode.Decompiler.CSharp.Transforms @@ -324,11 +341,13 @@ namespace ICSharpCode.Decompiler.CSharp.Transforms
// We cannot use checked/unchecked for top-level-expressions.
} else if (expr.Role.IsValid(Expression.Null)) {
// We use '<' so that expressions are introduced on the deepest level possible (goal 3)
if (result.CostInCheckedContext + new Cost(0, 1) < result.CostInUncheckedContext) {
result.CostInUncheckedContext = result.CostInCheckedContext + new Cost(0, 1);
var costIfWrapWithChecked = result.CostInCheckedContext.WrapInCheckedExpr();
var costIfWrapWithUnchecked = result.CostInUncheckedContext.WrapInCheckedExpr();
if (costIfWrapWithChecked < result.CostInUncheckedContext) {
result.CostInUncheckedContext = costIfWrapWithChecked;
result.NodesToInsertInUncheckedContext = result.NodesToInsertInCheckedContext + new InsertedExpression(expr, true);
} else if (result.CostInUncheckedContext + new Cost(0, 1) < result.CostInCheckedContext) {
result.CostInCheckedContext = result.CostInUncheckedContext + new Cost(0, 1);
} else if (costIfWrapWithUnchecked < result.CostInCheckedContext) {
result.CostInCheckedContext = costIfWrapWithUnchecked;
result.NodesToInsertInCheckedContext = result.NodesToInsertInUncheckedContext + new InsertedExpression(expr, false);
}
}

10
ICSharpCode.Decompiler/CSharp/TranslatedExpression.cs

@ -201,6 +201,14 @@ namespace ICSharpCode.Decompiler.CSharp @@ -201,6 +201,14 @@ namespace ICSharpCode.Decompiler.CSharp
if (targetType.Kind == TypeKind.Unknown || targetType.Kind == TypeKind.Void) {
return this; // don't attempt to insert cast to '?' or 'void' as these are not valid.
}
var compilation = expressionBuilder.compilation;
var conversions = Resolver.CSharpConversions.Get(compilation);
if (ResolveResult is ConversionResolveResult conv && Expression is CastExpression cast2 && conv.Conversion.IsBoxingConversion && conversions.IsBoxingConversion(conv.Input.Type, targetType)) {
var unwrapped = this.UnwrapChild(cast2.Expression);
if (allowImplicitConversion)
return unwrapped;
return unwrapped.ConvertTo(targetType, expressionBuilder, checkForOverflow, allowImplicitConversion);
}
if (Expression is UnaryOperatorExpression uoe && uoe.Operator == UnaryOperatorType.NullConditional && targetType.IsReferenceType == true) {
// "(T)(x?).AccessChain" is invalid, but "((T)x)?.AccessChain" is valid and equivalent
return new UnaryOperatorExpression(
@ -208,7 +216,6 @@ namespace ICSharpCode.Decompiler.CSharp @@ -208,7 +216,6 @@ namespace ICSharpCode.Decompiler.CSharp
UnwrapChild(uoe.Expression).ConvertTo(targetType, expressionBuilder, checkForOverflow, allowImplicitConversion)
).WithRR(new ResolveResult(targetType)).WithoutILInstruction();
}
var compilation = expressionBuilder.compilation;
bool isLifted = type.IsKnownType(KnownTypeCode.NullableOfT) && targetType.IsKnownType(KnownTypeCode.NullableOfT);
IType utype = isLifted ? NullableType.GetUnderlyingType(type) : type;
IType targetUType = isLifted ? NullableType.GetUnderlyingType(targetType) : targetType;
@ -350,7 +357,6 @@ namespace ICSharpCode.Decompiler.CSharp @@ -350,7 +357,6 @@ namespace ICSharpCode.Decompiler.CSharp
.WithILInstruction(this.ILInstructions)
.WithRR(new ConstantResolveResult(targetType, null));
}
var conversions = Resolver.CSharpConversions.Get(compilation);
if (allowImplicitConversion && conversions.ImplicitConversion(type, targetType).IsValid) {
return this;
}

2
ICSharpCode.Decompiler/IL/Instructions/BinaryNumericInstruction.cs

@ -148,7 +148,7 @@ namespace ICSharpCode.Decompiler.IL @@ -148,7 +148,7 @@ namespace ICSharpCode.Decompiler.IL
}
}
string GetOperatorName(BinaryNumericOperator @operator)
internal static string GetOperatorName(BinaryNumericOperator @operator)
{
switch (@operator) {
case BinaryNumericOperator.Add:

46
ICSharpCode.Decompiler/IL/Instructions/CompoundAssignmentInstruction.cs

@ -111,9 +111,19 @@ namespace ICSharpCode.Decompiler.IL @@ -111,9 +111,19 @@ namespace ICSharpCode.Decompiler.IL
}
}
if (binary.Sign != Sign.None) {
if (type.GetSign() != binary.Sign)
return false;
if (type.IsCSharpSmallIntegerType()) {
// C# will use numeric promotion to int, binary op must be signed
if (binary.Sign != Sign.Signed)
return false;
} else {
// C# will use sign from type
if (type.GetSign() != binary.Sign)
return false;
}
}
// Can't transform if the RHS value would be need to be truncated for the LHS type.
if (Transforms.TransformAssignment.IsImplicitTruncation(binary.Right, type, binary.IsLifted))
return false;
return true;
}
@ -148,40 +158,12 @@ namespace ICSharpCode.Decompiler.IL @@ -148,40 +158,12 @@ namespace ICSharpCode.Decompiler.IL
return flags;
}
}
string GetOperatorName(BinaryNumericOperator @operator)
{
switch (@operator) {
case BinaryNumericOperator.Add:
return "add";
case BinaryNumericOperator.Sub:
return "sub";
case BinaryNumericOperator.Mul:
return "mul";
case BinaryNumericOperator.Div:
return "div";
case BinaryNumericOperator.Rem:
return "rem";
case BinaryNumericOperator.BitAnd:
return "bit.and";
case BinaryNumericOperator.BitOr:
return "bit.or";
case BinaryNumericOperator.BitXor:
return "bit.xor";
case BinaryNumericOperator.ShiftLeft:
return "bit.shl";
case BinaryNumericOperator.ShiftRight:
return "bit.shr";
default:
throw new ArgumentOutOfRangeException();
}
}
public override void WriteTo(ITextOutput output, ILAstWritingOptions options)
{
ILRange.WriteTo(output, options);
output.Write(OpCode);
output.Write("." + GetOperatorName(Operator));
output.Write("." + BinaryNumericInstruction.GetOperatorName(Operator));
if (CompoundAssignmentType == CompoundAssignmentType.EvaluatesToNewValue)
output.Write(".new");
else

8
ICSharpCode.Decompiler/IL/Transforms/TransformAssignment.cs

@ -332,7 +332,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms @@ -332,7 +332,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms
/// Gets whether 'stobj type(..., value)' would evaluate to a different value than 'value'
/// due to implicit truncation.
/// </summary>
bool IsImplicitTruncation(ILInstruction value, IType type)
static internal bool IsImplicitTruncation(ILInstruction value, IType type, bool allowNullableValue = false)
{
if (!type.IsSmallIntegerType()) {
// Implicit truncation in ILAst only happens for small integer types;
@ -361,8 +361,14 @@ namespace ICSharpCode.Decompiler.IL.Transforms @@ -361,8 +361,14 @@ namespace ICSharpCode.Decompiler.IL.Transforms
return conv.TargetType != type.ToPrimitiveType();
} else if (value is Comp) {
return false; // comp returns 0 or 1, which always fits
} else if (value is IfInstruction ifInst) {
return IsImplicitTruncation(ifInst.TrueInst, type, allowNullableValue)
|| IsImplicitTruncation(ifInst.FalseInst, type, allowNullableValue);
} else {
IType inferredType = value.InferType();
if (allowNullableValue) {
inferredType = NullableType.GetUnderlyingType(inferredType);
}
if (inferredType.Kind != TypeKind.Unknown) {
return !(inferredType.GetSize() <= type.GetSize() && inferredType.GetSign() == type.GetSign());
}

Loading…
Cancel
Save