From 7a8a97896361b799610acc08f670f89d15da7122 Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sun, 12 Apr 2026 09:53:48 +0200 Subject: [PATCH 1/2] Add CompilerOptions.UseRoslyn4_14_0 --- .../CorrectnessTestRunner.cs | 28 +++++++++---- .../Helpers/RoslynToolset.cs | 4 +- .../Helpers/Tester.cs | 27 +++++++++--- .../PrettyTestRunner.cs | 42 ++++++++++++++++++- .../TestCases/ILPretty/ExtensionEncodingV2.il | 2 +- .../TestCases/VBPretty/YieldReturn.cs | 4 +- .../UglyTestRunner.cs | 4 ++ .../VBPrettyTestRunner.cs | 12 ++++++ 8 files changed, 102 insertions(+), 21 deletions(-) diff --git a/ICSharpCode.Decompiler.Tests/CorrectnessTestRunner.cs b/ICSharpCode.Decompiler.Tests/CorrectnessTestRunner.cs index cf3974d2f0..5c8366b70e 100644 --- a/ICSharpCode.Decompiler.Tests/CorrectnessTestRunner.cs +++ b/ICSharpCode.Decompiler.Tests/CorrectnessTestRunner.cs @@ -58,6 +58,8 @@ public void AllFilesHaveTests() CompilerOptions.Optimize | CompilerOptions.UseRoslyn2_10_0 | CompilerOptions.TargetNet40, CompilerOptions.UseRoslyn3_11_0 | CompilerOptions.TargetNet40, CompilerOptions.Optimize | CompilerOptions.UseRoslyn3_11_0 | CompilerOptions.TargetNet40, + CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, CompilerOptions.UseRoslyn1_3_2, @@ -66,6 +68,8 @@ public void AllFilesHaveTests() CompilerOptions.Optimize | CompilerOptions.UseRoslyn2_10_0, CompilerOptions.UseRoslyn3_11_0, CompilerOptions.Optimize | CompilerOptions.UseRoslyn3_11_0, + CompilerOptions.UseRoslyn4_14_0, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0, CompilerOptions.UseRoslynLatest, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest, }; @@ -80,8 +84,10 @@ public void AllFilesHaveTests() CompilerOptions.Optimize | CompilerOptions.UseRoslyn2_10_0 | CompilerOptions.TargetNet40, CompilerOptions.UseRoslyn3_11_0 | CompilerOptions.TargetNet40, CompilerOptions.Optimize | CompilerOptions.UseRoslyn3_11_0 | CompilerOptions.TargetNet40, + CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, - CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40 + CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, }; static readonly CompilerOptions[] defaultOptions = @@ -94,6 +100,8 @@ public void AllFilesHaveTests() CompilerOptions.Optimize | CompilerOptions.UseRoslyn2_10_0 | CompilerOptions.TargetNet40, CompilerOptions.UseRoslyn3_11_0 | CompilerOptions.TargetNet40, CompilerOptions.Optimize | CompilerOptions.UseRoslyn3_11_0 | CompilerOptions.TargetNet40, + CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, CompilerOptions.UseRoslyn1_3_2, @@ -102,6 +110,8 @@ public void AllFilesHaveTests() CompilerOptions.Optimize | CompilerOptions.UseRoslyn2_10_0, CompilerOptions.UseRoslyn3_11_0, CompilerOptions.Optimize | CompilerOptions.UseRoslyn3_11_0, + CompilerOptions.UseRoslyn4_14_0, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0, CompilerOptions.UseRoslynLatest, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest, CompilerOptions.UseMcs2_6_4, @@ -118,6 +128,8 @@ public void AllFilesHaveTests() CompilerOptions.Optimize | CompilerOptions.UseRoslyn2_10_0 | CompilerOptions.TargetNet40, CompilerOptions.UseRoslyn3_11_0 | CompilerOptions.TargetNet40, CompilerOptions.Optimize | CompilerOptions.UseRoslyn3_11_0 | CompilerOptions.TargetNet40, + CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, CompilerOptions.UseRoslyn1_3_2, @@ -126,6 +138,8 @@ public void AllFilesHaveTests() CompilerOptions.Optimize | CompilerOptions.UseRoslyn2_10_0, CompilerOptions.UseRoslyn3_11_0, CompilerOptions.Optimize | CompilerOptions.UseRoslyn3_11_0, + CompilerOptions.UseRoslyn4_14_0, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0, CompilerOptions.UseRoslynLatest, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest, }; @@ -136,20 +150,16 @@ public void AllFilesHaveTests() CompilerOptions.Optimize | CompilerOptions.UseRoslyn2_10_0 | CompilerOptions.TargetNet40, CompilerOptions.UseRoslyn3_11_0 | CompilerOptions.TargetNet40, CompilerOptions.Optimize | CompilerOptions.UseRoslyn3_11_0 | CompilerOptions.TargetNet40, + CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, CompilerOptions.UseRoslyn2_10_0, CompilerOptions.Optimize | CompilerOptions.UseRoslyn2_10_0, CompilerOptions.UseRoslyn3_11_0, CompilerOptions.Optimize | CompilerOptions.UseRoslyn3_11_0, - CompilerOptions.UseRoslynLatest, - CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest, - }; - - static readonly CompilerOptions[] roslynLatestOnlyOptions = - { - CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, - CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, + CompilerOptions.UseRoslyn4_14_0, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0, CompilerOptions.UseRoslynLatest, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest, }; diff --git a/ICSharpCode.Decompiler.Tests/Helpers/RoslynToolset.cs b/ICSharpCode.Decompiler.Tests/Helpers/RoslynToolset.cs index 5718fbbb1c..21abefe72d 100644 --- a/ICSharpCode.Decompiler.Tests/Helpers/RoslynToolset.cs +++ b/ICSharpCode.Decompiler.Tests/Helpers/RoslynToolset.cs @@ -166,9 +166,9 @@ string GetCompiler(string compiler, string version) internal static string SanitizeVersion(string version) { - int index = version.IndexOf("-"); + int index = version.IndexOf('-'); if (index > 0) - return version.Remove(index); + return version[..index]; return version; } } diff --git a/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs b/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs index c8ad97b876..85e51dd2a8 100644 --- a/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs +++ b/ICSharpCode.Decompiler.Tests/Helpers/Tester.cs @@ -72,8 +72,9 @@ public enum CompilerOptions ReferenceUnsafe = 0x10000, CheckForOverflowUnderflow = 0x20000, ProcessXmlDoc = 0x40000, + UseRoslyn4_14_0 = 0x80000, UseMcsMask = UseMcs2_6_4 | UseMcs5_23, - UseRoslynMask = UseRoslyn1_3_2 | UseRoslyn2_10_0 | UseRoslyn3_11_0 | UseRoslynLatest + UseRoslynMask = UseRoslyn1_3_2 | UseRoslyn2_10_0 | UseRoslyn3_11_0 | UseRoslyn4_14_0 | UseRoslynLatest } [Flags] @@ -135,11 +136,12 @@ internal static async Task Initialize() await roslynToolset.Fetch("1.3.2", "Microsoft.Net.Compilers", "tools").ConfigureAwait(false); await roslynToolset.Fetch("2.10.0", "Microsoft.Net.Compilers", "tools").ConfigureAwait(false); await roslynToolset.Fetch("3.11.0").ConfigureAwait(false); + await roslynToolset.Fetch("4.14.0").ConfigureAwait(false); await roslynToolset.Fetch(roslynLatestVersion).ConfigureAwait(false); await vswhereToolset.Fetch().ConfigureAwait(false); await RefAssembliesToolset.Fetch("5.0.0", sourcePath: "ref/net5.0").ConfigureAwait(false); - await RefAssembliesToolset.Fetch("10.0.0", sourcePath: "ref/net10.0").ConfigureAwait(false); + await RefAssembliesToolset.Fetch("9.0.0", sourcePath: "ref/net9.0").ConfigureAwait(false); await RefAssembliesToolset.Fetch(CurrentNetCoreRefAsmVersion, sourcePath: $"ref/net{CurrentNetCoreVersion}").ConfigureAwait(false); #if DEBUG @@ -347,6 +349,7 @@ private static string ReplacePrivImplDetails(string il) static readonly Dictionary> targetFrameworkAttributeSnippetFiles = new() { { CurrentNetCoreAppVersion, new Lazy(() => GetTargetFrameworkAttributeSnippetFile(CurrentNetCoreAppVersion)) }, + { ".NETCoreApp,Version=v9.0", new Lazy(() => GetTargetFrameworkAttributeSnippetFile(".NETCoreApp,Version=v9.0")) }, { ".NETCoreApp,Version=v5.0", new Lazy(() => GetTargetFrameworkAttributeSnippetFile(".NETCoreApp,Version=v5.0")) }, { ".NETCoreApp,Version=v2.2", new Lazy(() => GetTargetFrameworkAttributeSnippetFile(".NETCoreApp,Version=v2.2")) }, }; @@ -429,6 +432,7 @@ public static List GetPreprocessorSymbols(CompilerOptions flags) preprocessorSymbols.Add("VB14"); if (flags.HasFlag(CompilerOptions.UseRoslyn2_10_0) || flags.HasFlag(CompilerOptions.UseRoslyn3_11_0) + || flags.HasFlag(CompilerOptions.UseRoslyn4_14_0) || flags.HasFlag(CompilerOptions.UseRoslynLatest)) { preprocessorSymbols.Add("ROSLYN2"); @@ -439,6 +443,7 @@ public static List GetPreprocessorSymbols(CompilerOptions flags) preprocessorSymbols.Add("VB15"); } if (flags.HasFlag(CompilerOptions.UseRoslyn3_11_0) + || flags.HasFlag(CompilerOptions.UseRoslyn4_14_0) || flags.HasFlag(CompilerOptions.UseRoslynLatest)) { if (!flags.HasFlag(CompilerOptions.TargetNet40)) @@ -450,7 +455,8 @@ public static List GetPreprocessorSymbols(CompilerOptions flags) preprocessorSymbols.Add("CS90"); preprocessorSymbols.Add("VB16"); } - if (flags.HasFlag(CompilerOptions.UseRoslynLatest)) + if (flags.HasFlag(CompilerOptions.UseRoslyn4_14_0) + || flags.HasFlag(CompilerOptions.UseRoslynLatest)) { if (!flags.HasFlag(CompilerOptions.TargetNet40)) { @@ -458,14 +464,21 @@ public static List GetPreprocessorSymbols(CompilerOptions flags) preprocessorSymbols.Add("NET70"); preprocessorSymbols.Add("NET80"); preprocessorSymbols.Add("NET90"); - preprocessorSymbols.Add("NET100"); - preprocessorSymbols.Add("NET110"); } preprocessorSymbols.Add("ROSLYN4"); preprocessorSymbols.Add("CS100"); preprocessorSymbols.Add("CS110"); preprocessorSymbols.Add("CS120"); preprocessorSymbols.Add("CS130"); + } + if (flags.HasFlag(CompilerOptions.UseRoslynLatest)) + { + if (!flags.HasFlag(CompilerOptions.TargetNet40)) + { + preprocessorSymbols.Add("NET100"); + preprocessorSymbols.Add("NET110"); + } + preprocessorSymbols.Add("ROSLYN5"); preprocessorSymbols.Add("CS140"); preprocessorSymbols.Add("CS150"); } @@ -528,6 +541,7 @@ public static async Task CompileCSharp(string sourceFileName, C CompilerOptions.UseRoslyn1_3_2 => ("1.3.2", "6", null), CompilerOptions.UseRoslyn2_10_0 => ("2.10.0", "latest", targetNet40 ? null : ".NETCoreApp,Version=v2.2"), CompilerOptions.UseRoslyn3_11_0 => ("3.11.0", "latest", targetNet40 ? null : ".NETCoreApp,Version=v5.0"), + CompilerOptions.UseRoslyn4_14_0 => ("4.14.0", "latest", targetNet40 ? null : ".NETCoreApp,Version=v9.0"), _ => (roslynLatestVersion, flags.HasFlag(CompilerOptions.Preview) ? "preview" : "latest", targetNet40 ? null : CurrentNetCoreAppVersion) }; @@ -743,6 +757,7 @@ internal static DecompilerSettings GetSettings(CompilerOptions cscOptions) CompilerOptions.UseRoslyn1_3_2 => CSharp.LanguageVersion.CSharp6, CompilerOptions.UseRoslyn2_10_0 => CSharp.LanguageVersion.CSharp7_3, CompilerOptions.UseRoslyn3_11_0 => CSharp.LanguageVersion.CSharp9_0, + CompilerOptions.UseRoslyn4_14_0 => CSharp.LanguageVersion.CSharp13_0, _ => cscOptions.HasFlag(CompilerOptions.Preview) ? CSharp.LanguageVersion.Latest : CSharp.LanguageVersion.CSharp14_0, }; DecompilerSettings settings = new(langVersion) { @@ -819,6 +834,8 @@ internal static string GetSuffix(CompilerOptions cscOptions) suffix += ".roslyn2"; if ((cscOptions & CompilerOptions.UseRoslyn3_11_0) != 0) suffix += ".roslyn3"; + if ((cscOptions & CompilerOptions.UseRoslyn4_14_0) != 0) + suffix += ".roslyn4"; if ((cscOptions & CompilerOptions.UseRoslynLatest) != 0) suffix += ".roslyn"; if ((cscOptions & CompilerOptions.UseMcs2_6_4) != 0) diff --git a/ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs b/ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs index 5daef0a490..8810773c6f 100644 --- a/ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs +++ b/ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs @@ -63,6 +63,8 @@ public void AllFilesHaveTests() CompilerOptions.Optimize | CompilerOptions.UseRoslyn2_10_0 | CompilerOptions.TargetNet40, CompilerOptions.UseRoslyn3_11_0 | CompilerOptions.TargetNet40, CompilerOptions.Optimize | CompilerOptions.UseRoslyn3_11_0 | CompilerOptions.TargetNet40, + CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, CompilerOptions.UseRoslyn1_3_2, @@ -71,6 +73,8 @@ public void AllFilesHaveTests() CompilerOptions.Optimize | CompilerOptions.UseRoslyn2_10_0, CompilerOptions.UseRoslyn3_11_0, CompilerOptions.Optimize | CompilerOptions.UseRoslyn3_11_0, + CompilerOptions.UseRoslyn4_14_0, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0, CompilerOptions.UseRoslynLatest, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest, }; @@ -83,6 +87,8 @@ public void AllFilesHaveTests() CompilerOptions.Optimize | CompilerOptions.UseRoslyn2_10_0, CompilerOptions.UseRoslyn3_11_0, CompilerOptions.Optimize | CompilerOptions.UseRoslyn3_11_0, + CompilerOptions.UseRoslyn4_14_0, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0, CompilerOptions.UseRoslynLatest, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest, }; @@ -93,12 +99,16 @@ public void AllFilesHaveTests() CompilerOptions.Optimize | CompilerOptions.UseRoslyn2_10_0 | CompilerOptions.TargetNet40, CompilerOptions.UseRoslyn3_11_0 | CompilerOptions.TargetNet40, CompilerOptions.Optimize | CompilerOptions.UseRoslyn3_11_0 | CompilerOptions.TargetNet40, + CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, CompilerOptions.UseRoslyn2_10_0, CompilerOptions.Optimize | CompilerOptions.UseRoslyn2_10_0, CompilerOptions.UseRoslyn3_11_0, CompilerOptions.Optimize | CompilerOptions.UseRoslyn3_11_0, + CompilerOptions.UseRoslyn4_14_0, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0, CompilerOptions.UseRoslynLatest, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest, }; @@ -109,6 +119,8 @@ public void AllFilesHaveTests() CompilerOptions.Optimize | CompilerOptions.UseRoslyn2_10_0, CompilerOptions.UseRoslyn3_11_0, CompilerOptions.Optimize | CompilerOptions.UseRoslyn3_11_0, + CompilerOptions.UseRoslyn4_14_0, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0, CompilerOptions.UseRoslynLatest, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest, }; @@ -117,10 +129,14 @@ public void AllFilesHaveTests() { CompilerOptions.UseRoslyn3_11_0 | CompilerOptions.TargetNet40, CompilerOptions.Optimize | CompilerOptions.UseRoslyn3_11_0 | CompilerOptions.TargetNet40, + CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, CompilerOptions.UseRoslyn3_11_0, CompilerOptions.Optimize | CompilerOptions.UseRoslyn3_11_0, + CompilerOptions.UseRoslyn4_14_0, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0, CompilerOptions.UseRoslynLatest, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest, }; @@ -129,19 +145,33 @@ public void AllFilesHaveTests() { CompilerOptions.UseRoslyn3_11_0, CompilerOptions.Optimize | CompilerOptions.UseRoslyn3_11_0, + CompilerOptions.UseRoslyn4_14_0, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0, CompilerOptions.UseRoslynLatest, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest, }; static readonly CompilerOptions[] roslyn4OrNewerWithNet40Options = { + CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, + CompilerOptions.UseRoslyn4_14_0, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0, CompilerOptions.UseRoslynLatest, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest, }; static readonly CompilerOptions[] roslyn4OrNewerOptions = + { + CompilerOptions.UseRoslyn4_14_0, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0, + CompilerOptions.UseRoslynLatest, + CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest, + }; + + static readonly CompilerOptions[] roslyn5OrNewerOptions = { CompilerOptions.UseRoslynLatest, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest, @@ -155,6 +185,8 @@ public void AllFilesHaveTests() CompilerOptions.Optimize | CompilerOptions.UseRoslyn2_10_0 | CompilerOptions.TargetNet40, CompilerOptions.UseRoslyn3_11_0 | CompilerOptions.TargetNet40, CompilerOptions.Optimize | CompilerOptions.UseRoslyn3_11_0 | CompilerOptions.TargetNet40, + CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, CompilerOptions.UseRoslyn1_3_2, @@ -163,6 +195,8 @@ public void AllFilesHaveTests() CompilerOptions.Optimize | CompilerOptions.UseRoslyn2_10_0, CompilerOptions.UseRoslyn3_11_0, CompilerOptions.Optimize | CompilerOptions.UseRoslyn3_11_0, + CompilerOptions.UseRoslyn4_14_0, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0, CompilerOptions.UseRoslynLatest, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest, }; @@ -175,6 +209,8 @@ public void AllFilesHaveTests() CompilerOptions.Optimize | CompilerOptions.UseRoslyn2_10_0 | CompilerOptions.TargetNet40, CompilerOptions.UseRoslyn3_11_0 | CompilerOptions.TargetNet40, CompilerOptions.Optimize | CompilerOptions.UseRoslyn3_11_0 | CompilerOptions.TargetNet40, + CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, CompilerOptions.UseRoslyn1_3_2, @@ -183,6 +219,8 @@ public void AllFilesHaveTests() CompilerOptions.Optimize | CompilerOptions.UseRoslyn2_10_0, CompilerOptions.UseRoslyn3_11_0, CompilerOptions.Optimize | CompilerOptions.UseRoslyn3_11_0, + CompilerOptions.UseRoslyn4_14_0, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0, CompilerOptions.UseRoslynLatest, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest, CompilerOptions.UseMcs2_6_4, @@ -201,7 +239,7 @@ public async Task HelloWorld() [Test] public async Task IndexRangeTest([ValueSource(nameof(roslyn3OrNewerOptions))] CompilerOptions cscOptions) { - if (cscOptions.HasFlag(CompilerOptions.UseRoslynLatest)) + if (cscOptions.HasFlag(CompilerOptions.UseRoslyn4_14_0) || cscOptions.HasFlag(CompilerOptions.UseRoslynLatest)) { Assert.Ignore("See https://github.com/icsharpcode/ILSpy/issues/2540"); } @@ -560,7 +598,7 @@ public async Task Issue3598([ValueSource(nameof(roslyn4OrNewerOptions))] Compile } [Test] - public async Task ExtensionEverything([ValueSource(nameof(roslyn4OrNewerOptions))] CompilerOptions cscOptions) + public async Task ExtensionEverything([ValueSource(nameof(roslyn5OrNewerOptions))] CompilerOptions cscOptions) { await RunForLibrary(cscOptions: cscOptions | CompilerOptions.Preview | CompilerOptions.NullableEnable); } diff --git a/ICSharpCode.Decompiler.Tests/TestCases/ILPretty/ExtensionEncodingV2.il b/ICSharpCode.Decompiler.Tests/TestCases/ILPretty/ExtensionEncodingV2.il index 996199657a..6b0acf8d5f 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/ILPretty/ExtensionEncodingV2.il +++ b/ICSharpCode.Decompiler.Tests/TestCases/ILPretty/ExtensionEncodingV2.il @@ -16,7 +16,7 @@ int32(263) } .custom instance void [System.Runtime]System.Runtime.Versioning.TargetFrameworkAttribute::.ctor(string) = { - string('.NETCoreApp,Version=10.0') + string('.NETCoreApp,Version=11.0') } .permissionset reqmin = { [System.Runtime]System.Security.Permissions.SecurityPermissionAttribute = { diff --git a/ICSharpCode.Decompiler.Tests/TestCases/VBPretty/YieldReturn.cs b/ICSharpCode.Decompiler.Tests/TestCases/VBPretty/YieldReturn.cs index 0103871bcd..255c9e4052 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/VBPretty/YieldReturn.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/VBPretty/YieldReturn.cs @@ -318,12 +318,12 @@ public static IEnumerable UnconditionalThrowInTryFinally() public static IEnumerable NestedTryFinallyStartingOnSamePosition() { // The first user IL instruction is already in 2 nested try blocks. -#if ((ROSLYN2 && !ROSLYN4) && OPT) +#if ROSLYN2 && !ROSLYN4 && OPT int num = -1; #endif try { -#if ((ROSLYN2 && !ROSLYN4) && OPT) +#if ROSLYN2 && !ROSLYN4 && OPT _ = num - 1; #endif try diff --git a/ICSharpCode.Decompiler.Tests/UglyTestRunner.cs b/ICSharpCode.Decompiler.Tests/UglyTestRunner.cs index 2502c2b7f5..15ad540dcf 100644 --- a/ICSharpCode.Decompiler.Tests/UglyTestRunner.cs +++ b/ICSharpCode.Decompiler.Tests/UglyTestRunner.cs @@ -59,8 +59,12 @@ public void AllFilesHaveTests() static readonly CompilerOptions[] roslynOnlyOptions = { + CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, + CompilerOptions.UseRoslyn4_14_0, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0, CompilerOptions.UseRoslynLatest, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest, }; diff --git a/ICSharpCode.Decompiler.Tests/VBPrettyTestRunner.cs b/ICSharpCode.Decompiler.Tests/VBPrettyTestRunner.cs index 9fcc77b7d6..fbd94a6bf8 100644 --- a/ICSharpCode.Decompiler.Tests/VBPrettyTestRunner.cs +++ b/ICSharpCode.Decompiler.Tests/VBPrettyTestRunner.cs @@ -61,12 +61,18 @@ public void AllFilesHaveTests() CompilerOptions.Optimize | CompilerOptions.UseRoslyn2_10_0 | CompilerOptions.TargetNet40, CompilerOptions.UseRoslyn3_11_0 | CompilerOptions.TargetNet40, CompilerOptions.Optimize | CompilerOptions.UseRoslyn3_11_0 | CompilerOptions.TargetNet40, + CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, CompilerOptions.UseRoslyn1_3_2, CompilerOptions.Optimize | CompilerOptions.UseRoslyn1_3_2, CompilerOptions.UseRoslyn2_10_0, CompilerOptions.Optimize | CompilerOptions.UseRoslyn2_10_0, + CompilerOptions.UseRoslyn3_11_0, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn3_11_0, + CompilerOptions.UseRoslyn4_14_0, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0, CompilerOptions.UseRoslynLatest, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest, }; @@ -79,12 +85,18 @@ public void AllFilesHaveTests() CompilerOptions.Optimize | CompilerOptions.UseRoslyn2_10_0 | CompilerOptions.TargetNet40, CompilerOptions.UseRoslyn3_11_0 | CompilerOptions.TargetNet40, CompilerOptions.Optimize | CompilerOptions.UseRoslyn3_11_0 | CompilerOptions.TargetNet40, + CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0 | CompilerOptions.TargetNet40, CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest | CompilerOptions.TargetNet40, CompilerOptions.UseRoslyn1_3_2, CompilerOptions.Optimize | CompilerOptions.UseRoslyn1_3_2, CompilerOptions.UseRoslyn2_10_0, CompilerOptions.Optimize | CompilerOptions.UseRoslyn2_10_0, + CompilerOptions.UseRoslyn3_11_0, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn3_11_0, + CompilerOptions.UseRoslyn4_14_0, + CompilerOptions.Optimize | CompilerOptions.UseRoslyn4_14_0, CompilerOptions.UseRoslynLatest, CompilerOptions.Optimize | CompilerOptions.UseRoslynLatest, }; From 9e984a95ffde0940c0fd68a5b1480c5350079ead Mon Sep 17 00:00:00 2001 From: Siegfried Pammer Date: Sun, 12 Apr 2026 10:39:48 +0200 Subject: [PATCH 2/2] Remove IL file from ugly tests --- ...larReplacementOfAggregates.net40.roslyn.il | 577 ------------------ ...eplacementOfAggregates.opt.net40.roslyn.il | 509 --------------- ...calarReplacementOfAggregates.opt.roslyn.il | 509 --------------- ...iveScalarReplacementOfAggregates.roslyn.il | 577 ------------------ .../Ugly/NoArrayInitializers.Expected.cs | 2 +- .../Ugly/NoArrayInitializers.net40.roslyn.il | 116 ---- .../NoArrayInitializers.opt.net40.roslyn.il | 103 ---- .../Ugly/NoArrayInitializers.opt.roslyn.il | 107 ---- .../Ugly/NoArrayInitializers.roslyn.il | 120 ---- .../Ugly/NoDecimalConstants.net40.roslyn.il | 97 --- .../NoDecimalConstants.opt.net40.roslyn.il | 95 --- .../Ugly/NoDecimalConstants.opt.roslyn.il | 95 --- .../Ugly/NoDecimalConstants.roslyn.il | 97 --- .../Ugly/NoExtensionMethods.net40.roslyn.il | 117 ---- .../NoExtensionMethods.opt.net40.roslyn.il | 93 --- .../Ugly/NoExtensionMethods.opt.roslyn.il | 93 --- .../Ugly/NoExtensionMethods.roslyn.il | 117 ---- .../TestCases/Ugly/NoForEachStatement.il | 156 ----- .../Ugly/NoForEachStatement.net40.roslyn.il | 145 ----- .../TestCases/Ugly/NoForEachStatement.opt.il | 128 ---- .../NoForEachStatement.opt.net40.roslyn.il | 126 ---- .../Ugly/NoForEachStatement.opt.roslyn.il | 126 ---- .../Ugly/NoForEachStatement.roslyn.il | 145 ----- .../Ugly/NoLocalFunctions.Expected.cs | 10 +- .../Ugly/NoLocalFunctions.net40.roslyn.il | 179 ------ .../Ugly/NoLocalFunctions.opt.net40.roslyn.il | 165 ----- .../Ugly/NoLocalFunctions.opt.roslyn.il | 165 ----- .../TestCases/Ugly/NoLocalFunctions.roslyn.il | 179 ------ .../TestCases/Ugly/NoNewOfT.il | 176 ------ .../TestCases/Ugly/NoNewOfT.net40.roslyn.il | 241 -------- .../TestCases/Ugly/NoNewOfT.opt.il | 147 ----- .../Ugly/NoNewOfT.opt.net40.roslyn.il | 205 ------- .../TestCases/Ugly/NoNewOfT.opt.roslyn.il | 115 ---- .../TestCases/Ugly/NoNewOfT.roslyn.il | 145 ----- .../TestCases/Ugly/NoPropertiesAndEvents.il | 136 ----- .../NoPropertiesAndEvents.net40.roslyn.il | 133 ---- .../Ugly/NoPropertiesAndEvents.opt.il | 124 ---- .../NoPropertiesAndEvents.opt.net40.roslyn.il | 131 ---- .../Ugly/NoPropertiesAndEvents.opt.roslyn.il | 131 ---- .../Ugly/NoPropertiesAndEvents.roslyn.il | 133 ---- .../UglyTestRunner.cs | 32 +- 41 files changed, 19 insertions(+), 6778 deletions(-) delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/AggressiveScalarReplacementOfAggregates.net40.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/AggressiveScalarReplacementOfAggregates.opt.net40.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/AggressiveScalarReplacementOfAggregates.opt.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/AggressiveScalarReplacementOfAggregates.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.net40.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.opt.net40.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.opt.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoDecimalConstants.net40.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoDecimalConstants.opt.net40.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoDecimalConstants.opt.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoDecimalConstants.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoExtensionMethods.net40.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoExtensionMethods.opt.net40.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoExtensionMethods.opt.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoExtensionMethods.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.net40.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.opt.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.opt.net40.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.opt.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.net40.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.opt.net40.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.opt.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.net40.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.opt.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.opt.net40.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.opt.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.net40.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.opt.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.opt.net40.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.opt.roslyn.il delete mode 100644 ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.roslyn.il diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/AggressiveScalarReplacementOfAggregates.net40.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/AggressiveScalarReplacementOfAggregates.net40.roslyn.il deleted file mode 100644 index 50a820f926..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/AggressiveScalarReplacementOfAggregates.net40.roslyn.il +++ /dev/null @@ -1,577 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly tmp4B37 -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module tmp4B37.tmp -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass - extends [mscorlib]System.Object -{ - .field public class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program thisField - .field public int32 field1 - .field public string field2 - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method DisplayClass::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass - -.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass - extends [mscorlib]System.Object -{ - .field public class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass field3 - .field public int32 field1 - .field public string field2 - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method NestedDisplayClass::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass - -.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program - extends [mscorlib]System.Object -{ - .method public hidebysig instance int32 - Rand() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: nop - IL_0001: newobj instance void [mscorlib]System.NotImplementedException::.ctor() - IL_0006: throw - } // end of method Program::Rand - - .method public hidebysig instance void - Test1() cil managed - { - // Code size 55 (0x37) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0) - IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0006: dup - IL_0007: ldc.i4.s 42 - IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000e: dup - IL_000f: ldstr "Hello World!" - IL_0014: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0019: stloc.0 - IL_001a: ldstr "{0} {1}" - IL_001f: ldloc.0 - IL_0020: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0025: box [mscorlib]System.Int32 - IL_002a: ldloc.0 - IL_002b: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0030: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_0035: nop - IL_0036: ret - } // end of method Program::Test1 - - .method public hidebysig instance void - Test2() cil managed - { - // Code size 60 (0x3c) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0) - IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0006: dup - IL_0007: ldc.i4.s 42 - IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000e: dup - IL_000f: ldstr "Hello World!" - IL_0014: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0019: stloc.0 - IL_001a: ldstr "{0} {1}" - IL_001f: ldloc.0 - IL_0020: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0025: box [mscorlib]System.Int32 - IL_002a: ldloc.0 - IL_002b: callvirt instance int32 [mscorlib]System.Object::GetHashCode() - IL_0030: box [mscorlib]System.Int32 - IL_0035: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_003a: nop - IL_003b: ret - } // end of method Program::Test2 - - .method public hidebysig instance void - Test3() cil managed - { - // Code size 50 (0x32) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0) - IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0006: dup - IL_0007: ldc.i4.s 42 - IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000e: dup - IL_000f: ldstr "Hello World!" - IL_0014: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0019: stloc.0 - IL_001a: ldstr "{0} {1}" - IL_001f: ldloc.0 - IL_0020: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0025: box [mscorlib]System.Int32 - IL_002a: ldloc.0 - IL_002b: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_0030: nop - IL_0031: ret - } // end of method Program::Test3 - - .method public hidebysig instance void - Test4() cil managed - { - // Code size 114 (0x72) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass V_1, - bool V_2) - IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0006: dup - IL_0007: ldarg.0 - IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::thisField - IL_000d: dup - IL_000e: ldc.i4.s 42 - IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0015: dup - IL_0016: ldstr "Hello World!" - IL_001b: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0020: stloc.0 - IL_0021: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::.ctor() - IL_0026: dup - IL_0027: ldc.i4 0x1267 - IL_002c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1 - IL_0031: dup - IL_0032: ldstr "ILSpy" - IL_0037: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2 - IL_003c: stloc.1 - IL_003d: ldloc.0 - IL_003e: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0043: ldc.i4.s 100 - IL_0045: cgt - IL_0047: stloc.2 - IL_0048: ldloc.2 - IL_0049: brfalse.s IL_0056 - - IL_004b: nop - IL_004c: ldloc.1 - IL_004d: ldloc.0 - IL_004e: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_0053: nop - IL_0054: br.s IL_005f - - IL_0056: nop - IL_0057: ldloc.1 - IL_0058: ldnull - IL_0059: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_005e: nop - IL_005f: ldstr "{0} {1}" - IL_0064: ldloc.0 - IL_0065: ldloc.1 - IL_0066: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_006b: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_0070: nop - IL_0071: ret - } // end of method Program::Test4 - - .method public hidebysig instance void - Test5() cil managed - { - // Code size 135 (0x87) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass V_1, - bool V_2) - IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0006: dup - IL_0007: ldarg.0 - IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::thisField - IL_000d: dup - IL_000e: ldc.i4.s 42 - IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0015: dup - IL_0016: ldstr "Hello World!" - IL_001b: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0020: stloc.0 - IL_0021: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::.ctor() - IL_0026: dup - IL_0027: ldc.i4 0x1267 - IL_002c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1 - IL_0031: dup - IL_0032: ldstr "ILSpy" - IL_0037: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2 - IL_003c: stloc.1 - IL_003d: ldloc.0 - IL_003e: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0043: ldc.i4.s 100 - IL_0045: cgt - IL_0047: stloc.2 - IL_0048: ldloc.2 - IL_0049: brfalse.s IL_0056 - - IL_004b: nop - IL_004c: ldloc.1 - IL_004d: ldloc.0 - IL_004e: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_0053: nop - IL_0054: br.s IL_005f - - IL_0056: nop - IL_0057: ldloc.1 - IL_0058: ldnull - IL_0059: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_005e: nop - IL_005f: ldstr "{0} {1}" - IL_0064: ldloc.1 - IL_0065: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2 - IL_006a: ldloc.1 - IL_006b: ldflda int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1 - IL_0070: call instance string [mscorlib]System.Int32::ToString() - IL_0075: call string [mscorlib]System.String::Concat(string, - string) - IL_007a: ldloc.1 - IL_007b: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_0080: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_0085: nop - IL_0086: ret - } // end of method Program::Test5 - - .method public hidebysig instance void - Issue1898(int32 i) cil managed - { - // Code size 151 (0x97) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass V_1, - int32 V_2, - int32 V_3, - int32 V_4, - bool V_5) - IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0006: dup - IL_0007: ldarg.0 - IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::thisField - IL_000d: dup - IL_000e: ldarg.1 - IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0014: stloc.0 - IL_0015: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::.ctor() - IL_001a: stloc.1 - IL_001b: br.s IL_0092 - - IL_001d: nop - IL_001e: ldarg.0 - IL_001f: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program::Rand() - IL_0024: stloc.3 - IL_0025: ldloc.3 - IL_0026: stloc.2 - IL_0027: ldloc.2 - IL_0028: ldc.i4.1 - IL_0029: sub - IL_002a: switch ( - IL_003d, - IL_004b, - IL_0062) - IL_003b: br.s IL_006b - - IL_003d: ldloc.1 - IL_003e: ldarg.0 - IL_003f: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program::Rand() - IL_0044: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1 - IL_0049: br.s IL_0091 - - IL_004b: ldloc.1 - IL_004c: ldarg.0 - IL_004d: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program::Rand() - IL_0052: stloc.s V_4 - IL_0054: ldloca.s V_4 - IL_0056: call instance string [mscorlib]System.Int32::ToString() - IL_005b: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2 - IL_0060: br.s IL_0091 - - IL_0062: ldloc.1 - IL_0063: ldloc.0 - IL_0064: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_0069: br.s IL_0091 - - IL_006b: ldloc.1 - IL_006c: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1 - IL_0071: call void [mscorlib]System.Console::WriteLine(int32) - IL_0076: nop - IL_0077: ldloc.1 - IL_0078: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2 - IL_007d: call void [mscorlib]System.Console::WriteLine(string) - IL_0082: nop - IL_0083: ldloc.1 - IL_0084: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_0089: call void [mscorlib]System.Console::WriteLine(object) - IL_008e: nop - IL_008f: br.s IL_0091 - - IL_0091: nop - IL_0092: ldc.i4.1 - IL_0093: stloc.s V_5 - IL_0095: br.s IL_001d - } // end of method Program::Issue1898 - - .method public hidebysig instance void - Test6(int32 i) cil managed - { - // Code size 68 (0x44) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0, - bool V_1) - IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0006: dup - IL_0007: ldarg.1 - IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000d: dup - IL_000e: ldstr "Hello World!" - IL_0013: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0018: stloc.0 - IL_0019: ldarg.1 - IL_001a: ldc.i4.0 - IL_001b: clt - IL_001d: stloc.1 - IL_001e: ldloc.1 - IL_001f: brfalse.s IL_0027 - - IL_0021: nop - IL_0022: ldarg.1 - IL_0023: neg - IL_0024: starg.s i - IL_0026: nop - IL_0027: ldstr "{0} {1}" - IL_002c: ldloc.0 - IL_002d: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0032: box [mscorlib]System.Int32 - IL_0037: ldloc.0 - IL_0038: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_003d: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_0042: nop - IL_0043: ret - } // end of method Program::Test6 - - .method public hidebysig instance void - Test6b(int32 i) cil managed - { - // Code size 69 (0x45) - .maxstack 3 - .locals init (int32 V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_1, - bool V_2) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: stloc.0 - IL_0003: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0008: dup - IL_0009: ldloc.0 - IL_000a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000f: dup - IL_0010: ldstr "Hello World!" - IL_0015: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_001a: stloc.1 - IL_001b: ldloc.0 - IL_001c: ldc.i4.0 - IL_001d: clt - IL_001f: stloc.2 - IL_0020: ldloc.2 - IL_0021: brfalse.s IL_0028 - - IL_0023: nop - IL_0024: ldloc.0 - IL_0025: neg - IL_0026: stloc.0 - IL_0027: nop - IL_0028: ldstr "{0} {1}" - IL_002d: ldloc.1 - IL_002e: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0033: box [mscorlib]System.Int32 - IL_0038: ldloc.1 - IL_0039: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_003e: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_0043: nop - IL_0044: ret - } // end of method Program::Test6b - - .method public hidebysig instance void - Test7(int32 i) cil managed - { - // Code size 71 (0x47) - .maxstack 4 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0, - int32 V_1) - IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0006: dup - IL_0007: ldarg.1 - IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000d: dup - IL_000e: ldstr "Hello World!" - IL_0013: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0018: stloc.0 - IL_0019: ldstr "{0} {1} {2}" - IL_001e: ldloc.0 - IL_001f: dup - IL_0020: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0025: stloc.1 - IL_0026: ldloc.1 - IL_0027: ldc.i4.1 - IL_0028: add - IL_0029: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_002e: ldloc.1 - IL_002f: box [mscorlib]System.Int32 - IL_0034: ldloc.0 - IL_0035: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_003a: ldarg.1 - IL_003b: box [mscorlib]System.Int32 - IL_0040: call void [mscorlib]System.Console::WriteLine(string, - object, - object, - object) - IL_0045: nop - IL_0046: ret - } // end of method Program::Test7 - - .method public hidebysig instance void - Test8(int32 i) cil managed - { - // Code size 58 (0x3a) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0) - IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0006: dup - IL_0007: ldarg.1 - IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000d: dup - IL_000e: ldstr "Hello World!" - IL_0013: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0018: stloc.0 - IL_0019: ldc.i4.s 42 - IL_001b: starg.s i - IL_001d: ldstr "{0} {1}" - IL_0022: ldloc.0 - IL_0023: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0028: box [mscorlib]System.Int32 - IL_002d: ldloc.0 - IL_002e: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0033: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_0038: nop - IL_0039: ret - } // end of method Program::Test8 - - .method public hidebysig instance void - Test8b(int32 i) cil managed - { - // Code size 59 (0x3b) - .maxstack 3 - .locals init (int32 V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_1) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: stloc.0 - IL_0003: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0008: dup - IL_0009: ldloc.0 - IL_000a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000f: dup - IL_0010: ldstr "Hello World!" - IL_0015: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_001a: stloc.1 - IL_001b: ldc.i4.s 42 - IL_001d: stloc.0 - IL_001e: ldstr "{0} {1}" - IL_0023: ldloc.1 - IL_0024: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0029: box [mscorlib]System.Int32 - IL_002e: ldloc.1 - IL_002f: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0034: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_0039: nop - IL_003a: ret - } // end of method Program::Test8b - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method Program::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/AggressiveScalarReplacementOfAggregates.opt.net40.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/AggressiveScalarReplacementOfAggregates.opt.net40.roslyn.il deleted file mode 100644 index 1d4bca5564..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/AggressiveScalarReplacementOfAggregates.opt.net40.roslyn.il +++ /dev/null @@ -1,509 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly tmp96F5 -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module tmp96F5.tmp -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass - extends [mscorlib]System.Object -{ - .field public class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program thisField - .field public int32 field1 - .field public string field2 - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method DisplayClass::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass - -.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass - extends [mscorlib]System.Object -{ - .field public class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass field3 - .field public int32 field1 - .field public string field2 - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method NestedDisplayClass::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass - -.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program - extends [mscorlib]System.Object -{ - .method public hidebysig instance int32 - Rand() cil managed - { - // Code size 6 (0x6) - .maxstack 8 - IL_0000: newobj instance void [mscorlib]System.NotImplementedException::.ctor() - IL_0005: throw - } // end of method Program::Rand - - .method public hidebysig instance void - Test1() cil managed - { - // Code size 53 (0x35) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0005: dup - IL_0006: ldc.i4.s 42 - IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000d: dup - IL_000e: ldstr "Hello World!" - IL_0013: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0018: stloc.0 - IL_0019: ldstr "{0} {1}" - IL_001e: ldloc.0 - IL_001f: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0024: box [mscorlib]System.Int32 - IL_0029: ldloc.0 - IL_002a: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_002f: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_0034: ret - } // end of method Program::Test1 - - .method public hidebysig instance void - Test2() cil managed - { - // Code size 58 (0x3a) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0005: dup - IL_0006: ldc.i4.s 42 - IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000d: dup - IL_000e: ldstr "Hello World!" - IL_0013: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0018: stloc.0 - IL_0019: ldstr "{0} {1}" - IL_001e: ldloc.0 - IL_001f: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0024: box [mscorlib]System.Int32 - IL_0029: ldloc.0 - IL_002a: callvirt instance int32 [mscorlib]System.Object::GetHashCode() - IL_002f: box [mscorlib]System.Int32 - IL_0034: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_0039: ret - } // end of method Program::Test2 - - .method public hidebysig instance void - Test3() cil managed - { - // Code size 48 (0x30) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0005: dup - IL_0006: ldc.i4.s 42 - IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000d: dup - IL_000e: ldstr "Hello World!" - IL_0013: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0018: stloc.0 - IL_0019: ldstr "{0} {1}" - IL_001e: ldloc.0 - IL_001f: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0024: box [mscorlib]System.Int32 - IL_0029: ldloc.0 - IL_002a: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_002f: ret - } // end of method Program::Test3 - - .method public hidebysig instance void - Test4() cil managed - { - // Code size 104 (0x68) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass V_1) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0005: dup - IL_0006: ldarg.0 - IL_0007: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::thisField - IL_000c: dup - IL_000d: ldc.i4.s 42 - IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0014: dup - IL_0015: ldstr "Hello World!" - IL_001a: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_001f: stloc.0 - IL_0020: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::.ctor() - IL_0025: dup - IL_0026: ldc.i4 0x1267 - IL_002b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1 - IL_0030: dup - IL_0031: ldstr "ILSpy" - IL_0036: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2 - IL_003b: stloc.1 - IL_003c: ldloc.0 - IL_003d: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0042: ldc.i4.s 100 - IL_0044: ble.s IL_004f - - IL_0046: ldloc.1 - IL_0047: ldloc.0 - IL_0048: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_004d: br.s IL_0056 - - IL_004f: ldloc.1 - IL_0050: ldnull - IL_0051: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_0056: ldstr "{0} {1}" - IL_005b: ldloc.0 - IL_005c: ldloc.1 - IL_005d: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_0062: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_0067: ret - } // end of method Program::Test4 - - .method public hidebysig instance void - Test5() cil managed - { - // Code size 125 (0x7d) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass V_1) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0005: dup - IL_0006: ldarg.0 - IL_0007: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::thisField - IL_000c: dup - IL_000d: ldc.i4.s 42 - IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0014: dup - IL_0015: ldstr "Hello World!" - IL_001a: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_001f: stloc.0 - IL_0020: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::.ctor() - IL_0025: dup - IL_0026: ldc.i4 0x1267 - IL_002b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1 - IL_0030: dup - IL_0031: ldstr "ILSpy" - IL_0036: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2 - IL_003b: stloc.1 - IL_003c: ldloc.0 - IL_003d: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0042: ldc.i4.s 100 - IL_0044: ble.s IL_004f - - IL_0046: ldloc.1 - IL_0047: ldloc.0 - IL_0048: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_004d: br.s IL_0056 - - IL_004f: ldloc.1 - IL_0050: ldnull - IL_0051: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_0056: ldstr "{0} {1}" - IL_005b: ldloc.1 - IL_005c: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2 - IL_0061: ldloc.1 - IL_0062: ldflda int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1 - IL_0067: call instance string [mscorlib]System.Int32::ToString() - IL_006c: call string [mscorlib]System.String::Concat(string, - string) - IL_0071: ldloc.1 - IL_0072: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_0077: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_007c: ret - } // end of method Program::Test5 - - .method public hidebysig instance void - Issue1898(int32 i) cil managed - { - // Code size 135 (0x87) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass V_1, - int32 V_2, - int32 V_3) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0005: dup - IL_0006: ldarg.0 - IL_0007: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::thisField - IL_000c: dup - IL_000d: ldarg.1 - IL_000e: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0013: stloc.0 - IL_0014: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::.ctor() - IL_0019: stloc.1 - IL_001a: ldarg.0 - IL_001b: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program::Rand() - IL_0020: stloc.2 - IL_0021: ldloc.2 - IL_0022: ldc.i4.1 - IL_0023: sub - IL_0024: switch ( - IL_0037, - IL_0045, - IL_005b) - IL_0035: br.s IL_0064 - - IL_0037: ldloc.1 - IL_0038: ldarg.0 - IL_0039: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program::Rand() - IL_003e: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1 - IL_0043: br.s IL_001a - - IL_0045: ldloc.1 - IL_0046: ldarg.0 - IL_0047: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program::Rand() - IL_004c: stloc.3 - IL_004d: ldloca.s V_3 - IL_004f: call instance string [mscorlib]System.Int32::ToString() - IL_0054: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2 - IL_0059: br.s IL_001a - - IL_005b: ldloc.1 - IL_005c: ldloc.0 - IL_005d: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_0062: br.s IL_001a - - IL_0064: ldloc.1 - IL_0065: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1 - IL_006a: call void [mscorlib]System.Console::WriteLine(int32) - IL_006f: ldloc.1 - IL_0070: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2 - IL_0075: call void [mscorlib]System.Console::WriteLine(string) - IL_007a: ldloc.1 - IL_007b: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_0080: call void [mscorlib]System.Console::WriteLine(object) - IL_0085: br.s IL_001a - } // end of method Program::Issue1898 - - .method public hidebysig instance void - Test6(int32 i) cil managed - { - // Code size 60 (0x3c) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0005: dup - IL_0006: ldarg.1 - IL_0007: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000c: dup - IL_000d: ldstr "Hello World!" - IL_0012: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0017: stloc.0 - IL_0018: ldarg.1 - IL_0019: ldc.i4.0 - IL_001a: bge.s IL_0020 - - IL_001c: ldarg.1 - IL_001d: neg - IL_001e: starg.s i - IL_0020: ldstr "{0} {1}" - IL_0025: ldloc.0 - IL_0026: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_002b: box [mscorlib]System.Int32 - IL_0030: ldloc.0 - IL_0031: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0036: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_003b: ret - } // end of method Program::Test6 - - .method public hidebysig instance void - Test6b(int32 i) cil managed - { - // Code size 61 (0x3d) - .maxstack 3 - .locals init (int32 V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_1) - IL_0000: ldarg.1 - IL_0001: stloc.0 - IL_0002: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0007: dup - IL_0008: ldloc.0 - IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000e: dup - IL_000f: ldstr "Hello World!" - IL_0014: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0019: stloc.1 - IL_001a: ldloc.0 - IL_001b: ldc.i4.0 - IL_001c: bge.s IL_0021 - - IL_001e: ldloc.0 - IL_001f: neg - IL_0020: stloc.0 - IL_0021: ldstr "{0} {1}" - IL_0026: ldloc.1 - IL_0027: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_002c: box [mscorlib]System.Int32 - IL_0031: ldloc.1 - IL_0032: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0037: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_003c: ret - } // end of method Program::Test6b - - .method public hidebysig instance void - Test7(int32 i) cil managed - { - // Code size 69 (0x45) - .maxstack 4 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0, - int32 V_1) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0005: dup - IL_0006: ldarg.1 - IL_0007: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000c: dup - IL_000d: ldstr "Hello World!" - IL_0012: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0017: stloc.0 - IL_0018: ldstr "{0} {1} {2}" - IL_001d: ldloc.0 - IL_001e: dup - IL_001f: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0024: stloc.1 - IL_0025: ldloc.1 - IL_0026: ldc.i4.1 - IL_0027: add - IL_0028: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_002d: ldloc.1 - IL_002e: box [mscorlib]System.Int32 - IL_0033: ldloc.0 - IL_0034: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0039: ldarg.1 - IL_003a: box [mscorlib]System.Int32 - IL_003f: call void [mscorlib]System.Console::WriteLine(string, - object, - object, - object) - IL_0044: ret - } // end of method Program::Test7 - - .method public hidebysig instance void - Test8(int32 i) cil managed - { - // Code size 56 (0x38) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0005: dup - IL_0006: ldarg.1 - IL_0007: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000c: dup - IL_000d: ldstr "Hello World!" - IL_0012: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0017: stloc.0 - IL_0018: ldc.i4.s 42 - IL_001a: starg.s i - IL_001c: ldstr "{0} {1}" - IL_0021: ldloc.0 - IL_0022: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0027: box [mscorlib]System.Int32 - IL_002c: ldloc.0 - IL_002d: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0032: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_0037: ret - } // end of method Program::Test8 - - .method public hidebysig instance void - Test8b(int32 i) cil managed - { - // Code size 57 (0x39) - .maxstack 3 - .locals init (int32 V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_1) - IL_0000: ldarg.1 - IL_0001: stloc.0 - IL_0002: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0007: dup - IL_0008: ldloc.0 - IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000e: dup - IL_000f: ldstr "Hello World!" - IL_0014: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0019: stloc.1 - IL_001a: ldc.i4.s 42 - IL_001c: stloc.0 - IL_001d: ldstr "{0} {1}" - IL_0022: ldloc.1 - IL_0023: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0028: box [mscorlib]System.Int32 - IL_002d: ldloc.1 - IL_002e: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0033: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_0038: ret - } // end of method Program::Test8b - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method Program::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/AggressiveScalarReplacementOfAggregates.opt.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/AggressiveScalarReplacementOfAggregates.opt.roslyn.il deleted file mode 100644 index c2ec15ad8d..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/AggressiveScalarReplacementOfAggregates.opt.roslyn.il +++ /dev/null @@ -1,509 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly AggressiveScalarReplacementOfAggregates -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module AggressiveScalarReplacementOfAggregates.dll -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass - extends [mscorlib]System.Object -{ - .field public class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program thisField - .field public int32 field1 - .field public string field2 - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method DisplayClass::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass - -.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass - extends [mscorlib]System.Object -{ - .field public class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass field3 - .field public int32 field1 - .field public string field2 - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method NestedDisplayClass::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass - -.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program - extends [mscorlib]System.Object -{ - .method public hidebysig instance int32 - Rand() cil managed - { - // Code size 6 (0x6) - .maxstack 8 - IL_0000: newobj instance void [mscorlib]System.NotImplementedException::.ctor() - IL_0005: throw - } // end of method Program::Rand - - .method public hidebysig instance void - Test1() cil managed - { - // Code size 53 (0x35) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0005: dup - IL_0006: ldc.i4.s 42 - IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000d: dup - IL_000e: ldstr "Hello World!" - IL_0013: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0018: stloc.0 - IL_0019: ldstr "{0} {1}" - IL_001e: ldloc.0 - IL_001f: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0024: box [mscorlib]System.Int32 - IL_0029: ldloc.0 - IL_002a: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_002f: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_0034: ret - } // end of method Program::Test1 - - .method public hidebysig instance void - Test2() cil managed - { - // Code size 58 (0x3a) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0005: dup - IL_0006: ldc.i4.s 42 - IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000d: dup - IL_000e: ldstr "Hello World!" - IL_0013: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0018: stloc.0 - IL_0019: ldstr "{0} {1}" - IL_001e: ldloc.0 - IL_001f: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0024: box [mscorlib]System.Int32 - IL_0029: ldloc.0 - IL_002a: callvirt instance int32 [mscorlib]System.Object::GetHashCode() - IL_002f: box [mscorlib]System.Int32 - IL_0034: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_0039: ret - } // end of method Program::Test2 - - .method public hidebysig instance void - Test3() cil managed - { - // Code size 48 (0x30) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0005: dup - IL_0006: ldc.i4.s 42 - IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000d: dup - IL_000e: ldstr "Hello World!" - IL_0013: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0018: stloc.0 - IL_0019: ldstr "{0} {1}" - IL_001e: ldloc.0 - IL_001f: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0024: box [mscorlib]System.Int32 - IL_0029: ldloc.0 - IL_002a: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_002f: ret - } // end of method Program::Test3 - - .method public hidebysig instance void - Test4() cil managed - { - // Code size 104 (0x68) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass V_1) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0005: dup - IL_0006: ldarg.0 - IL_0007: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::thisField - IL_000c: dup - IL_000d: ldc.i4.s 42 - IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0014: dup - IL_0015: ldstr "Hello World!" - IL_001a: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_001f: stloc.0 - IL_0020: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::.ctor() - IL_0025: dup - IL_0026: ldc.i4 0x1267 - IL_002b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1 - IL_0030: dup - IL_0031: ldstr "ILSpy" - IL_0036: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2 - IL_003b: stloc.1 - IL_003c: ldloc.0 - IL_003d: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0042: ldc.i4.s 100 - IL_0044: ble.s IL_004f - - IL_0046: ldloc.1 - IL_0047: ldloc.0 - IL_0048: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_004d: br.s IL_0056 - - IL_004f: ldloc.1 - IL_0050: ldnull - IL_0051: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_0056: ldstr "{0} {1}" - IL_005b: ldloc.0 - IL_005c: ldloc.1 - IL_005d: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_0062: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_0067: ret - } // end of method Program::Test4 - - .method public hidebysig instance void - Test5() cil managed - { - // Code size 125 (0x7d) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass V_1) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0005: dup - IL_0006: ldarg.0 - IL_0007: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::thisField - IL_000c: dup - IL_000d: ldc.i4.s 42 - IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0014: dup - IL_0015: ldstr "Hello World!" - IL_001a: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_001f: stloc.0 - IL_0020: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::.ctor() - IL_0025: dup - IL_0026: ldc.i4 0x1267 - IL_002b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1 - IL_0030: dup - IL_0031: ldstr "ILSpy" - IL_0036: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2 - IL_003b: stloc.1 - IL_003c: ldloc.0 - IL_003d: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0042: ldc.i4.s 100 - IL_0044: ble.s IL_004f - - IL_0046: ldloc.1 - IL_0047: ldloc.0 - IL_0048: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_004d: br.s IL_0056 - - IL_004f: ldloc.1 - IL_0050: ldnull - IL_0051: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_0056: ldstr "{0} {1}" - IL_005b: ldloc.1 - IL_005c: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2 - IL_0061: ldloc.1 - IL_0062: ldflda int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1 - IL_0067: call instance string [mscorlib]System.Int32::ToString() - IL_006c: call string [mscorlib]System.String::Concat(string, - string) - IL_0071: ldloc.1 - IL_0072: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_0077: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_007c: ret - } // end of method Program::Test5 - - .method public hidebysig instance void - Issue1898(int32 i) cil managed - { - // Code size 135 (0x87) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass V_1, - int32 V_2, - int32 V_3) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0005: dup - IL_0006: ldarg.0 - IL_0007: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::thisField - IL_000c: dup - IL_000d: ldarg.1 - IL_000e: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0013: stloc.0 - IL_0014: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::.ctor() - IL_0019: stloc.1 - IL_001a: ldarg.0 - IL_001b: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program::Rand() - IL_0020: stloc.2 - IL_0021: ldloc.2 - IL_0022: ldc.i4.1 - IL_0023: sub - IL_0024: switch ( - IL_0037, - IL_0045, - IL_005b) - IL_0035: br.s IL_0064 - - IL_0037: ldloc.1 - IL_0038: ldarg.0 - IL_0039: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program::Rand() - IL_003e: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1 - IL_0043: br.s IL_001a - - IL_0045: ldloc.1 - IL_0046: ldarg.0 - IL_0047: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program::Rand() - IL_004c: stloc.3 - IL_004d: ldloca.s V_3 - IL_004f: call instance string [mscorlib]System.Int32::ToString() - IL_0054: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2 - IL_0059: br.s IL_001a - - IL_005b: ldloc.1 - IL_005c: ldloc.0 - IL_005d: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_0062: br.s IL_001a - - IL_0064: ldloc.1 - IL_0065: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1 - IL_006a: call void [mscorlib]System.Console::WriteLine(int32) - IL_006f: ldloc.1 - IL_0070: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2 - IL_0075: call void [mscorlib]System.Console::WriteLine(string) - IL_007a: ldloc.1 - IL_007b: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_0080: call void [mscorlib]System.Console::WriteLine(object) - IL_0085: br.s IL_001a - } // end of method Program::Issue1898 - - .method public hidebysig instance void - Test6(int32 i) cil managed - { - // Code size 60 (0x3c) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0005: dup - IL_0006: ldarg.1 - IL_0007: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000c: dup - IL_000d: ldstr "Hello World!" - IL_0012: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0017: stloc.0 - IL_0018: ldarg.1 - IL_0019: ldc.i4.0 - IL_001a: bge.s IL_0020 - - IL_001c: ldarg.1 - IL_001d: neg - IL_001e: starg.s i - IL_0020: ldstr "{0} {1}" - IL_0025: ldloc.0 - IL_0026: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_002b: box [mscorlib]System.Int32 - IL_0030: ldloc.0 - IL_0031: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0036: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_003b: ret - } // end of method Program::Test6 - - .method public hidebysig instance void - Test6b(int32 i) cil managed - { - // Code size 61 (0x3d) - .maxstack 3 - .locals init (int32 V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_1) - IL_0000: ldarg.1 - IL_0001: stloc.0 - IL_0002: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0007: dup - IL_0008: ldloc.0 - IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000e: dup - IL_000f: ldstr "Hello World!" - IL_0014: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0019: stloc.1 - IL_001a: ldloc.0 - IL_001b: ldc.i4.0 - IL_001c: bge.s IL_0021 - - IL_001e: ldloc.0 - IL_001f: neg - IL_0020: stloc.0 - IL_0021: ldstr "{0} {1}" - IL_0026: ldloc.1 - IL_0027: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_002c: box [mscorlib]System.Int32 - IL_0031: ldloc.1 - IL_0032: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0037: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_003c: ret - } // end of method Program::Test6b - - .method public hidebysig instance void - Test7(int32 i) cil managed - { - // Code size 69 (0x45) - .maxstack 4 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0, - int32 V_1) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0005: dup - IL_0006: ldarg.1 - IL_0007: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000c: dup - IL_000d: ldstr "Hello World!" - IL_0012: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0017: stloc.0 - IL_0018: ldstr "{0} {1} {2}" - IL_001d: ldloc.0 - IL_001e: dup - IL_001f: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0024: stloc.1 - IL_0025: ldloc.1 - IL_0026: ldc.i4.1 - IL_0027: add - IL_0028: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_002d: ldloc.1 - IL_002e: box [mscorlib]System.Int32 - IL_0033: ldloc.0 - IL_0034: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0039: ldarg.1 - IL_003a: box [mscorlib]System.Int32 - IL_003f: call void [mscorlib]System.Console::WriteLine(string, - object, - object, - object) - IL_0044: ret - } // end of method Program::Test7 - - .method public hidebysig instance void - Test8(int32 i) cil managed - { - // Code size 56 (0x38) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0005: dup - IL_0006: ldarg.1 - IL_0007: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000c: dup - IL_000d: ldstr "Hello World!" - IL_0012: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0017: stloc.0 - IL_0018: ldc.i4.s 42 - IL_001a: starg.s i - IL_001c: ldstr "{0} {1}" - IL_0021: ldloc.0 - IL_0022: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0027: box [mscorlib]System.Int32 - IL_002c: ldloc.0 - IL_002d: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0032: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_0037: ret - } // end of method Program::Test8 - - .method public hidebysig instance void - Test8b(int32 i) cil managed - { - // Code size 57 (0x39) - .maxstack 3 - .locals init (int32 V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_1) - IL_0000: ldarg.1 - IL_0001: stloc.0 - IL_0002: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0007: dup - IL_0008: ldloc.0 - IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000e: dup - IL_000f: ldstr "Hello World!" - IL_0014: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0019: stloc.1 - IL_001a: ldc.i4.s 42 - IL_001c: stloc.0 - IL_001d: ldstr "{0} {1}" - IL_0022: ldloc.1 - IL_0023: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0028: box [mscorlib]System.Int32 - IL_002d: ldloc.1 - IL_002e: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0033: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_0038: ret - } // end of method Program::Test8b - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method Program::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/AggressiveScalarReplacementOfAggregates.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/AggressiveScalarReplacementOfAggregates.roslyn.il deleted file mode 100644 index a51b839f84..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/AggressiveScalarReplacementOfAggregates.roslyn.il +++ /dev/null @@ -1,577 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly AggressiveScalarReplacementOfAggregates -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module AggressiveScalarReplacementOfAggregates.dll -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass - extends [mscorlib]System.Object -{ - .field public class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program thisField - .field public int32 field1 - .field public string field2 - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method DisplayClass::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass - -.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass - extends [mscorlib]System.Object -{ - .field public class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass field3 - .field public int32 field1 - .field public string field2 - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method NestedDisplayClass::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass - -.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program - extends [mscorlib]System.Object -{ - .method public hidebysig instance int32 - Rand() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: nop - IL_0001: newobj instance void [mscorlib]System.NotImplementedException::.ctor() - IL_0006: throw - } // end of method Program::Rand - - .method public hidebysig instance void - Test1() cil managed - { - // Code size 55 (0x37) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0) - IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0006: dup - IL_0007: ldc.i4.s 42 - IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000e: dup - IL_000f: ldstr "Hello World!" - IL_0014: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0019: stloc.0 - IL_001a: ldstr "{0} {1}" - IL_001f: ldloc.0 - IL_0020: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0025: box [mscorlib]System.Int32 - IL_002a: ldloc.0 - IL_002b: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0030: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_0035: nop - IL_0036: ret - } // end of method Program::Test1 - - .method public hidebysig instance void - Test2() cil managed - { - // Code size 60 (0x3c) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0) - IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0006: dup - IL_0007: ldc.i4.s 42 - IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000e: dup - IL_000f: ldstr "Hello World!" - IL_0014: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0019: stloc.0 - IL_001a: ldstr "{0} {1}" - IL_001f: ldloc.0 - IL_0020: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0025: box [mscorlib]System.Int32 - IL_002a: ldloc.0 - IL_002b: callvirt instance int32 [mscorlib]System.Object::GetHashCode() - IL_0030: box [mscorlib]System.Int32 - IL_0035: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_003a: nop - IL_003b: ret - } // end of method Program::Test2 - - .method public hidebysig instance void - Test3() cil managed - { - // Code size 50 (0x32) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0) - IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0006: dup - IL_0007: ldc.i4.s 42 - IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000e: dup - IL_000f: ldstr "Hello World!" - IL_0014: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0019: stloc.0 - IL_001a: ldstr "{0} {1}" - IL_001f: ldloc.0 - IL_0020: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0025: box [mscorlib]System.Int32 - IL_002a: ldloc.0 - IL_002b: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_0030: nop - IL_0031: ret - } // end of method Program::Test3 - - .method public hidebysig instance void - Test4() cil managed - { - // Code size 114 (0x72) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass V_1, - bool V_2) - IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0006: dup - IL_0007: ldarg.0 - IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::thisField - IL_000d: dup - IL_000e: ldc.i4.s 42 - IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0015: dup - IL_0016: ldstr "Hello World!" - IL_001b: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0020: stloc.0 - IL_0021: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::.ctor() - IL_0026: dup - IL_0027: ldc.i4 0x1267 - IL_002c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1 - IL_0031: dup - IL_0032: ldstr "ILSpy" - IL_0037: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2 - IL_003c: stloc.1 - IL_003d: ldloc.0 - IL_003e: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0043: ldc.i4.s 100 - IL_0045: cgt - IL_0047: stloc.2 - IL_0048: ldloc.2 - IL_0049: brfalse.s IL_0056 - - IL_004b: nop - IL_004c: ldloc.1 - IL_004d: ldloc.0 - IL_004e: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_0053: nop - IL_0054: br.s IL_005f - - IL_0056: nop - IL_0057: ldloc.1 - IL_0058: ldnull - IL_0059: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_005e: nop - IL_005f: ldstr "{0} {1}" - IL_0064: ldloc.0 - IL_0065: ldloc.1 - IL_0066: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_006b: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_0070: nop - IL_0071: ret - } // end of method Program::Test4 - - .method public hidebysig instance void - Test5() cil managed - { - // Code size 135 (0x87) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass V_1, - bool V_2) - IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0006: dup - IL_0007: ldarg.0 - IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::thisField - IL_000d: dup - IL_000e: ldc.i4.s 42 - IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0015: dup - IL_0016: ldstr "Hello World!" - IL_001b: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0020: stloc.0 - IL_0021: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::.ctor() - IL_0026: dup - IL_0027: ldc.i4 0x1267 - IL_002c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1 - IL_0031: dup - IL_0032: ldstr "ILSpy" - IL_0037: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2 - IL_003c: stloc.1 - IL_003d: ldloc.0 - IL_003e: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0043: ldc.i4.s 100 - IL_0045: cgt - IL_0047: stloc.2 - IL_0048: ldloc.2 - IL_0049: brfalse.s IL_0056 - - IL_004b: nop - IL_004c: ldloc.1 - IL_004d: ldloc.0 - IL_004e: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_0053: nop - IL_0054: br.s IL_005f - - IL_0056: nop - IL_0057: ldloc.1 - IL_0058: ldnull - IL_0059: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_005e: nop - IL_005f: ldstr "{0} {1}" - IL_0064: ldloc.1 - IL_0065: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2 - IL_006a: ldloc.1 - IL_006b: ldflda int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1 - IL_0070: call instance string [mscorlib]System.Int32::ToString() - IL_0075: call string [mscorlib]System.String::Concat(string, - string) - IL_007a: ldloc.1 - IL_007b: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_0080: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_0085: nop - IL_0086: ret - } // end of method Program::Test5 - - .method public hidebysig instance void - Issue1898(int32 i) cil managed - { - // Code size 151 (0x97) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass V_1, - int32 V_2, - int32 V_3, - int32 V_4, - bool V_5) - IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0006: dup - IL_0007: ldarg.0 - IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::thisField - IL_000d: dup - IL_000e: ldarg.1 - IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0014: stloc.0 - IL_0015: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::.ctor() - IL_001a: stloc.1 - IL_001b: br.s IL_0092 - - IL_001d: nop - IL_001e: ldarg.0 - IL_001f: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program::Rand() - IL_0024: stloc.3 - IL_0025: ldloc.3 - IL_0026: stloc.2 - IL_0027: ldloc.2 - IL_0028: ldc.i4.1 - IL_0029: sub - IL_002a: switch ( - IL_003d, - IL_004b, - IL_0062) - IL_003b: br.s IL_006b - - IL_003d: ldloc.1 - IL_003e: ldarg.0 - IL_003f: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program::Rand() - IL_0044: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1 - IL_0049: br.s IL_0091 - - IL_004b: ldloc.1 - IL_004c: ldarg.0 - IL_004d: call instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program::Rand() - IL_0052: stloc.s V_4 - IL_0054: ldloca.s V_4 - IL_0056: call instance string [mscorlib]System.Int32::ToString() - IL_005b: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2 - IL_0060: br.s IL_0091 - - IL_0062: ldloc.1 - IL_0063: ldloc.0 - IL_0064: stfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_0069: br.s IL_0091 - - IL_006b: ldloc.1 - IL_006c: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field1 - IL_0071: call void [mscorlib]System.Console::WriteLine(int32) - IL_0076: nop - IL_0077: ldloc.1 - IL_0078: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field2 - IL_007d: call void [mscorlib]System.Console::WriteLine(string) - IL_0082: nop - IL_0083: ldloc.1 - IL_0084: ldfld class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass ICSharpCode.Decompiler.Tests.TestCases.Ugly.NestedDisplayClass::field3 - IL_0089: call void [mscorlib]System.Console::WriteLine(object) - IL_008e: nop - IL_008f: br.s IL_0091 - - IL_0091: nop - IL_0092: ldc.i4.1 - IL_0093: stloc.s V_5 - IL_0095: br.s IL_001d - } // end of method Program::Issue1898 - - .method public hidebysig instance void - Test6(int32 i) cil managed - { - // Code size 68 (0x44) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0, - bool V_1) - IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0006: dup - IL_0007: ldarg.1 - IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000d: dup - IL_000e: ldstr "Hello World!" - IL_0013: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0018: stloc.0 - IL_0019: ldarg.1 - IL_001a: ldc.i4.0 - IL_001b: clt - IL_001d: stloc.1 - IL_001e: ldloc.1 - IL_001f: brfalse.s IL_0027 - - IL_0021: nop - IL_0022: ldarg.1 - IL_0023: neg - IL_0024: starg.s i - IL_0026: nop - IL_0027: ldstr "{0} {1}" - IL_002c: ldloc.0 - IL_002d: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0032: box [mscorlib]System.Int32 - IL_0037: ldloc.0 - IL_0038: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_003d: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_0042: nop - IL_0043: ret - } // end of method Program::Test6 - - .method public hidebysig instance void - Test6b(int32 i) cil managed - { - // Code size 69 (0x45) - .maxstack 3 - .locals init (int32 V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_1, - bool V_2) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: stloc.0 - IL_0003: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0008: dup - IL_0009: ldloc.0 - IL_000a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000f: dup - IL_0010: ldstr "Hello World!" - IL_0015: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_001a: stloc.1 - IL_001b: ldloc.0 - IL_001c: ldc.i4.0 - IL_001d: clt - IL_001f: stloc.2 - IL_0020: ldloc.2 - IL_0021: brfalse.s IL_0028 - - IL_0023: nop - IL_0024: ldloc.0 - IL_0025: neg - IL_0026: stloc.0 - IL_0027: nop - IL_0028: ldstr "{0} {1}" - IL_002d: ldloc.1 - IL_002e: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0033: box [mscorlib]System.Int32 - IL_0038: ldloc.1 - IL_0039: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_003e: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_0043: nop - IL_0044: ret - } // end of method Program::Test6b - - .method public hidebysig instance void - Test7(int32 i) cil managed - { - // Code size 71 (0x47) - .maxstack 4 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0, - int32 V_1) - IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0006: dup - IL_0007: ldarg.1 - IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000d: dup - IL_000e: ldstr "Hello World!" - IL_0013: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0018: stloc.0 - IL_0019: ldstr "{0} {1} {2}" - IL_001e: ldloc.0 - IL_001f: dup - IL_0020: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0025: stloc.1 - IL_0026: ldloc.1 - IL_0027: ldc.i4.1 - IL_0028: add - IL_0029: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_002e: ldloc.1 - IL_002f: box [mscorlib]System.Int32 - IL_0034: ldloc.0 - IL_0035: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_003a: ldarg.1 - IL_003b: box [mscorlib]System.Int32 - IL_0040: call void [mscorlib]System.Console::WriteLine(string, - object, - object, - object) - IL_0045: nop - IL_0046: ret - } // end of method Program::Test7 - - .method public hidebysig instance void - Test8(int32 i) cil managed - { - // Code size 58 (0x3a) - .maxstack 3 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_0) - IL_0000: nop - IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0006: dup - IL_0007: ldarg.1 - IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000d: dup - IL_000e: ldstr "Hello World!" - IL_0013: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0018: stloc.0 - IL_0019: ldc.i4.s 42 - IL_001b: starg.s i - IL_001d: ldstr "{0} {1}" - IL_0022: ldloc.0 - IL_0023: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0028: box [mscorlib]System.Int32 - IL_002d: ldloc.0 - IL_002e: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0033: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_0038: nop - IL_0039: ret - } // end of method Program::Test8 - - .method public hidebysig instance void - Test8b(int32 i) cil managed - { - // Code size 59 (0x3b) - .maxstack 3 - .locals init (int32 V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass V_1) - IL_0000: nop - IL_0001: ldarg.1 - IL_0002: stloc.0 - IL_0003: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::.ctor() - IL_0008: dup - IL_0009: ldloc.0 - IL_000a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_000f: dup - IL_0010: ldstr "Hello World!" - IL_0015: stfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_001a: stloc.1 - IL_001b: ldc.i4.s 42 - IL_001d: stloc.0 - IL_001e: ldstr "{0} {1}" - IL_0023: ldloc.1 - IL_0024: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field1 - IL_0029: box [mscorlib]System.Int32 - IL_002e: ldloc.1 - IL_002f: ldfld string ICSharpCode.Decompiler.Tests.TestCases.Ugly.DisplayClass::field2 - IL_0034: call void [mscorlib]System.Console::WriteLine(string, - object, - object) - IL_0039: nop - IL_003a: ret - } // end of method Program::Test8b - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method Program::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Program - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.Expected.cs b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.Expected.cs index 296df592c4..0ed732c8a4 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.Expected.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.Expected.cs @@ -6,7 +6,7 @@ internal sealed class _003CPrivateImplementationDetails_003E { [StructLayout(LayoutKind.Explicit, Pack = 1, Size = 12)] - private struct __StaticArrayInitTypeSize_003D12 + internal struct __StaticArrayInitTypeSize_003D12 { } internal static readonly __StaticArrayInitTypeSize_003D12 _4636993D3E1DA4E9D6B8F87B79E8F7C6D018580D52661950EABC3845C5897A4D/* Not supported: data(01 00 00 00 02 00 00 00 03 00 00 00) */; diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.net40.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.net40.roslyn.il deleted file mode 100644 index b70013f679..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.net40.roslyn.il +++ /dev/null @@ -1,116 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly tmp9704 -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module tmp9704.tmp -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoArrayInitializers - extends [mscorlib]System.Object -{ - .method public hidebysig instance int32[] - LiteralArray() cil managed - { - // Code size 23 (0x17) - .maxstack 3 - .locals init (int32[] V_0) - IL_0000: nop - IL_0001: ldc.i4.3 - IL_0002: newarr [mscorlib]System.Int32 - IL_0007: dup - IL_0008: ldtoken field valuetype ''/'__StaticArrayInitTypeSize=12' ''::'4636993D3E1DA4E9D6B8F87B79E8F7C6D018580D52661950EABC3845C5897A4D' - IL_000d: call void [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray(class [mscorlib]System.Array, - valuetype [mscorlib]System.RuntimeFieldHandle) - IL_0012: stloc.0 - IL_0013: br.s IL_0015 - - IL_0015: ldloc.0 - IL_0016: ret - } // end of method NoArrayInitializers::LiteralArray - - .method public hidebysig instance int32[] - VariableArray(int32 a, - int32 b) cil managed - { - // Code size 20 (0x14) - .maxstack 4 - .locals init (int32[] V_0) - IL_0000: nop - IL_0001: ldc.i4.2 - IL_0002: newarr [mscorlib]System.Int32 - IL_0007: dup - IL_0008: ldc.i4.0 - IL_0009: ldarg.1 - IL_000a: stelem.i4 - IL_000b: dup - IL_000c: ldc.i4.1 - IL_000d: ldarg.2 - IL_000e: stelem.i4 - IL_000f: stloc.0 - IL_0010: br.s IL_0012 - - IL_0012: ldloc.0 - IL_0013: ret - } // end of method NoArrayInitializers::VariableArray - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method NoArrayInitializers::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoArrayInitializers - -.class private auto ansi sealed '' - extends [mscorlib]System.Object -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .class explicit ansi sealed nested private '__StaticArrayInitTypeSize=12' - extends [mscorlib]System.ValueType - { - .pack 1 - .size 12 - } // end of class '__StaticArrayInitTypeSize=12' - - .field static assembly initonly valuetype ''/'__StaticArrayInitTypeSize=12' '4636993D3E1DA4E9D6B8F87B79E8F7C6D018580D52661950EABC3845C5897A4D' at I_000026C0 -} // end of class '' - - -// ============================================================= - -.data cil I_000026C0 = bytearray ( - 01 00 00 00 02 00 00 00 03 00 00 00) -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.opt.net40.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.opt.net40.roslyn.il deleted file mode 100644 index bb1945af46..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.opt.net40.roslyn.il +++ /dev/null @@ -1,103 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly tmp9705 -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module tmp9705.tmp -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoArrayInitializers - extends [mscorlib]System.Object -{ - .method public hidebysig instance int32[] - LiteralArray() cil managed - { - // Code size 18 (0x12) - .maxstack 8 - IL_0000: ldc.i4.3 - IL_0001: newarr [mscorlib]System.Int32 - IL_0006: dup - IL_0007: ldtoken field valuetype ''/'__StaticArrayInitTypeSize=12' ''::'4636993D3E1DA4E9D6B8F87B79E8F7C6D018580D52661950EABC3845C5897A4D' - IL_000c: call void [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray(class [mscorlib]System.Array, - valuetype [mscorlib]System.RuntimeFieldHandle) - IL_0011: ret - } // end of method NoArrayInitializers::LiteralArray - - .method public hidebysig instance int32[] - VariableArray(int32 a, - int32 b) cil managed - { - // Code size 15 (0xf) - .maxstack 8 - IL_0000: ldc.i4.2 - IL_0001: newarr [mscorlib]System.Int32 - IL_0006: dup - IL_0007: ldc.i4.0 - IL_0008: ldarg.1 - IL_0009: stelem.i4 - IL_000a: dup - IL_000b: ldc.i4.1 - IL_000c: ldarg.2 - IL_000d: stelem.i4 - IL_000e: ret - } // end of method NoArrayInitializers::VariableArray - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method NoArrayInitializers::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoArrayInitializers - -.class private auto ansi sealed '' - extends [mscorlib]System.Object -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .class explicit ansi sealed nested private '__StaticArrayInitTypeSize=12' - extends [mscorlib]System.ValueType - { - .pack 1 - .size 12 - } // end of class '__StaticArrayInitTypeSize=12' - - .field static assembly initonly valuetype ''/'__StaticArrayInitTypeSize=12' '4636993D3E1DA4E9D6B8F87B79E8F7C6D018580D52661950EABC3845C5897A4D' at I_00002690 -} // end of class '' - - -// ============================================================= - -.data cil I_00002690 = bytearray ( - 01 00 00 00 02 00 00 00 03 00 00 00) -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.opt.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.opt.roslyn.il deleted file mode 100644 index ba60c3a529..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.opt.roslyn.il +++ /dev/null @@ -1,107 +0,0 @@ - -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 -// Copyright (c) Microsoft Corporation. All rights reserved. - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly NoArrayInitializers -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module NoArrayInitializers.dll -// MVID: {C6AD59A2-7245-425B-A6BB-29F93FAB1116} -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x00FD0000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoArrayInitializers - extends [mscorlib]System.Object -{ - .method public hidebysig instance int32[] - LiteralArray() cil managed - { - // Code size 18 (0x12) - .maxstack 8 - IL_0000: ldc.i4.3 - IL_0001: newarr [mscorlib]System.Int32 - IL_0006: dup - IL_0007: ldtoken field valuetype ''/'__StaticArrayInitTypeSize=12' ''::'4636993D3E1DA4E9D6B8F87B79E8F7C6D018580D52661950EABC3845C5897A4D' - IL_000c: call void [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray(class [mscorlib]System.Array, - valuetype [mscorlib]System.RuntimeFieldHandle) - IL_0011: ret - } // end of method NoArrayInitializers::LiteralArray - - .method public hidebysig instance int32[] - VariableArray(int32 a, - int32 b) cil managed - { - // Code size 15 (0xf) - .maxstack 8 - IL_0000: ldc.i4.2 - IL_0001: newarr [mscorlib]System.Int32 - IL_0006: dup - IL_0007: ldc.i4.0 - IL_0008: ldarg.1 - IL_0009: stelem.i4 - IL_000a: dup - IL_000b: ldc.i4.1 - IL_000c: ldarg.2 - IL_000d: stelem.i4 - IL_000e: ret - } // end of method NoArrayInitializers::VariableArray - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method NoArrayInitializers::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoArrayInitializers - -.class private auto ansi sealed '' - extends [mscorlib]System.Object -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .class explicit ansi sealed nested private '__StaticArrayInitTypeSize=12' - extends [mscorlib]System.ValueType - { - .pack 1 - .size 12 - } // end of class '__StaticArrayInitTypeSize=12' - - .field static assembly initonly valuetype ''/'__StaticArrayInitTypeSize=12' '4636993D3E1DA4E9D6B8F87B79E8F7C6D018580D52661950EABC3845C5897A4D' at I_00002690 -} // end of class '' - - -// ============================================================= - -.data cil I_00002690 = bytearray ( - 01 00 00 00 02 00 00 00 03 00 00 00) -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.roslyn.il deleted file mode 100644 index 4b89437489..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoArrayInitializers.roslyn.il +++ /dev/null @@ -1,120 +0,0 @@ - -// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 -// Copyright (c) Microsoft Corporation. All rights reserved. - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly NoArrayInitializers -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module NoArrayInitializers.dll -// MVID: {C1B38171-55C8-4DDA-ACC8-78EFA1168D40} -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY -// Image base: 0x03D10000 - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoArrayInitializers - extends [mscorlib]System.Object -{ - .method public hidebysig instance int32[] - LiteralArray() cil managed - { - // Code size 23 (0x17) - .maxstack 3 - .locals init (int32[] V_0) - IL_0000: nop - IL_0001: ldc.i4.3 - IL_0002: newarr [mscorlib]System.Int32 - IL_0007: dup - IL_0008: ldtoken field valuetype ''/'__StaticArrayInitTypeSize=12' ''::'4636993D3E1DA4E9D6B8F87B79E8F7C6D018580D52661950EABC3845C5897A4D' - IL_000d: call void [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray(class [mscorlib]System.Array, - valuetype [mscorlib]System.RuntimeFieldHandle) - IL_0012: stloc.0 - IL_0013: br.s IL_0015 - - IL_0015: ldloc.0 - IL_0016: ret - } // end of method NoArrayInitializers::LiteralArray - - .method public hidebysig instance int32[] - VariableArray(int32 a, - int32 b) cil managed - { - // Code size 20 (0x14) - .maxstack 4 - .locals init (int32[] V_0) - IL_0000: nop - IL_0001: ldc.i4.2 - IL_0002: newarr [mscorlib]System.Int32 - IL_0007: dup - IL_0008: ldc.i4.0 - IL_0009: ldarg.1 - IL_000a: stelem.i4 - IL_000b: dup - IL_000c: ldc.i4.1 - IL_000d: ldarg.2 - IL_000e: stelem.i4 - IL_000f: stloc.0 - IL_0010: br.s IL_0012 - - IL_0012: ldloc.0 - IL_0013: ret - } // end of method NoArrayInitializers::VariableArray - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method NoArrayInitializers::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoArrayInitializers - -.class private auto ansi sealed '' - extends [mscorlib]System.Object -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .class explicit ansi sealed nested private '__StaticArrayInitTypeSize=12' - extends [mscorlib]System.ValueType - { - .pack 1 - .size 12 - } // end of class '__StaticArrayInitTypeSize=12' - - .field static assembly initonly valuetype ''/'__StaticArrayInitTypeSize=12' '4636993D3E1DA4E9D6B8F87B79E8F7C6D018580D52661950EABC3845C5897A4D' at I_000026C0 -} // end of class '' - - -// ============================================================= - -.data cil I_000026C0 = bytearray ( - 01 00 00 00 02 00 00 00 03 00 00 00) -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoDecimalConstants.net40.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoDecimalConstants.net40.roslyn.il deleted file mode 100644 index 77ebf3a589..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoDecimalConstants.net40.roslyn.il +++ /dev/null @@ -1,97 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly tmpA278 -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module tmpA278.tmp -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoDecimalConstants - extends [mscorlib]System.Object -{ - .field private static initonly valuetype [mscorlib]System.Decimal constant - .custom instance void [mscorlib]System.Runtime.CompilerServices.DecimalConstantAttribute::.ctor(uint8, - uint8, - uint32, - uint32, - uint32) = ( 01 00 01 00 00 00 00 00 00 00 00 00 0A 00 00 00 - 00 00 ) - .method private hidebysig instance void - MethodWithOptionalParameter([opt] valuetype [mscorlib]System.Decimal parameter) cil managed - { - .param [1] - .custom instance void [mscorlib]System.Runtime.CompilerServices.DecimalConstantAttribute::.ctor(uint8, - uint8, - uint32, - uint32, - uint32) = ( 01 00 01 00 00 00 00 00 00 00 00 00 0A 00 00 00 - 00 00 ) - // Code size 2 (0x2) - .maxstack 8 - IL_0000: nop - IL_0001: ret - } // end of method NoDecimalConstants::MethodWithOptionalParameter - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method NoDecimalConstants::.ctor - - .method private hidebysig specialname rtspecialname static - void .cctor() cil managed - { - // Code size 17 (0x11) - .maxstack 8 - IL_0000: ldc.i4.s 10 - IL_0002: ldc.i4.0 - IL_0003: ldc.i4.0 - IL_0004: ldc.i4.0 - IL_0005: ldc.i4.1 - IL_0006: newobj instance void [mscorlib]System.Decimal::.ctor(int32, - int32, - int32, - bool, - uint8) - IL_000b: stsfld valuetype [mscorlib]System.Decimal ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoDecimalConstants::constant - IL_0010: ret - } // end of method NoDecimalConstants::.cctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoDecimalConstants - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoDecimalConstants.opt.net40.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoDecimalConstants.opt.net40.roslyn.il deleted file mode 100644 index 0d34cff05e..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoDecimalConstants.opt.net40.roslyn.il +++ /dev/null @@ -1,95 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly tmpA279 -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module tmpA279.tmp -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoDecimalConstants - extends [mscorlib]System.Object -{ - .field private static initonly valuetype [mscorlib]System.Decimal constant - .custom instance void [mscorlib]System.Runtime.CompilerServices.DecimalConstantAttribute::.ctor(uint8, - uint8, - uint32, - uint32, - uint32) = ( 01 00 01 00 00 00 00 00 00 00 00 00 0A 00 00 00 - 00 00 ) - .method private hidebysig instance void - MethodWithOptionalParameter([opt] valuetype [mscorlib]System.Decimal parameter) cil managed - { - .param [1] - .custom instance void [mscorlib]System.Runtime.CompilerServices.DecimalConstantAttribute::.ctor(uint8, - uint8, - uint32, - uint32, - uint32) = ( 01 00 01 00 00 00 00 00 00 00 00 00 0A 00 00 00 - 00 00 ) - // Code size 1 (0x1) - .maxstack 8 - IL_0000: ret - } // end of method NoDecimalConstants::MethodWithOptionalParameter - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method NoDecimalConstants::.ctor - - .method private hidebysig specialname rtspecialname static - void .cctor() cil managed - { - // Code size 17 (0x11) - .maxstack 8 - IL_0000: ldc.i4.s 10 - IL_0002: ldc.i4.0 - IL_0003: ldc.i4.0 - IL_0004: ldc.i4.0 - IL_0005: ldc.i4.1 - IL_0006: newobj instance void [mscorlib]System.Decimal::.ctor(int32, - int32, - int32, - bool, - uint8) - IL_000b: stsfld valuetype [mscorlib]System.Decimal ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoDecimalConstants::constant - IL_0010: ret - } // end of method NoDecimalConstants::.cctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoDecimalConstants - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoDecimalConstants.opt.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoDecimalConstants.opt.roslyn.il deleted file mode 100644 index 6f97629f2d..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoDecimalConstants.opt.roslyn.il +++ /dev/null @@ -1,95 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly NoDecimalConstants -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module NoDecimalConstants.dll -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoDecimalConstants - extends [mscorlib]System.Object -{ - .field private static initonly valuetype [mscorlib]System.Decimal constant - .custom instance void [mscorlib]System.Runtime.CompilerServices.DecimalConstantAttribute::.ctor(uint8, - uint8, - uint32, - uint32, - uint32) = ( 01 00 01 00 00 00 00 00 00 00 00 00 0A 00 00 00 - 00 00 ) - .method private hidebysig instance void - MethodWithOptionalParameter([opt] valuetype [mscorlib]System.Decimal parameter) cil managed - { - .param [1] - .custom instance void [mscorlib]System.Runtime.CompilerServices.DecimalConstantAttribute::.ctor(uint8, - uint8, - uint32, - uint32, - uint32) = ( 01 00 01 00 00 00 00 00 00 00 00 00 0A 00 00 00 - 00 00 ) - // Code size 1 (0x1) - .maxstack 8 - IL_0000: ret - } // end of method NoDecimalConstants::MethodWithOptionalParameter - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method NoDecimalConstants::.ctor - - .method private hidebysig specialname rtspecialname static - void .cctor() cil managed - { - // Code size 17 (0x11) - .maxstack 8 - IL_0000: ldc.i4.s 10 - IL_0002: ldc.i4.0 - IL_0003: ldc.i4.0 - IL_0004: ldc.i4.0 - IL_0005: ldc.i4.1 - IL_0006: newobj instance void [mscorlib]System.Decimal::.ctor(int32, - int32, - int32, - bool, - uint8) - IL_000b: stsfld valuetype [mscorlib]System.Decimal ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoDecimalConstants::constant - IL_0010: ret - } // end of method NoDecimalConstants::.cctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoDecimalConstants - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoDecimalConstants.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoDecimalConstants.roslyn.il deleted file mode 100644 index ea109cfe6e..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoDecimalConstants.roslyn.il +++ /dev/null @@ -1,97 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly NoDecimalConstants -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module NoDecimalConstants.dll -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoDecimalConstants - extends [mscorlib]System.Object -{ - .field private static initonly valuetype [mscorlib]System.Decimal constant - .custom instance void [mscorlib]System.Runtime.CompilerServices.DecimalConstantAttribute::.ctor(uint8, - uint8, - uint32, - uint32, - uint32) = ( 01 00 01 00 00 00 00 00 00 00 00 00 0A 00 00 00 - 00 00 ) - .method private hidebysig instance void - MethodWithOptionalParameter([opt] valuetype [mscorlib]System.Decimal parameter) cil managed - { - .param [1] - .custom instance void [mscorlib]System.Runtime.CompilerServices.DecimalConstantAttribute::.ctor(uint8, - uint8, - uint32, - uint32, - uint32) = ( 01 00 01 00 00 00 00 00 00 00 00 00 0A 00 00 00 - 00 00 ) - // Code size 2 (0x2) - .maxstack 8 - IL_0000: nop - IL_0001: ret - } // end of method NoDecimalConstants::MethodWithOptionalParameter - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method NoDecimalConstants::.ctor - - .method private hidebysig specialname rtspecialname static - void .cctor() cil managed - { - // Code size 17 (0x11) - .maxstack 8 - IL_0000: ldc.i4.s 10 - IL_0002: ldc.i4.0 - IL_0003: ldc.i4.0 - IL_0004: ldc.i4.0 - IL_0005: ldc.i4.1 - IL_0006: newobj instance void [mscorlib]System.Decimal::.ctor(int32, - int32, - int32, - bool, - uint8) - IL_000b: stsfld valuetype [mscorlib]System.Decimal ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoDecimalConstants::constant - IL_0010: ret - } // end of method NoDecimalConstants::.cctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoDecimalConstants - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoExtensionMethods.net40.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoExtensionMethods.net40.roslyn.il deleted file mode 100644 index 1c03c64402..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoExtensionMethods.net40.roslyn.il +++ /dev/null @@ -1,117 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly tmpA29B -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module tmpA29B.tmp -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods - extends [mscorlib]System.Object -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly hidebysig static class [mscorlib]System.Func`1 - AsFunc(!!T 'value') cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 23 (0x17) - .maxstack 2 - .locals init (class [mscorlib]System.Func`1 V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: box !!T - IL_0007: ldftn !!0 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods::Return(!!0) - IL_000d: newobj instance void class [mscorlib]System.Func`1::.ctor(object, - native int) - IL_0012: stloc.0 - IL_0013: br.s IL_0015 - - IL_0015: ldloc.0 - IL_0016: ret - } // end of method NoExtensionMethods::AsFunc - - .method private hidebysig static !!T Return(!!T 'value') cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 7 (0x7) - .maxstack 1 - .locals init (!!T V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: stloc.0 - IL_0003: br.s IL_0005 - - IL_0005: ldloc.0 - IL_0006: ret - } // end of method NoExtensionMethods::Return - - .method assembly hidebysig static class [mscorlib]System.Func`2 - ExtensionMethodAsStaticFunc() cil managed - { - // Code size 18 (0x12) - .maxstack 2 - .locals init (class [mscorlib]System.Func`2 V_0) - IL_0000: nop - IL_0001: ldnull - IL_0002: ldftn !!0 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods::Return(!!0) - IL_0008: newobj instance void class [mscorlib]System.Func`2::.ctor(object, - native int) - IL_000d: stloc.0 - IL_000e: br.s IL_0010 - - IL_0010: ldloc.0 - IL_0011: ret - } // end of method NoExtensionMethods::ExtensionMethodAsStaticFunc - - .method assembly hidebysig static class [mscorlib]System.Func`1 - ExtensionMethodBoundToNull() cil managed - { - // Code size 18 (0x12) - .maxstack 2 - .locals init (class [mscorlib]System.Func`1 V_0) - IL_0000: nop - IL_0001: ldnull - IL_0002: ldftn !!0 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods::Return(!!0) - IL_0008: newobj instance void class [mscorlib]System.Func`1::.ctor(object, - native int) - IL_000d: stloc.0 - IL_000e: br.s IL_0010 - - IL_0010: ldloc.0 - IL_0011: ret - } // end of method NoExtensionMethods::ExtensionMethodBoundToNull - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoExtensionMethods.opt.net40.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoExtensionMethods.opt.net40.roslyn.il deleted file mode 100644 index dd1936d11a..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoExtensionMethods.opt.net40.roslyn.il +++ /dev/null @@ -1,93 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly tmpA29A -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module tmpA29A.tmp -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods - extends [mscorlib]System.Object -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly hidebysig static class [mscorlib]System.Func`1 - AsFunc(!!T 'value') cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 18 (0x12) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: box !!T - IL_0006: ldftn !!0 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods::Return(!!0) - IL_000c: newobj instance void class [mscorlib]System.Func`1::.ctor(object, - native int) - IL_0011: ret - } // end of method NoExtensionMethods::AsFunc - - .method private hidebysig static !!T Return(!!T 'value') cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 2 (0x2) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ret - } // end of method NoExtensionMethods::Return - - .method assembly hidebysig static class [mscorlib]System.Func`2 - ExtensionMethodAsStaticFunc() cil managed - { - // Code size 13 (0xd) - .maxstack 8 - IL_0000: ldnull - IL_0001: ldftn !!0 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods::Return(!!0) - IL_0007: newobj instance void class [mscorlib]System.Func`2::.ctor(object, - native int) - IL_000c: ret - } // end of method NoExtensionMethods::ExtensionMethodAsStaticFunc - - .method assembly hidebysig static class [mscorlib]System.Func`1 - ExtensionMethodBoundToNull() cil managed - { - // Code size 13 (0xd) - .maxstack 8 - IL_0000: ldnull - IL_0001: ldftn !!0 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods::Return(!!0) - IL_0007: newobj instance void class [mscorlib]System.Func`1::.ctor(object, - native int) - IL_000c: ret - } // end of method NoExtensionMethods::ExtensionMethodBoundToNull - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoExtensionMethods.opt.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoExtensionMethods.opt.roslyn.il deleted file mode 100644 index 12d81400b0..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoExtensionMethods.opt.roslyn.il +++ /dev/null @@ -1,93 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly NoExtensionMethods -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module NoExtensionMethods.dll -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods - extends [mscorlib]System.Object -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly hidebysig static class [mscorlib]System.Func`1 - AsFunc(!!T 'value') cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 18 (0x12) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: box !!T - IL_0006: ldftn !!0 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods::Return(!!0) - IL_000c: newobj instance void class [mscorlib]System.Func`1::.ctor(object, - native int) - IL_0011: ret - } // end of method NoExtensionMethods::AsFunc - - .method private hidebysig static !!T Return(!!T 'value') cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 2 (0x2) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ret - } // end of method NoExtensionMethods::Return - - .method assembly hidebysig static class [mscorlib]System.Func`2 - ExtensionMethodAsStaticFunc() cil managed - { - // Code size 13 (0xd) - .maxstack 8 - IL_0000: ldnull - IL_0001: ldftn !!0 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods::Return(!!0) - IL_0007: newobj instance void class [mscorlib]System.Func`2::.ctor(object, - native int) - IL_000c: ret - } // end of method NoExtensionMethods::ExtensionMethodAsStaticFunc - - .method assembly hidebysig static class [mscorlib]System.Func`1 - ExtensionMethodBoundToNull() cil managed - { - // Code size 13 (0xd) - .maxstack 8 - IL_0000: ldnull - IL_0001: ldftn !!0 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods::Return(!!0) - IL_0007: newobj instance void class [mscorlib]System.Func`1::.ctor(object, - native int) - IL_000c: ret - } // end of method NoExtensionMethods::ExtensionMethodBoundToNull - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoExtensionMethods.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoExtensionMethods.roslyn.il deleted file mode 100644 index a740ada26d..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoExtensionMethods.roslyn.il +++ /dev/null @@ -1,117 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly NoExtensionMethods -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module NoExtensionMethods.dll -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods - extends [mscorlib]System.Object -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) - .method assembly hidebysig static class [mscorlib]System.Func`1 - AsFunc(!!T 'value') cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 23 (0x17) - .maxstack 2 - .locals init (class [mscorlib]System.Func`1 V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: box !!T - IL_0007: ldftn !!0 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods::Return(!!0) - IL_000d: newobj instance void class [mscorlib]System.Func`1::.ctor(object, - native int) - IL_0012: stloc.0 - IL_0013: br.s IL_0015 - - IL_0015: ldloc.0 - IL_0016: ret - } // end of method NoExtensionMethods::AsFunc - - .method private hidebysig static !!T Return(!!T 'value') cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.ExtensionAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 7 (0x7) - .maxstack 1 - .locals init (!!T V_0) - IL_0000: nop - IL_0001: ldarg.0 - IL_0002: stloc.0 - IL_0003: br.s IL_0005 - - IL_0005: ldloc.0 - IL_0006: ret - } // end of method NoExtensionMethods::Return - - .method assembly hidebysig static class [mscorlib]System.Func`2 - ExtensionMethodAsStaticFunc() cil managed - { - // Code size 18 (0x12) - .maxstack 2 - .locals init (class [mscorlib]System.Func`2 V_0) - IL_0000: nop - IL_0001: ldnull - IL_0002: ldftn !!0 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods::Return(!!0) - IL_0008: newobj instance void class [mscorlib]System.Func`2::.ctor(object, - native int) - IL_000d: stloc.0 - IL_000e: br.s IL_0010 - - IL_0010: ldloc.0 - IL_0011: ret - } // end of method NoExtensionMethods::ExtensionMethodAsStaticFunc - - .method assembly hidebysig static class [mscorlib]System.Func`1 - ExtensionMethodBoundToNull() cil managed - { - // Code size 18 (0x12) - .maxstack 2 - .locals init (class [mscorlib]System.Func`1 V_0) - IL_0000: nop - IL_0001: ldnull - IL_0002: ldftn !!0 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods::Return(!!0) - IL_0008: newobj instance void class [mscorlib]System.Func`1::.ctor(object, - native int) - IL_000d: stloc.0 - IL_000e: br.s IL_0010 - - IL_0010: ldloc.0 - IL_0011: ret - } // end of method NoExtensionMethods::ExtensionMethodBoundToNull - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoExtensionMethods - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.il deleted file mode 100644 index 0218966ae0..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.il +++ /dev/null @@ -1,156 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly rerff2f0 -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module rerff2f0.dll -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoForEachStatement - extends [mscorlib]System.Object -{ - .method public hidebysig static void SimpleNonGenericForeach(class [mscorlib]System.Collections.IEnumerable enumerable) cil managed - { - // Code size 64 (0x40) - .maxstack 2 - .locals init (object V_0, - class [mscorlib]System.Collections.IEnumerator V_1, - bool V_2, - class [mscorlib]System.IDisposable V_3) - IL_0000: nop - IL_0001: nop - IL_0002: ldarg.0 - IL_0003: callvirt instance class [mscorlib]System.Collections.IEnumerator [mscorlib]System.Collections.IEnumerable::GetEnumerator() - IL_0008: stloc.1 - .try - { - IL_0009: br.s IL_001b - - IL_000b: ldloc.1 - IL_000c: callvirt instance object [mscorlib]System.Collections.IEnumerator::get_Current() - IL_0011: stloc.0 - IL_0012: nop - IL_0013: ldloc.0 - IL_0014: call void [mscorlib]System.Console::WriteLine(object) - IL_0019: nop - IL_001a: nop - IL_001b: ldloc.1 - IL_001c: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0021: stloc.2 - IL_0022: ldloc.2 - IL_0023: brtrue.s IL_000b - - IL_0025: leave.s IL_003e - - } // end .try - finally - { - IL_0027: ldloc.1 - IL_0028: isinst [mscorlib]System.IDisposable - IL_002d: stloc.3 - IL_002e: ldloc.3 - IL_002f: ldnull - IL_0030: ceq - IL_0032: stloc.2 - IL_0033: ldloc.2 - IL_0034: brtrue.s IL_003d - - IL_0036: ldloc.3 - IL_0037: callvirt instance void [mscorlib]System.IDisposable::Dispose() - IL_003c: nop - IL_003d: endfinally - } // end handler - IL_003e: nop - IL_003f: ret - } // end of method NoForEachStatement::SimpleNonGenericForeach - - .method public hidebysig static void SimpleForeachOverInts(class [mscorlib]System.Collections.Generic.IEnumerable`1 enumerable) cil managed - { - // Code size 57 (0x39) - .maxstack 2 - .locals init (int32 V_0, - class [mscorlib]System.Collections.Generic.IEnumerator`1 V_1, - bool V_2) - IL_0000: nop - IL_0001: nop - IL_0002: ldarg.0 - IL_0003: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0008: stloc.1 - .try - { - IL_0009: br.s IL_001b - - IL_000b: ldloc.1 - IL_000c: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0011: stloc.0 - IL_0012: nop - IL_0013: ldloc.0 - IL_0014: call void [mscorlib]System.Console::WriteLine(int32) - IL_0019: nop - IL_001a: nop - IL_001b: ldloc.1 - IL_001c: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0021: stloc.2 - IL_0022: ldloc.2 - IL_0023: brtrue.s IL_000b - - IL_0025: leave.s IL_0037 - - } // end .try - finally - { - IL_0027: ldloc.1 - IL_0028: ldnull - IL_0029: ceq - IL_002b: stloc.2 - IL_002c: ldloc.2 - IL_002d: brtrue.s IL_0036 - - IL_002f: ldloc.1 - IL_0030: callvirt instance void [mscorlib]System.IDisposable::Dispose() - IL_0035: nop - IL_0036: endfinally - } // end handler - IL_0037: nop - IL_0038: ret - } // end of method NoForEachStatement::SimpleForeachOverInts - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method NoForEachStatement::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoForEachStatement - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.net40.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.net40.roslyn.il deleted file mode 100644 index 67ab4fa0ad..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.net40.roslyn.il +++ /dev/null @@ -1,145 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly tmpA7E1 -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module tmpA7E1.tmp -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoForEachStatement - extends [mscorlib]System.Object -{ - .method public hidebysig static void SimpleNonGenericForeach(class [mscorlib]System.Collections.IEnumerable enumerable) cil managed - { - // Code size 56 (0x38) - .maxstack 1 - .locals init (class [mscorlib]System.Collections.IEnumerator V_0, - object V_1, - class [mscorlib]System.IDisposable V_2) - IL_0000: nop - IL_0001: nop - IL_0002: ldarg.0 - IL_0003: callvirt instance class [mscorlib]System.Collections.IEnumerator [mscorlib]System.Collections.IEnumerable::GetEnumerator() - IL_0008: stloc.0 - .try - { - IL_0009: br.s IL_001b - - IL_000b: ldloc.0 - IL_000c: callvirt instance object [mscorlib]System.Collections.IEnumerator::get_Current() - IL_0011: stloc.1 - IL_0012: nop - IL_0013: ldloc.1 - IL_0014: call void [mscorlib]System.Console::WriteLine(object) - IL_0019: nop - IL_001a: nop - IL_001b: ldloc.0 - IL_001c: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0021: brtrue.s IL_000b - - IL_0023: leave.s IL_0037 - - } // end .try - finally - { - IL_0025: ldloc.0 - IL_0026: isinst [mscorlib]System.IDisposable - IL_002b: stloc.2 - IL_002c: ldloc.2 - IL_002d: brfalse.s IL_0036 - - IL_002f: ldloc.2 - IL_0030: callvirt instance void [mscorlib]System.IDisposable::Dispose() - IL_0035: nop - IL_0036: endfinally - } // end handler - IL_0037: ret - } // end of method NoForEachStatement::SimpleNonGenericForeach - - .method public hidebysig static void SimpleForeachOverInts(class [mscorlib]System.Collections.Generic.IEnumerable`1 enumerable) cil managed - { - // Code size 49 (0x31) - .maxstack 1 - .locals init (class [mscorlib]System.Collections.Generic.IEnumerator`1 V_0, - int32 V_1) - IL_0000: nop - IL_0001: nop - IL_0002: ldarg.0 - IL_0003: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0008: stloc.0 - .try - { - IL_0009: br.s IL_001b - - IL_000b: ldloc.0 - IL_000c: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0011: stloc.1 - IL_0012: nop - IL_0013: ldloc.1 - IL_0014: call void [mscorlib]System.Console::WriteLine(int32) - IL_0019: nop - IL_001a: nop - IL_001b: ldloc.0 - IL_001c: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0021: brtrue.s IL_000b - - IL_0023: leave.s IL_0030 - - } // end .try - finally - { - IL_0025: ldloc.0 - IL_0026: brfalse.s IL_002f - - IL_0028: ldloc.0 - IL_0029: callvirt instance void [mscorlib]System.IDisposable::Dispose() - IL_002e: nop - IL_002f: endfinally - } // end handler - IL_0030: ret - } // end of method NoForEachStatement::SimpleForeachOverInts - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method NoForEachStatement::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoForEachStatement - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.opt.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.opt.il deleted file mode 100644 index 7307150dd9..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.opt.il +++ /dev/null @@ -1,128 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly prqfqkbt -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module prqfqkbt.dll -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoForEachStatement - extends [mscorlib]System.Object -{ - .method public hidebysig static void SimpleNonGenericForeach(class [mscorlib]System.Collections.IEnumerable enumerable) cil managed - { - // Code size 50 (0x32) - .maxstack 1 - .locals init (object V_0, - class [mscorlib]System.Collections.IEnumerator V_1, - class [mscorlib]System.IDisposable V_2) - IL_0000: ldarg.0 - IL_0001: callvirt instance class [mscorlib]System.Collections.IEnumerator [mscorlib]System.Collections.IEnumerable::GetEnumerator() - IL_0006: stloc.1 - .try - { - IL_0007: br.s IL_0016 - - IL_0009: ldloc.1 - IL_000a: callvirt instance object [mscorlib]System.Collections.IEnumerator::get_Current() - IL_000f: stloc.0 - IL_0010: ldloc.0 - IL_0011: call void [mscorlib]System.Console::WriteLine(object) - IL_0016: ldloc.1 - IL_0017: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_001c: brtrue.s IL_0009 - - IL_001e: leave.s IL_0031 - - } // end .try - finally - { - IL_0020: ldloc.1 - IL_0021: isinst [mscorlib]System.IDisposable - IL_0026: stloc.2 - IL_0027: ldloc.2 - IL_0028: brfalse.s IL_0030 - - IL_002a: ldloc.2 - IL_002b: callvirt instance void [mscorlib]System.IDisposable::Dispose() - IL_0030: endfinally - } // end handler - IL_0031: ret - } // end of method NoForEachStatement::SimpleNonGenericForeach - - .method public hidebysig static void SimpleForeachOverInts(class [mscorlib]System.Collections.Generic.IEnumerable`1 enumerable) cil managed - { - // Code size 43 (0x2b) - .maxstack 1 - .locals init (int32 V_0, - class [mscorlib]System.Collections.Generic.IEnumerator`1 V_1) - IL_0000: ldarg.0 - IL_0001: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0006: stloc.1 - .try - { - IL_0007: br.s IL_0016 - - IL_0009: ldloc.1 - IL_000a: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_000f: stloc.0 - IL_0010: ldloc.0 - IL_0011: call void [mscorlib]System.Console::WriteLine(int32) - IL_0016: ldloc.1 - IL_0017: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_001c: brtrue.s IL_0009 - - IL_001e: leave.s IL_002a - - } // end .try - finally - { - IL_0020: ldloc.1 - IL_0021: brfalse.s IL_0029 - - IL_0023: ldloc.1 - IL_0024: callvirt instance void [mscorlib]System.IDisposable::Dispose() - IL_0029: endfinally - } // end handler - IL_002a: ret - } // end of method NoForEachStatement::SimpleForeachOverInts - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method NoForEachStatement::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoForEachStatement - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.opt.net40.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.opt.net40.roslyn.il deleted file mode 100644 index 33c6c63536..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.opt.net40.roslyn.il +++ /dev/null @@ -1,126 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly tmpAA15 -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module tmpAA15.tmp -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoForEachStatement - extends [mscorlib]System.Object -{ - .method public hidebysig static void SimpleNonGenericForeach(class [mscorlib]System.Collections.IEnumerable enumerable) cil managed - { - // Code size 48 (0x30) - .maxstack 1 - .locals init (class [mscorlib]System.Collections.IEnumerator V_0, - class [mscorlib]System.IDisposable V_1) - IL_0000: ldarg.0 - IL_0001: callvirt instance class [mscorlib]System.Collections.IEnumerator [mscorlib]System.Collections.IEnumerable::GetEnumerator() - IL_0006: stloc.0 - .try - { - IL_0007: br.s IL_0014 - - IL_0009: ldloc.0 - IL_000a: callvirt instance object [mscorlib]System.Collections.IEnumerator::get_Current() - IL_000f: call void [mscorlib]System.Console::WriteLine(object) - IL_0014: ldloc.0 - IL_0015: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_001a: brtrue.s IL_0009 - - IL_001c: leave.s IL_002f - - } // end .try - finally - { - IL_001e: ldloc.0 - IL_001f: isinst [mscorlib]System.IDisposable - IL_0024: stloc.1 - IL_0025: ldloc.1 - IL_0026: brfalse.s IL_002e - - IL_0028: ldloc.1 - IL_0029: callvirt instance void [mscorlib]System.IDisposable::Dispose() - IL_002e: endfinally - } // end handler - IL_002f: ret - } // end of method NoForEachStatement::SimpleNonGenericForeach - - .method public hidebysig static void SimpleForeachOverInts(class [mscorlib]System.Collections.Generic.IEnumerable`1 enumerable) cil managed - { - // Code size 41 (0x29) - .maxstack 1 - .locals init (class [mscorlib]System.Collections.Generic.IEnumerator`1 V_0) - IL_0000: ldarg.0 - IL_0001: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0006: stloc.0 - .try - { - IL_0007: br.s IL_0014 - - IL_0009: ldloc.0 - IL_000a: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_000f: call void [mscorlib]System.Console::WriteLine(int32) - IL_0014: ldloc.0 - IL_0015: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_001a: brtrue.s IL_0009 - - IL_001c: leave.s IL_0028 - - } // end .try - finally - { - IL_001e: ldloc.0 - IL_001f: brfalse.s IL_0027 - - IL_0021: ldloc.0 - IL_0022: callvirt instance void [mscorlib]System.IDisposable::Dispose() - IL_0027: endfinally - } // end handler - IL_0028: ret - } // end of method NoForEachStatement::SimpleForeachOverInts - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method NoForEachStatement::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoForEachStatement - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.opt.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.opt.roslyn.il deleted file mode 100644 index 10d523787a..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.opt.roslyn.il +++ /dev/null @@ -1,126 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly NoForEachStatement -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module NoForEachStatement.dll -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoForEachStatement - extends [mscorlib]System.Object -{ - .method public hidebysig static void SimpleNonGenericForeach(class [mscorlib]System.Collections.IEnumerable enumerable) cil managed - { - // Code size 48 (0x30) - .maxstack 1 - .locals init (class [mscorlib]System.Collections.IEnumerator V_0, - class [mscorlib]System.IDisposable V_1) - IL_0000: ldarg.0 - IL_0001: callvirt instance class [mscorlib]System.Collections.IEnumerator [mscorlib]System.Collections.IEnumerable::GetEnumerator() - IL_0006: stloc.0 - .try - { - IL_0007: br.s IL_0014 - - IL_0009: ldloc.0 - IL_000a: callvirt instance object [mscorlib]System.Collections.IEnumerator::get_Current() - IL_000f: call void [mscorlib]System.Console::WriteLine(object) - IL_0014: ldloc.0 - IL_0015: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_001a: brtrue.s IL_0009 - - IL_001c: leave.s IL_002f - - } // end .try - finally - { - IL_001e: ldloc.0 - IL_001f: isinst [mscorlib]System.IDisposable - IL_0024: stloc.1 - IL_0025: ldloc.1 - IL_0026: brfalse.s IL_002e - - IL_0028: ldloc.1 - IL_0029: callvirt instance void [mscorlib]System.IDisposable::Dispose() - IL_002e: endfinally - } // end handler - IL_002f: ret - } // end of method NoForEachStatement::SimpleNonGenericForeach - - .method public hidebysig static void SimpleForeachOverInts(class [mscorlib]System.Collections.Generic.IEnumerable`1 enumerable) cil managed - { - // Code size 41 (0x29) - .maxstack 1 - .locals init (class [mscorlib]System.Collections.Generic.IEnumerator`1 V_0) - IL_0000: ldarg.0 - IL_0001: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0006: stloc.0 - .try - { - IL_0007: br.s IL_0014 - - IL_0009: ldloc.0 - IL_000a: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_000f: call void [mscorlib]System.Console::WriteLine(int32) - IL_0014: ldloc.0 - IL_0015: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_001a: brtrue.s IL_0009 - - IL_001c: leave.s IL_0028 - - } // end .try - finally - { - IL_001e: ldloc.0 - IL_001f: brfalse.s IL_0027 - - IL_0021: ldloc.0 - IL_0022: callvirt instance void [mscorlib]System.IDisposable::Dispose() - IL_0027: endfinally - } // end handler - IL_0028: ret - } // end of method NoForEachStatement::SimpleForeachOverInts - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method NoForEachStatement::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoForEachStatement - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.roslyn.il deleted file mode 100644 index 8c8ecb1071..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoForEachStatement.roslyn.il +++ /dev/null @@ -1,145 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly NoForEachStatement -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module NoForEachStatement.dll -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoForEachStatement - extends [mscorlib]System.Object -{ - .method public hidebysig static void SimpleNonGenericForeach(class [mscorlib]System.Collections.IEnumerable enumerable) cil managed - { - // Code size 56 (0x38) - .maxstack 1 - .locals init (class [mscorlib]System.Collections.IEnumerator V_0, - object V_1, - class [mscorlib]System.IDisposable V_2) - IL_0000: nop - IL_0001: nop - IL_0002: ldarg.0 - IL_0003: callvirt instance class [mscorlib]System.Collections.IEnumerator [mscorlib]System.Collections.IEnumerable::GetEnumerator() - IL_0008: stloc.0 - .try - { - IL_0009: br.s IL_001b - - IL_000b: ldloc.0 - IL_000c: callvirt instance object [mscorlib]System.Collections.IEnumerator::get_Current() - IL_0011: stloc.1 - IL_0012: nop - IL_0013: ldloc.1 - IL_0014: call void [mscorlib]System.Console::WriteLine(object) - IL_0019: nop - IL_001a: nop - IL_001b: ldloc.0 - IL_001c: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0021: brtrue.s IL_000b - - IL_0023: leave.s IL_0037 - - } // end .try - finally - { - IL_0025: ldloc.0 - IL_0026: isinst [mscorlib]System.IDisposable - IL_002b: stloc.2 - IL_002c: ldloc.2 - IL_002d: brfalse.s IL_0036 - - IL_002f: ldloc.2 - IL_0030: callvirt instance void [mscorlib]System.IDisposable::Dispose() - IL_0035: nop - IL_0036: endfinally - } // end handler - IL_0037: ret - } // end of method NoForEachStatement::SimpleNonGenericForeach - - .method public hidebysig static void SimpleForeachOverInts(class [mscorlib]System.Collections.Generic.IEnumerable`1 enumerable) cil managed - { - // Code size 49 (0x31) - .maxstack 1 - .locals init (class [mscorlib]System.Collections.Generic.IEnumerator`1 V_0, - int32 V_1) - IL_0000: nop - IL_0001: nop - IL_0002: ldarg.0 - IL_0003: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - IL_0008: stloc.0 - .try - { - IL_0009: br.s IL_001b - - IL_000b: ldloc.0 - IL_000c: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1::get_Current() - IL_0011: stloc.1 - IL_0012: nop - IL_0013: ldloc.1 - IL_0014: call void [mscorlib]System.Console::WriteLine(int32) - IL_0019: nop - IL_001a: nop - IL_001b: ldloc.0 - IL_001c: callvirt instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - IL_0021: brtrue.s IL_000b - - IL_0023: leave.s IL_0030 - - } // end .try - finally - { - IL_0025: ldloc.0 - IL_0026: brfalse.s IL_002f - - IL_0028: ldloc.0 - IL_0029: callvirt instance void [mscorlib]System.IDisposable::Dispose() - IL_002e: nop - IL_002f: endfinally - } // end handler - IL_0030: ret - } // end of method NoForEachStatement::SimpleForeachOverInts - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method NoForEachStatement::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoForEachStatement - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.Expected.cs b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.Expected.cs index b69f21fed0..0d6eecae98 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.Expected.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.Expected.cs @@ -44,9 +44,9 @@ private static void UseLocalFunctionReference() private static void SimpleCapture() { - _003C_003Ec__DisplayClass1_0 A_ = default(_003C_003Ec__DisplayClass1_0); - A_.x = 1; - _003CSimpleCapture_003Eg__F_007C1_0(ref A_); + _003C_003Ec__DisplayClass1_0 _003C_003Ec__DisplayClass1_1 = default(_003C_003Ec__DisplayClass1_0); + _003C_003Ec__DisplayClass1_1.x = 1; + _003CSimpleCapture_003Eg__F_007C1_0(ref _003C_003Ec__DisplayClass1_1); } private static void SimpleCaptureWithRef() @@ -69,9 +69,9 @@ internal static int _003CUseLocalFunctionReference_003Eg__F_007C0_0() } [CompilerGenerated] - private static int _003CSimpleCapture_003Eg__F_007C1_0(ref _003C_003Ec__DisplayClass1_0 A_0) + private static int _003CSimpleCapture_003Eg__F_007C1_0(ref _003C_003Ec__DisplayClass1_0 P_0) { - return 42 + A_0.x; + return 42 + P_0.x; } } } diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.net40.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.net40.roslyn.il deleted file mode 100644 index 31a8c73ead..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.net40.roslyn.il +++ /dev/null @@ -1,179 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly tmpADF1 -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module tmpADF1.tmp -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle - extends [mscorlib]System.Object -{ - .field private initonly class [mscorlib]System.Func`1 _func - .method public hidebysig specialname rtspecialname - instance void .ctor(class [mscorlib]System.Func`1 func) cil managed - { - // Code size 16 (0x10) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: nop - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: stfld class [mscorlib]System.Func`1 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle::_func - IL_000f: ret - } // end of method Handle::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle - -.class public abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions - extends [mscorlib]System.Object -{ - .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass1_0' - extends [mscorlib]System.ValueType - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public int32 x - } // end of class '<>c__DisplayClass1_0' - - .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass2_0' - extends [mscorlib]System.Object - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public int32 x - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method '<>c__DisplayClass2_0'::.ctor - - .method assembly hidebysig instance int32 - 'g__F|0'() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: ldc.i4.s 42 - IL_0002: ldarg.0 - IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::x - IL_0008: add - IL_0009: ret - } // end of method '<>c__DisplayClass2_0'::'g__F|0' - - } // end of class '<>c__DisplayClass2_0' - - .method private hidebysig static void UseLocalFunctionReference() cil managed - { - // Code size 21 (0x15) - .maxstack 2 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle V_0) - IL_0000: nop - IL_0001: nop - IL_0002: ldnull - IL_0003: ldftn int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions::'g__F|0_0'() - IL_0009: newobj instance void class [mscorlib]System.Func`1::.ctor(object, - native int) - IL_000e: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle::.ctor(class [mscorlib]System.Func`1) - IL_0013: stloc.0 - IL_0014: ret - } // end of method NoLocalFunctions::UseLocalFunctionReference - - .method private hidebysig static void SimpleCapture() cil managed - { - // Code size 19 (0x13) - .maxstack 2 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0' V_0) - IL_0000: nop - IL_0001: ldloca.s V_0 - IL_0003: ldc.i4.1 - IL_0004: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'::x - IL_0009: nop - IL_000a: ldloca.s V_0 - IL_000c: call int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions::'g__F|1_0'(valuetype ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'&) - IL_0011: pop - IL_0012: ret - } // end of method NoLocalFunctions::SimpleCapture - - .method private hidebysig static void SimpleCaptureWithRef() cil managed - { - // Code size 34 (0x22) - .maxstack 2 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0' V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle V_1) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::.ctor() - IL_0005: stloc.0 - IL_0006: nop - IL_0007: ldloc.0 - IL_0008: ldc.i4.1 - IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::x - IL_000e: nop - IL_000f: ldloc.0 - IL_0010: ldftn instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::'g__F|0'() - IL_0016: newobj instance void class [mscorlib]System.Func`1::.ctor(object, - native int) - IL_001b: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle::.ctor(class [mscorlib]System.Func`1) - IL_0020: stloc.1 - IL_0021: ret - } // end of method NoLocalFunctions::SimpleCaptureWithRef - - .method assembly hidebysig static int32 - 'g__F|0_0'() cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 3 (0x3) - .maxstack 8 - IL_0000: ldc.i4.s 42 - IL_0002: ret - } // end of method NoLocalFunctions::'g__F|0_0' - - .method assembly hidebysig static int32 - 'g__F|1_0'(valuetype ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'& A_0) cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 10 (0xa) - .maxstack 8 - IL_0000: ldc.i4.s 42 - IL_0002: ldarg.0 - IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'::x - IL_0008: add - IL_0009: ret - } // end of method NoLocalFunctions::'g__F|1_0' - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.opt.net40.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.opt.net40.roslyn.il deleted file mode 100644 index 49f193309c..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.opt.net40.roslyn.il +++ /dev/null @@ -1,165 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly tmpAE03 -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module tmpAE03.tmp -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle - extends [mscorlib]System.Object -{ - .field private initonly class [mscorlib]System.Func`1 _func - .method public hidebysig specialname rtspecialname - instance void .ctor(class [mscorlib]System.Func`1 func) cil managed - { - // Code size 14 (0xe) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [mscorlib]System.Func`1 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle::_func - IL_000d: ret - } // end of method Handle::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle - -.class public abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions - extends [mscorlib]System.Object -{ - .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass1_0' - extends [mscorlib]System.ValueType - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public int32 x - } // end of class '<>c__DisplayClass1_0' - - .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass2_0' - extends [mscorlib]System.Object - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public int32 x - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method '<>c__DisplayClass2_0'::.ctor - - .method assembly hidebysig instance int32 - 'g__F|0'() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: ldc.i4.s 42 - IL_0002: ldarg.0 - IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::x - IL_0008: add - IL_0009: ret - } // end of method '<>c__DisplayClass2_0'::'g__F|0' - - } // end of class '<>c__DisplayClass2_0' - - .method private hidebysig static void UseLocalFunctionReference() cil managed - { - // Code size 19 (0x13) - .maxstack 8 - IL_0000: ldnull - IL_0001: ldftn int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions::'g__F|0_0'() - IL_0007: newobj instance void class [mscorlib]System.Func`1::.ctor(object, - native int) - IL_000c: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle::.ctor(class [mscorlib]System.Func`1) - IL_0011: pop - IL_0012: ret - } // end of method NoLocalFunctions::UseLocalFunctionReference - - .method private hidebysig static void SimpleCapture() cil managed - { - // Code size 17 (0x11) - .maxstack 2 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0' V_0) - IL_0000: ldloca.s V_0 - IL_0002: ldc.i4.1 - IL_0003: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'::x - IL_0008: ldloca.s V_0 - IL_000a: call int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions::'g__F|1_0'(valuetype ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'&) - IL_000f: pop - IL_0010: ret - } // end of method NoLocalFunctions::SimpleCapture - - .method private hidebysig static void SimpleCaptureWithRef() cil managed - { - // Code size 30 (0x1e) - .maxstack 8 - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::.ctor() - IL_0005: dup - IL_0006: ldc.i4.1 - IL_0007: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::x - IL_000c: ldftn instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::'g__F|0'() - IL_0012: newobj instance void class [mscorlib]System.Func`1::.ctor(object, - native int) - IL_0017: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle::.ctor(class [mscorlib]System.Func`1) - IL_001c: pop - IL_001d: ret - } // end of method NoLocalFunctions::SimpleCaptureWithRef - - .method assembly hidebysig static int32 - 'g__F|0_0'() cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 3 (0x3) - .maxstack 8 - IL_0000: ldc.i4.s 42 - IL_0002: ret - } // end of method NoLocalFunctions::'g__F|0_0' - - .method assembly hidebysig static int32 - 'g__F|1_0'(valuetype ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'& A_0) cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 10 (0xa) - .maxstack 8 - IL_0000: ldc.i4.s 42 - IL_0002: ldarg.0 - IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'::x - IL_0008: add - IL_0009: ret - } // end of method NoLocalFunctions::'g__F|1_0' - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.opt.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.opt.roslyn.il deleted file mode 100644 index 605a923625..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.opt.roslyn.il +++ /dev/null @@ -1,165 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly NoLocalFunctions -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module NoLocalFunctions.dll -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle - extends [mscorlib]System.Object -{ - .field private initonly class [mscorlib]System.Func`1 _func - .method public hidebysig specialname rtspecialname - instance void .ctor(class [mscorlib]System.Func`1 func) cil managed - { - // Code size 14 (0xe) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld class [mscorlib]System.Func`1 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle::_func - IL_000d: ret - } // end of method Handle::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle - -.class public abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions - extends [mscorlib]System.Object -{ - .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass1_0' - extends [mscorlib]System.ValueType - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public int32 x - } // end of class '<>c__DisplayClass1_0' - - .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass2_0' - extends [mscorlib]System.Object - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public int32 x - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method '<>c__DisplayClass2_0'::.ctor - - .method assembly hidebysig instance int32 - 'g__F|0'() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: ldc.i4.s 42 - IL_0002: ldarg.0 - IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::x - IL_0008: add - IL_0009: ret - } // end of method '<>c__DisplayClass2_0'::'g__F|0' - - } // end of class '<>c__DisplayClass2_0' - - .method private hidebysig static void UseLocalFunctionReference() cil managed - { - // Code size 19 (0x13) - .maxstack 8 - IL_0000: ldnull - IL_0001: ldftn int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions::'g__F|0_0'() - IL_0007: newobj instance void class [mscorlib]System.Func`1::.ctor(object, - native int) - IL_000c: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle::.ctor(class [mscorlib]System.Func`1) - IL_0011: pop - IL_0012: ret - } // end of method NoLocalFunctions::UseLocalFunctionReference - - .method private hidebysig static void SimpleCapture() cil managed - { - // Code size 17 (0x11) - .maxstack 2 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0' V_0) - IL_0000: ldloca.s V_0 - IL_0002: ldc.i4.1 - IL_0003: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'::x - IL_0008: ldloca.s V_0 - IL_000a: call int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions::'g__F|1_0'(valuetype ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'&) - IL_000f: pop - IL_0010: ret - } // end of method NoLocalFunctions::SimpleCapture - - .method private hidebysig static void SimpleCaptureWithRef() cil managed - { - // Code size 30 (0x1e) - .maxstack 8 - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::.ctor() - IL_0005: dup - IL_0006: ldc.i4.1 - IL_0007: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::x - IL_000c: ldftn instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::'g__F|0'() - IL_0012: newobj instance void class [mscorlib]System.Func`1::.ctor(object, - native int) - IL_0017: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle::.ctor(class [mscorlib]System.Func`1) - IL_001c: pop - IL_001d: ret - } // end of method NoLocalFunctions::SimpleCaptureWithRef - - .method assembly hidebysig static int32 - 'g__F|0_0'() cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 3 (0x3) - .maxstack 8 - IL_0000: ldc.i4.s 42 - IL_0002: ret - } // end of method NoLocalFunctions::'g__F|0_0' - - .method assembly hidebysig static int32 - 'g__F|1_0'(valuetype ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'& A_0) cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 10 (0xa) - .maxstack 8 - IL_0000: ldc.i4.s 42 - IL_0002: ldarg.0 - IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'::x - IL_0008: add - IL_0009: ret - } // end of method NoLocalFunctions::'g__F|1_0' - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.roslyn.il deleted file mode 100644 index ac6ecbb93f..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoLocalFunctions.roslyn.il +++ /dev/null @@ -1,179 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly NoLocalFunctions -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module NoLocalFunctions.dll -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class public auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle - extends [mscorlib]System.Object -{ - .field private initonly class [mscorlib]System.Func`1 _func - .method public hidebysig specialname rtspecialname - instance void .ctor(class [mscorlib]System.Func`1 func) cil managed - { - // Code size 16 (0x10) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: nop - IL_0008: ldarg.0 - IL_0009: ldarg.1 - IL_000a: stfld class [mscorlib]System.Func`1 ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle::_func - IL_000f: ret - } // end of method Handle::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle - -.class public abstract auto ansi sealed beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions - extends [mscorlib]System.Object -{ - .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass1_0' - extends [mscorlib]System.ValueType - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public int32 x - } // end of class '<>c__DisplayClass1_0' - - .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass2_0' - extends [mscorlib]System.Object - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .field public int32 x - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method '<>c__DisplayClass2_0'::.ctor - - .method assembly hidebysig instance int32 - 'g__F|0'() cil managed - { - // Code size 10 (0xa) - .maxstack 8 - IL_0000: ldc.i4.s 42 - IL_0002: ldarg.0 - IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::x - IL_0008: add - IL_0009: ret - } // end of method '<>c__DisplayClass2_0'::'g__F|0' - - } // end of class '<>c__DisplayClass2_0' - - .method private hidebysig static void UseLocalFunctionReference() cil managed - { - // Code size 21 (0x15) - .maxstack 2 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle V_0) - IL_0000: nop - IL_0001: nop - IL_0002: ldnull - IL_0003: ldftn int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions::'g__F|0_0'() - IL_0009: newobj instance void class [mscorlib]System.Func`1::.ctor(object, - native int) - IL_000e: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle::.ctor(class [mscorlib]System.Func`1) - IL_0013: stloc.0 - IL_0014: ret - } // end of method NoLocalFunctions::UseLocalFunctionReference - - .method private hidebysig static void SimpleCapture() cil managed - { - // Code size 19 (0x13) - .maxstack 2 - .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0' V_0) - IL_0000: nop - IL_0001: ldloca.s V_0 - IL_0003: ldc.i4.1 - IL_0004: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'::x - IL_0009: nop - IL_000a: ldloca.s V_0 - IL_000c: call int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions::'g__F|1_0'(valuetype ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'&) - IL_0011: pop - IL_0012: ret - } // end of method NoLocalFunctions::SimpleCapture - - .method private hidebysig static void SimpleCaptureWithRef() cil managed - { - // Code size 34 (0x22) - .maxstack 2 - .locals init (class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0' V_0, - class ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle V_1) - IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::.ctor() - IL_0005: stloc.0 - IL_0006: nop - IL_0007: ldloc.0 - IL_0008: ldc.i4.1 - IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::x - IL_000e: nop - IL_000f: ldloc.0 - IL_0010: ldftn instance int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass2_0'::'g__F|0'() - IL_0016: newobj instance void class [mscorlib]System.Func`1::.ctor(object, - native int) - IL_001b: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.Handle::.ctor(class [mscorlib]System.Func`1) - IL_0020: stloc.1 - IL_0021: ret - } // end of method NoLocalFunctions::SimpleCaptureWithRef - - .method assembly hidebysig static int32 - 'g__F|0_0'() cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 3 (0x3) - .maxstack 8 - IL_0000: ldc.i4.s 42 - IL_0002: ret - } // end of method NoLocalFunctions::'g__F|0_0' - - .method assembly hidebysig static int32 - 'g__F|1_0'(valuetype ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'& A_0) cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 10 (0xa) - .maxstack 8 - IL_0000: ldc.i4.s 42 - IL_0002: ldarg.0 - IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions/'<>c__DisplayClass1_0'::x - IL_0008: add - IL_0009: ret - } // end of method NoLocalFunctions::'g__F|1_0' - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoLocalFunctions - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.il deleted file mode 100644 index 59e8de7fdd..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.il +++ /dev/null @@ -1,176 +0,0 @@ - -// .NET IL Disassembler. Version 9.0.4 - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly tmpvpdwr1 -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module tmpvpdwr1.tmp -// MVID: {8447adbb-757d-4626-b7b7-846d745d90d0} -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoNewOfT`1<.ctor TOnType> - extends [mscorlib]System.Object -{ - .method public hidebysig static !TOnType - CreateTOnType() cil managed - { - // Code size 39 (0x27) - .maxstack 1 - .locals init (!TOnType V_0, - !TOnType V_1) - IL_0000: nop - IL_0001: ldloca.s V_1 - IL_0003: initobj !TOnType - IL_0009: ldloc.1 - IL_000a: box !TOnType - IL_000f: brfalse.s IL_001c - - IL_0011: ldloca.s V_1 - IL_0013: initobj !TOnType - IL_0019: ldloc.1 - IL_001a: br.s IL_0021 - - IL_001c: call !!0 [mscorlib]System.Activator::CreateInstance() - IL_0021: nop - IL_0022: stloc.0 - IL_0023: br.s IL_0025 - - IL_0025: ldloc.0 - IL_0026: ret - } // end of method NoNewOfT`1::CreateTOnType - - .method public hidebysig static !!T CreateUnconstrainedT<.ctor T>() cil managed - { - // Code size 39 (0x27) - .maxstack 1 - .locals init (!!T V_0, - !!T V_1) - IL_0000: nop - IL_0001: ldloca.s V_1 - IL_0003: initobj !!T - IL_0009: ldloc.1 - IL_000a: box !!T - IL_000f: brfalse.s IL_001c - - IL_0011: ldloca.s V_1 - IL_0013: initobj !!T - IL_0019: ldloc.1 - IL_001a: br.s IL_0021 - - IL_001c: call !!0 [mscorlib]System.Activator::CreateInstance() - IL_0021: nop - IL_0022: stloc.0 - IL_0023: br.s IL_0025 - - IL_0025: ldloc.0 - IL_0026: ret - } // end of method NoNewOfT`1::CreateUnconstrainedT - - .method public hidebysig static !!T CreateClassT() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (!!T V_0) - IL_0000: nop - IL_0001: call !!0 [mscorlib]System.Activator::CreateInstance() - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method NoNewOfT`1::CreateClassT - - .method public hidebysig static !!T CollectionInitializer<.ctor (class [mscorlib]System.Collections.Generic.IList`1) T>() cil managed - { - // Code size 106 (0x6a) - .maxstack 2 - .locals init (!!T V_0, - !!T V_1, - !!T V_2) - IL_0000: nop - IL_0001: ldloca.s V_2 - IL_0003: initobj !!T - IL_0009: ldloc.2 - IL_000a: box !!T - IL_000f: brfalse.s IL_001c - - IL_0011: ldloca.s V_2 - IL_0013: initobj !!T - IL_0019: ldloc.2 - IL_001a: br.s IL_0021 - - IL_001c: call !!0 [mscorlib]System.Activator::CreateInstance() - IL_0021: nop - IL_0022: stloc.0 - IL_0023: ldloc.0 - IL_0024: box !!T - IL_0029: ldc.i4.1 - IL_002a: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1::Add(!0) - IL_002f: nop - IL_0030: ldloc.0 - IL_0031: box !!T - IL_0036: ldc.i4.2 - IL_0037: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1::Add(!0) - IL_003c: nop - IL_003d: ldloc.0 - IL_003e: box !!T - IL_0043: ldc.i4.3 - IL_0044: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1::Add(!0) - IL_0049: nop - IL_004a: ldloc.0 - IL_004b: box !!T - IL_0050: ldc.i4.4 - IL_0051: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1::Add(!0) - IL_0056: nop - IL_0057: ldloc.0 - IL_0058: box !!T - IL_005d: ldc.i4.5 - IL_005e: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1::Add(!0) - IL_0063: nop - IL_0064: ldloc.0 - IL_0065: stloc.1 - IL_0066: br.s IL_0068 - - IL_0068: ldloc.1 - IL_0069: ret - } // end of method NoNewOfT`1::CollectionInitializer - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method NoNewOfT`1::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoNewOfT`1 - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.net40.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.net40.roslyn.il deleted file mode 100644 index a46e2be15a..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.net40.roslyn.il +++ /dev/null @@ -1,241 +0,0 @@ - -// .NET IL Disassembler. Version 9.0.4 - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly tmpyccvci -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module tmpyccvci.tmp -// MVID: {ff6a33b6-7f19-447b-b168-f5c528dc4b6f} -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.custom instance void System.Runtime.CompilerServices.RefSafetyRulesAttribute::.ctor(int32) = ( 01 00 0B 00 00 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi sealed beforefieldinit Microsoft.CodeAnalysis.EmbeddedAttribute - extends [mscorlib]System.Attribute -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void Microsoft.CodeAnalysis.EmbeddedAttribute::.ctor() = ( 01 00 00 00 ) - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Attribute::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method EmbeddedAttribute::.ctor - -} // end of class Microsoft.CodeAnalysis.EmbeddedAttribute - -.class private auto ansi sealed beforefieldinit System.Runtime.CompilerServices.RefSafetyRulesAttribute - extends [mscorlib]System.Attribute -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void Microsoft.CodeAnalysis.EmbeddedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 02 00 00 00 02 00 54 02 0D 41 6C 6C 6F 77 // ........T..Allow - 4D 75 6C 74 69 70 6C 65 00 54 02 09 49 6E 68 65 // Multiple.T..Inhe - 72 69 74 65 64 00 ) // rited. - .field public initonly int32 Version - .method public hidebysig specialname rtspecialname - instance void .ctor(int32 A_1) cil managed - { - // Code size 15 (0xf) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Attribute::.ctor() - IL_0006: nop - IL_0007: ldarg.0 - IL_0008: ldarg.1 - IL_0009: stfld int32 System.Runtime.CompilerServices.RefSafetyRulesAttribute::Version - IL_000e: ret - } // end of method RefSafetyRulesAttribute::.ctor - -} // end of class System.Runtime.CompilerServices.RefSafetyRulesAttribute - -.class private auto ansi sealed beforefieldinit System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute - extends [mscorlib]System.Attribute -{ - .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 02 00 54 02 0D 41 6C 6C 6F 77 // ........T..Allow - 4D 75 6C 74 69 70 6C 65 01 54 02 09 49 6E 68 65 // Multiple.T..Inhe - 72 69 74 65 64 00 ) // rited. - .method public hidebysig specialname rtspecialname - instance void .ctor(string featureName) cil managed - { - // Code size 9 (0x9) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Attribute::.ctor() - IL_0006: nop - IL_0007: nop - IL_0008: ret - } // end of method CompilerFeatureRequiredAttribute::.ctor - -} // end of class System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute - -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.IsExternalInit - extends [mscorlib]System.Object -{ - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method IsExternalInit::.ctor - -} // end of class System.Runtime.CompilerServices.IsExternalInit - -.class private auto ansi sealed beforefieldinit System.Runtime.CompilerServices.RequiredMemberAttribute - extends [mscorlib]System.Attribute -{ - .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 8C 01 00 00 02 00 54 02 0D 41 6C 6C 6F 77 // ........T..Allow - 4D 75 6C 74 69 70 6C 65 00 54 02 09 49 6E 68 65 // Multiple.T..Inhe - 72 69 74 65 64 00 ) // rited. - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Attribute::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method RequiredMemberAttribute::.ctor - -} // end of class System.Runtime.CompilerServices.RequiredMemberAttribute - -.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoNewOfT`1<.ctor TOnType> - extends [mscorlib]System.Object -{ - .method public hidebysig static !TOnType - CreateTOnType() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (!TOnType V_0) - IL_0000: nop - IL_0001: call !!0 [mscorlib]System.Activator::CreateInstance() - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method NoNewOfT`1::CreateTOnType - - .method public hidebysig static !!T CreateUnconstrainedT<.ctor T>() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (!!T V_0) - IL_0000: nop - IL_0001: call !!0 [mscorlib]System.Activator::CreateInstance() - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method NoNewOfT`1::CreateUnconstrainedT - - .method public hidebysig static !!T CreateClassT() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (!!T V_0) - IL_0000: nop - IL_0001: call !!0 [mscorlib]System.Activator::CreateInstance() - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method NoNewOfT`1::CreateClassT - - .method public hidebysig static !!T CollectionInitializer<.ctor (class [mscorlib]System.Collections.Generic.IList`1) T>() cil managed - { - // Code size 88 (0x58) - .maxstack 2 - .locals init (!!T V_0, - !!T V_1) - IL_0000: nop - IL_0001: call !!0 [mscorlib]System.Activator::CreateInstance() - IL_0006: stloc.0 - IL_0007: ldloca.s V_0 - IL_0009: ldc.i4.1 - IL_000a: constrained. !!T - IL_0010: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1::Add(!0) - IL_0015: nop - IL_0016: ldloca.s V_0 - IL_0018: ldc.i4.2 - IL_0019: constrained. !!T - IL_001f: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1::Add(!0) - IL_0024: nop - IL_0025: ldloca.s V_0 - IL_0027: ldc.i4.3 - IL_0028: constrained. !!T - IL_002e: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1::Add(!0) - IL_0033: nop - IL_0034: ldloca.s V_0 - IL_0036: ldc.i4.4 - IL_0037: constrained. !!T - IL_003d: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1::Add(!0) - IL_0042: nop - IL_0043: ldloca.s V_0 - IL_0045: ldc.i4.5 - IL_0046: constrained. !!T - IL_004c: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1::Add(!0) - IL_0051: nop - IL_0052: ldloc.0 - IL_0053: stloc.1 - IL_0054: br.s IL_0056 - - IL_0056: ldloc.1 - IL_0057: ret - } // end of method NoNewOfT`1::CollectionInitializer - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method NoNewOfT`1::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoNewOfT`1 - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.opt.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.opt.il deleted file mode 100644 index c49b5ab540..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.opt.il +++ /dev/null @@ -1,147 +0,0 @@ - -// .NET IL Disassembler. Version 9.0.4 - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly tmp1ekgox -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module tmp1ekgox.tmp -// MVID: {67ce32bd-0144-4136-a198-2fc9f941f624} -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoNewOfT`1<.ctor TOnType> - extends [mscorlib]System.Object -{ - .method public hidebysig static !TOnType - CreateTOnType() cil managed - { - // Code size 32 (0x20) - .maxstack 1 - .locals init (!TOnType V_0, - !TOnType V_1) - IL_0000: ldloca.s V_0 - IL_0002: initobj !TOnType - IL_0008: ldloc.0 - IL_0009: box !TOnType - IL_000e: brfalse.s IL_001a - - IL_0010: ldloca.s V_1 - IL_0012: initobj !TOnType - IL_0018: ldloc.1 - IL_0019: ret - - IL_001a: call !!0 [mscorlib]System.Activator::CreateInstance() - IL_001f: ret - } // end of method NoNewOfT`1::CreateTOnType - - .method public hidebysig static !!T CreateUnconstrainedT<.ctor T>() cil managed - { - // Code size 32 (0x20) - .maxstack 1 - .locals init (!!T V_0, - !!T V_1) - IL_0000: ldloca.s V_0 - IL_0002: initobj !!T - IL_0008: ldloc.0 - IL_0009: box !!T - IL_000e: brfalse.s IL_001a - - IL_0010: ldloca.s V_1 - IL_0012: initobj !!T - IL_0018: ldloc.1 - IL_0019: ret - - IL_001a: call !!0 [mscorlib]System.Activator::CreateInstance() - IL_001f: ret - } // end of method NoNewOfT`1::CreateUnconstrainedT - - .method public hidebysig static !!T CreateClassT() cil managed - { - // Code size 6 (0x6) - .maxstack 8 - IL_0000: call !!0 [mscorlib]System.Activator::CreateInstance() - IL_0005: ret - } // end of method NoNewOfT`1::CreateClassT - - .method public hidebysig static !!T CollectionInitializer<.ctor (class [mscorlib]System.Collections.Generic.IList`1) T>() cil managed - { - // Code size 95 (0x5f) - .maxstack 2 - .locals init (!!T V_0, - !!T V_1, - !!T V_2) - IL_0000: ldloca.s V_1 - IL_0002: initobj !!T - IL_0008: ldloc.1 - IL_0009: box !!T - IL_000e: brfalse.s IL_001b - - IL_0010: ldloca.s V_2 - IL_0012: initobj !!T - IL_0018: ldloc.2 - IL_0019: br.s IL_0020 - - IL_001b: call !!0 [mscorlib]System.Activator::CreateInstance() - IL_0020: stloc.0 - IL_0021: ldloc.0 - IL_0022: box !!T - IL_0027: ldc.i4.1 - IL_0028: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1::Add(!0) - IL_002d: ldloc.0 - IL_002e: box !!T - IL_0033: ldc.i4.2 - IL_0034: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1::Add(!0) - IL_0039: ldloc.0 - IL_003a: box !!T - IL_003f: ldc.i4.3 - IL_0040: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1::Add(!0) - IL_0045: ldloc.0 - IL_0046: box !!T - IL_004b: ldc.i4.4 - IL_004c: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1::Add(!0) - IL_0051: ldloc.0 - IL_0052: box !!T - IL_0057: ldc.i4.5 - IL_0058: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1::Add(!0) - IL_005d: ldloc.0 - IL_005e: ret - } // end of method NoNewOfT`1::CollectionInitializer - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method NoNewOfT`1::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoNewOfT`1 - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.opt.net40.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.opt.net40.roslyn.il deleted file mode 100644 index 849b7843d1..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.opt.net40.roslyn.il +++ /dev/null @@ -1,205 +0,0 @@ - -// .NET IL Disassembler. Version 9.0.4 - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly tmp4xstme -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module tmp4xstme.tmp -// MVID: {a031faef-fcb2-420c-9cd3-6e9b01e7f81e} -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.custom instance void System.Runtime.CompilerServices.RefSafetyRulesAttribute::.ctor(int32) = ( 01 00 0B 00 00 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi sealed beforefieldinit Microsoft.CodeAnalysis.EmbeddedAttribute - extends [mscorlib]System.Attribute -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void Microsoft.CodeAnalysis.EmbeddedAttribute::.ctor() = ( 01 00 00 00 ) - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Attribute::.ctor() - IL_0006: ret - } // end of method EmbeddedAttribute::.ctor - -} // end of class Microsoft.CodeAnalysis.EmbeddedAttribute - -.class private auto ansi sealed beforefieldinit System.Runtime.CompilerServices.RefSafetyRulesAttribute - extends [mscorlib]System.Attribute -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void Microsoft.CodeAnalysis.EmbeddedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 02 00 00 00 02 00 54 02 0D 41 6C 6C 6F 77 // ........T..Allow - 4D 75 6C 74 69 70 6C 65 00 54 02 09 49 6E 68 65 // Multiple.T..Inhe - 72 69 74 65 64 00 ) // rited. - .field public initonly int32 Version - .method public hidebysig specialname rtspecialname - instance void .ctor(int32 A_1) cil managed - { - // Code size 14 (0xe) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Attribute::.ctor() - IL_0006: ldarg.0 - IL_0007: ldarg.1 - IL_0008: stfld int32 System.Runtime.CompilerServices.RefSafetyRulesAttribute::Version - IL_000d: ret - } // end of method RefSafetyRulesAttribute::.ctor - -} // end of class System.Runtime.CompilerServices.RefSafetyRulesAttribute - -.class private auto ansi sealed beforefieldinit System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute - extends [mscorlib]System.Attribute -{ - .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 02 00 54 02 0D 41 6C 6C 6F 77 // ........T..Allow - 4D 75 6C 74 69 70 6C 65 01 54 02 09 49 6E 68 65 // Multiple.T..Inhe - 72 69 74 65 64 00 ) // rited. - .method public hidebysig specialname rtspecialname - instance void .ctor(string featureName) cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Attribute::.ctor() - IL_0006: ret - } // end of method CompilerFeatureRequiredAttribute::.ctor - -} // end of class System.Runtime.CompilerServices.CompilerFeatureRequiredAttribute - -.class private auto ansi beforefieldinit System.Runtime.CompilerServices.IsExternalInit - extends [mscorlib]System.Object -{ - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method IsExternalInit::.ctor - -} // end of class System.Runtime.CompilerServices.IsExternalInit - -.class private auto ansi sealed beforefieldinit System.Runtime.CompilerServices.RequiredMemberAttribute - extends [mscorlib]System.Attribute -{ - .custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 8C 01 00 00 02 00 54 02 0D 41 6C 6C 6F 77 // ........T..Allow - 4D 75 6C 74 69 70 6C 65 00 54 02 09 49 6E 68 65 // Multiple.T..Inhe - 72 69 74 65 64 00 ) // rited. - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Attribute::.ctor() - IL_0006: ret - } // end of method RequiredMemberAttribute::.ctor - -} // end of class System.Runtime.CompilerServices.RequiredMemberAttribute - -.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoNewOfT`1<.ctor TOnType> - extends [mscorlib]System.Object -{ - .method public hidebysig static !TOnType - CreateTOnType() cil managed - { - // Code size 6 (0x6) - .maxstack 8 - IL_0000: call !!0 [mscorlib]System.Activator::CreateInstance() - IL_0005: ret - } // end of method NoNewOfT`1::CreateTOnType - - .method public hidebysig static !!T CreateUnconstrainedT<.ctor T>() cil managed - { - // Code size 6 (0x6) - .maxstack 8 - IL_0000: call !!0 [mscorlib]System.Activator::CreateInstance() - IL_0005: ret - } // end of method NoNewOfT`1::CreateUnconstrainedT - - .method public hidebysig static !!T CreateClassT() cil managed - { - // Code size 6 (0x6) - .maxstack 8 - IL_0000: call !!0 [mscorlib]System.Activator::CreateInstance() - IL_0005: ret - } // end of method NoNewOfT`1::CreateClassT - - .method public hidebysig static !!T CollectionInitializer<.ctor (class [mscorlib]System.Collections.Generic.IList`1) T>() cil managed - { - // Code size 78 (0x4e) - .maxstack 2 - .locals init (!!T V_0) - IL_0000: call !!0 [mscorlib]System.Activator::CreateInstance() - IL_0005: stloc.0 - IL_0006: ldloca.s V_0 - IL_0008: ldc.i4.1 - IL_0009: constrained. !!T - IL_000f: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1::Add(!0) - IL_0014: ldloca.s V_0 - IL_0016: ldc.i4.2 - IL_0017: constrained. !!T - IL_001d: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1::Add(!0) - IL_0022: ldloca.s V_0 - IL_0024: ldc.i4.3 - IL_0025: constrained. !!T - IL_002b: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1::Add(!0) - IL_0030: ldloca.s V_0 - IL_0032: ldc.i4.4 - IL_0033: constrained. !!T - IL_0039: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1::Add(!0) - IL_003e: ldloca.s V_0 - IL_0040: ldc.i4.5 - IL_0041: constrained. !!T - IL_0047: callvirt instance void class [mscorlib]System.Collections.Generic.ICollection`1::Add(!0) - IL_004c: ldloc.0 - IL_004d: ret - } // end of method NoNewOfT`1::CollectionInitializer - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method NoNewOfT`1::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoNewOfT`1 - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.opt.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.opt.roslyn.il deleted file mode 100644 index 75c9478f95..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.opt.roslyn.il +++ /dev/null @@ -1,115 +0,0 @@ - -// .NET IL Disassembler. Version 9.0.4 - - - -// Metadata version: v4.0.30319 -.assembly extern System.Runtime -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 10:0:0:0 -} -.assembly tmpauzspg -{ - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [System.Runtime]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 ) - - .custom instance void [System.Runtime]System.Runtime.Versioning.TargetFrameworkAttribute::.ctor(string) = ( 01 00 19 2E 4E 45 54 43 6F 72 65 41 70 70 2C 56 // ....NETCoreApp,V - 65 72 73 69 6F 6E 3D 76 31 30 2E 30 00 00 ) // ersion=v10.0.. - .permissionset reqmin - = {[System.Runtime]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module tmpauzspg.tmp -// MVID: {6d3a3b63-d01c-49f7-9515-565421f78266} -.custom instance void [System.Runtime]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.custom instance void [System.Runtime]System.Runtime.CompilerServices.RefSafetyRulesAttribute::.ctor(int32) = ( 01 00 0B 00 00 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoNewOfT`1<.ctor TOnType> - extends [System.Runtime]System.Object -{ - .method public hidebysig static !TOnType - CreateTOnType() cil managed - { - // Code size 6 (0x6) - .maxstack 8 - IL_0000: call !!0 [System.Runtime]System.Activator::CreateInstance() - IL_0005: ret - } // end of method NoNewOfT`1::CreateTOnType - - .method public hidebysig static !!T CreateUnconstrainedT<.ctor T>() cil managed - { - // Code size 6 (0x6) - .maxstack 8 - IL_0000: call !!0 [System.Runtime]System.Activator::CreateInstance() - IL_0005: ret - } // end of method NoNewOfT`1::CreateUnconstrainedT - - .method public hidebysig static !!T CreateClassT() cil managed - { - // Code size 6 (0x6) - .maxstack 8 - IL_0000: call !!0 [System.Runtime]System.Activator::CreateInstance() - IL_0005: ret - } // end of method NoNewOfT`1::CreateClassT - - .method public hidebysig static !!T CollectionInitializer<.ctor (class [System.Runtime]System.Collections.Generic.IList`1) T>() cil managed - { - // Code size 78 (0x4e) - .maxstack 2 - .locals init (!!T V_0) - IL_0000: call !!0 [System.Runtime]System.Activator::CreateInstance() - IL_0005: stloc.0 - IL_0006: ldloca.s V_0 - IL_0008: ldc.i4.1 - IL_0009: constrained. !!T - IL_000f: callvirt instance void class [System.Runtime]System.Collections.Generic.ICollection`1::Add(!0) - IL_0014: ldloca.s V_0 - IL_0016: ldc.i4.2 - IL_0017: constrained. !!T - IL_001d: callvirt instance void class [System.Runtime]System.Collections.Generic.ICollection`1::Add(!0) - IL_0022: ldloca.s V_0 - IL_0024: ldc.i4.3 - IL_0025: constrained. !!T - IL_002b: callvirt instance void class [System.Runtime]System.Collections.Generic.ICollection`1::Add(!0) - IL_0030: ldloca.s V_0 - IL_0032: ldc.i4.4 - IL_0033: constrained. !!T - IL_0039: callvirt instance void class [System.Runtime]System.Collections.Generic.ICollection`1::Add(!0) - IL_003e: ldloca.s V_0 - IL_0040: ldc.i4.5 - IL_0041: constrained. !!T - IL_0047: callvirt instance void class [System.Runtime]System.Collections.Generic.ICollection`1::Add(!0) - IL_004c: ldloc.0 - IL_004d: ret - } // end of method NoNewOfT`1::CollectionInitializer - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [System.Runtime]System.Object::.ctor() - IL_0006: ret - } // end of method NoNewOfT`1::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoNewOfT`1 - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.roslyn.il deleted file mode 100644 index 3706f9e89a..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoNewOfT.roslyn.il +++ /dev/null @@ -1,145 +0,0 @@ - -// .NET IL Disassembler. Version 9.0.4 - - - -// Metadata version: v4.0.30319 -.assembly extern System.Runtime -{ - .publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....: - .ver 10:0:0:0 -} -.assembly tmpybdlca -{ - .custom instance void [System.Runtime]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [System.Runtime]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [System.Runtime]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [System.Runtime]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) - - .custom instance void [System.Runtime]System.Runtime.Versioning.TargetFrameworkAttribute::.ctor(string) = ( 01 00 19 2E 4E 45 54 43 6F 72 65 41 70 70 2C 56 // ....NETCoreApp,V - 65 72 73 69 6F 6E 3D 76 31 30 2E 30 00 00 ) // ersion=v10.0.. - .permissionset reqmin - = {[System.Runtime]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module tmpybdlca.tmp -// MVID: {b57f13a4-d291-42ea-b595-3766c1f1470c} -.custom instance void [System.Runtime]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.custom instance void [System.Runtime]System.Runtime.CompilerServices.RefSafetyRulesAttribute::.ctor(int32) = ( 01 00 0B 00 00 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoNewOfT`1<.ctor TOnType> - extends [System.Runtime]System.Object -{ - .method public hidebysig static !TOnType - CreateTOnType() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (!TOnType V_0) - IL_0000: nop - IL_0001: call !!0 [System.Runtime]System.Activator::CreateInstance() - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method NoNewOfT`1::CreateTOnType - - .method public hidebysig static !!T CreateUnconstrainedT<.ctor T>() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (!!T V_0) - IL_0000: nop - IL_0001: call !!0 [System.Runtime]System.Activator::CreateInstance() - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method NoNewOfT`1::CreateUnconstrainedT - - .method public hidebysig static !!T CreateClassT() cil managed - { - // Code size 11 (0xb) - .maxstack 1 - .locals init (!!T V_0) - IL_0000: nop - IL_0001: call !!0 [System.Runtime]System.Activator::CreateInstance() - IL_0006: stloc.0 - IL_0007: br.s IL_0009 - - IL_0009: ldloc.0 - IL_000a: ret - } // end of method NoNewOfT`1::CreateClassT - - .method public hidebysig static !!T CollectionInitializer<.ctor (class [System.Runtime]System.Collections.Generic.IList`1) T>() cil managed - { - // Code size 88 (0x58) - .maxstack 2 - .locals init (!!T V_0, - !!T V_1) - IL_0000: nop - IL_0001: call !!0 [System.Runtime]System.Activator::CreateInstance() - IL_0006: stloc.0 - IL_0007: ldloca.s V_0 - IL_0009: ldc.i4.1 - IL_000a: constrained. !!T - IL_0010: callvirt instance void class [System.Runtime]System.Collections.Generic.ICollection`1::Add(!0) - IL_0015: nop - IL_0016: ldloca.s V_0 - IL_0018: ldc.i4.2 - IL_0019: constrained. !!T - IL_001f: callvirt instance void class [System.Runtime]System.Collections.Generic.ICollection`1::Add(!0) - IL_0024: nop - IL_0025: ldloca.s V_0 - IL_0027: ldc.i4.3 - IL_0028: constrained. !!T - IL_002e: callvirt instance void class [System.Runtime]System.Collections.Generic.ICollection`1::Add(!0) - IL_0033: nop - IL_0034: ldloca.s V_0 - IL_0036: ldc.i4.4 - IL_0037: constrained. !!T - IL_003d: callvirt instance void class [System.Runtime]System.Collections.Generic.ICollection`1::Add(!0) - IL_0042: nop - IL_0043: ldloca.s V_0 - IL_0045: ldc.i4.5 - IL_0046: constrained. !!T - IL_004c: callvirt instance void class [System.Runtime]System.Collections.Generic.ICollection`1::Add(!0) - IL_0051: nop - IL_0052: ldloc.0 - IL_0053: stloc.1 - IL_0054: br.s IL_0056 - - IL_0056: ldloc.1 - IL_0057: ret - } // end of method NoNewOfT`1::CollectionInitializer - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [System.Runtime]System.Object::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method NoNewOfT`1::.ctor - -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoNewOfT`1 - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.il deleted file mode 100644 index 98fb8d1d7e..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.il +++ /dev/null @@ -1,136 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly tmp8FA -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module tmp8FA.tmp -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents - extends [mscorlib]System.Object -{ - .field private class [mscorlib]System.EventHandler MyEvent - .method public hidebysig specialname instance void - add_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed - { - // Code size 48 (0x30) - .maxstack 3 - .locals init (class [mscorlib]System.EventHandler V_0, - class [mscorlib]System.EventHandler V_1, - class [mscorlib]System.EventHandler V_2, - bool V_3) - IL_0000: ldarg.0 - IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: stloc.1 - IL_0009: ldloc.1 - IL_000a: ldarg.1 - IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Combine(class [mscorlib]System.Delegate, - class [mscorlib]System.Delegate) - IL_0010: castclass [mscorlib]System.EventHandler - IL_0015: stloc.2 - IL_0016: ldarg.0 - IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent - IL_001c: ldloc.2 - IL_001d: ldloc.1 - IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, - !!0, - !!0) - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ldloc.1 - IL_0026: ceq - IL_0028: ldc.i4.0 - IL_0029: ceq - IL_002b: stloc.3 - IL_002c: ldloc.3 - IL_002d: brtrue.s IL_0007 - - IL_002f: ret - } // end of method NoPropertiesAndEvents::add_MyEvent - - .method public hidebysig specialname instance void - remove_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed - { - // Code size 48 (0x30) - .maxstack 3 - .locals init (class [mscorlib]System.EventHandler V_0, - class [mscorlib]System.EventHandler V_1, - class [mscorlib]System.EventHandler V_2, - bool V_3) - IL_0000: ldarg.0 - IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: stloc.1 - IL_0009: ldloc.1 - IL_000a: ldarg.1 - IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Remove(class [mscorlib]System.Delegate, - class [mscorlib]System.Delegate) - IL_0010: castclass [mscorlib]System.EventHandler - IL_0015: stloc.2 - IL_0016: ldarg.0 - IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent - IL_001c: ldloc.2 - IL_001d: ldloc.1 - IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, - !!0, - !!0) - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ldloc.1 - IL_0026: ceq - IL_0028: ldc.i4.0 - IL_0029: ceq - IL_002b: stloc.3 - IL_002c: ldloc.3 - IL_002d: brtrue.s IL_0007 - - IL_002f: ret - } // end of method NoPropertiesAndEvents::remove_MyEvent - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method NoPropertiesAndEvents::.ctor - - .event [mscorlib]System.EventHandler MyEvent - { - .addon instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::add_MyEvent(class [mscorlib]System.EventHandler) - .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::remove_MyEvent(class [mscorlib]System.EventHandler) - } // end of event NoPropertiesAndEvents::MyEvent -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.net40.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.net40.roslyn.il deleted file mode 100644 index 19fd011bdf..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.net40.roslyn.il +++ /dev/null @@ -1,133 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly tmpB115 -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module tmpB115.tmp -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents - extends [mscorlib]System.Object -{ - .field private class [mscorlib]System.EventHandler MyEvent - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .method public hidebysig specialname instance void - add_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) - .maxstack 3 - .locals init (class [mscorlib]System.EventHandler V_0, - class [mscorlib]System.EventHandler V_1, - class [mscorlib]System.EventHandler V_2) - IL_0000: ldarg.0 - IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: stloc.1 - IL_0009: ldloc.1 - IL_000a: ldarg.1 - IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Combine(class [mscorlib]System.Delegate, - class [mscorlib]System.Delegate) - IL_0010: castclass [mscorlib]System.EventHandler - IL_0015: stloc.2 - IL_0016: ldarg.0 - IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent - IL_001c: ldloc.2 - IL_001d: ldloc.1 - IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, - !!0, - !!0) - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ldloc.1 - IL_0026: bne.un.s IL_0007 - - IL_0028: ret - } // end of method NoPropertiesAndEvents::add_MyEvent - - .method public hidebysig specialname instance void - remove_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) - .maxstack 3 - .locals init (class [mscorlib]System.EventHandler V_0, - class [mscorlib]System.EventHandler V_1, - class [mscorlib]System.EventHandler V_2) - IL_0000: ldarg.0 - IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: stloc.1 - IL_0009: ldloc.1 - IL_000a: ldarg.1 - IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Remove(class [mscorlib]System.Delegate, - class [mscorlib]System.Delegate) - IL_0010: castclass [mscorlib]System.EventHandler - IL_0015: stloc.2 - IL_0016: ldarg.0 - IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent - IL_001c: ldloc.2 - IL_001d: ldloc.1 - IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, - !!0, - !!0) - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ldloc.1 - IL_0026: bne.un.s IL_0007 - - IL_0028: ret - } // end of method NoPropertiesAndEvents::remove_MyEvent - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method NoPropertiesAndEvents::.ctor - - .event [mscorlib]System.EventHandler MyEvent - { - .addon instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::add_MyEvent(class [mscorlib]System.EventHandler) - .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::remove_MyEvent(class [mscorlib]System.EventHandler) - } // end of event NoPropertiesAndEvents::MyEvent -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.opt.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.opt.il deleted file mode 100644 index dbf8140aa2..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.opt.il +++ /dev/null @@ -1,124 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly tmp8FB -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module tmp8FB.tmp -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents - extends [mscorlib]System.Object -{ - .field private class [mscorlib]System.EventHandler MyEvent - .method public hidebysig specialname instance void - add_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed - { - // Code size 41 (0x29) - .maxstack 3 - .locals init (class [mscorlib]System.EventHandler V_0, - class [mscorlib]System.EventHandler V_1, - class [mscorlib]System.EventHandler V_2) - IL_0000: ldarg.0 - IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: stloc.1 - IL_0009: ldloc.1 - IL_000a: ldarg.1 - IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Combine(class [mscorlib]System.Delegate, - class [mscorlib]System.Delegate) - IL_0010: castclass [mscorlib]System.EventHandler - IL_0015: stloc.2 - IL_0016: ldarg.0 - IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent - IL_001c: ldloc.2 - IL_001d: ldloc.1 - IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, - !!0, - !!0) - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ldloc.1 - IL_0026: bne.un.s IL_0007 - - IL_0028: ret - } // end of method NoPropertiesAndEvents::add_MyEvent - - .method public hidebysig specialname instance void - remove_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed - { - // Code size 41 (0x29) - .maxstack 3 - .locals init (class [mscorlib]System.EventHandler V_0, - class [mscorlib]System.EventHandler V_1, - class [mscorlib]System.EventHandler V_2) - IL_0000: ldarg.0 - IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: stloc.1 - IL_0009: ldloc.1 - IL_000a: ldarg.1 - IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Remove(class [mscorlib]System.Delegate, - class [mscorlib]System.Delegate) - IL_0010: castclass [mscorlib]System.EventHandler - IL_0015: stloc.2 - IL_0016: ldarg.0 - IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent - IL_001c: ldloc.2 - IL_001d: ldloc.1 - IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, - !!0, - !!0) - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ldloc.1 - IL_0026: bne.un.s IL_0007 - - IL_0028: ret - } // end of method NoPropertiesAndEvents::remove_MyEvent - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method NoPropertiesAndEvents::.ctor - - .event [mscorlib]System.EventHandler MyEvent - { - .addon instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::add_MyEvent(class [mscorlib]System.EventHandler) - .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::remove_MyEvent(class [mscorlib]System.EventHandler) - } // end of event NoPropertiesAndEvents::MyEvent -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.opt.net40.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.opt.net40.roslyn.il deleted file mode 100644 index 1c755f4083..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.opt.net40.roslyn.il +++ /dev/null @@ -1,131 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly tmpB126 -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module tmpB126.tmp -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents - extends [mscorlib]System.Object -{ - .field private class [mscorlib]System.EventHandler MyEvent - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .method public hidebysig specialname instance void - add_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) - .maxstack 3 - .locals init (class [mscorlib]System.EventHandler V_0, - class [mscorlib]System.EventHandler V_1, - class [mscorlib]System.EventHandler V_2) - IL_0000: ldarg.0 - IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: stloc.1 - IL_0009: ldloc.1 - IL_000a: ldarg.1 - IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Combine(class [mscorlib]System.Delegate, - class [mscorlib]System.Delegate) - IL_0010: castclass [mscorlib]System.EventHandler - IL_0015: stloc.2 - IL_0016: ldarg.0 - IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent - IL_001c: ldloc.2 - IL_001d: ldloc.1 - IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, - !!0, - !!0) - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ldloc.1 - IL_0026: bne.un.s IL_0007 - - IL_0028: ret - } // end of method NoPropertiesAndEvents::add_MyEvent - - .method public hidebysig specialname instance void - remove_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) - .maxstack 3 - .locals init (class [mscorlib]System.EventHandler V_0, - class [mscorlib]System.EventHandler V_1, - class [mscorlib]System.EventHandler V_2) - IL_0000: ldarg.0 - IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: stloc.1 - IL_0009: ldloc.1 - IL_000a: ldarg.1 - IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Remove(class [mscorlib]System.Delegate, - class [mscorlib]System.Delegate) - IL_0010: castclass [mscorlib]System.EventHandler - IL_0015: stloc.2 - IL_0016: ldarg.0 - IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent - IL_001c: ldloc.2 - IL_001d: ldloc.1 - IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, - !!0, - !!0) - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ldloc.1 - IL_0026: bne.un.s IL_0007 - - IL_0028: ret - } // end of method NoPropertiesAndEvents::remove_MyEvent - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method NoPropertiesAndEvents::.ctor - - .event [mscorlib]System.EventHandler MyEvent - { - .addon instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::add_MyEvent(class [mscorlib]System.EventHandler) - .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::remove_MyEvent(class [mscorlib]System.EventHandler) - } // end of event NoPropertiesAndEvents::MyEvent -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.opt.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.opt.roslyn.il deleted file mode 100644 index 754e2a1eaa..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.opt.roslyn.il +++ /dev/null @@ -1,131 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly tmp8F9 -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module tmp8F9.tmp -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents - extends [mscorlib]System.Object -{ - .field private class [mscorlib]System.EventHandler MyEvent - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .method public hidebysig specialname instance void - add_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) - .maxstack 3 - .locals init (class [mscorlib]System.EventHandler V_0, - class [mscorlib]System.EventHandler V_1, - class [mscorlib]System.EventHandler V_2) - IL_0000: ldarg.0 - IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: stloc.1 - IL_0009: ldloc.1 - IL_000a: ldarg.1 - IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Combine(class [mscorlib]System.Delegate, - class [mscorlib]System.Delegate) - IL_0010: castclass [mscorlib]System.EventHandler - IL_0015: stloc.2 - IL_0016: ldarg.0 - IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent - IL_001c: ldloc.2 - IL_001d: ldloc.1 - IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, - !!0, - !!0) - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ldloc.1 - IL_0026: bne.un.s IL_0007 - - IL_0028: ret - } // end of method NoPropertiesAndEvents::add_MyEvent - - .method public hidebysig specialname instance void - remove_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) - .maxstack 3 - .locals init (class [mscorlib]System.EventHandler V_0, - class [mscorlib]System.EventHandler V_1, - class [mscorlib]System.EventHandler V_2) - IL_0000: ldarg.0 - IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: stloc.1 - IL_0009: ldloc.1 - IL_000a: ldarg.1 - IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Remove(class [mscorlib]System.Delegate, - class [mscorlib]System.Delegate) - IL_0010: castclass [mscorlib]System.EventHandler - IL_0015: stloc.2 - IL_0016: ldarg.0 - IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent - IL_001c: ldloc.2 - IL_001d: ldloc.1 - IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, - !!0, - !!0) - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ldloc.1 - IL_0026: bne.un.s IL_0007 - - IL_0028: ret - } // end of method NoPropertiesAndEvents::remove_MyEvent - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method NoPropertiesAndEvents::.ctor - - .event [mscorlib]System.EventHandler MyEvent - { - .addon instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::add_MyEvent(class [mscorlib]System.EventHandler) - .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::remove_MyEvent(class [mscorlib]System.EventHandler) - } // end of event NoPropertiesAndEvents::MyEvent -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.roslyn.il deleted file mode 100644 index 0538d65dec..0000000000 --- a/ICSharpCode.Decompiler.Tests/TestCases/Ugly/NoPropertiesAndEvents.roslyn.il +++ /dev/null @@ -1,133 +0,0 @@ - - - - -// Metadata version: v4.0.30319 -.assembly extern mscorlib -{ - .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. - .ver 4:0:0:0 -} -.assembly tmp8F8 -{ - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) - .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx - 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. - - // --- The following custom attribute is added automatically, do not uncomment ------- - // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) - - .permissionset reqmin - = {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}} - .hash algorithm 0x00008004 - .ver 0:0:0:0 -} -.module tmp8F8.tmp -.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) -.imagebase 0x10000000 -.file alignment 0x00000200 -.stackreserve 0x00100000 -.subsystem 0x0003 // WINDOWS_CUI -.corflags 0x00000001 // ILONLY - - -// =============== CLASS MEMBERS DECLARATION =================== - -.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents - extends [mscorlib]System.Object -{ - .field private class [mscorlib]System.EventHandler MyEvent - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) - .method public hidebysig specialname instance void - add_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) - .maxstack 3 - .locals init (class [mscorlib]System.EventHandler V_0, - class [mscorlib]System.EventHandler V_1, - class [mscorlib]System.EventHandler V_2) - IL_0000: ldarg.0 - IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: stloc.1 - IL_0009: ldloc.1 - IL_000a: ldarg.1 - IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Combine(class [mscorlib]System.Delegate, - class [mscorlib]System.Delegate) - IL_0010: castclass [mscorlib]System.EventHandler - IL_0015: stloc.2 - IL_0016: ldarg.0 - IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent - IL_001c: ldloc.2 - IL_001d: ldloc.1 - IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, - !!0, - !!0) - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ldloc.1 - IL_0026: bne.un.s IL_0007 - - IL_0028: ret - } // end of method NoPropertiesAndEvents::add_MyEvent - - .method public hidebysig specialname instance void - remove_MyEvent(class [mscorlib]System.EventHandler 'value') cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) - // Code size 41 (0x29) - .maxstack 3 - .locals init (class [mscorlib]System.EventHandler V_0, - class [mscorlib]System.EventHandler V_1, - class [mscorlib]System.EventHandler V_2) - IL_0000: ldarg.0 - IL_0001: ldfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: stloc.1 - IL_0009: ldloc.1 - IL_000a: ldarg.1 - IL_000b: call class [mscorlib]System.Delegate [mscorlib]System.Delegate::Remove(class [mscorlib]System.Delegate, - class [mscorlib]System.Delegate) - IL_0010: castclass [mscorlib]System.EventHandler - IL_0015: stloc.2 - IL_0016: ldarg.0 - IL_0017: ldflda class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::MyEvent - IL_001c: ldloc.2 - IL_001d: ldloc.1 - IL_001e: call !!0 [mscorlib]System.Threading.Interlocked::CompareExchange(!!0&, - !!0, - !!0) - IL_0023: stloc.0 - IL_0024: ldloc.0 - IL_0025: ldloc.1 - IL_0026: bne.un.s IL_0007 - - IL_0028: ret - } // end of method NoPropertiesAndEvents::remove_MyEvent - - .method public hidebysig specialname rtspecialname - instance void .ctor() cil managed - { - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: nop - IL_0007: ret - } // end of method NoPropertiesAndEvents::.ctor - - .event [mscorlib]System.EventHandler MyEvent - { - .addon instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::add_MyEvent(class [mscorlib]System.EventHandler) - .removeon instance void ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents::remove_MyEvent(class [mscorlib]System.EventHandler) - } // end of event NoPropertiesAndEvents::MyEvent -} // end of class ICSharpCode.Decompiler.Tests.TestCases.Ugly.NoPropertiesAndEvents - - -// ============================================================= - -// *********** DISASSEMBLY COMPLETE *********************** diff --git a/ICSharpCode.Decompiler.Tests/UglyTestRunner.cs b/ICSharpCode.Decompiler.Tests/UglyTestRunner.cs index 15ad540dcf..ccea015bec 100644 --- a/ICSharpCode.Decompiler.Tests/UglyTestRunner.cs +++ b/ICSharpCode.Decompiler.Tests/UglyTestRunner.cs @@ -141,35 +141,29 @@ public async Task NoNewOfT([ValueSource(nameof(defaultOptions))] CompilerOptions await RunForLibrary(cscOptions: cscOptions, decompilerSettings: new DecompilerSettings(CSharp.LanguageVersion.CSharp1)); } - async Task RunForLibrary([CallerMemberName] string testName = null, AssemblerOptions asmOptions = AssemblerOptions.None, CompilerOptions cscOptions = CompilerOptions.None, DecompilerSettings decompilerSettings = null) + async Task RunForLibrary([CallerMemberName] string testName = null, CompilerOptions cscOptions = CompilerOptions.None, DecompilerSettings decompilerSettings = null) { - await Run(testName, asmOptions | AssemblerOptions.Library, cscOptions | CompilerOptions.Library, decompilerSettings); + await Run(testName, cscOptions | CompilerOptions.Library, decompilerSettings); } - async Task Run([CallerMemberName] string testName = null, AssemblerOptions asmOptions = AssemblerOptions.None, CompilerOptions cscOptions = CompilerOptions.None, DecompilerSettings decompilerSettings = null) + async Task Run([CallerMemberName] string testName = null, CompilerOptions cscOptions = CompilerOptions.None, DecompilerSettings decompilerSettings = null) { - var ilFile = Path.Combine(TestCasePath, testName) + Tester.GetSuffix(cscOptions) + ".il"; var csFile = Path.Combine(TestCasePath, testName + ".cs"); var expectedFile = Path.Combine(TestCasePath, testName + ".Expected.cs"); + var exeFile = TestsAssemblyOutput.GetFilePath(TestCasePath, testName, Tester.GetSuffix(cscOptions) + ".exe"); - if (!File.Exists(ilFile)) + CompilerResults output = null; + try { - // re-create .il file if necessary - Helpers.CompilerResults output = null; - try - { - output = await Tester.CompileCSharp(csFile, cscOptions).ConfigureAwait(false); - await Tester.Disassemble(output.PathToAssembly, ilFile, asmOptions).ConfigureAwait(false); - } - finally - { - if (output != null) - output.DeleteTempFiles(); - } + output = await Tester.CompileCSharp(csFile, cscOptions, exeFile).ConfigureAwait(false); + } + finally + { + if (output != null) + output.DeleteTempFiles(); } - var executable = await Tester.AssembleIL(ilFile, asmOptions).ConfigureAwait(false); - var decompiled = await Tester.DecompileCSharp(executable, decompilerSettings).ConfigureAwait(false); + var decompiled = await Tester.DecompileCSharp(exeFile, decompilerSettings).ConfigureAwait(false); CodeAssert.FilesAreEqual(expectedFile, decompiled, Tester.GetPreprocessorSymbols(cscOptions).ToArray()); Tester.RepeatOnIOError(() => File.Delete(decompiled));