Browse Source

Merge branch 'master' of https://github.com/icsharpcode/ILSpy into metadata-explorer

pull/1716/head
Siegfried Pammer 7 years ago
parent
commit
02c56d631d
  1. 4
      .editorconfig
  2. 3
      .gitignore
  3. 40
      BuildTools/pipelines-install.ps1
  4. 2
      BuildTools/tidy.py
  5. 36
      BuildTools/update-assemblyinfo.ps1
  6. 2
      DecompilerNuGetDemos.workbook
  7. 9
      ICSharpCode.Decompiler.Console/ICSharpCode.Decompiler.Console.csproj
  8. 53
      ICSharpCode.Decompiler.Console/IlspyCmdProgram.cs
  9. 2
      ICSharpCode.Decompiler.PowerShell/ICSharpCode.Decompiler.PowerShell.csproj
  10. 25
      ICSharpCode.Decompiler.Tests/CorrectnessTestRunner.cs
  11. 68
      ICSharpCode.Decompiler.Tests/Helpers/CodeAssert.cs
  12. 5
      ICSharpCode.Decompiler.Tests/Helpers/RemoveCompilerAttribute.cs
  13. 15
      ICSharpCode.Decompiler.Tests/Helpers/Tester.VB.cs
  14. 73
      ICSharpCode.Decompiler.Tests/Helpers/Tester.cs
  15. 48
      ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj
  16. 44
      ICSharpCode.Decompiler.Tests/ILPrettyTestRunner.cs
  17. 2
      ICSharpCode.Decompiler.Tests/PdbGenerationTestRunner.cs
  18. 88
      ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs
  19. 37
      ICSharpCode.Decompiler.Tests/RoundtripAssembly.cs
  20. 76
      ICSharpCode.Decompiler.Tests/TestCases/Correctness/LocalFunctions.cs
  21. 79
      ICSharpCode.Decompiler.Tests/TestCases/Correctness/RefLocalsAndReturns.cs
  22. 9
      ICSharpCode.Decompiler.Tests/TestCases/Correctness/TrickyTypes.cs
  23. 9
      ICSharpCode.Decompiler.Tests/TestCases/ILPretty/ConstantBlobs.cs
  24. 39
      ICSharpCode.Decompiler.Tests/TestCases/ILPretty/ConstantBlobs.il
  25. 14
      ICSharpCode.Decompiler.Tests/TestCases/ILPretty/DirectCallToExplicitInterfaceImpl.cs
  26. 36
      ICSharpCode.Decompiler.Tests/TestCases/ILPretty/DirectCallToExplicitInterfaceImpl.il
  27. 10
      ICSharpCode.Decompiler.Tests/TestCases/ILPretty/FSharpLoops_Debug.cs
  28. 9
      ICSharpCode.Decompiler.Tests/TestCases/ILPretty/FSharpLoops_Release.cs
  29. 4
      ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1047.cs
  30. 45
      ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1325.cs
  31. 2
      ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1389.cs
  32. 23
      ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1454.cs
  33. 125
      ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1454.il
  34. 15
      ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1681.cs
  35. 42
      ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1681.il
  36. 39
      ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue684.cs
  37. 133
      ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue684.il
  38. 237
      ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Unsafe.cs
  39. 439
      ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Unsafe.il
  40. 849
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/AnonymousTypes.il
  41. 879
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/AnonymousTypes.mcs.il
  42. 744
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/AnonymousTypes.opt.il
  43. 879
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/AnonymousTypes.opt.mcs.il
  44. 814
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/AnonymousTypes.opt.roslyn.il
  45. 853
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/AnonymousTypes.roslyn.il
  46. 30
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/AssemblyCustomAttributes.il
  47. 30
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/AssemblyCustomAttributes.opt.il
  48. 34
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/AssemblyCustomAttributes.opt.roslyn.il
  49. 34
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/AssemblyCustomAttributes.roslyn.il
  50. 53
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.cs
  51. 1842
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.il
  52. 1645
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.opt.il
  53. 2010
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.opt.roslyn.il
  54. 2438
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.roslyn.il
  55. 205
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/AsyncMain.opt.roslyn.il
  56. 233
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/AsyncMain.roslyn.il
  57. 215
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/AutoProperties.opt.roslyn.il
  58. 223
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/AutoProperties.roslyn.il
  59. 5
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CS6_StringInterpolation.cs
  60. 1055
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CS6_StringInterpolation.opt.roslyn.il
  61. 1126
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CS6_StringInterpolation.roslyn.il
  62. 79
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CS72_PrivateProtected.opt.roslyn.il
  63. 82
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CS72_PrivateProtected.roslyn.il
  64. 1249
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CS73_StackAllocInitializers.opt.roslyn.il
  65. 1406
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CS73_StackAllocInitializers.roslyn.il
  66. 10
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CheckedUnchecked.cs
  67. 708
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CheckedUnchecked.il
  68. 611
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CheckedUnchecked.opt.il
  69. 653
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CheckedUnchecked.opt.roslyn.il
  70. 726
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CheckedUnchecked.roslyn.il
  71. 73
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.cs
  72. 22203
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.il
  73. 20360
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.opt.il
  74. 23706
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.opt.roslyn.il
  75. 26199
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.roslyn.il
  76. 25
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstantsTests.cs
  77. 169
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstantsTests.il
  78. 151
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstantsTests.opt.il
  79. 153
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstantsTests.opt.roslyn.il
  80. 172
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstantsTests.roslyn.il
  81. 88
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstructorInitializers.il
  82. 120
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstructorInitializers.mcs.il
  83. 87
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstructorInitializers.opt.il
  84. 120
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstructorInitializers.opt.mcs.il
  85. 91
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstructorInitializers.opt.roslyn.il
  86. 93
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstructorInitializers.roslyn.il
  87. 83
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeConflicts.cs
  88. 340
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeConflicts.il
  89. 332
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeConflicts.opt.il
  90. 336
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeConflicts.opt.roslyn.il
  91. 359
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeConflicts.roslyn.il
  92. 215
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeSamples.cs
  93. 1193
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeSamples.il
  94. 1071
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeSamples.opt.il
  95. 1081
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeSamples.opt.roslyn.il
  96. 1207
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeSamples.roslyn.il
  97. 356
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributes.il
  98. 340
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributes.opt.il
  99. 344
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributes.opt.roslyn.il
  100. 360
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributes.roslyn.il
  101. Some files were not shown because too many files have changed in this diff Show More

4
.editorconfig

@ -8,7 +8,9 @@ indent_size = 4 @@ -8,7 +8,9 @@ indent_size = 4
[*.il]
indent_style = space
indent_size = 2
[*.{yml,yaml}]
indent_style = space
indent_size = 2
[*.csproj]
indent_style = space
indent_size = 2

3
.gitignore vendored

@ -1,6 +1,7 @@ @@ -1,6 +1,7 @@
bin/
obj/
AppPackages/
BundleArtifacts/
/ICSharpCode.Decompiler/Properties/AssemblyInfo.cs
/ILSpy/Properties/AssemblyInfo.cs
/ILSpy/app.config

40
BuildTools/pipelines-install.ps1

@ -0,0 +1,40 @@ @@ -0,0 +1,40 @@
$ErrorActionPreference = "Stop"
$baseCommit = "d779383cb85003d6dabeb976f0845631e07bf463";
$baseCommitRev = 1;
# make sure this list matches artifacts-only branches list in azure-pipelines.yml!
$masterBranches = @("master", "3.2.x");
$globalAssemblyInfoTemplateFile = "ILSpy/Properties/AssemblyInfo.template.cs";
$versionParts = @{};
Get-Content $globalAssemblyInfoTemplateFile | where { $_ -match 'string (\w+) = "?(\w+)"?;' } | foreach { $versionParts.Add($Matches[1], $Matches[2]) }
$major = $versionParts.Major;
$minor = $versionParts.Minor;
$build = $versionParts.Build;
$versionName = $versionParts.VersionName;
if ($versionName -ne "null") {
$versionName = "-$versionName";
} else {
$versionName = "";
}
if ($masterBranches -contains $env:BUILD_SOURCEBRANCHNAME) {
$branch = "";
} else {
$branch = "-$env:BUILD_SOURCEBRANCHNAME";
}
if ($env:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER) {
$suffix = "-pr$env:SYSTEM_PULLREQUEST_PULLREQUESTNUMBER";
} else {
$suffix = "";
}
$revision = [Int32]::Parse((git rev-list --count "$baseCommit..HEAD")) + $baseCommitRev;
$newVersion="$major.$minor.$build.$revision";
$env:ILSPY_VERSION_NUMBER="$newVersion$branch$versionName$suffix";
Write-Host "##vso[build.updatebuildnumber]$newVersion$branch$versionName$suffix";
Write-Host "new version: $newVersion$branch$versionName$suffix";

2
BuildTools/tidy.py

@ -22,7 +22,7 @@ def main(): @@ -22,7 +22,7 @@ def main():
if '\\obj\\' in root:
continue
for filename in files:
if filename.lower().endswith('.cs'):
if filename.lower().endswith('.cs') and not filename.lower().endswith('resources.designer.cs'):
if not check(os.path.join(root, filename)):
ok = False
print('Tidy check: {}'.format('successful' if ok else 'failed'))

36
BuildTools/update-assemblyinfo.ps1

@ -57,8 +57,10 @@ function gitBranch() { @@ -57,8 +57,10 @@ function gitBranch() {
return "no-branch";
}
if ($env:APPVEYOR_REPO_BRANCH -ne $null) {
if ($env:APPVEYOR_REPO_BRANCH -ne $null) {
return $env:APPVEYOR_REPO_BRANCH;
} elseif ($env:BUILD_SOURCEBRANCHNAME -ne $null) {
return $env:BUILD_SOURCEBRANCHNAME;
} else {
return ((git branch --no-color).Split([System.Environment]::NewLine) | where { $_ -match "^\* " } | select -First 1).Substring(2);
}
@ -71,6 +73,12 @@ $templateFiles = ( @@ -71,6 +73,12 @@ $templateFiles = (
@{Input="ILSpy/Properties/app.config.template"; Output = "ILSpy/app.config"},
@{Input="ILSpy.AddIn/source.extension.vsixmanifest.template"; Output = "ILSpy.AddIn/source.extension.vsixmanifest"}
);
$appxmanifestFiles = (
@{Input="ILSpy.Package/Package.appxmanifest"; Output="ILSpy.Package/Package.appxmanifest"},
@{Input="ILSpy.Package/Package-CI.appxmanifest"; Output="ILSpy.Package/Package-CI.appxmanifest"}
);
[string]$mutexId = "ILSpyUpdateAssemblyInfo" + (Get-Location).ToString().GetHashCode();
Write-Host $mutexId;
[bool]$createdNew = $false;
@ -142,6 +150,32 @@ try { @@ -142,6 +150,32 @@ try {
$out | Out-File -Encoding utf8 $file.Output;
}
}
# Only update these on the Build Agent when ReleaseChannel is set
if($Env:ReleaseChannel -ne '' -and $Env:ReleaseChannel -ne $null) {
foreach ($file in $appxmanifestFiles) {
[string]$in = (Get-Content $file.Input) -Join [System.Environment]::NewLine;
$out = $in.Replace('$INSERTVERSION$', $fullVersionNumber);
$out = $out.Replace('$INSERTMAJORVERSION$', $major);
$out = $out.Replace('$INSERTMINORVERSION$', $minor);
$out = $out.Replace('$INSERTREVISION$', $revision);
$out = $out.Replace('$INSERTCOMMITHASH$', $gitCommitHash);
$out = $out.Replace('$INSERTSHORTCOMMITHASH$', $gitCommitHash.Substring(0, 8));
$out = $out.Replace('$INSERTDATE$', [System.DateTime]::Now.ToString("MM/dd/yyyy"));
$out = $out.Replace('$INSERTYEAR$', [System.DateTime]::Now.Year.ToString());
$out = $out.Replace('$INSERTBRANCHNAME$', $branchName);
$out = $out.Replace('$INSERTBRANCHPOSTFIX$', $postfixBranchName);
$out = $out.Replace('$INSERTVERSIONNAME$', $versionName);
$out = $out.Replace('$INSERTVERSIONNAMEPOSTFIX$', $postfixVersionName);
$out = $out.Replace('$INSERTBUILDCONFIG$', $buildConfig);
if (((Get-Content $file.Input) -Join [System.Environment]::NewLine) -ne $out) {
$out | Out-File -Encoding utf8 $file.Output;
}
}
}
} finally {
$mutex.ReleaseMutex();
$mutex.Close();

2
DecompilerNuGetDemos.workbook

@ -6,7 +6,7 @@ platforms: @@ -6,7 +6,7 @@ platforms:
- DotNetCore
packages:
- id: ICSharpCode.Decompiler
version: 4.0.0.4521
version: 5.0.0.5124
---
Setup: load the references required to work with the decompiler

9
ICSharpCode.Decompiler.Console/ICSharpCode.Decompiler.Console.csproj

@ -7,7 +7,7 @@ @@ -7,7 +7,7 @@
<PackAsTool>true</PackAsTool>
<AssemblyName>ilspycmd</AssemblyName>
<ToolCommandName>ilspycmd</ToolCommandName>
<Version>4.0</Version>
<Version>5.0.0.5124</Version>
<Description>Command-line decompiler using the ILSpy decompilation engine</Description>
<Copyright>Copyright 2011-2019 AlphaSierraPapa</Copyright>
<PackageProjectUrl>https://github.com/icsharpcode/ILSpy/</PackageProjectUrl>
@ -15,9 +15,10 @@ @@ -15,9 +15,10 @@
<PackageIconUrl>https://ilspy.net/images/icon32.png</PackageIconUrl>
<RepositoryUrl>https://github.com/icsharpcode/ILSpy/</RepositoryUrl>
<Company />
<AssemblyVersion>4.0.0.0</AssemblyVersion>
<FileVersion>4.0.0.0</FileVersion>
<AssemblyVersion>5.0.0.0</AssemblyVersion>
<FileVersion>5.0.0.0</FileVersion>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<Authors>ILSpy Team</Authors>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
@ -27,7 +28,7 @@ @@ -27,7 +28,7 @@
<ItemGroup>
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="2.3.2" />
<PackageReference Include="ICSharpCode.Decompiler" Version="4.0.0.4521" />
<PackageReference Include="ICSharpCode.Decompiler" Version="5.0.0.5124" />
<PackageReference Include="System.IO.FileSystem.Primitives" Version="4.3.0" />
<PackageReference Include="System.Runtime.Handles" Version="4.3.0" />

53
ICSharpCode.Decompiler.Console/IlspyCmdProgram.cs

@ -46,7 +46,7 @@ Remarks: @@ -46,7 +46,7 @@ Remarks:
public bool ShowILCodeFlag { get; }
[Option("-d|--debuginfo", "Generate PDB.", CommandOptionType.NoValue)]
public bool CreteDebugInfoFlag { get; }
public bool CreateDebugInfoFlag { get; }
[Option("-l|--list <entity-type(s)>", "Lists all entities of the specified type(s). Valid types: c(lass), i(interface), s(truct), d(elegate), e(num)", CommandOptionType.MultipleValue)]
public string[] EntityTypes { get; } = new string[0];
@ -54,6 +54,10 @@ Remarks: @@ -54,6 +54,10 @@ Remarks:
[Option("-v|--version", "Show version of ICSharpCode.Decompiler used.", CommandOptionType.NoValue)]
public bool ShowVersion { get; }
[DirectoryExists]
[Option("-r|--referencepath <path>", "Path to a directory containing dependencies of the assembly that is being decompiled.", CommandOptionType.MultipleValue)]
public string[] ReferencePaths { get; } = new string[0];
private int OnExecute(CommandLineApplication app)
{
TextWriter output = System.Console.Out;
@ -61,7 +65,7 @@ Remarks: @@ -61,7 +65,7 @@ Remarks:
try {
if (CreateCompilableProjectFlag) {
DecompileAsProject(InputAssemblyName, OutputDirectory);
DecompileAsProject(InputAssemblyName, OutputDirectory, ReferencePaths);
} else if (EntityTypes.Any()) {
var values = EntityTypes.SelectMany(v => v.Split(',', ';')).ToArray();
HashSet<TypeKind> kinds = TypesParser.ParseSelection(values);
@ -70,15 +74,15 @@ Remarks: @@ -70,15 +74,15 @@ Remarks:
output = File.CreateText(Path.Combine(OutputDirectory, outputName) + ".list.txt");
}
ListContent(InputAssemblyName, output, kinds);
ListContent(InputAssemblyName, output, kinds, ReferencePaths);
} else if (ShowILCodeFlag) {
if (outputDirectorySpecified) {
string outputName = Path.GetFileNameWithoutExtension(InputAssemblyName);
output = File.CreateText(Path.Combine(OutputDirectory, outputName) + ".il");
}
ShowIL(InputAssemblyName, output);
} else if (CreteDebugInfoFlag) {
ShowIL(InputAssemblyName, output, ReferencePaths);
} else if (CreateDebugInfoFlag) {
string pdbFileName = null;
if (outputDirectorySpecified) {
string outputName = Path.GetFileNameWithoutExtension(InputAssemblyName);
@ -87,7 +91,7 @@ Remarks: @@ -87,7 +91,7 @@ Remarks:
pdbFileName = Path.ChangeExtension(InputAssemblyName, ".pdb");
}
return GeneratePdbForAssembly(InputAssemblyName, pdbFileName, app);
return GeneratePdbForAssembly(InputAssemblyName, pdbFileName, ReferencePaths, app);
} else if (ShowVersion) {
string vInfo = "ilspycmd: " + typeof(ILSpyCmdProgram).Assembly.GetName().Version.ToString() +
Environment.NewLine
@ -101,7 +105,7 @@ Remarks: @@ -101,7 +105,7 @@ Remarks:
(String.IsNullOrEmpty(TypeName) ? outputName : TypeName) + ".decompiled.cs"));
}
Decompile(InputAssemblyName, output, TypeName);
Decompile(InputAssemblyName, output, ReferencePaths, TypeName);
}
} catch (Exception ex) {
app.Error.WriteLine(ex.ToString());
@ -113,14 +117,19 @@ Remarks: @@ -113,14 +117,19 @@ Remarks:
return 0;
}
static CSharpDecompiler GetDecompiler(string assemblyFileName)
static CSharpDecompiler GetDecompiler(string assemblyFileName, string[] referencePaths)
{
return new CSharpDecompiler(assemblyFileName, new DecompilerSettings() { ThrowOnAssemblyResolveErrors = false });
var module = new PEFile(assemblyFileName);
var resolver = new UniversalAssemblyResolver(assemblyFileName, false, module.Reader.DetectTargetFrameworkId());
foreach (var path in referencePaths) {
resolver.AddSearchDirectory(path);
}
return new CSharpDecompiler(assemblyFileName, resolver, new DecompilerSettings());
}
static void ListContent(string assemblyFileName, TextWriter output, ISet<TypeKind> kinds)
static void ListContent(string assemblyFileName, TextWriter output, ISet<TypeKind> kinds, string[] referencePaths)
{
CSharpDecompiler decompiler = GetDecompiler(assemblyFileName);
CSharpDecompiler decompiler = GetDecompiler(assemblyFileName, referencePaths);
foreach (var type in decompiler.TypeSystem.MainModule.TypeDefinitions) {
if (!kinds.Contains(type.Kind))
@ -129,9 +138,9 @@ Remarks: @@ -129,9 +138,9 @@ Remarks:
}
}
static void ShowIL(string assemblyFileName, TextWriter output)
static void ShowIL(string assemblyFileName, TextWriter output, string[] referencePaths)
{
CSharpDecompiler decompiler = GetDecompiler(assemblyFileName);
CSharpDecompiler decompiler = GetDecompiler(assemblyFileName, referencePaths);
ITextOutput textOutput = new PlainTextOutput();
ReflectionDisassembler disassembler = new ReflectionDisassembler(textOutput, CancellationToken.None);
@ -143,17 +152,21 @@ Remarks: @@ -143,17 +152,21 @@ Remarks:
output.WriteLine(textOutput.ToString());
}
static void DecompileAsProject(string assemblyFileName, string outputDirectory)
static void DecompileAsProject(string assemblyFileName, string outputDirectory, string[] referencePaths)
{
WholeProjectDecompiler decompiler = new WholeProjectDecompiler();
var decompiler = new WholeProjectDecompiler();
var module = new PEFile(assemblyFileName);
decompiler.AssemblyResolver = new UniversalAssemblyResolver(assemblyFileName, false, module.Reader.DetectTargetFrameworkId());
var resolver = new UniversalAssemblyResolver(assemblyFileName, false, module.Reader.DetectTargetFrameworkId());
foreach (var path in referencePaths) {
resolver.AddSearchDirectory(path);
}
decompiler.AssemblyResolver = resolver;
decompiler.DecompileProject(module, outputDirectory);
}
static void Decompile(string assemblyFileName, TextWriter output, string typeName = null)
static void Decompile(string assemblyFileName, TextWriter output, string[] referencePaths, string typeName = null)
{
CSharpDecompiler decompiler = GetDecompiler(assemblyFileName);
CSharpDecompiler decompiler = GetDecompiler(assemblyFileName, referencePaths);
if (typeName == null) {
output.Write(decompiler.DecompileWholeModuleAsString());
@ -163,7 +176,7 @@ Remarks: @@ -163,7 +176,7 @@ Remarks:
}
}
static int GeneratePdbForAssembly(string assemblyFileName, string pdbFileName, CommandLineApplication app)
static int GeneratePdbForAssembly(string assemblyFileName, string pdbFileName, string[] referencePaths, CommandLineApplication app)
{
var module = new PEFile(assemblyFileName,
new FileStream(assemblyFileName, FileMode.Open, FileAccess.Read),
@ -176,7 +189,7 @@ Remarks: @@ -176,7 +189,7 @@ Remarks:
}
using (FileStream stream = new FileStream(pdbFileName, FileMode.OpenOrCreate, FileAccess.Write)) {
var decompiler = GetDecompiler(assemblyFileName);
var decompiler = GetDecompiler(assemblyFileName, referencePaths);
PortablePdbWriter.WritePdb(module, decompiler, new DecompilerSettings() { ThrowOnAssemblyResolveErrors = false }, stream);
}

2
ICSharpCode.Decompiler.PowerShell/ICSharpCode.Decompiler.PowerShell.csproj

@ -8,7 +8,7 @@ @@ -8,7 +8,7 @@
<ItemGroup>
<PackageReference Include="PowerShellStandard.Library" Version="5.1.0" />
<PackageReference Include="ICSharpCode.Decompiler" Version="4.0.0.4521" />
<PackageReference Include="ICSharpCode.Decompiler" Version="5.0.0.5124" />
</ItemGroup>
</Project>

25
ICSharpCode.Decompiler.Tests/CorrectnessTestRunner.cs

@ -196,12 +196,6 @@ namespace ICSharpCode.Decompiler.Tests @@ -196,12 +196,6 @@ namespace ICSharpCode.Decompiler.Tests
RunCS(options: options);
}
[Test]
public void RefLocalsAndReturns([ValueSource("roslynOnlyOptions")] CompilerOptions options)
{
RunCS(options: options);
}
[Test]
public void BitNot([Values(false, true)] bool force32Bit)
{
@ -295,12 +289,6 @@ namespace ICSharpCode.Decompiler.Tests @@ -295,12 +289,6 @@ namespace ICSharpCode.Decompiler.Tests
RunCS(options: options);
}
[Test]
public void LocalFunctions([ValueSource(nameof(roslynOnlyOptions))] CompilerOptions options)
{
RunCS(options: options);
}
void RunCS([CallerMemberName] string testName = null, CompilerOptions options = CompilerOptions.UseDebug)
{
string testFileName = testName + ".cs";
@ -329,8 +317,8 @@ namespace ICSharpCode.Decompiler.Tests @@ -329,8 +317,8 @@ namespace ICSharpCode.Decompiler.Tests
Tester.RunAndCompareOutput(testFileName, outputFile.PathToAssembly, decompiledOutputFile.PathToAssembly, decompiledCodeFile);
File.Delete(decompiledCodeFile);
File.Delete(decompiledOutputFile.PathToAssembly);
Tester.RepeatOnIOError(() => File.Delete(decompiledCodeFile));
Tester.RepeatOnIOError(() => File.Delete(decompiledOutputFile.PathToAssembly));
} finally {
if (outputFile != null)
outputFile.TempFiles.Delete();
@ -341,6 +329,7 @@ namespace ICSharpCode.Decompiler.Tests @@ -341,6 +329,7 @@ namespace ICSharpCode.Decompiler.Tests
void RunVB([CallerMemberName] string testName = null, CompilerOptions options = CompilerOptions.UseDebug)
{
options |= CompilerOptions.ReferenceVisualBasic;
string testFileName = testName + ".vb";
string testOutputFileName = testName + Tester.GetSuffix(options) + ".exe";
CompilerResults outputFile = null, decompiledOutputFile = null;
@ -353,8 +342,8 @@ namespace ICSharpCode.Decompiler.Tests @@ -353,8 +342,8 @@ namespace ICSharpCode.Decompiler.Tests
Tester.RunAndCompareOutput(testFileName, outputFile.PathToAssembly, decompiledOutputFile.PathToAssembly, decompiledCodeFile);
File.Delete(decompiledCodeFile);
File.Delete(decompiledOutputFile.PathToAssembly);
Tester.RepeatOnIOError(() => File.Delete(decompiledCodeFile));
Tester.RepeatOnIOError(() => File.Delete(decompiledOutputFile.PathToAssembly));
} finally {
if (outputFile != null)
outputFile.TempFiles.Delete();
@ -375,8 +364,8 @@ namespace ICSharpCode.Decompiler.Tests @@ -375,8 +364,8 @@ namespace ICSharpCode.Decompiler.Tests
Tester.RunAndCompareOutput(testFileName, outputFile, decompiledOutputFile.PathToAssembly, decompiledCodeFile);
File.Delete(decompiledCodeFile);
File.Delete(decompiledOutputFile.PathToAssembly);
Tester.RepeatOnIOError(() => File.Delete(decompiledCodeFile));
Tester.RepeatOnIOError(() => File.Delete(decompiledOutputFile.PathToAssembly));
} finally {
if (decompiledOutputFile != null)
decompiledOutputFile.TempFiles.Delete();

68
ICSharpCode.Decompiler.Tests/Helpers/CodeAssert.cs

@ -36,44 +36,72 @@ namespace ICSharpCode.Decompiler.Tests.Helpers @@ -36,44 +36,72 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
);
var alignedDiff = Diff.AlignElements(collection1, collection2, diffSections, new StringSimilarityDiffElementAligner());
bool result = true, ignoreChange;
bool result = true;
int line1 = 0, line2 = 0;
const int contextSize = 10;
int consecutiveMatches = contextSize;
var hiddenMatches = new List<string>();
foreach (var change in alignedDiff) {
switch (change.Operation) {
case DiffOperation.Match:
diff.Write("{0,4} {1,4} ", ++line1, ++line2);
diff.Write(" ");
diff.WriteLine(change.ElementFromCollection1.Value);
AppendMatch($"{++line1,4} {++line2,4} ", change.ElementFromCollection1.Value);
break;
case DiffOperation.Insert:
diff.Write(" {1,4} ", line1, ++line2);
result &= ignoreChange = ShouldIgnoreChange(change.ElementFromCollection2.Value);
diff.Write(ignoreChange ? " " : " + ");
diff.WriteLine(change.ElementFromCollection2.Value);
string pos = $" {++line2,4} ";
if (ShouldIgnoreChange(change.ElementFromCollection2.Value)) {
AppendMatch(pos, change.ElementFromCollection2.Value);
} else {
AppendDelta(pos, " + ", change.ElementFromCollection2.Value);
result = false;
}
break;
case DiffOperation.Delete:
diff.Write("{0,4} ", ++line1, line2);
result &= ignoreChange = ShouldIgnoreChange(change.ElementFromCollection1.Value);
diff.Write(ignoreChange ? " " : " - ");
diff.WriteLine(change.ElementFromCollection1.Value);
pos = $"{++line1,4} ";
if (ShouldIgnoreChange(change.ElementFromCollection1.Value)) {
AppendMatch(pos, change.ElementFromCollection1.Value);
} else {
AppendDelta(pos, " - ", change.ElementFromCollection1.Value);
result = false;
}
break;
case DiffOperation.Modify:
case DiffOperation.Replace:
diff.Write("{0,4} ", ++line1, line2);
AppendDelta($"{++line1,4} ", "(-)", change.ElementFromCollection1.Value);
AppendDelta($" {++line2,4} ", "(+)", change.ElementFromCollection2.Value);
result = false;
diff.Write("(-) ");
diff.WriteLine(change.ElementFromCollection1.Value);
diff.Write(" {1,4} ", line1, ++line2);
diff.Write("(+) ");
diff.WriteLine(change.ElementFromCollection2.Value);
break;
}
}
if (hiddenMatches.Count > 0) {
diff.WriteLine(" ...");
}
return result;
void AppendMatch(string pos, string code)
{
consecutiveMatches++;
if (consecutiveMatches > contextSize) {
// hide this match
hiddenMatches.Add(pos + " " + code);
} else {
diff.WriteLine(pos + " " + code);
}
}
void AppendDelta(string pos, string changeType, string code)
{
consecutiveMatches = 0;
if (hiddenMatches.Count > contextSize) {
diff.WriteLine(" ...");
}
for (int i = Math.Max(0, hiddenMatches.Count - contextSize); i < hiddenMatches.Count; i++) {
diff.WriteLine(hiddenMatches[i]);
}
hiddenMatches.Clear();
diff.WriteLine(pos + changeType + " " + code);
}
}
class CodeLineEqualityComparer : IEqualityComparer<string>

5
ICSharpCode.Decompiler.Tests/Helpers/RemoveCompilerAttribute.cs

@ -33,11 +33,14 @@ namespace ICSharpCode.Decompiler.Tests.Helpers @@ -33,11 +33,14 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
}
}
public class RemoveEmbeddedAtttributes : DepthFirstAstVisitor, IAstTransform
public class RemoveEmbeddedAttributes : DepthFirstAstVisitor, IAstTransform
{
HashSet<string> attributeNames = new HashSet<string>() {
"System.Runtime.CompilerServices.IsReadOnlyAttribute",
"System.Runtime.CompilerServices.IsByRefLikeAttribute",
"System.Runtime.CompilerServices.IsUnmanagedAttribute",
"System.Runtime.CompilerServices.NullableAttribute",
"System.Runtime.CompilerServices.NullableContextAttribute",
"Microsoft.CodeAnalysis.EmbeddedAttribute",
};

15
ICSharpCode.Decompiler.Tests/Helpers/Tester.VB.cs

@ -5,6 +5,7 @@ using System.IO; @@ -5,6 +5,7 @@ using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.CodeAnalysis;
using Microsoft.CodeAnalysis.VisualBasic;
@ -26,8 +27,12 @@ namespace ICSharpCode.Decompiler.Tests.Helpers @@ -26,8 +27,12 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
if (flags.HasFlag(CompilerOptions.UseRoslyn)) {
var parseOptions = new VisualBasicParseOptions(preprocessorSymbols: preprocessorSymbols, languageVersion: LanguageVersion.Latest);
var syntaxTrees = sourceFileNames.Select(f => SyntaxFactory.ParseSyntaxTree(File.ReadAllText(f), parseOptions, path: f));
var references = defaultReferences.Value;
if (flags.HasFlag(CompilerOptions.ReferenceVisualBasic)) {
references = references.Concat(visualBasic.Value);
}
var compilation = VisualBasicCompilation.Create(Path.GetFileNameWithoutExtension(sourceFileName),
syntaxTrees, defaultReferences.Value,
syntaxTrees, references,
new VisualBasicCompilationOptions(
flags.HasFlag(CompilerOptions.Library) ? OutputKind.DynamicallyLinkedLibrary : OutputKind.ConsoleApplication,
platform: flags.HasFlag(CompilerOptions.Force32Bit) ? Platform.X86 : Platform.AnyCpu,
@ -51,10 +56,10 @@ namespace ICSharpCode.Decompiler.Tests.Helpers @@ -51,10 +56,10 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
var provider = new VBCodeProvider(new Dictionary<string, string> { { "CompilerVersion", "v4.0" } });
CompilerParameters options = new CompilerParameters();
options.GenerateExecutable = !flags.HasFlag(CompilerOptions.Library);
options.CompilerOptions = "/o" + (flags.HasFlag(CompilerOptions.Optimize) ? "+" : "-");
options.CompilerOptions = "/optimize" + (flags.HasFlag(CompilerOptions.Optimize) ? "+" : "-");
options.CompilerOptions += (flags.HasFlag(CompilerOptions.UseDebug) ? " /debug" : "");
options.CompilerOptions += (flags.HasFlag(CompilerOptions.Force32Bit) ? " /platform:anycpu32bitpreferred" : "");
options.CompilerOptions += "/optioninfer+ /optionexplicit+";
options.CompilerOptions += " /optioninfer+ /optionexplicit+";
if (preprocessorSymbols.Count > 0) {
options.CompilerOptions += " /d:" + string.Join(",", preprocessorSymbols.Select(p => $"{p.Key}={p.Value}"));
}
@ -65,7 +70,9 @@ namespace ICSharpCode.Decompiler.Tests.Helpers @@ -65,7 +70,9 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
options.ReferencedAssemblies.Add("System.dll");
options.ReferencedAssemblies.Add("System.Core.dll");
options.ReferencedAssemblies.Add("System.Xml.dll");
options.ReferencedAssemblies.Add("Microsoft.VisualBasic.dll");
if (flags.HasFlag(CompilerOptions.ReferenceVisualBasic)) {
options.ReferencedAssemblies.Add("Microsoft.VisualBasic.dll");
}
CompilerResults results = provider.CompileAssemblyFromFile(options, sourceFileNames.ToArray());
if (results.Errors.Cast<CompilerError>().Any(e => !e.IsWarning)) {
StringBuilder b = new StringBuilder("Compiler error:");

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

@ -54,6 +54,7 @@ namespace ICSharpCode.Decompiler.Tests.Helpers @@ -54,6 +54,7 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
Library = 0x8,
UseRoslyn = 0x10,
UseMcs = 0x20,
ReferenceVisualBasic = 0x40,
}
[Flags]
@ -181,23 +182,32 @@ namespace ICSharpCode.Decompiler.Tests.Helpers @@ -181,23 +182,32 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
return Regex.Replace(il, @"'<PrivateImplementationDetails>\{[0-9A-F-]+\}'", "'<PrivateImplementationDetails>'");
}
static readonly string refAsmPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86),
@"Reference Assemblies\Microsoft\Framework\.NETFramework\v4.7.2");
static readonly string thisAsmPath = Path.GetDirectoryName(typeof(Tester).Assembly.Location);
static readonly Lazy<IEnumerable<MetadataReference>> defaultReferences = new Lazy<IEnumerable<MetadataReference>>(delegate {
string refAsmPath = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.ProgramFilesX86),
@"Reference Assemblies\Microsoft\Framework\.NETFramework\v4.5");
return new[]
{
MetadataReference.CreateFromFile(Path.Combine(refAsmPath, "Facades\\netstandard.dll")),
MetadataReference.CreateFromFile(Path.Combine(refAsmPath, "mscorlib.dll")),
MetadataReference.CreateFromFile(Path.Combine(refAsmPath, "System.dll")),
MetadataReference.CreateFromFile(Path.Combine(refAsmPath, "System.Core.dll")),
MetadataReference.CreateFromFile(Path.Combine(refAsmPath, @"Facades\System.Runtime.dll")),
MetadataReference.CreateFromFile(Path.Combine(refAsmPath, "System.Xml.dll")),
MetadataReference.CreateFromFile(Path.Combine(refAsmPath, "Microsoft.CSharp.dll")),
MetadataReference.CreateFromFile(Path.Combine(refAsmPath, "Microsoft.VisualBasic.dll")),
MetadataReference.CreateFromFile(typeof(ValueTuple).Assembly.Location),
MetadataReference.CreateFromFile(typeof(ValueTask).Assembly.Location),
MetadataReference.CreateFromFile(typeof(Span<>).Assembly.Location),
};
});
static readonly Lazy<IEnumerable<MetadataReference>> visualBasic = new Lazy<IEnumerable<MetadataReference>>(delegate {
return new[] {
MetadataReference.CreateFromFile(Path.Combine(refAsmPath, "Microsoft.VisualBasic.dll"))
};
});
public static List<string> GetPreprocessorSymbols(CompilerOptions flags)
{
var preprocessorSymbols = new List<string>();
@ -236,10 +246,17 @@ namespace ICSharpCode.Decompiler.Tests.Helpers @@ -236,10 +246,17 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
var preprocessorSymbols = GetPreprocessorSymbols(flags);
if (flags.HasFlag(CompilerOptions.UseRoslyn)) {
var parseOptions = new CSharpParseOptions(preprocessorSymbols: preprocessorSymbols.ToArray(), languageVersion: Microsoft.CodeAnalysis.CSharp.LanguageVersion.Latest);
var parseOptions = new CSharpParseOptions(
preprocessorSymbols: preprocessorSymbols.ToArray(),
languageVersion: Microsoft.CodeAnalysis.CSharp.LanguageVersion.CSharp8
);
var syntaxTrees = sourceFileNames.Select(f => SyntaxFactory.ParseSyntaxTree(File.ReadAllText(f), parseOptions, path: f));
var references = defaultReferences.Value;
if (flags.HasFlag(CompilerOptions.ReferenceVisualBasic)) {
references = references.Concat(visualBasic.Value);
}
var compilation = CSharpCompilation.Create(Path.GetFileNameWithoutExtension(sourceFileName),
syntaxTrees, defaultReferences.Value,
syntaxTrees, references,
new CSharpCompilationOptions(
flags.HasFlag(CompilerOptions.Library) ? OutputKind.DynamicallyLinkedLibrary : OutputKind.ConsoleApplication,
platform: flags.HasFlag(CompilerOptions.Force32Bit) ? Platform.X86 : Platform.AnyCpu,
@ -326,7 +343,9 @@ namespace ICSharpCode.Decompiler.Tests.Helpers @@ -326,7 +343,9 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
options.ReferencedAssemblies.Add("System.Core.dll");
options.ReferencedAssemblies.Add("System.Xml.dll");
options.ReferencedAssemblies.Add("Microsoft.CSharp.dll");
options.ReferencedAssemblies.Add("Microsoft.VisualBasic.dll");
if (flags.HasFlag(CompilerOptions.ReferenceVisualBasic)) {
options.ReferencedAssemblies.Add("Microsoft.VisualBasic.dll");
}
CompilerResults results = provider.CompileAssemblyFromFile(options, sourceFileNames.ToArray());
if (results.Errors.Cast<CompilerError>().Any(e => !e.IsWarning)) {
StringBuilder b = new StringBuilder("Compiler error:");
@ -431,10 +450,10 @@ namespace ICSharpCode.Decompiler.Tests.Helpers @@ -431,10 +450,10 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
resolver.AddSearchDirectory(Path.GetDirectoryName(typeof(Span<>).Assembly.Location));
var typeSystem = new DecompilerTypeSystem(module, resolver, settings);
CSharpDecompiler decompiler = new CSharpDecompiler(typeSystem, settings);
decompiler.AstTransforms.Insert(0, new RemoveEmbeddedAtttributes());
decompiler.AstTransforms.Insert(0, new RemoveEmbeddedAttributes());
decompiler.AstTransforms.Insert(0, new RemoveCompilerAttribute());
decompiler.AstTransforms.Add(new EscapeInvalidIdentifiers());
var syntaxTree = decompiler.DecompileWholeModuleAsSingleFile();
var syntaxTree = decompiler.DecompileWholeModuleAsSingleFile(sortTypes: true);
StringWriter output = new StringWriter();
var visitor = new CSharpOutputVisitor(output, FormattingOptionsFactory.CreateSharpDevelop());
@ -500,5 +519,43 @@ namespace ICSharpCode.Decompiler.Tests.Helpers @@ -500,5 +519,43 @@ namespace ICSharpCode.Decompiler.Tests.Helpers
Assert.Fail(b.ToString());
}
}
internal static void RepeatOnIOError(Action action, int numTries = 5)
{
for (int i = 0; i < numTries - 1; i++) {
try {
action();
return;
} catch (IOException) {
} catch (UnauthorizedAccessException) {
// potential virus scanner problem
}
Thread.Sleep(10);
}
// If the last try still fails, don't catch the exception
action();
}
public static void SignAssembly(string assemblyPath, string keyFilePath)
{
string snPath = SdkUtility.GetSdkPath("sn.exe");
ProcessStartInfo info = new ProcessStartInfo(snPath);
info.Arguments = $"-R \"{assemblyPath}\" \"{keyFilePath}\"";
info.RedirectStandardError = true;
info.RedirectStandardOutput = true;
info.UseShellExecute = false;
Process process = Process.Start(info);
var outputTask = process.StandardOutput.ReadToEndAsync();
var errorTask = process.StandardError.ReadToEndAsync();
Task.WaitAll(outputTask, errorTask);
process.WaitForExit();
Console.WriteLine("output: " + outputTask.Result);
Console.WriteLine("errors: " + errorTask.Result);
}
}
}

48
ICSharpCode.Decompiler.Tests/ICSharpCode.Decompiler.Tests.csproj

@ -2,12 +2,12 @@ @@ -2,12 +2,12 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net462</TargetFramework>
<TargetFramework>net472</TargetFramework>
<LangVersion>7.3</LangVersion>
<AllowUnsafeBlocks>True</AllowUnsafeBlocks>
<NoWarn>1701;1702;1705,67,169,1058,728,1720,649,168,251</NoWarn>
<NoWarn>1701;1702;1705,67,169,1058,728,1720,649,168,251,660,661,675</NoWarn>
<GenerateAssemblyInfo>False</GenerateAssemblyInfo>
@ -32,18 +32,23 @@ @@ -32,18 +32,23 @@
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DefineConstants>TRACE;DEBUG;NET46;ROSLYN;CS60;CS70</DefineConstants>
<DefineConstants>TRACE;DEBUG;NET46;ROSLYN;CS60;CS70;CS71;CS72;CS73</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|AnyCPU'">
<DefineConstants>TRACE;NET46;ROSLYN;CS60;CS70;CS71;CS72;CS73</DefineConstants>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DiffLib" Version="2017.7.26.1241" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="2.10.0" />
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic" Version="2.10.0" />
<PackageReference Include="Microsoft.Build.Locator" Version="1.2.2" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="3.3.0-beta1-final" />
<PackageReference Include="Microsoft.CodeAnalysis.VisualBasic" Version="3.3.0-beta1-final" />
<PackageReference Include="Microsoft.DiaSymReader.Converter.Xml" Version="1.1.0-beta1-63314-01" />
<PackageReference Include="NUnit3TestAdapter" Version="3.11.2" />
<PackageReference Include="NUnit3TestAdapter" Version="3.13.0" />
<PackageReference Include="System.Collections.Immutable" Version="1.5.0" />
<PackageReference Include="NUnit" Version="3.11.0" />
<PackageReference Include="System.Memory" Version="4.5.1" />
<PackageReference Include="NUnit" Version="3.12.0" />
<PackageReference Include="System.Memory" Version="4.5.3" />
</ItemGroup>
<ItemGroup>
@ -55,11 +60,18 @@ @@ -55,11 +60,18 @@
<None Include="TestCases\Correctness\StackTests.il" />
<None Include="TestCases\Correctness\StackTypes.il" />
<None Include="TestCases\Correctness\Uninit.vb" />
<None Include="TestCases\ILPretty\ConstantBlobs.il" />
<None Include="TestCases\ILPretty\CS1xSwitch_Debug.il" />
<None Include="TestCases\ILPretty\CS1xSwitch_Release.il" />
<None Include="TestCases\ILPretty\Issue1157.il" />
<None Include="TestCases\ILPretty\Issue684.cs" />
<None Include="TestCases\ILPretty\Issue684.il" />
<None Include="TestCases\ILPretty\FSharpLoops.fs" />
<None Include="TestCases\ILPretty\FSharpLoops_Debug.il" />
<None Include="TestCases\ILPretty\FSharpLoops_Release.il" />
<None Include="TestCases\ILPretty\FSharpUsing.fs" />
<None Include="TestCases\ILPretty\FSharpUsing_Debug.il" />
<None Include="TestCases\ILPretty\DirectCallToExplicitInterfaceImpl.il" />
<None Include="TestCases\ILPretty\FSharpUsing_Release.il" />
<None Include="TestCases\Correctness\BitNot.il" />
<None Include="TestCases\Correctness\Readme.txt" />
@ -67,19 +79,34 @@ @@ -67,19 +79,34 @@
<ItemGroup>
<Compile Include="DisassemblerPrettyTestRunner.cs" />
<Compile Include="TestCases\ILPretty\ConstantBlobs.cs" />
<Compile Include="TestCases\Pretty\OutVariables.cs" />
<Compile Include="TestCases\Pretty\CustomTaskType.cs" />
<None Include="TestCases\VBPretty\VBCompoundAssign.cs" />
<Compile Include="TestCases\Pretty\ThrowExpressions.cs" />
<None Include="TestCases\ILPretty\Issue1145.cs" />
<Compile Include="TestCases\ILPretty\Issue1157.cs" />
<None Include="TestCases\ILPretty\Unsafe.cs" />
<None Include="TestCases\ILPretty\CS1xSwitch_Debug.cs" />
<None Include="TestCases\ILPretty\CS1xSwitch_Release.cs" />
<None Include="TestCases\ILPretty\DirectCallToExplicitInterfaceImpl.cs" />
<Compile Include="TestCases\ILPretty\Issue1389.cs" />
<Compile Include="TestCases\ILPretty\Issue1454.cs" />
<Compile Include="TestCases\Pretty\Discards.cs" />
<Compile Include="TestCases\Pretty\MultidimensionalArray.cs" />
<Compile Include="Output\CSharpAmbienceTests.cs" />
<Compile Include="Semantics\ConversionTests.cs" />
<Compile Include="Semantics\ExplicitConversionTest.cs" />
<Compile Include="Semantics\OverloadResolutionTests.cs" />
<Compile Include="DataFlowTest.cs" />
<Compile Include="TestCases\Correctness\LocalFunctions.cs" />
<Compile Include="TestCases\Correctness\RefLocalsAndReturns.cs" />
<Compile Include="TestCases\Pretty\LocalFunctions.cs" />
<Compile Include="TestCases\ILPretty\Issue1256.cs" />
<Compile Include="TestCases\ILPretty\Issue1323.cs" />
<Compile Include="TestCases\Pretty\CustomAttributes2.cs" />
<Compile Include="TestCases\Pretty\EnumTests.cs" />
<Compile Include="TestCases\Pretty\UserDefinedConversions.cs" />
<None Include="TestCases\ILPretty\Unsafe.il" />
<None Include="TestCases\Pretty\NullableRefTypes.cs" />
<Compile Include="TestCases\Pretty\TypeMemberTests.cs" />
<Compile Include="TestCases\Pretty\ValueTypes.cs" />
<None Include="TestCases\ILPretty\Issue1389.il" />
@ -219,6 +246,7 @@ @@ -219,6 +246,7 @@
<None Include="TestCases\ILPretty\Issue379.il" />
<None Include="TestCases\ILPretty\Issue982.il" />
<None Include="TestCases\Pretty\Readme.txt" />
<None Include="TestCases\VBPretty\VBCompoundAssign.vb" />
<None Include="TestCases\VBPretty\Async.vb" />
</ItemGroup>

44
ICSharpCode.Decompiler.Tests/ILPrettyTestRunner.cs

@ -58,6 +58,12 @@ namespace ICSharpCode.Decompiler.Tests @@ -58,6 +58,12 @@ namespace ICSharpCode.Decompiler.Tests
Run();
}
[Test]
public void Issue684()
{
Run();
}
[Test]
public void Issue959()
{
@ -91,13 +97,19 @@ namespace ICSharpCode.Decompiler.Tests @@ -91,13 +97,19 @@ namespace ICSharpCode.Decompiler.Tests
[Test]
public void FSharpUsing_Debug()
{
Run(settings: new DecompilerSettings { RemoveDeadCode = true });
Run(settings: new DecompilerSettings { RemoveDeadStores = true });
}
[Test]
public void FSharpUsing_Release()
{
Run(settings: new DecompilerSettings { RemoveDeadCode = true });
Run(settings: new DecompilerSettings { RemoveDeadStores = true });
}
[Test]
public void DirectCallToExplicitInterfaceImpl()
{
Run();
}
[Test]
@ -142,24 +154,48 @@ namespace ICSharpCode.Decompiler.Tests @@ -142,24 +154,48 @@ namespace ICSharpCode.Decompiler.Tests
Run();
}
[Test]
public void Issue1681()
{
Run();
}
[Test]
public void Issue1454()
{
Run();
}
[Test]
public void ConstantBlobs()
{
Run();
}
[Test]
public void SequenceOfNestedIfs()
{
Run();
}
[Test]
public void Unsafe()
{
Run();
}
[Test]
public void FSharpLoops_Debug()
{
CopyFSharpCoreDll();
Run(settings: new DecompilerSettings { RemoveDeadCode = true });
Run(settings: new DecompilerSettings { RemoveDeadStores = true });
}
[Test]
public void FSharpLoops_Release()
{
CopyFSharpCoreDll();
Run(settings: new DecompilerSettings { RemoveDeadCode = true });
Run(settings: new DecompilerSettings { RemoveDeadStores = true });
}
void Run([CallerMemberName] string testName = null, DecompilerSettings settings = null)

2
ICSharpCode.Decompiler.Tests/PdbGenerationTestRunner.cs

@ -18,7 +18,7 @@ using NUnit.Framework; @@ -18,7 +18,7 @@ using NUnit.Framework;
namespace ICSharpCode.Decompiler.Tests
{
[TestFixture]
[TestFixture, Parallelizable(ParallelScope.All)]
public class PdbGenerationTestRunner
{
static readonly string TestCasePath = Tester.TestCasePath + "/PdbGen";

88
ICSharpCode.Decompiler.Tests/PrettyTestRunner.cs

@ -114,7 +114,7 @@ namespace ICSharpCode.Decompiler.Tests @@ -114,7 +114,7 @@ namespace ICSharpCode.Decompiler.Tests
RunForLibrary(cscOptions: cscOptions, decompilerSettings: new DecompilerSettings {
NullPropagation = false,
// legacy csc generates a dead store in debug builds
RemoveDeadCode = (cscOptions == CompilerOptions.None)
RemoveDeadStores = (cscOptions == CompilerOptions.None)
});
}
@ -123,7 +123,7 @@ namespace ICSharpCode.Decompiler.Tests @@ -123,7 +123,7 @@ namespace ICSharpCode.Decompiler.Tests
{
RunForLibrary(cscOptions: cscOptions, decompilerSettings: new DecompilerSettings {
// legacy csc generates a dead store in debug builds
RemoveDeadCode = (cscOptions == CompilerOptions.None)
RemoveDeadStores = (cscOptions == CompilerOptions.None)
});
}
@ -134,7 +134,7 @@ namespace ICSharpCode.Decompiler.Tests @@ -134,7 +134,7 @@ namespace ICSharpCode.Decompiler.Tests
}
[Test]
public void DelegateConstruction([ValueSource(nameof(defaultOptions))] CompilerOptions cscOptions)
public void DelegateConstruction([ValueSource(nameof(defaultOptionsWithMcs))] CompilerOptions cscOptions)
{
RunForLibrary(cscOptions: cscOptions);
}
@ -180,10 +180,16 @@ namespace ICSharpCode.Decompiler.Tests @@ -180,10 +180,16 @@ namespace ICSharpCode.Decompiler.Tests
{
RunForLibrary(cscOptions: cscOptions, decompilerSettings: new DecompilerSettings {
// legacy csc generates a dead store in debug builds
RemoveDeadCode = (cscOptions == CompilerOptions.None)
RemoveDeadStores = (cscOptions == CompilerOptions.None)
});
}
[Test]
public void LocalFunctions([ValueSource(nameof(roslynOnlyOptions))] CompilerOptions cscOptions)
{
RunForLibrary(cscOptions: cscOptions);
}
[Test]
public void PropertiesAndEvents([ValueSource(nameof(defaultOptions))] CompilerOptions cscOptions)
{
@ -233,6 +239,12 @@ namespace ICSharpCode.Decompiler.Tests @@ -233,6 +239,12 @@ namespace ICSharpCode.Decompiler.Tests
RunForLibrary(cscOptions: cscOptions, asmOptions: AssemblerOptions.UseOwnDisassembler);
}
[Test]
public void OutVariables([ValueSource(nameof(roslynOnlyOptions))] CompilerOptions cscOptions)
{
RunForLibrary(cscOptions: cscOptions);
}
[Test]
public void InitializerTests([ValueSource(nameof(defaultOptions))] CompilerOptions cscOptions)
{
@ -252,13 +264,12 @@ namespace ICSharpCode.Decompiler.Tests @@ -252,13 +264,12 @@ namespace ICSharpCode.Decompiler.Tests
}
[Test]
public void FixProxyCalls([Values(CompilerOptions.None, CompilerOptions.Optimize, CompilerOptions.UseRoslyn)] CompilerOptions cscOptions)
public void FixProxyCalls([ValueSource(nameof(defaultOptions))] CompilerOptions cscOptions)
{
RunForLibrary(cscOptions: cscOptions);
}
[Test]
[Ignore("Special cases not implemented in new decompiler.")]
public void ValueTypes([ValueSource(nameof(defaultOptions))] CompilerOptions cscOptions)
{
RunForLibrary(cscOptions: cscOptions);
@ -273,7 +284,9 @@ namespace ICSharpCode.Decompiler.Tests @@ -273,7 +284,9 @@ namespace ICSharpCode.Decompiler.Tests
[Test]
public void VariableNamingWithoutSymbols([ValueSource(nameof(defaultOptions))] CompilerOptions cscOptions)
{
RunForLibrary(cscOptions: cscOptions, decompilerSettings: new DecompilerSettings { UseDebugSymbols = false });
var settings = Tester.GetSettings(cscOptions);
settings.UseDebugSymbols = false;
RunForLibrary(cscOptions: cscOptions, decompilerSettings: settings);
}
[Test]
@ -288,6 +301,18 @@ namespace ICSharpCode.Decompiler.Tests @@ -288,6 +301,18 @@ namespace ICSharpCode.Decompiler.Tests
Run(cscOptions: cscOptions);
}
[Test]
public void CustomTaskType([ValueSource(nameof(roslynOnlyOptions))] CompilerOptions cscOptions)
{
RunForLibrary(cscOptions: cscOptions);
}
[Test]
public void NullableRefTypes([ValueSource(nameof(roslynOnlyOptions))] CompilerOptions cscOptions)
{
RunForLibrary(cscOptions: cscOptions);
}
[Test]
public void NullPropagation([ValueSource(nameof(roslynOnlyOptions))] CompilerOptions cscOptions)
{
@ -312,6 +337,12 @@ namespace ICSharpCode.Decompiler.Tests @@ -312,6 +337,12 @@ namespace ICSharpCode.Decompiler.Tests
RunForLibrary(cscOptions: cscOptions);
}
[Test]
public void ThrowExpressions([ValueSource(nameof(roslynOnlyOptions))] CompilerOptions cscOptions)
{
RunForLibrary(cscOptions: cscOptions);
}
[Test]
public void WellKnownConstants([ValueSource(nameof(defaultOptions))] CompilerOptions cscOptions)
{
@ -415,7 +446,19 @@ namespace ICSharpCode.Decompiler.Tests @@ -415,7 +446,19 @@ namespace ICSharpCode.Decompiler.Tests
}
[Test]
public void YieldReturn([ValueSource(nameof(defaultOptions))] CompilerOptions cscOptions)
public void YieldReturn([ValueSource(nameof(defaultOptionsWithMcs))] CompilerOptions cscOptions)
{
RunForLibrary(cscOptions: cscOptions);
}
[Test]
public void UserDefinedConversions([ValueSource(nameof(defaultOptions))] CompilerOptions cscOptions)
{
RunForLibrary(cscOptions: cscOptions);
}
[Test]
public void Discards([ValueSource(nameof(roslynOnlyOptions))] CompilerOptions cscOptions)
{
RunForLibrary(cscOptions: cscOptions);
}
@ -427,26 +470,25 @@ namespace ICSharpCode.Decompiler.Tests @@ -427,26 +470,25 @@ namespace ICSharpCode.Decompiler.Tests
void Run([CallerMemberName] string testName = null, AssemblerOptions asmOptions = AssemblerOptions.None, 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 exeFile = Path.Combine(TestCasePath, testName) + Tester.GetSuffix(cscOptions) + ".exe";
if (cscOptions.HasFlag(CompilerOptions.Library)) {
exeFile = Path.ChangeExtension(exeFile, ".dll");
}
if (!File.Exists(ilFile)) {
// re-create .il file if necessary
CompilerResults output = null;
try {
string outputFile = Path.ChangeExtension(ilFile,
cscOptions.HasFlag(CompilerOptions.Library) ? ".dll" : ".exe");
output = Tester.CompileCSharp(csFile, cscOptions, outputFile);
Tester.Disassemble(output.PathToAssembly, ilFile, asmOptions);
} finally {
if (output != null)
output.TempFiles.Delete();
}
// 1. Compile
CompilerResults output = null;
try {
output = Tester.CompileCSharp(csFile, cscOptions, exeFile);
} finally {
if (output != null)
output.TempFiles.Delete();
}
var executable = Tester.AssembleIL(ilFile, asmOptions);
var decompiled = Tester.DecompileCSharp(executable, decompilerSettings ?? Tester.GetSettings(cscOptions));
// 2. Decompile
var decompiled = Tester.DecompileCSharp(exeFile, decompilerSettings ?? Tester.GetSettings(cscOptions));
// 3. Compile
CodeAssert.FilesAreEqual(csFile, decompiled, Tester.GetPreprocessorSymbols(cscOptions).ToArray());
}
}

37
ICSharpCode.Decompiler.Tests/RoundtripAssembly.cs

@ -26,6 +26,7 @@ using System.Threading; @@ -26,6 +26,7 @@ using System.Threading;
using ICSharpCode.Decompiler.CSharp;
using ICSharpCode.Decompiler.Metadata;
using ICSharpCode.Decompiler.Tests.Helpers;
using Microsoft.Build.Locator;
using Microsoft.Win32;
using NUnit.Framework;
@ -68,11 +69,7 @@ namespace ICSharpCode.Decompiler.Tests @@ -68,11 +69,7 @@ namespace ICSharpCode.Decompiler.Tests
[Test]
public void ICSharpCode_Decompiler()
{
try {
RunWithTest("ICSharpCode.Decompiler", "ICSharpCode.Decompiler.dll", "ICSharpCode.Decompiler.Tests.exe");
} catch (CompilationFailedException) {
Assert.Ignore("C# 7 local functions not yet supported.");
}
RunWithTest("ICSharpCode.Decompiler", "ICSharpCode.Decompiler.dll", "ICSharpCode.Decompiler.Tests.exe");
}
[Test]
@ -105,9 +102,9 @@ namespace ICSharpCode.Decompiler.Tests @@ -105,9 +102,9 @@ namespace ICSharpCode.Decompiler.Tests
RunWithOutput("Random Tests\\TestCases", "TestCase-1.exe");
}
void RunWithTest(string dir, string fileToRoundtrip, string fileToTest)
void RunWithTest(string dir, string fileToRoundtrip, string fileToTest, string keyFile = null)
{
RunInternal(dir, fileToRoundtrip, outputDir => RunTest(outputDir, fileToTest));
RunInternal(dir, fileToRoundtrip, outputDir => RunTest(outputDir, fileToTest), keyFile);
}
void RunWithOutput(string dir, string fileToRoundtrip)
@ -117,7 +114,7 @@ namespace ICSharpCode.Decompiler.Tests @@ -117,7 +114,7 @@ namespace ICSharpCode.Decompiler.Tests
outputDir => Tester.RunAndCompareOutput(fileToRoundtrip, Path.Combine(inputDir, fileToRoundtrip), Path.Combine(outputDir, fileToRoundtrip)));
}
void RunInternal(string dir, string fileToRoundtrip, Action<string> testAction)
void RunInternal(string dir, string fileToRoundtrip, Action<string> testAction, string snkFilePath = null)
{
if (!Directory.Exists(TestDir)) {
Assert.Ignore($"Assembly-roundtrip test ignored: test directory '{TestDir}' needs to be checked out separately." + Environment.NewLine +
@ -150,8 +147,14 @@ namespace ICSharpCode.Decompiler.Tests @@ -150,8 +147,14 @@ namespace ICSharpCode.Decompiler.Tests
resolver.RemoveSearchDirectory(".");
var decompiler = new TestProjectDecompiler(inputDir);
decompiler.AssemblyResolver = resolver;
// Let's limit the roundtrip tests to C# 7.3 for now; because 8.0 is still in preview
// and the generated project doesn't build as-is.
decompiler.Settings = new DecompilerSettings(LanguageVersion.CSharp7_3);
// use a fixed GUID so that we can diff the output between different ILSpy runs without spurious changes
decompiler.ProjectGuid = Guid.Parse("{127C83E4-4587-4CF9-ADCA-799875F3DFE6}");
if (snkFilePath != null) {
decompiler.StrongNameKeyFile = Path.Combine(inputDir, snkFilePath);
}
decompiler.DecompileProject(module, decompiledDir);
Console.WriteLine($"Decompiled {fileToRoundtrip} in {w.Elapsed.TotalSeconds:f2}");
projectFile = Path.Combine(decompiledDir, module.Name + ".csproj");
@ -186,21 +189,15 @@ namespace ICSharpCode.Decompiler.Tests @@ -186,21 +189,15 @@ namespace ICSharpCode.Decompiler.Tests
}
}
static string FindVS2017()
{
using (var key = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32)) {
using (var subkey = key.OpenSubKey(@"SOFTWARE\Microsoft\VisualStudio\SxS\VS7")) {
return subkey?.GetValue("15.0") as string;
}
}
}
static string FindMSBuild()
{
string vsPath = FindVS2017();
string vsPath = MSBuildLocator.QueryVisualStudioInstances(new VisualStudioInstanceQueryOptions { DiscoveryTypes = DiscoveryType.VisualStudioSetup })
.OrderByDescending(i => i.Version)
.FirstOrDefault()
?.MSBuildPath;
if (vsPath == null)
throw new InvalidOperationException("Could not find VS2017");
return Path.Combine(vsPath, @"MSBuild\15.0\bin\MSBuild.exe");
throw new InvalidOperationException("Could not find MSBuild");
return Path.Combine(vsPath, "msbuild.exe");
}
static void Compile(string projectFile, string outputDir)

76
ICSharpCode.Decompiler.Tests/TestCases/Correctness/LocalFunctions.cs

@ -1,76 +0,0 @@ @@ -1,76 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace LocalFunctions
{
class LocalFunctions
{
int field;
public static void Main(string[] args)
{
StaticContextNoCapture(10);
StaticContextSimpleCapture(10);
StaticContextCaptureInForLoop(10);
var inst = new LocalFunctions() { field = 10 };
inst.ContextNoCapture();
inst.ContextSimpleCapture();
inst.ContextCaptureInForLoop();
}
public static void StaticContextNoCapture(int length)
{
for (int i = 0; i < length; i++) {
LocalWrite("Hello " + i);
}
void LocalWrite(string s) => Console.WriteLine(s);
}
public static void StaticContextSimpleCapture(int length)
{
for (int i = 0; i < length; i++) {
LocalWrite();
}
void LocalWrite() => Console.WriteLine("Hello " + length);
}
public static void StaticContextCaptureInForLoop(int length)
{
for (int i = 0; i < length; i++) {
void LocalWrite() => Console.WriteLine("Hello " + i + "/" + length);
LocalWrite();
}
}
public void ContextNoCapture()
{
for (int i = 0; i < field; i++) {
LocalWrite("Hello " + i);
}
void LocalWrite(string s) => Console.WriteLine(s);
}
public void ContextSimpleCapture()
{
for (int i = 0; i < field; i++) {
LocalWrite();
}
void LocalWrite() => Console.WriteLine("Hello " + field);
}
public void ContextCaptureInForLoop()
{
for (int i = 0; i < field; i++) {
void LocalWrite() => Console.WriteLine("Hello " + i + "/" + field);
LocalWrite();
}
}
}
}

79
ICSharpCode.Decompiler.Tests/TestCases/Correctness/RefLocalsAndReturns.cs

@ -1,79 +0,0 @@ @@ -1,79 +0,0 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness
{
class RefLocalsAndReturns
{
static int[] numbers = { 1, 3, 7, 15, 31, 63, 127, 255, 511, 1023 };
static string[] strings = { "Hello", "World" };
static string NullString = "";
static int DefaultInt = 0;
public delegate ref TReturn RefFunc<T1, TReturn>(T1 param1);
public static TReturn Invoker<T1, TReturn>(RefFunc<T1, TReturn> action, T1 value)
{
return action(value);
}
public static ref int FindNumber(int target)
{
for (int ctr = 0; ctr < numbers.Length; ctr++) {
if (numbers[ctr] >= target)
return ref numbers[ctr];
}
return ref numbers[0];
}
public static ref int LastNumber()
{
return ref numbers[numbers.Length - 1];
}
public static ref int ElementAtOrDefault(int index)
{
return ref index < 0 || index >= numbers.Length ? ref DefaultInt : ref numbers[index];
}
public static ref int LastOrDefault()
{
return ref numbers.Length > 0 ? ref numbers[numbers.Length - 1] : ref DefaultInt;
}
public static void DoubleNumber(ref int num)
{
Console.WriteLine("old: " + num);
num *= 2;
Console.WriteLine("new: " + num);
}
public static ref string GetOrSetString(int index)
{
if (index < 0 || index >= strings.Length)
return ref NullString;
return ref strings[index];
}
public static void Main(string[] args)
{
DoubleNumber(ref FindNumber(32));
Console.WriteLine(string.Join(", ", numbers));
DoubleNumber(ref LastNumber());
Console.WriteLine(string.Join(", ", numbers));
Console.WriteLine(GetOrSetString(0));
GetOrSetString(0) = "Goodbye";
Console.WriteLine(string.Join(" ", strings));
GetOrSetString(5) = "Here I mutated the null value!?";
Console.WriteLine(GetOrSetString(-5));
Console.WriteLine(Invoker(x => ref numbers[x], 0));
Console.WriteLine(LastOrDefault());
LastOrDefault() = 10000;
Console.WriteLine(ElementAtOrDefault(-5));
}
}
}

9
ICSharpCode.Decompiler.Tests/TestCases/Correctness/TrickyTypes.cs

@ -26,6 +26,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness @@ -26,6 +26,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness
{
InterestingConstants();
TruncatedComp();
StringConcat();
}
static void Print<T>(T val)
@ -92,5 +93,13 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness @@ -92,5 +93,13 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Correctness
Print(val1 <= val2);
Print((int)val1 <= val2);
}
static void StringConcat()
{
// Some string.Concat()-cases that cannot be replaced using operator+
Print(string.Concat("String concat:"));
Print(string.Concat(1, 2));
Print(string.Concat(1, 2, "str"));
}
}
}

9
ICSharpCode.Decompiler.Tests/TestCases/ILPretty/ConstantBlobs.cs

@ -0,0 +1,9 @@ @@ -0,0 +1,9 @@
namespace ICSharpCode.Decompiler.Tests.TestCases.ILPretty
{
internal class ConstantBlobs
{
public static void Float_Int32(float f1 = 0f, float f2 = -1f, float f3 = int.MaxValue, float f4 = int.MinValue)
{
}
}
}

39
ICSharpCode.Decompiler.Tests/TestCases/ILPretty/ConstantBlobs.il

@ -0,0 +1,39 @@ @@ -0,0 +1,39 @@
// 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 ConstantBlobs
{
.ver 1:0:0:0
}
.module ConstantBlobs.exe
// MVID: {B973FCD6-A9C4-48A9-8291-26DDC248E208}
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00020003 // ILONLY 32BITPREFERRED
// Image base: 0x000001C4B6C90000
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.ConstantBlobs
extends [mscorlib]System.Object
{
.method public hidebysig static void Float_Int32(
[opt] float32 f1,
[opt] float32 f2,
[opt] float32 f3,
[opt] float32 f4
) cil managed
{
.param [1] = int32(0)
.param [2] = int32(-1)
.param [3] = int32(2147483647)
.param [4] = int32(-2147483648)
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method Program::Float_Int32
}

14
ICSharpCode.Decompiler.Tests/TestCases/ILPretty/DirectCallToExplicitInterfaceImpl.cs

@ -0,0 +1,14 @@ @@ -0,0 +1,14 @@
using System;
public sealed class TestClass : IDisposable
{
void IDisposable.Dispose()
{
}
public void Test(TestClass other)
{
((IDisposable)this).Dispose();
((IDisposable)other).Dispose();
}
}

36
ICSharpCode.Decompiler.Tests/TestCases/ILPretty/DirectCallToExplicitInterfaceImpl.il

@ -0,0 +1,36 @@ @@ -0,0 +1,36 @@
.assembly extern mscorlib
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly DirectCallToExplicitInterfaceImpl
{
.ver 1:0:0:0
}
.module DirectCallToExplicitInterfaceImpl.exe
.class public auto ansi sealed TestClass
extends [mscorlib]System.Object
implements [mscorlib]System.IDisposable
{
// Methods
.method private final hidebysig newslot virtual
instance void System.IDisposable.Dispose () cil managed
{
.override method instance void [mscorlib]System.IDisposable::Dispose()
ret
}
.method public hidebysig void Test (class TestClass other) cil managed
{
ldarg.0
call instance void TestClass::System.IDisposable.Dispose()
ldarg.1
call instance void TestClass::System.IDisposable.Dispose()
ret
}
} // end of class TestClass

10
ICSharpCode.Decompiler.Tests/TestCases/ILPretty/FSharpLoops_Debug.cs

@ -1,4 +1,3 @@ @@ -1,4 +1,3 @@
// C:\Users\Siegfried\Documents\Visual Studio 2017\Projects\ConsoleApp13\ConsoleApplication1\bin\Debug\ConsoleApplication1.exe
// ConsoleApplication1, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
// Global type: <Module>
@ -37,11 +36,6 @@ public static class Program @@ -37,11 +36,6 @@ public static class Program
[CompilationMapping(SourceConstructFlags.Closure)]
internal sealed class disposable_00403 : IDisposable
{
public disposable_00403()
{
((object)this)._002Ector();
}
private void System_002DIDisposable_002DDispose()
{
}
@ -170,10 +164,10 @@ public static class Program @@ -170,10 +164,10 @@ public static class Program
}
namespace _003CStartupCode_0024ConsoleApplication1_003E
{
internal static class _0024Program
internal static class _0024AssemblyInfo
{
}
internal static class _0024AssemblyInfo
internal static class _0024Program
{
}
}

9
ICSharpCode.Decompiler.Tests/TestCases/ILPretty/FSharpLoops_Release.cs

@ -37,11 +37,6 @@ public static class Program @@ -37,11 +37,6 @@ public static class Program
[CompilationMapping(SourceConstructFlags.Closure)]
internal sealed class disposable_00403 : IDisposable
{
public disposable_00403()
{
((object)this)._002Ector();
}
private void System_002DIDisposable_002DDispose()
{
}
@ -172,10 +167,10 @@ public static class Program @@ -172,10 +167,10 @@ public static class Program
}
namespace _003CStartupCode_0024ConsoleApplication1_003E
{
internal static class _0024Program
internal static class _0024AssemblyInfo
{
}
internal static class _0024AssemblyInfo
internal static class _0024Program
{
}
}

4
ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1047.cs

@ -6,12 +6,8 @@ @@ -6,12 +6,8 @@
private void ProblemMethod()
{
IL_0000:
while (!dummy) {
}
return;
IL_0014:
goto IL_0000;
}
}
}

45
ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1325.cs

@ -12,16 +12,7 @@ using System.Runtime.Versioning; @@ -12,16 +12,7 @@ using System.Runtime.Versioning;
[assembly: TargetFramework(".NETCoreApp,Version=v2.1", FrameworkDisplayName = "")]
[assembly: AssemblyConfiguration("Debug")]
[assembly: AssemblyFileVersion("1.0.0.0")]
namespace Microsoft.VisualBasic
{
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class, Inherited = false)]
[CompilerGenerated]
[EditorBrowsable(EditorBrowsableState.Never)]
[Embedded]
internal sealed class Embedded : Attribute
{
}
}
namespace Issue1325
{
[StandardModule]
@ -40,19 +31,7 @@ namespace Issue1325 @@ -40,19 +31,7 @@ namespace Issue1325
t.Unparameterized = str + "asdf";
}
}
}
namespace Microsoft.VisualBasic.CompilerServices
{
[EditorBrowsable(EditorBrowsableState.Never)]
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
[CompilerGenerated]
[Embedded]
internal sealed class StandardModuleAttribute : Attribute
{
}
}
namespace Issue1325
{
internal class Test
{
[DebuggerBrowsable(DebuggerBrowsableState.Never)]
@ -72,3 +51,23 @@ namespace Issue1325 @@ -72,3 +51,23 @@ namespace Issue1325
}
}
}
namespace Microsoft.VisualBasic
{
[AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class, Inherited = false)]
[CompilerGenerated]
[EditorBrowsable(EditorBrowsableState.Never)]
[Embedded]
internal sealed class Embedded : Attribute
{
}
}
namespace Microsoft.VisualBasic.CompilerServices
{
[EditorBrowsable(EditorBrowsableState.Never)]
[AttributeUsage(AttributeTargets.Class, Inherited = false)]
[CompilerGenerated]
[Embedded]
internal sealed class StandardModuleAttribute : Attribute
{
}
}

2
ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1389.cs

@ -12,7 +12,7 @@ namespace Issue1389 @@ -12,7 +12,7 @@ namespace Issue1389
private static void UnusedResultOfIsinst()
{
bool flag = GetObject() is TypeCode;
_ = (GetObject() is TypeCode);
}
private static bool BoolResultOfIsinst()

23
ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1454.cs

@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
using System.Collections;
namespace ICSharpCode.Decompiler.Tests.TestCases.ILPretty
{
public class Issue1454
{
public static int GetCardinality(BitArray bitArray)
{
int[] array = new int[(bitArray.Count >> 5) + 1];
bitArray.CopyTo(array, 0);
int num = 0;
array[array.Length - 1] &= ~(-1 << bitArray.Count % 32);
for (int i = 0; i < array.Length; i++) {
int num2 = array[i];
num2 -= ((num2 >> 1) & 0x55555555);
num2 = (num2 & 0x33333333) + ((num2 >> 2) & 0x33333333);
num2 = ((num2 + (num2 >> 4)) & 0xF0F0F0F) * 16843009 >> 24;
num += num2;
}
return num;
}
}
}

125
ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1454.il

@ -0,0 +1,125 @@ @@ -0,0 +1,125 @@
.assembly extern mscorlib
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 )
.ver 4:0:0:0
}
.assembly Issue1454
{
.hash algorithm 0x00008004
.ver 1:0:4059:39717
}
.module Issue1454.dll
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000003 // ILONLY 32BITREQUIRED
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.Issue1454 extends [mscorlib]System.Object
{
.method public hidebysig static
int32 GetCardinality (
class [mscorlib]System.Collections.BitArray bitArray
) cil managed
{
.maxstack 5
.locals init (
[0] int32[],
[1] int32,
[2] int32,
[3] int32
)
IL_0000: ldarg.0
IL_0001: callvirt instance int32 [mscorlib]System.Collections.BitArray::get_Count()
IL_0006: ldc.i4.5
IL_0007: shr
IL_0008: ldc.i4.1
IL_0009: add
IL_000a: newarr [mscorlib]System.Int32
IL_000f: stloc.0
IL_0010: ldarg.0
IL_0011: ldloc.0
IL_0012: ldc.i4.0
IL_0013: callvirt instance void [mscorlib]System.Collections.BitArray::CopyTo(class [mscorlib]System.Array, int32)
IL_0018: ldc.i4.0
IL_0019: stloc.1
IL_001a: ldloc.0
IL_001b: ldloc.0
IL_001c: ldlen
IL_001d: conv.i4
IL_001e: ldc.i4.1
IL_001f: sub
IL_0020: ldelema [mscorlib]System.Int32
IL_0025: dup
IL_0026: ldind.i4
IL_0027: ldc.i4.m1
IL_0028: ldarg.0
IL_0029: callvirt instance int32 [mscorlib]System.Collections.BitArray::get_Count()
IL_002e: ldc.i4.s 32
IL_0030: rem
IL_0031: ldc.i4.s 31
IL_0033: and
IL_0034: shl
IL_0035: not
IL_0036: and
IL_0037: stind.i4
IL_0038: ldc.i4.0
IL_0039: stloc.2
IL_003a: br.s IL_007b
// loop start (head: IL_007b)
IL_003c: ldloc.0
IL_003d: ldloc.2
IL_003e: ldelem.i4
IL_003f: stloc.3
IL_0040: ldloc.3
IL_0041: ldloc.3
IL_0042: ldc.i4.1
IL_0043: shr
IL_0044: ldc.i4 1431655765
IL_0049: and
IL_004a: sub
IL_004b: stloc.3
IL_004c: ldloc.3
IL_004d: ldc.i4 858993459
IL_0052: and
IL_0053: ldloc.3
IL_0054: ldc.i4.2
IL_0055: shr
IL_0056: ldc.i4 858993459
IL_005b: and
IL_005c: add
IL_005d: stloc.3
IL_005e: ldloc.3
IL_005f: ldloc.3
IL_0060: ldc.i4.4
IL_0061: shr
IL_0062: add
IL_0063: ldc.i4 252645135
IL_0068: and
IL_0069: ldc.i4 16843009
IL_006e: mul
IL_006f: ldc.i4.s 24
IL_0071: shr
IL_0072: stloc.3
IL_0073: ldloc.1
IL_0074: ldloc.3
IL_0075: add
IL_0076: stloc.1
IL_0077: ldloc.2
IL_0078: ldc.i4.1
IL_0079: add
IL_007a: stloc.2
IL_007b: ldloc.2
IL_007c: ldloc.0
IL_007d: ldlen
IL_007e: conv.i4
IL_007f: blt.s IL_003c
// end loop
IL_0081: ldloc.1
IL_0082: ret
}
}

15
ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1681.cs

@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
namespace ICSharpCode.Decompiler.Tests.TestCases.ILPretty
{
internal class BaseClass
{
public int importsClausePosition;
}
internal class Issue1681 : BaseClass
{
public void Test()
{
_ = importsClausePosition;
}
}
}

42
ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue1681.il

@ -0,0 +1,42 @@ @@ -0,0 +1,42 @@
// 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 ConsoleApp11
{
.ver 1:0:0:0
}
.module ConsoleApp11.exe
// MVID: {B973FCD6-A9C4-48A9-8291-26DDC248E208}
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00020003 // ILONLY 32BITPREFERRED
// Image base: 0x000001C4B6C90000
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.BaseClass
extends [mscorlib]System.Object
{
.field public int32 importsClausePosition
}
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.Issue1681
extends ICSharpCode.Decompiler.Tests.TestCases.ILPretty.BaseClass
{
.method public hidebysig instance void Test() cil managed
{
// Code size 18 (0x12)
.maxstack 8
ldarg.0
ldfld int32 class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.BaseClass::importsClausePosition
pop
ret
} // end of method Issue1681::Test
}

39
ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue684.cs

@ -0,0 +1,39 @@ @@ -0,0 +1,39 @@
using System;
public static class Issue684
{
static int Main(string[] A_0)
{
int[] array = new int[1000];
int num = int.Parse(Console.ReadLine());
// Point of this test was to ensure the stack slot here uses an appropriate type,
// (bool instead of int). Unfortunately our type fixup runs too late to affect variable names.
bool num2 = num >= 1000;
if (!num2) {
num2 = (num < 2);
}
if (num2) {
Console.WriteLine(-1);
} else {
int i = 2;
for (int num3 = 2; num3 <= num; num3 = i) {
Console.WriteLine(num3);
for (; i <= num; i += num3) {
int num4 = array[i] = 1;
}
i = num3;
while (true) {
bool num5 = i <= num;
if (num5) {
num5 = (array[i] != 0);
}
if (!num5) {
break;
}
i++;
}
}
}
return 0;
}
}

133
ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Issue684.il

@ -0,0 +1,133 @@ @@ -0,0 +1,133 @@
.assembly extern mscorlib
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly Issue684
{
.ver 1:0:0:0
}
.module Issue684.exe
.class public auto ansi abstract sealed Issue684
extends [mscorlib]System.Object
{
// Methods
.method static privatescope
int32 Main$PST06000001 (
string[] ''
) cil managed
{
// Method begins at RVA 0x2050
// Code size 196 (0xc4)
.maxstack 11
.entrypoint
.locals init (
[0] int32,
[1] int32,
[2] int32,
[3] int32[],
[4] int32
)
IL_0000: ldc.i4 1000
IL_0005: newarr [mscorlib]System.Int32
IL_000a: stloc.3
IL_000b: call string [mscorlib]System.Console::ReadLine()
IL_0010: call int32 [mscorlib]System.Int32::Parse(string)
IL_0015: stloc.2
IL_0016: ldloc.2
IL_0017: ldc.i4 1000
IL_001c: clt
IL_001e: ldc.i4.0
IL_001f: ceq
IL_0021: dup
IL_0022: brtrue IL_0030
IL_0027: pop
IL_0028: ldloc.2
IL_0029: ldc.i4 2
IL_002e: clt
IL_0030: brfalse IL_0045
IL_0035: ldc.i4 1
IL_003a: neg
IL_003b: call void [mscorlib]System.Console::WriteLine(int32)
IL_0040: br IL_00c2
IL_0045: ldc.i4 2
IL_004a: stloc.0
IL_004b: ldc.i4 2
IL_0050: stloc.1
// loop start (head: IL_0051)
IL_0051: ldloc.1
IL_0052: ldloc.2
IL_0053: cgt
IL_0055: ldc.i4.0
IL_0056: ceq
IL_0058: brfalse IL_00c2
IL_005d: ldloc.1
IL_005e: call void [mscorlib]System.Console::WriteLine(int32)
// loop start (head: IL_0063)
IL_0063: ldloc.0
IL_0064: ldloc.2
IL_0065: cgt
IL_0067: ldc.i4.0
IL_0068: ceq
IL_006a: brfalse IL_0088
IL_006f: ldc.i4 1
IL_0074: stloc.s 4
IL_0076: ldloc.3
IL_0077: ldloc.0
IL_0078: ldloc.s 4
IL_007a: stelem.any [mscorlib]System.Int32
IL_007f: ldloc.0
IL_0080: ldloc.1
IL_0081: add
IL_0082: stloc.0
IL_0083: br IL_0063
// end loop
IL_0088: ldloc.1
IL_0089: stloc.0
// loop start (head: IL_008a)
IL_008a: ldloc.0
IL_008b: ldloc.2
IL_008c: cgt
IL_008e: ldc.i4.0
IL_008f: ceq
IL_0091: dup
IL_0092: brfalse IL_00a9
IL_0097: pop
IL_0098: ldloc.3
IL_0099: ldloc.0
IL_009a: ldelem.any [mscorlib]System.Int32
IL_009f: ldc.i4 0
IL_00a4: ceq
IL_00a6: ldc.i4.0
IL_00a7: ceq
IL_00a9: brfalse IL_00bb
IL_00ae: ldloc.0
IL_00af: ldc.i4 1
IL_00b4: add
IL_00b5: stloc.0
IL_00b6: br IL_008a
// end loop
IL_00bb: ldloc.0
IL_00bc: stloc.1
IL_00bd: br IL_0051
// end loop
IL_00c2: ldc.i4.0
IL_00c3: ret
} // end of method Program::Main
} // end of class Issue684

237
ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Unsafe.cs

@ -0,0 +1,237 @@ @@ -0,0 +1,237 @@
using System;
using System.Reflection;
[assembly: AssemblyFileVersion("4.0.0.0")]
[assembly: AssemblyInformationalVersion("4.0.0.0")]
[assembly: AssemblyTitle("System.Runtime.CompilerServices.Unsafe")]
[assembly: AssemblyDescription("System.Runtime.CompilerServices.Unsafe")]
[assembly: AssemblyMetadata(".NETFrameworkAssembly", "")]
[assembly: AssemblyMetadata("Serviceable", "True")]
[assembly: AssemblyCopyright("© Microsoft Corporation. All rights reserved.")]
[assembly: AssemblyCompany("Microsoft Corporation")]
[assembly: AssemblyProduct("Microsoft® .NET Framework")]
[assembly: CLSCompliant(false)]
namespace System.Runtime.CompilerServices
{
public static class Unsafe
{
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public unsafe static T Read<T>(void* source)
{
return *(T*)source;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public unsafe static T ReadUnaligned<T>(void* source)
{
return *(T*)source;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public unsafe static T ReadUnaligned<T>(ref byte source)
{
return *(T*)(&source);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public unsafe static void Write<T>(void* destination, T value)
{
*(T*)destination = value;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public unsafe static void WriteUnaligned<T>(void* destination, T value)
{
*(T*)destination = value;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public unsafe static void WriteUnaligned<T>(ref byte destination, T value)
{
*(T*)(&destination) = value;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public unsafe static void Copy<T>(void* destination, ref T source)
{
*(T*)destination = source;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public unsafe static void Copy<T>(ref T destination, void* source)
{
destination = *(T*)source;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public unsafe static void* AsPointer<T>(ref T value)
{
return &value;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public unsafe static int SizeOf<T>()
{
return sizeof(T);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public unsafe static void CopyBlock(void* destination, void* source, uint byteCount)
{
// IL cpblk instruction
Unsafe.CopyBlock(destination, source, byteCount);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void CopyBlock(ref byte destination, ref byte source, uint byteCount)
{
// IL cpblk instruction
Unsafe.CopyBlock(ref destination, ref source, byteCount);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public unsafe static void CopyBlockUnaligned(void* destination, void* source, uint byteCount)
{
// IL cpblk instruction
Unsafe.CopyBlockUnaligned(destination, source, byteCount);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void CopyBlockUnaligned(ref byte destination, ref byte source, uint byteCount)
{
// IL cpblk instruction
Unsafe.CopyBlockUnaligned(ref destination, ref source, byteCount);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public unsafe static void InitBlock(void* startAddress, byte value, uint byteCount)
{
// IL initblk instruction
Unsafe.InitBlock(startAddress, value, byteCount);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void InitBlock(ref byte startAddress, byte value, uint byteCount)
{
// IL initblk instruction
Unsafe.InitBlock(ref startAddress, value, byteCount);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public unsafe static void InitBlockUnaligned(void* startAddress, byte value, uint byteCount)
{
// IL initblk instruction
Unsafe.InitBlockUnaligned(startAddress, value, byteCount);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static void InitBlockUnaligned(ref byte startAddress, byte value, uint byteCount)
{
// IL initblk instruction
Unsafe.InitBlockUnaligned(ref startAddress, value, byteCount);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static T As<T>(object o) where T : class
{
return (T)o;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public unsafe static ref T AsRef<T>(void* source)
{
return ref *(T*)source;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ref T AsRef<T>(in T source)
{
return ref source;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public unsafe static ref TTo As<TFrom, TTo>(ref TFrom source)
{
return ref *(TTo*)(&source);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ref T Unbox<T>(object box) where T : struct
{
return ref (T)box;
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ref T Add<T>(ref T source, int elementOffset)
{
return ref Unsafe.Add(ref source, elementOffset);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public unsafe static void* Add<T>(void* source, int elementOffset)
{
return (byte*)source + (long)elementOffset * (long)sizeof(T);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ref T Add<T>(ref T source, IntPtr elementOffset)
{
return ref Unsafe.Add(ref source, elementOffset);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ref T AddByteOffset<T>(ref T source, IntPtr byteOffset)
{
return ref Unsafe.AddByteOffset(ref source, byteOffset);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ref T Subtract<T>(ref T source, int elementOffset)
{
return ref Unsafe.Subtract(ref source, elementOffset);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public unsafe static void* Subtract<T>(void* source, int elementOffset)
{
return (byte*)source - (long)elementOffset * (long)sizeof(T);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ref T Subtract<T>(ref T source, IntPtr elementOffset)
{
return ref Unsafe.Subtract(ref source, elementOffset);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static ref T SubtractByteOffset<T>(ref T source, IntPtr byteOffset)
{
return ref Unsafe.SubtractByteOffset(ref source, byteOffset);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static IntPtr ByteOffset<T>(ref T origin, ref T target)
{
return Unsafe.ByteOffset(ref target, ref origin);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool AreSame<T>(ref T left, ref T right)
{
return (ref left) == (ref right);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool IsAddressGreaterThan<T>(ref T left, ref T right)
{
return (ref left) > (ref right);
}
[MethodImpl(MethodImplOptions.AggressiveInlining)]
public static bool IsAddressLessThan<T>(ref T left, ref T right)
{
return (ref left) < (ref right);
}
}
}

439
ICSharpCode.Decompiler.Tests/TestCases/ILPretty/Unsafe.il

@ -0,0 +1,439 @@ @@ -0,0 +1,439 @@
#define CORE_ASSEMBLY "System.Runtime"
.assembly extern CORE_ASSEMBLY
{
.publickeytoken = (B0 3F 5F 7F 11 D5 0A 3A ) // .?_....:
.ver 4:0:0:0
}
.assembly System.Runtime.CompilerServices.Unsafe
{
.custom instance void [CORE_ASSEMBLY]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.custom instance void [CORE_ASSEMBLY]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 [CORE_ASSEMBLY]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [CORE_ASSEMBLY]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 02 00 00 00 00 00 )
.custom instance void [CORE_ASSEMBLY]System.Reflection.AssemblyFileVersionAttribute::.ctor(string) = ( 01 00 07 34 2E 30 2E 30 2E 30 00 00 ) // ...4.0.0.0..
.custom instance void [CORE_ASSEMBLY]System.Reflection.AssemblyInformationalVersionAttribute::.ctor(string) = ( 01 00 07 34 2E 30 2E 30 2E 30 00 00 ) // ...4.0.0.0..
.custom instance void [CORE_ASSEMBLY]System.Reflection.AssemblyTitleAttribute::.ctor(string) = ( 01 00 26 53 79 73 74 65 6D 2E 52 75 6E 74 69 6D // ..&System.Runtim
65 2E 43 6F 6D 70 69 6C 65 72 53 65 72 76 69 63 // e.CompilerServic
65 73 2E 55 6E 73 61 66 65 00 00 ) // es.Unsafe..
.custom instance void [CORE_ASSEMBLY]System.Reflection.AssemblyDescriptionAttribute::.ctor(string) = ( 01 00 26 53 79 73 74 65 6D 2E 52 75 6E 74 69 6D // ..&System.Runtim
65 2E 43 6F 6D 70 69 6C 65 72 53 65 72 76 69 63 // e.CompilerServic
65 73 2E 55 6E 73 61 66 65 00 00 ) // es.Unsafe..
.custom instance void [CORE_ASSEMBLY]System.Reflection.AssemblyMetadataAttribute::.ctor(string, string) = (
01 00 15 2e 4e 45 54 46 72 61 6d 65 77 6f 72 6b
41 73 73 65 6d 62 6c 79 00 00 00
) // ".NETFrameworkAssembly", ""
.custom instance void [CORE_ASSEMBLY]System.Reflection.AssemblyMetadataAttribute::.ctor(string, string) = (
01 00 0b 53 65 72 76 69 63 65 61 62 6c 65 04 54
72 75 65 00 00
) // "Serviceable", "True"
.custom instance void [CORE_ASSEMBLY]System.Reflection.AssemblyCopyrightAttribute::.ctor(string) = ( 01 00 2F C2 A9 20 4D 69 63 72 6F 73 6F 66 74 20 // ../.. Microsoft
43 6F 72 70 6F 72 61 74 69 6F 6E 2E 20 20 41 6C // Corporation. Al
6C 20 72 69 67 68 74 73 20 72 65 73 65 72 76 65 // l rights reserve
64 2E 00 00 ) // d...
.custom instance void [CORE_ASSEMBLY]System.Reflection.AssemblyCompanyAttribute::.ctor(string) = ( 01 00 15 4D 69 63 72 6F 73 6F 66 74 20 43 6F 72 // ...Microsoft Cor
70 6F 72 61 74 69 6F 6E 00 00 ) // poration..
.custom instance void [CORE_ASSEMBLY]System.Reflection.AssemblyProductAttribute::.ctor(string) = ( 01 00 1A 4D 69 63 72 6F 73 6F 66 74 C2 AE 20 2E // ...Microsoft.. .
4E 45 54 20 46 72 61 6D 65 77 6F 72 6B 00 00 ) // NET Framework..
.custom instance void [CORE_ASSEMBLY]System.CLSCompliantAttribute::.ctor(bool) = (
01 00 00 00 00
) // false
.hash algorithm 0x00008004
.ver 4:0:5:0
}
.module System.Runtime.CompilerServices.Unsafe.dll
// MVID: {1E97D84A-565B-49C5-B60A-F31A1A4ACE13}
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x02ED0000
// =============== CLASS MEMBERS DECLARATION ===================
.class public abstract auto ansi sealed beforefieldinit System.Runtime.CompilerServices.Unsafe
extends [CORE_ASSEMBLY]System.Object
{
.method public hidebysig static !!T Read<T>(void* source) cil managed aggressiveinlining
{
.maxstack 1
ldarg.0
ldobj !!T
ret
} // end of method Unsafe::Read
.method public hidebysig static !!T ReadUnaligned<T>(void* source) cil managed aggressiveinlining
{
.maxstack 1
ldarg.0
unaligned. 0x1
ldobj !!T
ret
} // end of method Unsafe::ReadUnaligned
.method public hidebysig static !!T ReadUnaligned<T>(uint8& source) cil managed aggressiveinlining
{
.maxstack 1
ldarg.0
unaligned. 0x1
ldobj !!T
ret
} // end of method Unsafe::ReadUnaligned
.method public hidebysig static void Write<T>(void* destination,
!!T 'value') cil managed aggressiveinlining
{
.maxstack 2
ldarg.0
ldarg.1
stobj !!T
ret
} // end of method Unsafe::Write
.method public hidebysig static void WriteUnaligned<T>(void* destination,
!!T 'value') cil managed aggressiveinlining
{
.maxstack 2
ldarg.0
ldarg.1
unaligned. 0x01
stobj !!T
ret
} // end of method Unsafe::WriteUnaligned
.method public hidebysig static void WriteUnaligned<T>(uint8& destination,
!!T 'value') cil managed aggressiveinlining
{
.maxstack 2
ldarg.0
ldarg.1
unaligned. 0x01
stobj !!T
ret
} // end of method Unsafe::WriteUnaligned
.method public hidebysig static void Copy<T>(void* destination,
!!T& source) cil managed aggressiveinlining
{
.maxstack 2
ldarg.0
ldarg.1
ldobj !!T
stobj !!T
ret
} // end of method Unsafe::Copy
.method public hidebysig static void Copy<T>(!!T& destination,
void* source) cil managed aggressiveinlining
{
.maxstack 2
ldarg.0
ldarg.1
ldobj !!T
stobj !!T
ret
} // end of method Unsafe::Copy
.method public hidebysig static void* AsPointer<T>(!!T& 'value') cil managed aggressiveinlining
{
.maxstack 1
ldarg.0
conv.u
ret
} // end of method Unsafe::AsPointer
.method public hidebysig static int32 SizeOf<T>() cil managed aggressiveinlining
{
.maxstack 1
sizeof !!T
ret
} // end of method Unsafe::SizeOf
.method public hidebysig static void CopyBlock(void* destination, void* source, uint32 byteCount) cil managed aggressiveinlining
{
.maxstack 3
ldarg.0
ldarg.1
ldarg.2
cpblk
ret
} // end of method Unsafe::CopyBlock
.method public hidebysig static void CopyBlock(uint8& destination, uint8& source, uint32 byteCount) cil managed aggressiveinlining
{
.maxstack 3
ldarg.0
ldarg.1
ldarg.2
cpblk
ret
} // end of method Unsafe::CopyBlock
.method public hidebysig static void CopyBlockUnaligned(void* destination, void* source, uint32 byteCount) cil managed aggressiveinlining
{
.maxstack 3
ldarg.0
ldarg.1
ldarg.2
unaligned. 0x1
cpblk
ret
} // end of method Unsafe::CopyBlockUnaligned
.method public hidebysig static void CopyBlockUnaligned(uint8& destination, uint8& source, uint32 byteCount) cil managed aggressiveinlining
{
.maxstack 3
ldarg.0
ldarg.1
ldarg.2
unaligned. 0x1
cpblk
ret
} // end of method Unsafe::CopyBlockUnaligned
.method public hidebysig static void InitBlock(void* startAddress, uint8 'value', uint32 byteCount) cil managed aggressiveinlining
{
.maxstack 3
ldarg.0
ldarg.1
ldarg.2
initblk
ret
} // end of method Unsafe::InitBlock
.method public hidebysig static void InitBlock(uint8& startAddress, uint8 'value', uint32 byteCount) cil managed aggressiveinlining
{
.maxstack 3
ldarg.0
ldarg.1
ldarg.2
initblk
ret
} // end of method Unsafe::InitBlock
.method public hidebysig static void InitBlockUnaligned(void* startAddress, uint8 'value', uint32 byteCount) cil managed aggressiveinlining
{
.maxstack 3
ldarg.0
ldarg.1
ldarg.2
unaligned. 0x1
initblk
ret
} // end of method Unsafe::InitBlockUnaligned
.method public hidebysig static void InitBlockUnaligned(uint8& startAddress, uint8 'value', uint32 byteCount) cil managed aggressiveinlining
{
.maxstack 3
ldarg.0
ldarg.1
ldarg.2
unaligned. 0x1
initblk
ret
} // end of method Unsafe::InitBlockUnaligned
.method public hidebysig static !!T As<class T>(object o) cil managed aggressiveinlining
{
.maxstack 1
ldarg.0
ret
} // end of method Unsafe::As
.method public hidebysig static !!T& AsRef<T>(void* source) cil managed aggressiveinlining
{
// For .NET Core the roundtrip via a local is no longer needed see:
// https://github.com/dotnet/coreclr/issues/13341
// and
// https://github.com/dotnet/coreclr/pull/11218
#ifdef netcoreapp
.maxstack 1
ldarg.0
ret
#else
.locals (int32&)
.maxstack 1
ldarg.0
// Roundtrip via a local to avoid type mismatch on return that the JIT inliner chokes on.
stloc.0
ldloc.0
ret
#endif
} // end of method Unsafe::AsRef
.method public hidebysig static !!T& AsRef<T>(!!T& source) cil managed aggressiveinlining
{
.param [1]
#ifdef netcoreapp
.custom instance void [CORE_ASSEMBLY]System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 00 00 00 )
#else
.custom instance void System.Runtime.CompilerServices.IsReadOnlyAttribute::.ctor() = ( 01 00 00 00 )
#endif
.maxstack 1
ldarg.0
ret
} // end of method Unsafe::AsRef
.method public hidebysig static !!TTo& As<TFrom, TTo>(!!TFrom& source) cil managed aggressiveinlining
{
.maxstack 1
ldarg.0
ret
} // end of method Unsafe::As
.method public hidebysig static !!T& Unbox<valuetype .ctor ([CORE_ASSEMBLY]System.ValueType) T> (object 'box') cil managed aggressiveinlining
{
.maxstack 1
ldarg.0
unbox !!T
ret
} // end of method Unsafe::Unbox
.method public hidebysig static !!T& Add<T>(!!T& source, int32 elementOffset) cil managed aggressiveinlining
{
.maxstack 3
ldarg.0
ldarg.1
sizeof !!T
conv.i
mul
add
ret
} // end of method Unsafe::Add
.method public hidebysig static void* Add<T>(void* source, int32 elementOffset) cil managed aggressiveinlining
{
.maxstack 3
ldarg.0
ldarg.1
sizeof !!T
conv.i
mul
add
ret
} // end of method Unsafe::Add
.method public hidebysig static !!T& Add<T>(!!T& source, native int elementOffset) cil managed aggressiveinlining
{
.maxstack 3
ldarg.0
ldarg.1
sizeof !!T
mul
add
ret
} // end of method Unsafe::Add
.method public hidebysig static !!T& AddByteOffset<T>(!!T& source, native int byteOffset) cil managed aggressiveinlining
{
.maxstack 2
ldarg.0
ldarg.1
add
ret
} // end of method Unsafe::AddByteOffset
.method public hidebysig static !!T& Subtract<T>(!!T& source, int32 elementOffset) cil managed aggressiveinlining
{
.maxstack 3
ldarg.0
ldarg.1
sizeof !!T
conv.i
mul
sub
ret
} // end of method Unsafe::Subtract
.method public hidebysig static void* Subtract<T>(void* source, int32 elementOffset) cil managed aggressiveinlining
{
.maxstack 3
ldarg.0
ldarg.1
sizeof !!T
conv.i
mul
sub
ret
} // end of method Unsafe::Subtract
.method public hidebysig static !!T& Subtract<T>(!!T& source, native int elementOffset) cil managed aggressiveinlining
{
.maxstack 3
ldarg.0
ldarg.1
sizeof !!T
mul
sub
ret
} // end of method Unsafe::Subtract
.method public hidebysig static !!T& SubtractByteOffset<T>(!!T& source, native int byteOffset) cil managed aggressiveinlining
{
.maxstack 2
ldarg.0
ldarg.1
sub
ret
} // end of method Unsafe::SubtractByteOffset
.method public hidebysig static native int ByteOffset<T>(!!T& origin, !!T& target) cil managed aggressiveinlining
{
.maxstack 2
ldarg.1
ldarg.0
sub
ret
} // end of method Unsafe::ByteOffset
.method public hidebysig static bool AreSame<T>(!!T& left, !!T& right) cil managed aggressiveinlining
{
.maxstack 2
ldarg.0
ldarg.1
ceq
ret
} // end of method Unsafe::AreSame
.method public hidebysig static bool IsAddressGreaterThan<T>(!!T& left, !!T& right) cil managed aggressiveinlining
{
.maxstack 2
ldarg.0
ldarg.1
cgt.un
ret
} // end of method Unsafe::IsAddressGreaterThan
.method public hidebysig static bool IsAddressLessThan<T>(!!T& left, !!T& right) cil managed aggressiveinlining
{
.maxstack 2
ldarg.0
ldarg.1
clt.un
ret
} // end of method Unsafe::IsAddressLessThan
} // end of class System.Runtime.CompilerServices.Unsafe
#ifdef netcoreapp
#else
.class private auto ansi sealed beforefieldinit System.Runtime.CompilerServices.IsReadOnlyAttribute
extends [CORE_ASSEMBLY]System.Attribute
{
.method public hidebysig specialname rtspecialname
instance void .ctor () cil managed
{
.maxstack 1
ldarg.0
call instance void [CORE_ASSEMBLY]System.Attribute::.ctor()
ret
} // end of method IsReadOnlyAttribute::.ctor
} // end of class System.Runtime.CompilerServices.IsReadOnlyAttribute
#endif

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

@ -1,849 +0,0 @@ @@ -1,849 +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 AnonymousTypes
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
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 AnonymousTypes.dll
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x10000000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// =============== CLASS MEMBERS DECLARATION ===================
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.AnonymousTypes
extends [mscorlib]System.Object
{
.method private hidebysig instance void
SimpleTypes() cil managed
{
// Code size 62 (0x3e)
.maxstack 2
.locals init (class '<>f__AnonymousType0' V_0,
class '<>f__AnonymousType1`1'<int32> V_1,
class '<>f__AnonymousType2`2'<int32,int32> V_2)
IL_0000: nop
IL_0001: newobj instance void '<>f__AnonymousType0'::.ctor()
IL_0006: stloc.0
IL_0007: ldc.i4.5
IL_0008: newobj instance void class '<>f__AnonymousType1`1'<int32>::.ctor(!0)
IL_000d: stloc.1
IL_000e: ldc.i4.5
IL_000f: ldc.i4.s 10
IL_0011: newobj instance void class '<>f__AnonymousType2`2'<int32,int32>::.ctor(!0,
!1)
IL_0016: stloc.2
IL_0017: ldloc.0
IL_0018: call void [mscorlib]System.Console::WriteLine(object)
IL_001d: nop
IL_001e: ldloc.1
IL_001f: callvirt instance !0 class '<>f__AnonymousType1`1'<int32>::get_X()
IL_0024: call void [mscorlib]System.Console::WriteLine(int32)
IL_0029: nop
IL_002a: ldloc.2
IL_002b: callvirt instance !1 class '<>f__AnonymousType2`2'<int32,int32>::get_Y()
IL_0030: ldloc.2
IL_0031: callvirt instance !0 class '<>f__AnonymousType2`2'<int32,int32>::get_X()
IL_0036: add
IL_0037: call void [mscorlib]System.Console::WriteLine(int32)
IL_003c: nop
IL_003d: ret
} // end of method AnonymousTypes::SimpleTypes
.method private hidebysig instance void
SimpleArray() cil managed
{
// Code size 62 (0x3e)
.maxstack 5
.locals init (class '<>f__AnonymousType3`3'<int32,int32,int32>[] V_0,
class '<>f__AnonymousType3`3'<int32,int32,int32>[] V_1)
IL_0000: nop
IL_0001: ldc.i4.2
IL_0002: newarr class '<>f__AnonymousType3`3'<int32,int32,int32>
IL_0007: stloc.1
IL_0008: ldloc.1
IL_0009: ldc.i4.0
IL_000a: ldc.i4.5
IL_000b: ldc.i4.2
IL_000c: ldc.i4.m1
IL_000d: newobj instance void class '<>f__AnonymousType3`3'<int32,int32,int32>::.ctor(!0,
!1,
!2)
IL_0012: stelem.ref
IL_0013: ldloc.1
IL_0014: ldc.i4.1
IL_0015: ldc.i4.3
IL_0016: ldc.i4.6
IL_0017: ldc.i4.s -6
IL_0019: newobj instance void class '<>f__AnonymousType3`3'<int32,int32,int32>::.ctor(!0,
!1,
!2)
IL_001e: stelem.ref
IL_001f: ldloc.1
IL_0020: stloc.0
IL_0021: ldloc.0
IL_0022: ldc.i4.0
IL_0023: ldelem.ref
IL_0024: callvirt instance !0 class '<>f__AnonymousType3`3'<int32,int32,int32>::get_X()
IL_0029: call void [mscorlib]System.Console::WriteLine(int32)
IL_002e: nop
IL_002f: ldloc.0
IL_0030: ldc.i4.1
IL_0031: ldelem.ref
IL_0032: callvirt instance !0 class '<>f__AnonymousType3`3'<int32,int32,int32>::get_X()
IL_0037: call void [mscorlib]System.Console::WriteLine(int32)
IL_003c: nop
IL_003d: ret
} // end of method AnonymousTypes::SimpleArray
.method private hidebysig instance void
JaggedArray() cil managed
{
// Code size 88 (0x58)
.maxstack 5
.locals init (class '<>f__AnonymousType3`3'<int32,int32,int32>[] V_0,
class '<>f__AnonymousType3`3'<int32,int32,int32>[][] V_1,
class '<>f__AnonymousType3`3'<int32,int32,int32>[] V_2,
class '<>f__AnonymousType3`3'<int32,int32,int32>[][] V_3)
IL_0000: nop
IL_0001: ldc.i4.2
IL_0002: newarr class '<>f__AnonymousType3`3'<int32,int32,int32>
IL_0007: stloc.2
IL_0008: ldloc.2
IL_0009: ldc.i4.0
IL_000a: ldc.i4.5
IL_000b: ldc.i4.2
IL_000c: ldc.i4.m1
IL_000d: newobj instance void class '<>f__AnonymousType3`3'<int32,int32,int32>::.ctor(!0,
!1,
!2)
IL_0012: stelem.ref
IL_0013: ldloc.2
IL_0014: ldc.i4.1
IL_0015: ldc.i4.3
IL_0016: ldc.i4.6
IL_0017: ldc.i4.s -6
IL_0019: newobj instance void class '<>f__AnonymousType3`3'<int32,int32,int32>::.ctor(!0,
!1,
!2)
IL_001e: stelem.ref
IL_001f: ldloc.2
IL_0020: stloc.0
IL_0021: ldc.i4.2
IL_0022: newarr class '<>f__AnonymousType3`3'<int32,int32,int32>[]
IL_0027: stloc.3
IL_0028: ldloc.3
IL_0029: ldc.i4.0
IL_002a: ldloc.0
IL_002b: stelem.ref
IL_002c: ldloc.3
IL_002d: ldc.i4.1
IL_002e: ldloc.0
IL_002f: stelem.ref
IL_0030: ldloc.3
IL_0031: stloc.1
IL_0032: ldloc.0
IL_0033: ldc.i4.0
IL_0034: ldelem.ref
IL_0035: callvirt instance !0 class '<>f__AnonymousType3`3'<int32,int32,int32>::get_X()
IL_003a: call void [mscorlib]System.Console::WriteLine(int32)
IL_003f: nop
IL_0040: ldloc.0
IL_0041: ldc.i4.1
IL_0042: ldelem.ref
IL_0043: callvirt instance !0 class '<>f__AnonymousType3`3'<int32,int32,int32>::get_X()
IL_0048: call void [mscorlib]System.Console::WriteLine(int32)
IL_004d: nop
IL_004e: ldloc.1
IL_004f: ldlen
IL_0050: conv.i4
IL_0051: call void [mscorlib]System.Console::WriteLine(int32)
IL_0056: nop
IL_0057: ret
} // end of method AnonymousTypes::JaggedArray
.method private hidebysig static void InlineVarDecl<T>([out] !!T& v,
!!T 'init') cil managed
{
// Code size 9 (0x9)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldarg.1
IL_0003: stobj !!T
IL_0008: ret
} // end of method AnonymousTypes::InlineVarDecl
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
} // end of method AnonymousTypes::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.AnonymousTypes
.class private auto ansi sealed beforefieldinit '<>f__AnonymousType0'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
} // end of method '<>f__AnonymousType0'::.ctor
.method public hidebysig virtual instance string
ToString() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 29 (0x1d)
.maxstack 2
.locals init (class [mscorlib]System.Text.StringBuilder V_0,
string V_1)
IL_0000: newobj instance void [mscorlib]System.Text.StringBuilder::.ctor()
IL_0005: stloc.0
IL_0006: ldloc.0
IL_0007: ldstr "{ }"
IL_000c: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_0011: pop
IL_0012: ldloc.0
IL_0013: callvirt instance string [mscorlib]System.Object::ToString()
IL_0018: stloc.1
IL_0019: br.s IL_001b
IL_001b: ldloc.1
IL_001c: ret
} // end of method '<>f__AnonymousType0'::ToString
.method public hidebysig virtual instance bool
Equals(object 'value') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 19 (0x13)
.maxstack 2
.locals init (class '<>f__AnonymousType0' V_0,
bool V_1)
IL_0000: ldarg.1
IL_0001: isinst '<>f__AnonymousType0'
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: ldnull
IL_0009: ceq
IL_000b: ldc.i4.0
IL_000c: ceq
IL_000e: stloc.1
IL_000f: br.s IL_0011
IL_0011: ldloc.1
IL_0012: ret
} // end of method '<>f__AnonymousType0'::Equals
.method public hidebysig virtual instance int32
GetHashCode() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 8 (0x8)
.maxstack 1
.locals init (int32 V_0,
int32 V_1)
IL_0000: ldc.i4.0
IL_0001: stloc.0
IL_0002: ldloc.0
IL_0003: stloc.1
IL_0004: br.s IL_0006
IL_0006: ldloc.1
IL_0007: ret
} // end of method '<>f__AnonymousType0'::GetHashCode
} // end of class '<>f__AnonymousType0'
.class private auto ansi sealed beforefieldinit '<>f__AnonymousType1`1'<'<X>j__TPar'>
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private initonly !'<X>j__TPar' '<X>i__Field'
.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 rtspecialname
instance void .ctor(!'<X>j__TPar' X) cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 14 (0xe)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld !0 class '<>f__AnonymousType1`1'<!'<X>j__TPar'>::'<X>i__Field'
IL_000d: ret
} // end of method '<>f__AnonymousType1`1'::.ctor
.method public hidebysig specialname instance !'<X>j__TPar'
get_X() cil managed
{
// Code size 11 (0xb)
.maxstack 1
.locals init (!'<X>j__TPar' V_0)
IL_0000: ldarg.0
IL_0001: ldfld !0 class '<>f__AnonymousType1`1'<!'<X>j__TPar'>::'<X>i__Field'
IL_0006: stloc.0
IL_0007: br.s IL_0009
IL_0009: ldloc.0
IL_000a: ret
} // end of method '<>f__AnonymousType1`1'::get_X
.method public hidebysig virtual instance string
ToString() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 59 (0x3b)
.maxstack 2
.locals init (class [mscorlib]System.Text.StringBuilder V_0,
string V_1)
IL_0000: newobj instance void [mscorlib]System.Text.StringBuilder::.ctor()
IL_0005: stloc.0
IL_0006: ldloc.0
IL_0007: ldstr "{ X = "
IL_000c: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_0011: pop
IL_0012: ldloc.0
IL_0013: ldarg.0
IL_0014: ldfld !0 class '<>f__AnonymousType1`1'<!'<X>j__TPar'>::'<X>i__Field'
IL_0019: box !'<X>j__TPar'
IL_001e: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(object)
IL_0023: pop
IL_0024: ldloc.0
IL_0025: ldstr " }"
IL_002a: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_002f: pop
IL_0030: ldloc.0
IL_0031: callvirt instance string [mscorlib]System.Object::ToString()
IL_0036: stloc.1
IL_0037: br.s IL_0039
IL_0039: ldloc.1
IL_003a: ret
} // end of method '<>f__AnonymousType1`1'::ToString
.method public hidebysig virtual instance bool
Equals(object 'value') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 41 (0x29)
.maxstack 3
.locals init (class '<>f__AnonymousType1`1'<!'<X>j__TPar'> V_0,
bool V_1)
IL_0000: ldarg.1
IL_0001: isinst class '<>f__AnonymousType1`1'<!'<X>j__TPar'>
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: brfalse.s IL_0022
IL_000a: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::get_Default()
IL_000f: ldarg.0
IL_0010: ldfld !0 class '<>f__AnonymousType1`1'<!'<X>j__TPar'>::'<X>i__Field'
IL_0015: ldloc.0
IL_0016: ldfld !0 class '<>f__AnonymousType1`1'<!'<X>j__TPar'>::'<X>i__Field'
IL_001b: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::Equals(!0,
!0)
IL_0020: br.s IL_0023
IL_0022: ldc.i4.0
IL_0023: nop
IL_0024: stloc.1
IL_0025: br.s IL_0027
IL_0027: ldloc.1
IL_0028: ret
} // end of method '<>f__AnonymousType1`1'::Equals
.method public hidebysig virtual instance int32
GetHashCode() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 37 (0x25)
.maxstack 3
.locals init (int32 V_0,
int32 V_1)
IL_0000: ldc.i4 0x12721cd8
IL_0005: stloc.0
IL_0006: ldc.i4 0xa5555529
IL_000b: ldloc.0
IL_000c: mul
IL_000d: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::get_Default()
IL_0012: ldarg.0
IL_0013: ldfld !0 class '<>f__AnonymousType1`1'<!'<X>j__TPar'>::'<X>i__Field'
IL_0018: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::GetHashCode(!0)
IL_001d: add
IL_001e: stloc.0
IL_001f: ldloc.0
IL_0020: stloc.1
IL_0021: br.s IL_0023
IL_0023: ldloc.1
IL_0024: ret
} // end of method '<>f__AnonymousType1`1'::GetHashCode
.property instance !'<X>j__TPar' X()
{
.get instance !'<X>j__TPar' '<>f__AnonymousType1`1'::get_X()
} // end of property '<>f__AnonymousType1`1'::X
} // end of class '<>f__AnonymousType1`1'
.class private auto ansi sealed beforefieldinit '<>f__AnonymousType2`2'<'<X>j__TPar','<Y>j__TPar'>
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private initonly !'<X>j__TPar' '<X>i__Field'
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.field private initonly !'<Y>j__TPar' '<Y>i__Field'
.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 rtspecialname
instance void .ctor(!'<X>j__TPar' X,
!'<Y>j__TPar' Y) cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 21 (0x15)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld !0 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<X>i__Field'
IL_000d: ldarg.0
IL_000e: ldarg.2
IL_000f: stfld !1 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<Y>i__Field'
IL_0014: ret
} // end of method '<>f__AnonymousType2`2'::.ctor
.method public hidebysig specialname instance !'<X>j__TPar'
get_X() cil managed
{
// Code size 11 (0xb)
.maxstack 1
.locals init (!'<X>j__TPar' V_0)
IL_0000: ldarg.0
IL_0001: ldfld !0 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<X>i__Field'
IL_0006: stloc.0
IL_0007: br.s IL_0009
IL_0009: ldloc.0
IL_000a: ret
} // end of method '<>f__AnonymousType2`2'::get_X
.method public hidebysig specialname instance !'<Y>j__TPar'
get_Y() cil managed
{
// Code size 11 (0xb)
.maxstack 1
.locals init (!'<Y>j__TPar' V_0)
IL_0000: ldarg.0
IL_0001: ldfld !1 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<Y>i__Field'
IL_0006: stloc.0
IL_0007: br.s IL_0009
IL_0009: ldloc.0
IL_000a: ret
} // end of method '<>f__AnonymousType2`2'::get_Y
.method public hidebysig virtual instance string
ToString() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 89 (0x59)
.maxstack 2
.locals init (class [mscorlib]System.Text.StringBuilder V_0,
string V_1)
IL_0000: newobj instance void [mscorlib]System.Text.StringBuilder::.ctor()
IL_0005: stloc.0
IL_0006: ldloc.0
IL_0007: ldstr "{ X = "
IL_000c: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_0011: pop
IL_0012: ldloc.0
IL_0013: ldarg.0
IL_0014: ldfld !0 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<X>i__Field'
IL_0019: box !'<X>j__TPar'
IL_001e: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(object)
IL_0023: pop
IL_0024: ldloc.0
IL_0025: ldstr ", Y = "
IL_002a: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_002f: pop
IL_0030: ldloc.0
IL_0031: ldarg.0
IL_0032: ldfld !1 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<Y>i__Field'
IL_0037: box !'<Y>j__TPar'
IL_003c: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(object)
IL_0041: pop
IL_0042: ldloc.0
IL_0043: ldstr " }"
IL_0048: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_004d: pop
IL_004e: ldloc.0
IL_004f: callvirt instance string [mscorlib]System.Object::ToString()
IL_0054: stloc.1
IL_0055: br.s IL_0057
IL_0057: ldloc.1
IL_0058: ret
} // end of method '<>f__AnonymousType2`2'::ToString
.method public hidebysig virtual instance bool
Equals(object 'value') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 65 (0x41)
.maxstack 3
.locals init (class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'> V_0,
bool V_1)
IL_0000: ldarg.1
IL_0001: isinst class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: brfalse.s IL_003a
IL_000a: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::get_Default()
IL_000f: ldarg.0
IL_0010: ldfld !0 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<X>i__Field'
IL_0015: ldloc.0
IL_0016: ldfld !0 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<X>i__Field'
IL_001b: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::Equals(!0,
!0)
IL_0020: brfalse.s IL_003a
IL_0022: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::get_Default()
IL_0027: ldarg.0
IL_0028: ldfld !1 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<Y>i__Field'
IL_002d: ldloc.0
IL_002e: ldfld !1 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<Y>i__Field'
IL_0033: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::Equals(!0,
!0)
IL_0038: br.s IL_003b
IL_003a: ldc.i4.0
IL_003b: nop
IL_003c: stloc.1
IL_003d: br.s IL_003f
IL_003f: ldloc.1
IL_0040: ret
} // end of method '<>f__AnonymousType2`2'::Equals
.method public hidebysig virtual instance int32
GetHashCode() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 62 (0x3e)
.maxstack 3
.locals init (int32 V_0,
int32 V_1)
IL_0000: ldc.i4 0xc18f39dd
IL_0005: stloc.0
IL_0006: ldc.i4 0xa5555529
IL_000b: ldloc.0
IL_000c: mul
IL_000d: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::get_Default()
IL_0012: ldarg.0
IL_0013: ldfld !0 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<X>i__Field'
IL_0018: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::GetHashCode(!0)
IL_001d: add
IL_001e: stloc.0
IL_001f: ldc.i4 0xa5555529
IL_0024: ldloc.0
IL_0025: mul
IL_0026: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::get_Default()
IL_002b: ldarg.0
IL_002c: ldfld !1 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<Y>i__Field'
IL_0031: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::GetHashCode(!0)
IL_0036: add
IL_0037: stloc.0
IL_0038: ldloc.0
IL_0039: stloc.1
IL_003a: br.s IL_003c
IL_003c: ldloc.1
IL_003d: ret
} // end of method '<>f__AnonymousType2`2'::GetHashCode
.property instance !'<X>j__TPar' X()
{
.get instance !'<X>j__TPar' '<>f__AnonymousType2`2'::get_X()
} // end of property '<>f__AnonymousType2`2'::X
.property instance !'<Y>j__TPar' Y()
{
.get instance !'<Y>j__TPar' '<>f__AnonymousType2`2'::get_Y()
} // end of property '<>f__AnonymousType2`2'::Y
} // end of class '<>f__AnonymousType2`2'
.class private auto ansi sealed beforefieldinit '<>f__AnonymousType3`3'<'<X>j__TPar','<Y>j__TPar','<Z>j__TPar'>
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private initonly !'<X>j__TPar' '<X>i__Field'
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.field private initonly !'<Y>j__TPar' '<Y>i__Field'
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.field private initonly !'<Z>j__TPar' '<Z>i__Field'
.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 rtspecialname
instance void .ctor(!'<X>j__TPar' X,
!'<Y>j__TPar' Y,
!'<Z>j__TPar' Z) cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 28 (0x1c)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld !0 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<X>i__Field'
IL_000d: ldarg.0
IL_000e: ldarg.2
IL_000f: stfld !1 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Y>i__Field'
IL_0014: ldarg.0
IL_0015: ldarg.3
IL_0016: stfld !2 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Z>i__Field'
IL_001b: ret
} // end of method '<>f__AnonymousType3`3'::.ctor
.method public hidebysig specialname instance !'<X>j__TPar'
get_X() cil managed
{
// Code size 11 (0xb)
.maxstack 1
.locals init (!'<X>j__TPar' V_0)
IL_0000: ldarg.0
IL_0001: ldfld !0 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<X>i__Field'
IL_0006: stloc.0
IL_0007: br.s IL_0009
IL_0009: ldloc.0
IL_000a: ret
} // end of method '<>f__AnonymousType3`3'::get_X
.method public hidebysig specialname instance !'<Y>j__TPar'
get_Y() cil managed
{
// Code size 11 (0xb)
.maxstack 1
.locals init (!'<Y>j__TPar' V_0)
IL_0000: ldarg.0
IL_0001: ldfld !1 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Y>i__Field'
IL_0006: stloc.0
IL_0007: br.s IL_0009
IL_0009: ldloc.0
IL_000a: ret
} // end of method '<>f__AnonymousType3`3'::get_Y
.method public hidebysig specialname instance !'<Z>j__TPar'
get_Z() cil managed
{
// Code size 11 (0xb)
.maxstack 1
.locals init (!'<Z>j__TPar' V_0)
IL_0000: ldarg.0
IL_0001: ldfld !2 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Z>i__Field'
IL_0006: stloc.0
IL_0007: br.s IL_0009
IL_0009: ldloc.0
IL_000a: ret
} // end of method '<>f__AnonymousType3`3'::get_Z
.method public hidebysig virtual instance string
ToString() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 119 (0x77)
.maxstack 2
.locals init (class [mscorlib]System.Text.StringBuilder V_0,
string V_1)
IL_0000: newobj instance void [mscorlib]System.Text.StringBuilder::.ctor()
IL_0005: stloc.0
IL_0006: ldloc.0
IL_0007: ldstr "{ X = "
IL_000c: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_0011: pop
IL_0012: ldloc.0
IL_0013: ldarg.0
IL_0014: ldfld !0 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<X>i__Field'
IL_0019: box !'<X>j__TPar'
IL_001e: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(object)
IL_0023: pop
IL_0024: ldloc.0
IL_0025: ldstr ", Y = "
IL_002a: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_002f: pop
IL_0030: ldloc.0
IL_0031: ldarg.0
IL_0032: ldfld !1 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Y>i__Field'
IL_0037: box !'<Y>j__TPar'
IL_003c: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(object)
IL_0041: pop
IL_0042: ldloc.0
IL_0043: ldstr ", Z = "
IL_0048: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_004d: pop
IL_004e: ldloc.0
IL_004f: ldarg.0
IL_0050: ldfld !2 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Z>i__Field'
IL_0055: box !'<Z>j__TPar'
IL_005a: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(object)
IL_005f: pop
IL_0060: ldloc.0
IL_0061: ldstr " }"
IL_0066: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_006b: pop
IL_006c: ldloc.0
IL_006d: callvirt instance string [mscorlib]System.Object::ToString()
IL_0072: stloc.1
IL_0073: br.s IL_0075
IL_0075: ldloc.1
IL_0076: ret
} // end of method '<>f__AnonymousType3`3'::ToString
.method public hidebysig virtual instance bool
Equals(object 'value') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 89 (0x59)
.maxstack 3
.locals init (class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'> V_0,
bool V_1)
IL_0000: ldarg.1
IL_0001: isinst class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: brfalse.s IL_0052
IL_000a: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::get_Default()
IL_000f: ldarg.0
IL_0010: ldfld !0 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<X>i__Field'
IL_0015: ldloc.0
IL_0016: ldfld !0 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<X>i__Field'
IL_001b: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::Equals(!0,
!0)
IL_0020: brfalse.s IL_0052
IL_0022: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::get_Default()
IL_0027: ldarg.0
IL_0028: ldfld !1 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Y>i__Field'
IL_002d: ldloc.0
IL_002e: ldfld !1 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Y>i__Field'
IL_0033: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::Equals(!0,
!0)
IL_0038: brfalse.s IL_0052
IL_003a: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Z>j__TPar'>::get_Default()
IL_003f: ldarg.0
IL_0040: ldfld !2 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Z>i__Field'
IL_0045: ldloc.0
IL_0046: ldfld !2 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Z>i__Field'
IL_004b: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Z>j__TPar'>::Equals(!0,
!0)
IL_0050: br.s IL_0053
IL_0052: ldc.i4.0
IL_0053: nop
IL_0054: stloc.1
IL_0055: br.s IL_0057
IL_0057: ldloc.1
IL_0058: ret
} // end of method '<>f__AnonymousType3`3'::Equals
.method public hidebysig virtual instance int32
GetHashCode() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 87 (0x57)
.maxstack 3
.locals init (int32 V_0,
int32 V_1)
IL_0000: ldc.i4 0xd0c61e6a
IL_0005: stloc.0
IL_0006: ldc.i4 0xa5555529
IL_000b: ldloc.0
IL_000c: mul
IL_000d: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::get_Default()
IL_0012: ldarg.0
IL_0013: ldfld !0 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<X>i__Field'
IL_0018: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::GetHashCode(!0)
IL_001d: add
IL_001e: stloc.0
IL_001f: ldc.i4 0xa5555529
IL_0024: ldloc.0
IL_0025: mul
IL_0026: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::get_Default()
IL_002b: ldarg.0
IL_002c: ldfld !1 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Y>i__Field'
IL_0031: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::GetHashCode(!0)
IL_0036: add
IL_0037: stloc.0
IL_0038: ldc.i4 0xa5555529
IL_003d: ldloc.0
IL_003e: mul
IL_003f: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Z>j__TPar'>::get_Default()
IL_0044: ldarg.0
IL_0045: ldfld !2 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Z>i__Field'
IL_004a: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Z>j__TPar'>::GetHashCode(!0)
IL_004f: add
IL_0050: stloc.0
IL_0051: ldloc.0
IL_0052: stloc.1
IL_0053: br.s IL_0055
IL_0055: ldloc.1
IL_0056: ret
} // end of method '<>f__AnonymousType3`3'::GetHashCode
.property instance !'<X>j__TPar' X()
{
.get instance !'<X>j__TPar' '<>f__AnonymousType3`3'::get_X()
} // end of property '<>f__AnonymousType3`3'::X
.property instance !'<Y>j__TPar' Y()
{
.get instance !'<Y>j__TPar' '<>f__AnonymousType3`3'::get_Y()
} // end of property '<>f__AnonymousType3`3'::Y
.property instance !'<Z>j__TPar' Z()
{
.get instance !'<Z>j__TPar' '<>f__AnonymousType3`3'::get_Z()
} // end of property '<>f__AnonymousType3`3'::Z
} // end of class '<>f__AnonymousType3`3'
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

879
ICSharpCode.Decompiler.Tests/TestCases/Pretty/AnonymousTypes.mcs.il

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

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

@ -1,744 +0,0 @@ @@ -1,744 +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 AnonymousTypes.opt
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
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 AnonymousTypes.opt.dll
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x10000000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// =============== CLASS MEMBERS DECLARATION ===================
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.AnonymousTypes
extends [mscorlib]System.Object
{
.method private hidebysig instance void
SimpleTypes() cil managed
{
// Code size 58 (0x3a)
.maxstack 2
.locals init (class '<>f__AnonymousType0' V_0,
class '<>f__AnonymousType1`1'<int32> V_1,
class '<>f__AnonymousType2`2'<int32,int32> V_2)
IL_0000: newobj instance void '<>f__AnonymousType0'::.ctor()
IL_0005: stloc.0
IL_0006: ldc.i4.5
IL_0007: newobj instance void class '<>f__AnonymousType1`1'<int32>::.ctor(!0)
IL_000c: stloc.1
IL_000d: ldc.i4.5
IL_000e: ldc.i4.s 10
IL_0010: newobj instance void class '<>f__AnonymousType2`2'<int32,int32>::.ctor(!0,
!1)
IL_0015: stloc.2
IL_0016: ldloc.0
IL_0017: call void [mscorlib]System.Console::WriteLine(object)
IL_001c: ldloc.1
IL_001d: callvirt instance !0 class '<>f__AnonymousType1`1'<int32>::get_X()
IL_0022: call void [mscorlib]System.Console::WriteLine(int32)
IL_0027: ldloc.2
IL_0028: callvirt instance !1 class '<>f__AnonymousType2`2'<int32,int32>::get_Y()
IL_002d: ldloc.2
IL_002e: callvirt instance !0 class '<>f__AnonymousType2`2'<int32,int32>::get_X()
IL_0033: add
IL_0034: call void [mscorlib]System.Console::WriteLine(int32)
IL_0039: ret
} // end of method AnonymousTypes::SimpleTypes
.method private hidebysig instance void
SimpleArray() cil managed
{
// Code size 59 (0x3b)
.maxstack 5
.locals init (class '<>f__AnonymousType3`3'<int32,int32,int32>[] V_0,
class '<>f__AnonymousType3`3'<int32,int32,int32>[] V_1)
IL_0000: ldc.i4.2
IL_0001: newarr class '<>f__AnonymousType3`3'<int32,int32,int32>
IL_0006: stloc.1
IL_0007: ldloc.1
IL_0008: ldc.i4.0
IL_0009: ldc.i4.5
IL_000a: ldc.i4.2
IL_000b: ldc.i4.m1
IL_000c: newobj instance void class '<>f__AnonymousType3`3'<int32,int32,int32>::.ctor(!0,
!1,
!2)
IL_0011: stelem.ref
IL_0012: ldloc.1
IL_0013: ldc.i4.1
IL_0014: ldc.i4.3
IL_0015: ldc.i4.6
IL_0016: ldc.i4.s -6
IL_0018: newobj instance void class '<>f__AnonymousType3`3'<int32,int32,int32>::.ctor(!0,
!1,
!2)
IL_001d: stelem.ref
IL_001e: ldloc.1
IL_001f: stloc.0
IL_0020: ldloc.0
IL_0021: ldc.i4.0
IL_0022: ldelem.ref
IL_0023: callvirt instance !0 class '<>f__AnonymousType3`3'<int32,int32,int32>::get_X()
IL_0028: call void [mscorlib]System.Console::WriteLine(int32)
IL_002d: ldloc.0
IL_002e: ldc.i4.1
IL_002f: ldelem.ref
IL_0030: callvirt instance !0 class '<>f__AnonymousType3`3'<int32,int32,int32>::get_X()
IL_0035: call void [mscorlib]System.Console::WriteLine(int32)
IL_003a: ret
} // end of method AnonymousTypes::SimpleArray
.method private hidebysig instance void
JaggedArray() cil managed
{
// Code size 84 (0x54)
.maxstack 5
.locals init (class '<>f__AnonymousType3`3'<int32,int32,int32>[] V_0,
class '<>f__AnonymousType3`3'<int32,int32,int32>[][] V_1,
class '<>f__AnonymousType3`3'<int32,int32,int32>[] V_2,
class '<>f__AnonymousType3`3'<int32,int32,int32>[][] V_3)
IL_0000: ldc.i4.2
IL_0001: newarr class '<>f__AnonymousType3`3'<int32,int32,int32>
IL_0006: stloc.2
IL_0007: ldloc.2
IL_0008: ldc.i4.0
IL_0009: ldc.i4.5
IL_000a: ldc.i4.2
IL_000b: ldc.i4.m1
IL_000c: newobj instance void class '<>f__AnonymousType3`3'<int32,int32,int32>::.ctor(!0,
!1,
!2)
IL_0011: stelem.ref
IL_0012: ldloc.2
IL_0013: ldc.i4.1
IL_0014: ldc.i4.3
IL_0015: ldc.i4.6
IL_0016: ldc.i4.s -6
IL_0018: newobj instance void class '<>f__AnonymousType3`3'<int32,int32,int32>::.ctor(!0,
!1,
!2)
IL_001d: stelem.ref
IL_001e: ldloc.2
IL_001f: stloc.0
IL_0020: ldc.i4.2
IL_0021: newarr class '<>f__AnonymousType3`3'<int32,int32,int32>[]
IL_0026: stloc.3
IL_0027: ldloc.3
IL_0028: ldc.i4.0
IL_0029: ldloc.0
IL_002a: stelem.ref
IL_002b: ldloc.3
IL_002c: ldc.i4.1
IL_002d: ldloc.0
IL_002e: stelem.ref
IL_002f: ldloc.3
IL_0030: stloc.1
IL_0031: ldloc.0
IL_0032: ldc.i4.0
IL_0033: ldelem.ref
IL_0034: callvirt instance !0 class '<>f__AnonymousType3`3'<int32,int32,int32>::get_X()
IL_0039: call void [mscorlib]System.Console::WriteLine(int32)
IL_003e: ldloc.0
IL_003f: ldc.i4.1
IL_0040: ldelem.ref
IL_0041: callvirt instance !0 class '<>f__AnonymousType3`3'<int32,int32,int32>::get_X()
IL_0046: call void [mscorlib]System.Console::WriteLine(int32)
IL_004b: ldloc.1
IL_004c: ldlen
IL_004d: conv.i4
IL_004e: call void [mscorlib]System.Console::WriteLine(int32)
IL_0053: ret
} // end of method AnonymousTypes::JaggedArray
.method private hidebysig static void InlineVarDecl<T>([out] !!T& v,
!!T 'init') cil managed
{
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: stobj !!T
IL_0007: ret
} // end of method AnonymousTypes::InlineVarDecl
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
} // end of method AnonymousTypes::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.AnonymousTypes
.class private auto ansi sealed beforefieldinit '<>f__AnonymousType0'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
} // end of method '<>f__AnonymousType0'::.ctor
.method public hidebysig virtual instance string
ToString() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 25 (0x19)
.maxstack 2
.locals init (class [mscorlib]System.Text.StringBuilder V_0)
IL_0000: newobj instance void [mscorlib]System.Text.StringBuilder::.ctor()
IL_0005: stloc.0
IL_0006: ldloc.0
IL_0007: ldstr "{ }"
IL_000c: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_0011: pop
IL_0012: ldloc.0
IL_0013: callvirt instance string [mscorlib]System.Object::ToString()
IL_0018: ret
} // end of method '<>f__AnonymousType0'::ToString
.method public hidebysig virtual instance bool
Equals(object 'value') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 15 (0xf)
.maxstack 2
.locals init (class '<>f__AnonymousType0' V_0)
IL_0000: ldarg.1
IL_0001: isinst '<>f__AnonymousType0'
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: ldnull
IL_0009: ceq
IL_000b: ldc.i4.0
IL_000c: ceq
IL_000e: ret
} // end of method '<>f__AnonymousType0'::Equals
.method public hidebysig virtual instance int32
GetHashCode() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 4 (0x4)
.maxstack 1
.locals init (int32 V_0)
IL_0000: ldc.i4.0
IL_0001: stloc.0
IL_0002: ldloc.0
IL_0003: ret
} // end of method '<>f__AnonymousType0'::GetHashCode
} // end of class '<>f__AnonymousType0'
.class private auto ansi sealed beforefieldinit '<>f__AnonymousType1`1'<'<X>j__TPar'>
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private initonly !'<X>j__TPar' '<X>i__Field'
.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 rtspecialname
instance void .ctor(!'<X>j__TPar' X) cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 14 (0xe)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld !0 class '<>f__AnonymousType1`1'<!'<X>j__TPar'>::'<X>i__Field'
IL_000d: ret
} // end of method '<>f__AnonymousType1`1'::.ctor
.method public hidebysig specialname instance !'<X>j__TPar'
get_X() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !0 class '<>f__AnonymousType1`1'<!'<X>j__TPar'>::'<X>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType1`1'::get_X
.method public hidebysig virtual instance string
ToString() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 55 (0x37)
.maxstack 2
.locals init (class [mscorlib]System.Text.StringBuilder V_0)
IL_0000: newobj instance void [mscorlib]System.Text.StringBuilder::.ctor()
IL_0005: stloc.0
IL_0006: ldloc.0
IL_0007: ldstr "{ X = "
IL_000c: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_0011: pop
IL_0012: ldloc.0
IL_0013: ldarg.0
IL_0014: ldfld !0 class '<>f__AnonymousType1`1'<!'<X>j__TPar'>::'<X>i__Field'
IL_0019: box !'<X>j__TPar'
IL_001e: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(object)
IL_0023: pop
IL_0024: ldloc.0
IL_0025: ldstr " }"
IL_002a: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_002f: pop
IL_0030: ldloc.0
IL_0031: callvirt instance string [mscorlib]System.Object::ToString()
IL_0036: ret
} // end of method '<>f__AnonymousType1`1'::ToString
.method public hidebysig virtual instance bool
Equals(object 'value') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 35 (0x23)
.maxstack 3
.locals init (class '<>f__AnonymousType1`1'<!'<X>j__TPar'> V_0)
IL_0000: ldarg.1
IL_0001: isinst class '<>f__AnonymousType1`1'<!'<X>j__TPar'>
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: brfalse.s IL_0021
IL_000a: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::get_Default()
IL_000f: ldarg.0
IL_0010: ldfld !0 class '<>f__AnonymousType1`1'<!'<X>j__TPar'>::'<X>i__Field'
IL_0015: ldloc.0
IL_0016: ldfld !0 class '<>f__AnonymousType1`1'<!'<X>j__TPar'>::'<X>i__Field'
IL_001b: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::Equals(!0,
!0)
IL_0020: ret
IL_0021: ldc.i4.0
IL_0022: ret
} // end of method '<>f__AnonymousType1`1'::Equals
.method public hidebysig virtual instance int32
GetHashCode() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 33 (0x21)
.maxstack 3
.locals init (int32 V_0)
IL_0000: ldc.i4 0x12721cd8
IL_0005: stloc.0
IL_0006: ldc.i4 0xa5555529
IL_000b: ldloc.0
IL_000c: mul
IL_000d: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::get_Default()
IL_0012: ldarg.0
IL_0013: ldfld !0 class '<>f__AnonymousType1`1'<!'<X>j__TPar'>::'<X>i__Field'
IL_0018: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::GetHashCode(!0)
IL_001d: add
IL_001e: stloc.0
IL_001f: ldloc.0
IL_0020: ret
} // end of method '<>f__AnonymousType1`1'::GetHashCode
.property instance !'<X>j__TPar' X()
{
.get instance !'<X>j__TPar' '<>f__AnonymousType1`1'::get_X()
} // end of property '<>f__AnonymousType1`1'::X
} // end of class '<>f__AnonymousType1`1'
.class private auto ansi sealed beforefieldinit '<>f__AnonymousType2`2'<'<X>j__TPar','<Y>j__TPar'>
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private initonly !'<X>j__TPar' '<X>i__Field'
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.field private initonly !'<Y>j__TPar' '<Y>i__Field'
.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 rtspecialname
instance void .ctor(!'<X>j__TPar' X,
!'<Y>j__TPar' Y) cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 21 (0x15)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld !0 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<X>i__Field'
IL_000d: ldarg.0
IL_000e: ldarg.2
IL_000f: stfld !1 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<Y>i__Field'
IL_0014: ret
} // end of method '<>f__AnonymousType2`2'::.ctor
.method public hidebysig specialname instance !'<X>j__TPar'
get_X() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !0 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<X>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType2`2'::get_X
.method public hidebysig specialname instance !'<Y>j__TPar'
get_Y() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !1 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<Y>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType2`2'::get_Y
.method public hidebysig virtual instance string
ToString() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 85 (0x55)
.maxstack 2
.locals init (class [mscorlib]System.Text.StringBuilder V_0)
IL_0000: newobj instance void [mscorlib]System.Text.StringBuilder::.ctor()
IL_0005: stloc.0
IL_0006: ldloc.0
IL_0007: ldstr "{ X = "
IL_000c: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_0011: pop
IL_0012: ldloc.0
IL_0013: ldarg.0
IL_0014: ldfld !0 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<X>i__Field'
IL_0019: box !'<X>j__TPar'
IL_001e: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(object)
IL_0023: pop
IL_0024: ldloc.0
IL_0025: ldstr ", Y = "
IL_002a: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_002f: pop
IL_0030: ldloc.0
IL_0031: ldarg.0
IL_0032: ldfld !1 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<Y>i__Field'
IL_0037: box !'<Y>j__TPar'
IL_003c: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(object)
IL_0041: pop
IL_0042: ldloc.0
IL_0043: ldstr " }"
IL_0048: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_004d: pop
IL_004e: ldloc.0
IL_004f: callvirt instance string [mscorlib]System.Object::ToString()
IL_0054: ret
} // end of method '<>f__AnonymousType2`2'::ToString
.method public hidebysig virtual instance bool
Equals(object 'value') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 59 (0x3b)
.maxstack 3
.locals init (class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'> V_0)
IL_0000: ldarg.1
IL_0001: isinst class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: brfalse.s IL_0039
IL_000a: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::get_Default()
IL_000f: ldarg.0
IL_0010: ldfld !0 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<X>i__Field'
IL_0015: ldloc.0
IL_0016: ldfld !0 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<X>i__Field'
IL_001b: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::Equals(!0,
!0)
IL_0020: brfalse.s IL_0039
IL_0022: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::get_Default()
IL_0027: ldarg.0
IL_0028: ldfld !1 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<Y>i__Field'
IL_002d: ldloc.0
IL_002e: ldfld !1 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<Y>i__Field'
IL_0033: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::Equals(!0,
!0)
IL_0038: ret
IL_0039: ldc.i4.0
IL_003a: ret
} // end of method '<>f__AnonymousType2`2'::Equals
.method public hidebysig virtual instance int32
GetHashCode() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 58 (0x3a)
.maxstack 3
.locals init (int32 V_0)
IL_0000: ldc.i4 0xc18f39dd
IL_0005: stloc.0
IL_0006: ldc.i4 0xa5555529
IL_000b: ldloc.0
IL_000c: mul
IL_000d: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::get_Default()
IL_0012: ldarg.0
IL_0013: ldfld !0 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<X>i__Field'
IL_0018: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::GetHashCode(!0)
IL_001d: add
IL_001e: stloc.0
IL_001f: ldc.i4 0xa5555529
IL_0024: ldloc.0
IL_0025: mul
IL_0026: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::get_Default()
IL_002b: ldarg.0
IL_002c: ldfld !1 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<Y>i__Field'
IL_0031: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::GetHashCode(!0)
IL_0036: add
IL_0037: stloc.0
IL_0038: ldloc.0
IL_0039: ret
} // end of method '<>f__AnonymousType2`2'::GetHashCode
.property instance !'<X>j__TPar' X()
{
.get instance !'<X>j__TPar' '<>f__AnonymousType2`2'::get_X()
} // end of property '<>f__AnonymousType2`2'::X
.property instance !'<Y>j__TPar' Y()
{
.get instance !'<Y>j__TPar' '<>f__AnonymousType2`2'::get_Y()
} // end of property '<>f__AnonymousType2`2'::Y
} // end of class '<>f__AnonymousType2`2'
.class private auto ansi sealed beforefieldinit '<>f__AnonymousType3`3'<'<X>j__TPar','<Y>j__TPar','<Z>j__TPar'>
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private initonly !'<X>j__TPar' '<X>i__Field'
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.field private initonly !'<Y>j__TPar' '<Y>i__Field'
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.field private initonly !'<Z>j__TPar' '<Z>i__Field'
.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 rtspecialname
instance void .ctor(!'<X>j__TPar' X,
!'<Y>j__TPar' Y,
!'<Z>j__TPar' Z) cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 28 (0x1c)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld !0 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<X>i__Field'
IL_000d: ldarg.0
IL_000e: ldarg.2
IL_000f: stfld !1 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Y>i__Field'
IL_0014: ldarg.0
IL_0015: ldarg.3
IL_0016: stfld !2 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Z>i__Field'
IL_001b: ret
} // end of method '<>f__AnonymousType3`3'::.ctor
.method public hidebysig specialname instance !'<X>j__TPar'
get_X() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !0 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<X>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType3`3'::get_X
.method public hidebysig specialname instance !'<Y>j__TPar'
get_Y() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !1 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Y>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType3`3'::get_Y
.method public hidebysig specialname instance !'<Z>j__TPar'
get_Z() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !2 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Z>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType3`3'::get_Z
.method public hidebysig virtual instance string
ToString() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 115 (0x73)
.maxstack 2
.locals init (class [mscorlib]System.Text.StringBuilder V_0)
IL_0000: newobj instance void [mscorlib]System.Text.StringBuilder::.ctor()
IL_0005: stloc.0
IL_0006: ldloc.0
IL_0007: ldstr "{ X = "
IL_000c: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_0011: pop
IL_0012: ldloc.0
IL_0013: ldarg.0
IL_0014: ldfld !0 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<X>i__Field'
IL_0019: box !'<X>j__TPar'
IL_001e: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(object)
IL_0023: pop
IL_0024: ldloc.0
IL_0025: ldstr ", Y = "
IL_002a: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_002f: pop
IL_0030: ldloc.0
IL_0031: ldarg.0
IL_0032: ldfld !1 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Y>i__Field'
IL_0037: box !'<Y>j__TPar'
IL_003c: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(object)
IL_0041: pop
IL_0042: ldloc.0
IL_0043: ldstr ", Z = "
IL_0048: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_004d: pop
IL_004e: ldloc.0
IL_004f: ldarg.0
IL_0050: ldfld !2 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Z>i__Field'
IL_0055: box !'<Z>j__TPar'
IL_005a: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(object)
IL_005f: pop
IL_0060: ldloc.0
IL_0061: ldstr " }"
IL_0066: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_006b: pop
IL_006c: ldloc.0
IL_006d: callvirt instance string [mscorlib]System.Object::ToString()
IL_0072: ret
} // end of method '<>f__AnonymousType3`3'::ToString
.method public hidebysig virtual instance bool
Equals(object 'value') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 83 (0x53)
.maxstack 3
.locals init (class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'> V_0)
IL_0000: ldarg.1
IL_0001: isinst class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: brfalse.s IL_0051
IL_000a: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::get_Default()
IL_000f: ldarg.0
IL_0010: ldfld !0 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<X>i__Field'
IL_0015: ldloc.0
IL_0016: ldfld !0 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<X>i__Field'
IL_001b: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::Equals(!0,
!0)
IL_0020: brfalse.s IL_0051
IL_0022: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::get_Default()
IL_0027: ldarg.0
IL_0028: ldfld !1 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Y>i__Field'
IL_002d: ldloc.0
IL_002e: ldfld !1 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Y>i__Field'
IL_0033: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::Equals(!0,
!0)
IL_0038: brfalse.s IL_0051
IL_003a: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Z>j__TPar'>::get_Default()
IL_003f: ldarg.0
IL_0040: ldfld !2 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Z>i__Field'
IL_0045: ldloc.0
IL_0046: ldfld !2 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Z>i__Field'
IL_004b: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Z>j__TPar'>::Equals(!0,
!0)
IL_0050: ret
IL_0051: ldc.i4.0
IL_0052: ret
} // end of method '<>f__AnonymousType3`3'::Equals
.method public hidebysig virtual instance int32
GetHashCode() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 83 (0x53)
.maxstack 3
.locals init (int32 V_0)
IL_0000: ldc.i4 0xd0c61e6a
IL_0005: stloc.0
IL_0006: ldc.i4 0xa5555529
IL_000b: ldloc.0
IL_000c: mul
IL_000d: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::get_Default()
IL_0012: ldarg.0
IL_0013: ldfld !0 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<X>i__Field'
IL_0018: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::GetHashCode(!0)
IL_001d: add
IL_001e: stloc.0
IL_001f: ldc.i4 0xa5555529
IL_0024: ldloc.0
IL_0025: mul
IL_0026: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::get_Default()
IL_002b: ldarg.0
IL_002c: ldfld !1 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Y>i__Field'
IL_0031: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::GetHashCode(!0)
IL_0036: add
IL_0037: stloc.0
IL_0038: ldc.i4 0xa5555529
IL_003d: ldloc.0
IL_003e: mul
IL_003f: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Z>j__TPar'>::get_Default()
IL_0044: ldarg.0
IL_0045: ldfld !2 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Z>i__Field'
IL_004a: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Z>j__TPar'>::GetHashCode(!0)
IL_004f: add
IL_0050: stloc.0
IL_0051: ldloc.0
IL_0052: ret
} // end of method '<>f__AnonymousType3`3'::GetHashCode
.property instance !'<X>j__TPar' X()
{
.get instance !'<X>j__TPar' '<>f__AnonymousType3`3'::get_X()
} // end of property '<>f__AnonymousType3`3'::X
.property instance !'<Y>j__TPar' Y()
{
.get instance !'<Y>j__TPar' '<>f__AnonymousType3`3'::get_Y()
} // end of property '<>f__AnonymousType3`3'::Y
.property instance !'<Z>j__TPar' Z()
{
.get instance !'<Z>j__TPar' '<>f__AnonymousType3`3'::get_Z()
} // end of property '<>f__AnonymousType3`3'::Z
} // end of class '<>f__AnonymousType3`3'
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

879
ICSharpCode.Decompiler.Tests/TestCases/Pretty/AnonymousTypes.opt.mcs.il

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

814
ICSharpCode.Decompiler.Tests/TestCases/Pretty/AnonymousTypes.opt.roslyn.il

@ -1,814 +0,0 @@ @@ -1,814 +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 AnonymousTypes
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
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 AnonymousTypes.dll
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x10000000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// =============== CLASS MEMBERS DECLARATION ===================
.class private auto ansi sealed beforefieldinit '<>f__AnonymousType0'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
} // end of method '<>f__AnonymousType0'::.ctor
.method public hidebysig virtual instance bool
Equals(object 'value') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 10 (0xa)
.maxstack 8
IL_0000: ldarg.1
IL_0001: isinst '<>f__AnonymousType0'
IL_0006: ldnull
IL_0007: cgt.un
IL_0009: ret
} // end of method '<>f__AnonymousType0'::Equals
.method public hidebysig virtual instance int32
GetHashCode() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: ldc.i4.0
IL_0001: ret
} // end of method '<>f__AnonymousType0'::GetHashCode
.method public hidebysig virtual instance string
ToString() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 6 (0x6)
.maxstack 8
IL_0000: ldstr "{ }"
IL_0005: ret
} // end of method '<>f__AnonymousType0'::ToString
} // end of class '<>f__AnonymousType0'
.class private auto ansi sealed beforefieldinit '<>f__AnonymousType1`1'<'<X>j__TPar'>
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private initonly !'<X>j__TPar' '<X>i__Field'
.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 !'<X>j__TPar'
get_X() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !0 class '<>f__AnonymousType1`1'<!'<X>j__TPar'>::'<X>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType1`1'::get_X
.method public hidebysig specialname rtspecialname
instance void .ctor(!'<X>j__TPar' X) cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 14 (0xe)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld !0 class '<>f__AnonymousType1`1'<!'<X>j__TPar'>::'<X>i__Field'
IL_000d: ret
} // end of method '<>f__AnonymousType1`1'::.ctor
.method public hidebysig virtual instance bool
Equals(object 'value') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 35 (0x23)
.maxstack 3
.locals init (class '<>f__AnonymousType1`1'<!'<X>j__TPar'> V_0)
IL_0000: ldarg.1
IL_0001: isinst class '<>f__AnonymousType1`1'<!'<X>j__TPar'>
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: brfalse.s IL_0021
IL_000a: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::get_Default()
IL_000f: ldarg.0
IL_0010: ldfld !0 class '<>f__AnonymousType1`1'<!'<X>j__TPar'>::'<X>i__Field'
IL_0015: ldloc.0
IL_0016: ldfld !0 class '<>f__AnonymousType1`1'<!'<X>j__TPar'>::'<X>i__Field'
IL_001b: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::Equals(!0,
!0)
IL_0020: ret
IL_0021: ldc.i4.0
IL_0022: ret
} // end of method '<>f__AnonymousType1`1'::Equals
.method public hidebysig virtual instance int32
GetHashCode() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 29 (0x1d)
.maxstack 8
IL_0000: ldc.i4 0x1df2dd8e
IL_0005: ldc.i4 0xa5555529
IL_000a: mul
IL_000b: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::get_Default()
IL_0010: ldarg.0
IL_0011: ldfld !0 class '<>f__AnonymousType1`1'<!'<X>j__TPar'>::'<X>i__Field'
IL_0016: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::GetHashCode(!0)
IL_001b: add
IL_001c: ret
} // end of method '<>f__AnonymousType1`1'::GetHashCode
.method public hidebysig virtual instance string
ToString() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 77 (0x4d)
.maxstack 7
.locals init (!'<X>j__TPar' V_0,
!'<X>j__TPar' V_1)
IL_0000: ldnull
IL_0001: ldstr "{{ X = {0} }}"
IL_0006: ldc.i4.1
IL_0007: newarr [mscorlib]System.Object
IL_000c: dup
IL_000d: ldc.i4.0
IL_000e: ldarg.0
IL_000f: ldfld !0 class '<>f__AnonymousType1`1'<!'<X>j__TPar'>::'<X>i__Field'
IL_0014: stloc.0
IL_0015: ldloca.s V_0
IL_0017: ldloca.s V_1
IL_0019: initobj !'<X>j__TPar'
IL_001f: ldloc.1
IL_0020: box !'<X>j__TPar'
IL_0025: brtrue.s IL_003b
IL_0027: ldobj !'<X>j__TPar'
IL_002c: stloc.1
IL_002d: ldloca.s V_1
IL_002f: ldloc.1
IL_0030: box !'<X>j__TPar'
IL_0035: brtrue.s IL_003b
IL_0037: pop
IL_0038: ldnull
IL_0039: br.s IL_0046
IL_003b: constrained. !'<X>j__TPar'
IL_0041: callvirt instance string [mscorlib]System.Object::ToString()
IL_0046: stelem.ref
IL_0047: call string [mscorlib]System.String::Format(class [mscorlib]System.IFormatProvider,
string,
object[])
IL_004c: ret
} // end of method '<>f__AnonymousType1`1'::ToString
.property instance !'<X>j__TPar' X()
{
.get instance !'<X>j__TPar' '<>f__AnonymousType1`1'::get_X()
} // end of property '<>f__AnonymousType1`1'::X
} // end of class '<>f__AnonymousType1`1'
.class private auto ansi sealed beforefieldinit '<>f__AnonymousType2`2'<'<X>j__TPar','<Y>j__TPar'>
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private initonly !'<X>j__TPar' '<X>i__Field'
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.field private initonly !'<Y>j__TPar' '<Y>i__Field'
.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 !'<X>j__TPar'
get_X() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !0 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<X>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType2`2'::get_X
.method public hidebysig specialname instance !'<Y>j__TPar'
get_Y() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !1 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<Y>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType2`2'::get_Y
.method public hidebysig specialname rtspecialname
instance void .ctor(!'<X>j__TPar' X,
!'<Y>j__TPar' Y) cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 21 (0x15)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld !0 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<X>i__Field'
IL_000d: ldarg.0
IL_000e: ldarg.2
IL_000f: stfld !1 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<Y>i__Field'
IL_0014: ret
} // end of method '<>f__AnonymousType2`2'::.ctor
.method public hidebysig virtual instance bool
Equals(object 'value') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 59 (0x3b)
.maxstack 3
.locals init (class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'> V_0)
IL_0000: ldarg.1
IL_0001: isinst class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: brfalse.s IL_0039
IL_000a: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::get_Default()
IL_000f: ldarg.0
IL_0010: ldfld !0 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<X>i__Field'
IL_0015: ldloc.0
IL_0016: ldfld !0 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<X>i__Field'
IL_001b: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::Equals(!0,
!0)
IL_0020: brfalse.s IL_0039
IL_0022: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::get_Default()
IL_0027: ldarg.0
IL_0028: ldfld !1 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<Y>i__Field'
IL_002d: ldloc.0
IL_002e: ldfld !1 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<Y>i__Field'
IL_0033: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::Equals(!0,
!0)
IL_0038: ret
IL_0039: ldc.i4.0
IL_003a: ret
} // end of method '<>f__AnonymousType2`2'::Equals
.method public hidebysig virtual instance int32
GetHashCode() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 52 (0x34)
.maxstack 8
IL_0000: ldc.i4 0x60414d69
IL_0005: ldc.i4 0xa5555529
IL_000a: mul
IL_000b: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::get_Default()
IL_0010: ldarg.0
IL_0011: ldfld !0 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<X>i__Field'
IL_0016: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::GetHashCode(!0)
IL_001b: add
IL_001c: ldc.i4 0xa5555529
IL_0021: mul
IL_0022: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::get_Default()
IL_0027: ldarg.0
IL_0028: ldfld !1 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<Y>i__Field'
IL_002d: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::GetHashCode(!0)
IL_0032: add
IL_0033: ret
} // end of method '<>f__AnonymousType2`2'::GetHashCode
.method public hidebysig virtual instance string
ToString() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 136 (0x88)
.maxstack 7
.locals init (!'<X>j__TPar' V_0,
!'<X>j__TPar' V_1,
!'<Y>j__TPar' V_2,
!'<Y>j__TPar' V_3)
IL_0000: ldnull
IL_0001: ldstr "{{ X = {0}, Y = {1} }}"
IL_0006: ldc.i4.2
IL_0007: newarr [mscorlib]System.Object
IL_000c: dup
IL_000d: ldc.i4.0
IL_000e: ldarg.0
IL_000f: ldfld !0 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<X>i__Field'
IL_0014: stloc.0
IL_0015: ldloca.s V_0
IL_0017: ldloca.s V_1
IL_0019: initobj !'<X>j__TPar'
IL_001f: ldloc.1
IL_0020: box !'<X>j__TPar'
IL_0025: brtrue.s IL_003b
IL_0027: ldobj !'<X>j__TPar'
IL_002c: stloc.1
IL_002d: ldloca.s V_1
IL_002f: ldloc.1
IL_0030: box !'<X>j__TPar'
IL_0035: brtrue.s IL_003b
IL_0037: pop
IL_0038: ldnull
IL_0039: br.s IL_0046
IL_003b: constrained. !'<X>j__TPar'
IL_0041: callvirt instance string [mscorlib]System.Object::ToString()
IL_0046: stelem.ref
IL_0047: dup
IL_0048: ldc.i4.1
IL_0049: ldarg.0
IL_004a: ldfld !1 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<Y>i__Field'
IL_004f: stloc.2
IL_0050: ldloca.s V_2
IL_0052: ldloca.s V_3
IL_0054: initobj !'<Y>j__TPar'
IL_005a: ldloc.3
IL_005b: box !'<Y>j__TPar'
IL_0060: brtrue.s IL_0076
IL_0062: ldobj !'<Y>j__TPar'
IL_0067: stloc.3
IL_0068: ldloca.s V_3
IL_006a: ldloc.3
IL_006b: box !'<Y>j__TPar'
IL_0070: brtrue.s IL_0076
IL_0072: pop
IL_0073: ldnull
IL_0074: br.s IL_0081
IL_0076: constrained. !'<Y>j__TPar'
IL_007c: callvirt instance string [mscorlib]System.Object::ToString()
IL_0081: stelem.ref
IL_0082: call string [mscorlib]System.String::Format(class [mscorlib]System.IFormatProvider,
string,
object[])
IL_0087: ret
} // end of method '<>f__AnonymousType2`2'::ToString
.property instance !'<X>j__TPar' X()
{
.get instance !'<X>j__TPar' '<>f__AnonymousType2`2'::get_X()
} // end of property '<>f__AnonymousType2`2'::X
.property instance !'<Y>j__TPar' Y()
{
.get instance !'<Y>j__TPar' '<>f__AnonymousType2`2'::get_Y()
} // end of property '<>f__AnonymousType2`2'::Y
} // end of class '<>f__AnonymousType2`2'
.class private auto ansi sealed beforefieldinit '<>f__AnonymousType3`3'<'<X>j__TPar','<Y>j__TPar','<Z>j__TPar'>
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private initonly !'<X>j__TPar' '<X>i__Field'
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.field private initonly !'<Y>j__TPar' '<Y>i__Field'
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.field private initonly !'<Z>j__TPar' '<Z>i__Field'
.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 !'<X>j__TPar'
get_X() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !0 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<X>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType3`3'::get_X
.method public hidebysig specialname instance !'<Y>j__TPar'
get_Y() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !1 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Y>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType3`3'::get_Y
.method public hidebysig specialname instance !'<Z>j__TPar'
get_Z() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !2 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Z>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType3`3'::get_Z
.method public hidebysig specialname rtspecialname
instance void .ctor(!'<X>j__TPar' X,
!'<Y>j__TPar' Y,
!'<Z>j__TPar' Z) cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 28 (0x1c)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld !0 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<X>i__Field'
IL_000d: ldarg.0
IL_000e: ldarg.2
IL_000f: stfld !1 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Y>i__Field'
IL_0014: ldarg.0
IL_0015: ldarg.3
IL_0016: stfld !2 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Z>i__Field'
IL_001b: ret
} // end of method '<>f__AnonymousType3`3'::.ctor
.method public hidebysig virtual instance bool
Equals(object 'value') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 83 (0x53)
.maxstack 3
.locals init (class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'> V_0)
IL_0000: ldarg.1
IL_0001: isinst class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: brfalse.s IL_0051
IL_000a: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::get_Default()
IL_000f: ldarg.0
IL_0010: ldfld !0 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<X>i__Field'
IL_0015: ldloc.0
IL_0016: ldfld !0 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<X>i__Field'
IL_001b: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::Equals(!0,
!0)
IL_0020: brfalse.s IL_0051
IL_0022: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::get_Default()
IL_0027: ldarg.0
IL_0028: ldfld !1 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Y>i__Field'
IL_002d: ldloc.0
IL_002e: ldfld !1 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Y>i__Field'
IL_0033: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::Equals(!0,
!0)
IL_0038: brfalse.s IL_0051
IL_003a: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Z>j__TPar'>::get_Default()
IL_003f: ldarg.0
IL_0040: ldfld !2 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Z>i__Field'
IL_0045: ldloc.0
IL_0046: ldfld !2 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Z>i__Field'
IL_004b: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Z>j__TPar'>::Equals(!0,
!0)
IL_0050: ret
IL_0051: ldc.i4.0
IL_0052: ret
} // end of method '<>f__AnonymousType3`3'::Equals
.method public hidebysig virtual instance int32
GetHashCode() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 75 (0x4b)
.maxstack 3
IL_0000: ldc.i4 0xb4568a5d
IL_0005: ldc.i4 0xa5555529
IL_000a: mul
IL_000b: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::get_Default()
IL_0010: ldarg.0
IL_0011: ldfld !0 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<X>i__Field'
IL_0016: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::GetHashCode(!0)
IL_001b: add
IL_001c: ldc.i4 0xa5555529
IL_0021: mul
IL_0022: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::get_Default()
IL_0027: ldarg.0
IL_0028: ldfld !1 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Y>i__Field'
IL_002d: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::GetHashCode(!0)
IL_0032: add
IL_0033: ldc.i4 0xa5555529
IL_0038: mul
IL_0039: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Z>j__TPar'>::get_Default()
IL_003e: ldarg.0
IL_003f: ldfld !2 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Z>i__Field'
IL_0044: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Z>j__TPar'>::GetHashCode(!0)
IL_0049: add
IL_004a: ret
} // end of method '<>f__AnonymousType3`3'::GetHashCode
.method public hidebysig virtual instance string
ToString() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 199 (0xc7)
.maxstack 7
.locals init (!'<X>j__TPar' V_0,
!'<X>j__TPar' V_1,
!'<Y>j__TPar' V_2,
!'<Y>j__TPar' V_3,
!'<Z>j__TPar' V_4,
!'<Z>j__TPar' V_5)
IL_0000: ldnull
IL_0001: ldstr "{{ X = {0}, Y = {1}, Z = {2} }}"
IL_0006: ldc.i4.3
IL_0007: newarr [mscorlib]System.Object
IL_000c: dup
IL_000d: ldc.i4.0
IL_000e: ldarg.0
IL_000f: ldfld !0 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<X>i__Field'
IL_0014: stloc.0
IL_0015: ldloca.s V_0
IL_0017: ldloca.s V_1
IL_0019: initobj !'<X>j__TPar'
IL_001f: ldloc.1
IL_0020: box !'<X>j__TPar'
IL_0025: brtrue.s IL_003b
IL_0027: ldobj !'<X>j__TPar'
IL_002c: stloc.1
IL_002d: ldloca.s V_1
IL_002f: ldloc.1
IL_0030: box !'<X>j__TPar'
IL_0035: brtrue.s IL_003b
IL_0037: pop
IL_0038: ldnull
IL_0039: br.s IL_0046
IL_003b: constrained. !'<X>j__TPar'
IL_0041: callvirt instance string [mscorlib]System.Object::ToString()
IL_0046: stelem.ref
IL_0047: dup
IL_0048: ldc.i4.1
IL_0049: ldarg.0
IL_004a: ldfld !1 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Y>i__Field'
IL_004f: stloc.2
IL_0050: ldloca.s V_2
IL_0052: ldloca.s V_3
IL_0054: initobj !'<Y>j__TPar'
IL_005a: ldloc.3
IL_005b: box !'<Y>j__TPar'
IL_0060: brtrue.s IL_0076
IL_0062: ldobj !'<Y>j__TPar'
IL_0067: stloc.3
IL_0068: ldloca.s V_3
IL_006a: ldloc.3
IL_006b: box !'<Y>j__TPar'
IL_0070: brtrue.s IL_0076
IL_0072: pop
IL_0073: ldnull
IL_0074: br.s IL_0081
IL_0076: constrained. !'<Y>j__TPar'
IL_007c: callvirt instance string [mscorlib]System.Object::ToString()
IL_0081: stelem.ref
IL_0082: dup
IL_0083: ldc.i4.2
IL_0084: ldarg.0
IL_0085: ldfld !2 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Z>i__Field'
IL_008a: stloc.s V_4
IL_008c: ldloca.s V_4
IL_008e: ldloca.s V_5
IL_0090: initobj !'<Z>j__TPar'
IL_0096: ldloc.s V_5
IL_0098: box !'<Z>j__TPar'
IL_009d: brtrue.s IL_00b5
IL_009f: ldobj !'<Z>j__TPar'
IL_00a4: stloc.s V_5
IL_00a6: ldloca.s V_5
IL_00a8: ldloc.s V_5
IL_00aa: box !'<Z>j__TPar'
IL_00af: brtrue.s IL_00b5
IL_00b1: pop
IL_00b2: ldnull
IL_00b3: br.s IL_00c0
IL_00b5: constrained. !'<Z>j__TPar'
IL_00bb: callvirt instance string [mscorlib]System.Object::ToString()
IL_00c0: stelem.ref
IL_00c1: call string [mscorlib]System.String::Format(class [mscorlib]System.IFormatProvider,
string,
object[])
IL_00c6: ret
} // end of method '<>f__AnonymousType3`3'::ToString
.property instance !'<X>j__TPar' X()
{
.get instance !'<X>j__TPar' '<>f__AnonymousType3`3'::get_X()
} // end of property '<>f__AnonymousType3`3'::X
.property instance !'<Y>j__TPar' Y()
{
.get instance !'<Y>j__TPar' '<>f__AnonymousType3`3'::get_Y()
} // end of property '<>f__AnonymousType3`3'::Y
.property instance !'<Z>j__TPar' Z()
{
.get instance !'<Z>j__TPar' '<>f__AnonymousType3`3'::get_Z()
} // end of property '<>f__AnonymousType3`3'::Z
} // end of class '<>f__AnonymousType3`3'
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.AnonymousTypes
extends [mscorlib]System.Object
{
.method private hidebysig instance void
SimpleTypes() cil managed
{
// Code size 56 (0x38)
.maxstack 3
.locals init (class '<>f__AnonymousType1`1'<int32> V_0,
class '<>f__AnonymousType2`2'<int32,int32> V_1)
IL_0000: newobj instance void '<>f__AnonymousType0'::.ctor()
IL_0005: ldc.i4.5
IL_0006: newobj instance void class '<>f__AnonymousType1`1'<int32>::.ctor(!0)
IL_000b: stloc.0
IL_000c: ldc.i4.5
IL_000d: ldc.i4.s 10
IL_000f: newobj instance void class '<>f__AnonymousType2`2'<int32,int32>::.ctor(!0,
!1)
IL_0014: stloc.1
IL_0015: call void [mscorlib]System.Console::WriteLine(object)
IL_001a: ldloc.0
IL_001b: callvirt instance !0 class '<>f__AnonymousType1`1'<int32>::get_X()
IL_0020: call void [mscorlib]System.Console::WriteLine(int32)
IL_0025: ldloc.1
IL_0026: callvirt instance !1 class '<>f__AnonymousType2`2'<int32,int32>::get_Y()
IL_002b: ldloc.1
IL_002c: callvirt instance !0 class '<>f__AnonymousType2`2'<int32,int32>::get_X()
IL_0031: add
IL_0032: call void [mscorlib]System.Console::WriteLine(int32)
IL_0037: ret
} // end of method AnonymousTypes::SimpleTypes
.method private hidebysig instance void
SimpleArray() cil managed
{
// Code size 55 (0x37)
.maxstack 8
IL_0000: ldc.i4.2
IL_0001: newarr class '<>f__AnonymousType3`3'<int32,int32,int32>
IL_0006: dup
IL_0007: ldc.i4.0
IL_0008: ldc.i4.5
IL_0009: ldc.i4.2
IL_000a: ldc.i4.m1
IL_000b: newobj instance void class '<>f__AnonymousType3`3'<int32,int32,int32>::.ctor(!0,
!1,
!2)
IL_0010: stelem.ref
IL_0011: dup
IL_0012: ldc.i4.1
IL_0013: ldc.i4.3
IL_0014: ldc.i4.6
IL_0015: ldc.i4.s -6
IL_0017: newobj instance void class '<>f__AnonymousType3`3'<int32,int32,int32>::.ctor(!0,
!1,
!2)
IL_001c: stelem.ref
IL_001d: dup
IL_001e: ldc.i4.0
IL_001f: ldelem.ref
IL_0020: callvirt instance !0 class '<>f__AnonymousType3`3'<int32,int32,int32>::get_X()
IL_0025: call void [mscorlib]System.Console::WriteLine(int32)
IL_002a: ldc.i4.1
IL_002b: ldelem.ref
IL_002c: callvirt instance !0 class '<>f__AnonymousType3`3'<int32,int32,int32>::get_X()
IL_0031: call void [mscorlib]System.Console::WriteLine(int32)
IL_0036: ret
} // end of method AnonymousTypes::SimpleArray
.method private hidebysig instance void
JaggedArray() cil managed
{
// Code size 78 (0x4e)
.maxstack 6
.locals init (class '<>f__AnonymousType3`3'<int32,int32,int32>[] V_0)
IL_0000: ldc.i4.2
IL_0001: newarr class '<>f__AnonymousType3`3'<int32,int32,int32>
IL_0006: dup
IL_0007: ldc.i4.0
IL_0008: ldc.i4.5
IL_0009: ldc.i4.2
IL_000a: ldc.i4.m1
IL_000b: newobj instance void class '<>f__AnonymousType3`3'<int32,int32,int32>::.ctor(!0,
!1,
!2)
IL_0010: stelem.ref
IL_0011: dup
IL_0012: ldc.i4.1
IL_0013: ldc.i4.3
IL_0014: ldc.i4.6
IL_0015: ldc.i4.s -6
IL_0017: newobj instance void class '<>f__AnonymousType3`3'<int32,int32,int32>::.ctor(!0,
!1,
!2)
IL_001c: stelem.ref
IL_001d: stloc.0
IL_001e: ldc.i4.2
IL_001f: newarr class '<>f__AnonymousType3`3'<int32,int32,int32>[]
IL_0024: dup
IL_0025: ldc.i4.0
IL_0026: ldloc.0
IL_0027: stelem.ref
IL_0028: dup
IL_0029: ldc.i4.1
IL_002a: ldloc.0
IL_002b: stelem.ref
IL_002c: ldloc.0
IL_002d: ldc.i4.0
IL_002e: ldelem.ref
IL_002f: callvirt instance !0 class '<>f__AnonymousType3`3'<int32,int32,int32>::get_X()
IL_0034: call void [mscorlib]System.Console::WriteLine(int32)
IL_0039: ldloc.0
IL_003a: ldc.i4.1
IL_003b: ldelem.ref
IL_003c: callvirt instance !0 class '<>f__AnonymousType3`3'<int32,int32,int32>::get_X()
IL_0041: call void [mscorlib]System.Console::WriteLine(int32)
IL_0046: ldlen
IL_0047: conv.i4
IL_0048: call void [mscorlib]System.Console::WriteLine(int32)
IL_004d: ret
} // end of method AnonymousTypes::JaggedArray
.method private hidebysig instance void
AnonymousTypeOutVar() cil managed
{
// Code size 26 (0x1a)
.maxstack 3
.locals init (class '<>f__AnonymousType2`2'<int32,int32> V_0)
IL_0000: ldloca.s V_0
IL_0002: ldc.i4.1
IL_0003: ldc.i4.2
IL_0004: newobj instance void class '<>f__AnonymousType2`2'<int32,int32>::.ctor(!0,
!1)
IL_0009: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.AnonymousTypes::InlineVarDecl<class '<>f__AnonymousType2`2'<int32,int32>>(!!0&,
!!0)
IL_000e: ldloc.0
IL_000f: callvirt instance !0 class '<>f__AnonymousType2`2'<int32,int32>::get_X()
IL_0014: call void [mscorlib]System.Console::WriteLine(int32)
IL_0019: ret
} // end of method AnonymousTypes::AnonymousTypeOutVar
.method private hidebysig static void InlineVarDecl<T>([out] !!T& v,
!!T 'init') cil managed
{
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: stobj !!T
IL_0007: ret
} // end of method AnonymousTypes::InlineVarDecl
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
} // end of method AnonymousTypes::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.AnonymousTypes
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

853
ICSharpCode.Decompiler.Tests/TestCases/Pretty/AnonymousTypes.roslyn.il

@ -1,853 +0,0 @@ @@ -1,853 +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 AnonymousTypes
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
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 AnonymousTypes.dll
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x10000000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// =============== CLASS MEMBERS DECLARATION ===================
.class private auto ansi sealed beforefieldinit '<>f__AnonymousType0'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 04 5C 7B 20 7D 01 00 54 0E 04 54 79 70 65 // ...\{ }..T..Type
10 3C 41 6E 6F 6E 79 6D 6F 75 73 20 54 79 70 65 // .<Anonymous Type
3E ) // >
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret
} // end of method '<>f__AnonymousType0'::.ctor
.method public hidebysig virtual instance bool
Equals(object 'value') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 10 (0xa)
.maxstack 8
IL_0000: ldarg.1
IL_0001: isinst '<>f__AnonymousType0'
IL_0006: ldnull
IL_0007: cgt.un
IL_0009: ret
} // end of method '<>f__AnonymousType0'::Equals
.method public hidebysig virtual instance int32
GetHashCode() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: ldc.i4.0
IL_0001: ret
} // end of method '<>f__AnonymousType0'::GetHashCode
.method public hidebysig virtual instance string
ToString() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 6 (0x6)
.maxstack 8
IL_0000: ldstr "{ }"
IL_0005: ret
} // end of method '<>f__AnonymousType0'::ToString
} // end of class '<>f__AnonymousType0'
.class private auto ansi sealed beforefieldinit '<>f__AnonymousType1`1'<'<X>j__TPar'>
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 0C 5C 7B 20 58 20 3D 20 7B 58 7D 20 7D 01 // ...\{ X = {X} }.
00 54 0E 04 54 79 70 65 10 3C 41 6E 6F 6E 79 6D // .T..Type.<Anonym
6F 75 73 20 54 79 70 65 3E ) // ous Type>
.field private initonly !'<X>j__TPar' '<X>i__Field'
.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 !'<X>j__TPar'
get_X() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !0 class '<>f__AnonymousType1`1'<!'<X>j__TPar'>::'<X>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType1`1'::get_X
.method public hidebysig specialname rtspecialname
instance void .ctor(!'<X>j__TPar' X) cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 14 (0xe)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld !0 class '<>f__AnonymousType1`1'<!'<X>j__TPar'>::'<X>i__Field'
IL_000d: ret
} // end of method '<>f__AnonymousType1`1'::.ctor
.method public hidebysig virtual instance bool
Equals(object 'value') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 36 (0x24)
.maxstack 3
.locals init (class '<>f__AnonymousType1`1'<!'<X>j__TPar'> V_0)
IL_0000: ldarg.1
IL_0001: isinst class '<>f__AnonymousType1`1'<!'<X>j__TPar'>
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: brfalse.s IL_0022
IL_000a: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::get_Default()
IL_000f: ldarg.0
IL_0010: ldfld !0 class '<>f__AnonymousType1`1'<!'<X>j__TPar'>::'<X>i__Field'
IL_0015: ldloc.0
IL_0016: ldfld !0 class '<>f__AnonymousType1`1'<!'<X>j__TPar'>::'<X>i__Field'
IL_001b: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::Equals(!0,
!0)
IL_0020: br.s IL_0023
IL_0022: ldc.i4.0
IL_0023: ret
} // end of method '<>f__AnonymousType1`1'::Equals
.method public hidebysig virtual instance int32
GetHashCode() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 29 (0x1d)
.maxstack 8
IL_0000: ldc.i4 0x1df2dd8e
IL_0005: ldc.i4 0xa5555529
IL_000a: mul
IL_000b: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::get_Default()
IL_0010: ldarg.0
IL_0011: ldfld !0 class '<>f__AnonymousType1`1'<!'<X>j__TPar'>::'<X>i__Field'
IL_0016: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::GetHashCode(!0)
IL_001b: add
IL_001c: ret
} // end of method '<>f__AnonymousType1`1'::GetHashCode
.method public hidebysig virtual instance string
ToString() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 77 (0x4d)
.maxstack 7
.locals init (!'<X>j__TPar' V_0,
!'<X>j__TPar' V_1)
IL_0000: ldnull
IL_0001: ldstr "{{ X = {0} }}"
IL_0006: ldc.i4.1
IL_0007: newarr [mscorlib]System.Object
IL_000c: dup
IL_000d: ldc.i4.0
IL_000e: ldarg.0
IL_000f: ldfld !0 class '<>f__AnonymousType1`1'<!'<X>j__TPar'>::'<X>i__Field'
IL_0014: stloc.0
IL_0015: ldloca.s V_0
IL_0017: ldloca.s V_1
IL_0019: initobj !'<X>j__TPar'
IL_001f: ldloc.1
IL_0020: box !'<X>j__TPar'
IL_0025: brtrue.s IL_003b
IL_0027: ldobj !'<X>j__TPar'
IL_002c: stloc.1
IL_002d: ldloca.s V_1
IL_002f: ldloc.1
IL_0030: box !'<X>j__TPar'
IL_0035: brtrue.s IL_003b
IL_0037: pop
IL_0038: ldnull
IL_0039: br.s IL_0046
IL_003b: constrained. !'<X>j__TPar'
IL_0041: callvirt instance string [mscorlib]System.Object::ToString()
IL_0046: stelem.ref
IL_0047: call string [mscorlib]System.String::Format(class [mscorlib]System.IFormatProvider,
string,
object[])
IL_004c: ret
} // end of method '<>f__AnonymousType1`1'::ToString
.property instance !'<X>j__TPar' X()
{
.get instance !'<X>j__TPar' '<>f__AnonymousType1`1'::get_X()
} // end of property '<>f__AnonymousType1`1'::X
} // end of class '<>f__AnonymousType1`1'
.class private auto ansi sealed beforefieldinit '<>f__AnonymousType2`2'<'<X>j__TPar','<Y>j__TPar'>
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 5C 7B 20 58 20 3D 20 7B 58 7D 2C 20 59 // ...\{ X = {X}, Y
20 3D 20 7B 59 7D 20 7D 01 00 54 0E 04 54 79 70 // = {Y} }..T..Typ
65 10 3C 41 6E 6F 6E 79 6D 6F 75 73 20 54 79 70 // e.<Anonymous Typ
65 3E ) // e>
.field private initonly !'<X>j__TPar' '<X>i__Field'
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.field private initonly !'<Y>j__TPar' '<Y>i__Field'
.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 !'<X>j__TPar'
get_X() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !0 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<X>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType2`2'::get_X
.method public hidebysig specialname instance !'<Y>j__TPar'
get_Y() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !1 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<Y>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType2`2'::get_Y
.method public hidebysig specialname rtspecialname
instance void .ctor(!'<X>j__TPar' X,
!'<Y>j__TPar' Y) cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 21 (0x15)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld !0 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<X>i__Field'
IL_000d: ldarg.0
IL_000e: ldarg.2
IL_000f: stfld !1 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<Y>i__Field'
IL_0014: ret
} // end of method '<>f__AnonymousType2`2'::.ctor
.method public hidebysig virtual instance bool
Equals(object 'value') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 60 (0x3c)
.maxstack 3
.locals init (class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'> V_0)
IL_0000: ldarg.1
IL_0001: isinst class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: brfalse.s IL_003a
IL_000a: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::get_Default()
IL_000f: ldarg.0
IL_0010: ldfld !0 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<X>i__Field'
IL_0015: ldloc.0
IL_0016: ldfld !0 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<X>i__Field'
IL_001b: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::Equals(!0,
!0)
IL_0020: brfalse.s IL_003a
IL_0022: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::get_Default()
IL_0027: ldarg.0
IL_0028: ldfld !1 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<Y>i__Field'
IL_002d: ldloc.0
IL_002e: ldfld !1 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<Y>i__Field'
IL_0033: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::Equals(!0,
!0)
IL_0038: br.s IL_003b
IL_003a: ldc.i4.0
IL_003b: ret
} // end of method '<>f__AnonymousType2`2'::Equals
.method public hidebysig virtual instance int32
GetHashCode() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 52 (0x34)
.maxstack 8
IL_0000: ldc.i4 0x60414d69
IL_0005: ldc.i4 0xa5555529
IL_000a: mul
IL_000b: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::get_Default()
IL_0010: ldarg.0
IL_0011: ldfld !0 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<X>i__Field'
IL_0016: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::GetHashCode(!0)
IL_001b: add
IL_001c: ldc.i4 0xa5555529
IL_0021: mul
IL_0022: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::get_Default()
IL_0027: ldarg.0
IL_0028: ldfld !1 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<Y>i__Field'
IL_002d: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::GetHashCode(!0)
IL_0032: add
IL_0033: ret
} // end of method '<>f__AnonymousType2`2'::GetHashCode
.method public hidebysig virtual instance string
ToString() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 136 (0x88)
.maxstack 7
.locals init (!'<X>j__TPar' V_0,
!'<X>j__TPar' V_1,
!'<Y>j__TPar' V_2,
!'<Y>j__TPar' V_3)
IL_0000: ldnull
IL_0001: ldstr "{{ X = {0}, Y = {1} }}"
IL_0006: ldc.i4.2
IL_0007: newarr [mscorlib]System.Object
IL_000c: dup
IL_000d: ldc.i4.0
IL_000e: ldarg.0
IL_000f: ldfld !0 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<X>i__Field'
IL_0014: stloc.0
IL_0015: ldloca.s V_0
IL_0017: ldloca.s V_1
IL_0019: initobj !'<X>j__TPar'
IL_001f: ldloc.1
IL_0020: box !'<X>j__TPar'
IL_0025: brtrue.s IL_003b
IL_0027: ldobj !'<X>j__TPar'
IL_002c: stloc.1
IL_002d: ldloca.s V_1
IL_002f: ldloc.1
IL_0030: box !'<X>j__TPar'
IL_0035: brtrue.s IL_003b
IL_0037: pop
IL_0038: ldnull
IL_0039: br.s IL_0046
IL_003b: constrained. !'<X>j__TPar'
IL_0041: callvirt instance string [mscorlib]System.Object::ToString()
IL_0046: stelem.ref
IL_0047: dup
IL_0048: ldc.i4.1
IL_0049: ldarg.0
IL_004a: ldfld !1 class '<>f__AnonymousType2`2'<!'<X>j__TPar',!'<Y>j__TPar'>::'<Y>i__Field'
IL_004f: stloc.2
IL_0050: ldloca.s V_2
IL_0052: ldloca.s V_3
IL_0054: initobj !'<Y>j__TPar'
IL_005a: ldloc.3
IL_005b: box !'<Y>j__TPar'
IL_0060: brtrue.s IL_0076
IL_0062: ldobj !'<Y>j__TPar'
IL_0067: stloc.3
IL_0068: ldloca.s V_3
IL_006a: ldloc.3
IL_006b: box !'<Y>j__TPar'
IL_0070: brtrue.s IL_0076
IL_0072: pop
IL_0073: ldnull
IL_0074: br.s IL_0081
IL_0076: constrained. !'<Y>j__TPar'
IL_007c: callvirt instance string [mscorlib]System.Object::ToString()
IL_0081: stelem.ref
IL_0082: call string [mscorlib]System.String::Format(class [mscorlib]System.IFormatProvider,
string,
object[])
IL_0087: ret
} // end of method '<>f__AnonymousType2`2'::ToString
.property instance !'<X>j__TPar' X()
{
.get instance !'<X>j__TPar' '<>f__AnonymousType2`2'::get_X()
} // end of property '<>f__AnonymousType2`2'::X
.property instance !'<Y>j__TPar' Y()
{
.get instance !'<Y>j__TPar' '<>f__AnonymousType2`2'::get_Y()
} // end of property '<>f__AnonymousType2`2'::Y
} // end of class '<>f__AnonymousType2`2'
.class private auto ansi sealed beforefieldinit '<>f__AnonymousType3`3'<'<X>j__TPar','<Y>j__TPar','<Z>j__TPar'>
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 1E 5C 7B 20 58 20 3D 20 7B 58 7D 2C 20 59 // ...\{ X = {X}, Y
20 3D 20 7B 59 7D 2C 20 5A 20 3D 20 7B 5A 7D 20 // = {Y}, Z = {Z}
7D 01 00 54 0E 04 54 79 70 65 10 3C 41 6E 6F 6E // }..T..Type.<Anon
79 6D 6F 75 73 20 54 79 70 65 3E ) // ymous Type>
.field private initonly !'<X>j__TPar' '<X>i__Field'
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.field private initonly !'<Y>j__TPar' '<Y>i__Field'
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.field private initonly !'<Z>j__TPar' '<Z>i__Field'
.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 !'<X>j__TPar'
get_X() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !0 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<X>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType3`3'::get_X
.method public hidebysig specialname instance !'<Y>j__TPar'
get_Y() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !1 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Y>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType3`3'::get_Y
.method public hidebysig specialname instance !'<Z>j__TPar'
get_Z() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !2 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Z>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType3`3'::get_Z
.method public hidebysig specialname rtspecialname
instance void .ctor(!'<X>j__TPar' X,
!'<Y>j__TPar' Y,
!'<Z>j__TPar' Z) cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 28 (0x1c)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld !0 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<X>i__Field'
IL_000d: ldarg.0
IL_000e: ldarg.2
IL_000f: stfld !1 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Y>i__Field'
IL_0014: ldarg.0
IL_0015: ldarg.3
IL_0016: stfld !2 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Z>i__Field'
IL_001b: ret
} // end of method '<>f__AnonymousType3`3'::.ctor
.method public hidebysig virtual instance bool
Equals(object 'value') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 84 (0x54)
.maxstack 3
.locals init (class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'> V_0)
IL_0000: ldarg.1
IL_0001: isinst class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: brfalse.s IL_0052
IL_000a: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::get_Default()
IL_000f: ldarg.0
IL_0010: ldfld !0 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<X>i__Field'
IL_0015: ldloc.0
IL_0016: ldfld !0 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<X>i__Field'
IL_001b: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::Equals(!0,
!0)
IL_0020: brfalse.s IL_0052
IL_0022: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::get_Default()
IL_0027: ldarg.0
IL_0028: ldfld !1 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Y>i__Field'
IL_002d: ldloc.0
IL_002e: ldfld !1 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Y>i__Field'
IL_0033: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::Equals(!0,
!0)
IL_0038: brfalse.s IL_0052
IL_003a: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Z>j__TPar'>::get_Default()
IL_003f: ldarg.0
IL_0040: ldfld !2 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Z>i__Field'
IL_0045: ldloc.0
IL_0046: ldfld !2 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Z>i__Field'
IL_004b: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Z>j__TPar'>::Equals(!0,
!0)
IL_0050: br.s IL_0053
IL_0052: ldc.i4.0
IL_0053: ret
} // end of method '<>f__AnonymousType3`3'::Equals
.method public hidebysig virtual instance int32
GetHashCode() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 75 (0x4b)
.maxstack 3
IL_0000: ldc.i4 0xb4568a5d
IL_0005: ldc.i4 0xa5555529
IL_000a: mul
IL_000b: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::get_Default()
IL_0010: ldarg.0
IL_0011: ldfld !0 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<X>i__Field'
IL_0016: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<X>j__TPar'>::GetHashCode(!0)
IL_001b: add
IL_001c: ldc.i4 0xa5555529
IL_0021: mul
IL_0022: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::get_Default()
IL_0027: ldarg.0
IL_0028: ldfld !1 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Y>i__Field'
IL_002d: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Y>j__TPar'>::GetHashCode(!0)
IL_0032: add
IL_0033: ldc.i4 0xa5555529
IL_0038: mul
IL_0039: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Z>j__TPar'>::get_Default()
IL_003e: ldarg.0
IL_003f: ldfld !2 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Z>i__Field'
IL_0044: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<Z>j__TPar'>::GetHashCode(!0)
IL_0049: add
IL_004a: ret
} // end of method '<>f__AnonymousType3`3'::GetHashCode
.method public hidebysig virtual instance string
ToString() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 199 (0xc7)
.maxstack 7
.locals init (!'<X>j__TPar' V_0,
!'<X>j__TPar' V_1,
!'<Y>j__TPar' V_2,
!'<Y>j__TPar' V_3,
!'<Z>j__TPar' V_4,
!'<Z>j__TPar' V_5)
IL_0000: ldnull
IL_0001: ldstr "{{ X = {0}, Y = {1}, Z = {2} }}"
IL_0006: ldc.i4.3
IL_0007: newarr [mscorlib]System.Object
IL_000c: dup
IL_000d: ldc.i4.0
IL_000e: ldarg.0
IL_000f: ldfld !0 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<X>i__Field'
IL_0014: stloc.0
IL_0015: ldloca.s V_0
IL_0017: ldloca.s V_1
IL_0019: initobj !'<X>j__TPar'
IL_001f: ldloc.1
IL_0020: box !'<X>j__TPar'
IL_0025: brtrue.s IL_003b
IL_0027: ldobj !'<X>j__TPar'
IL_002c: stloc.1
IL_002d: ldloca.s V_1
IL_002f: ldloc.1
IL_0030: box !'<X>j__TPar'
IL_0035: brtrue.s IL_003b
IL_0037: pop
IL_0038: ldnull
IL_0039: br.s IL_0046
IL_003b: constrained. !'<X>j__TPar'
IL_0041: callvirt instance string [mscorlib]System.Object::ToString()
IL_0046: stelem.ref
IL_0047: dup
IL_0048: ldc.i4.1
IL_0049: ldarg.0
IL_004a: ldfld !1 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Y>i__Field'
IL_004f: stloc.2
IL_0050: ldloca.s V_2
IL_0052: ldloca.s V_3
IL_0054: initobj !'<Y>j__TPar'
IL_005a: ldloc.3
IL_005b: box !'<Y>j__TPar'
IL_0060: brtrue.s IL_0076
IL_0062: ldobj !'<Y>j__TPar'
IL_0067: stloc.3
IL_0068: ldloca.s V_3
IL_006a: ldloc.3
IL_006b: box !'<Y>j__TPar'
IL_0070: brtrue.s IL_0076
IL_0072: pop
IL_0073: ldnull
IL_0074: br.s IL_0081
IL_0076: constrained. !'<Y>j__TPar'
IL_007c: callvirt instance string [mscorlib]System.Object::ToString()
IL_0081: stelem.ref
IL_0082: dup
IL_0083: ldc.i4.2
IL_0084: ldarg.0
IL_0085: ldfld !2 class '<>f__AnonymousType3`3'<!'<X>j__TPar',!'<Y>j__TPar',!'<Z>j__TPar'>::'<Z>i__Field'
IL_008a: stloc.s V_4
IL_008c: ldloca.s V_4
IL_008e: ldloca.s V_5
IL_0090: initobj !'<Z>j__TPar'
IL_0096: ldloc.s V_5
IL_0098: box !'<Z>j__TPar'
IL_009d: brtrue.s IL_00b5
IL_009f: ldobj !'<Z>j__TPar'
IL_00a4: stloc.s V_5
IL_00a6: ldloca.s V_5
IL_00a8: ldloc.s V_5
IL_00aa: box !'<Z>j__TPar'
IL_00af: brtrue.s IL_00b5
IL_00b1: pop
IL_00b2: ldnull
IL_00b3: br.s IL_00c0
IL_00b5: constrained. !'<Z>j__TPar'
IL_00bb: callvirt instance string [mscorlib]System.Object::ToString()
IL_00c0: stelem.ref
IL_00c1: call string [mscorlib]System.String::Format(class [mscorlib]System.IFormatProvider,
string,
object[])
IL_00c6: ret
} // end of method '<>f__AnonymousType3`3'::ToString
.property instance !'<X>j__TPar' X()
{
.get instance !'<X>j__TPar' '<>f__AnonymousType3`3'::get_X()
} // end of property '<>f__AnonymousType3`3'::X
.property instance !'<Y>j__TPar' Y()
{
.get instance !'<Y>j__TPar' '<>f__AnonymousType3`3'::get_Y()
} // end of property '<>f__AnonymousType3`3'::Y
.property instance !'<Z>j__TPar' Z()
{
.get instance !'<Z>j__TPar' '<>f__AnonymousType3`3'::get_Z()
} // end of property '<>f__AnonymousType3`3'::Z
} // end of class '<>f__AnonymousType3`3'
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.AnonymousTypes
extends [mscorlib]System.Object
{
.method private hidebysig instance void
SimpleTypes() cil managed
{
// Code size 62 (0x3e)
.maxstack 2
.locals init (class '<>f__AnonymousType0' V_0,
class '<>f__AnonymousType1`1'<int32> V_1,
class '<>f__AnonymousType2`2'<int32,int32> V_2)
IL_0000: nop
IL_0001: newobj instance void '<>f__AnonymousType0'::.ctor()
IL_0006: stloc.0
IL_0007: ldc.i4.5
IL_0008: newobj instance void class '<>f__AnonymousType1`1'<int32>::.ctor(!0)
IL_000d: stloc.1
IL_000e: ldc.i4.5
IL_000f: ldc.i4.s 10
IL_0011: newobj instance void class '<>f__AnonymousType2`2'<int32,int32>::.ctor(!0,
!1)
IL_0016: stloc.2
IL_0017: ldloc.0
IL_0018: call void [mscorlib]System.Console::WriteLine(object)
IL_001d: nop
IL_001e: ldloc.1
IL_001f: callvirt instance !0 class '<>f__AnonymousType1`1'<int32>::get_X()
IL_0024: call void [mscorlib]System.Console::WriteLine(int32)
IL_0029: nop
IL_002a: ldloc.2
IL_002b: callvirt instance !1 class '<>f__AnonymousType2`2'<int32,int32>::get_Y()
IL_0030: ldloc.2
IL_0031: callvirt instance !0 class '<>f__AnonymousType2`2'<int32,int32>::get_X()
IL_0036: add
IL_0037: call void [mscorlib]System.Console::WriteLine(int32)
IL_003c: nop
IL_003d: ret
} // end of method AnonymousTypes::SimpleTypes
.method private hidebysig instance void
SimpleArray() cil managed
{
// Code size 60 (0x3c)
.maxstack 6
.locals init (class '<>f__AnonymousType3`3'<int32,int32,int32>[] V_0)
IL_0000: nop
IL_0001: ldc.i4.2
IL_0002: newarr class '<>f__AnonymousType3`3'<int32,int32,int32>
IL_0007: dup
IL_0008: ldc.i4.0
IL_0009: ldc.i4.5
IL_000a: ldc.i4.2
IL_000b: ldc.i4.m1
IL_000c: newobj instance void class '<>f__AnonymousType3`3'<int32,int32,int32>::.ctor(!0,
!1,
!2)
IL_0011: stelem.ref
IL_0012: dup
IL_0013: ldc.i4.1
IL_0014: ldc.i4.3
IL_0015: ldc.i4.6
IL_0016: ldc.i4.s -6
IL_0018: newobj instance void class '<>f__AnonymousType3`3'<int32,int32,int32>::.ctor(!0,
!1,
!2)
IL_001d: stelem.ref
IL_001e: stloc.0
IL_001f: ldloc.0
IL_0020: ldc.i4.0
IL_0021: ldelem.ref
IL_0022: callvirt instance !0 class '<>f__AnonymousType3`3'<int32,int32,int32>::get_X()
IL_0027: call void [mscorlib]System.Console::WriteLine(int32)
IL_002c: nop
IL_002d: ldloc.0
IL_002e: ldc.i4.1
IL_002f: ldelem.ref
IL_0030: callvirt instance !0 class '<>f__AnonymousType3`3'<int32,int32,int32>::get_X()
IL_0035: call void [mscorlib]System.Console::WriteLine(int32)
IL_003a: nop
IL_003b: ret
} // end of method AnonymousTypes::SimpleArray
.method private hidebysig instance void
JaggedArray() cil managed
{
// Code size 84 (0x54)
.maxstack 6
.locals init (class '<>f__AnonymousType3`3'<int32,int32,int32>[] V_0,
class '<>f__AnonymousType3`3'<int32,int32,int32>[][] V_1)
IL_0000: nop
IL_0001: ldc.i4.2
IL_0002: newarr class '<>f__AnonymousType3`3'<int32,int32,int32>
IL_0007: dup
IL_0008: ldc.i4.0
IL_0009: ldc.i4.5
IL_000a: ldc.i4.2
IL_000b: ldc.i4.m1
IL_000c: newobj instance void class '<>f__AnonymousType3`3'<int32,int32,int32>::.ctor(!0,
!1,
!2)
IL_0011: stelem.ref
IL_0012: dup
IL_0013: ldc.i4.1
IL_0014: ldc.i4.3
IL_0015: ldc.i4.6
IL_0016: ldc.i4.s -6
IL_0018: newobj instance void class '<>f__AnonymousType3`3'<int32,int32,int32>::.ctor(!0,
!1,
!2)
IL_001d: stelem.ref
IL_001e: stloc.0
IL_001f: ldc.i4.2
IL_0020: newarr class '<>f__AnonymousType3`3'<int32,int32,int32>[]
IL_0025: dup
IL_0026: ldc.i4.0
IL_0027: ldloc.0
IL_0028: stelem.ref
IL_0029: dup
IL_002a: ldc.i4.1
IL_002b: ldloc.0
IL_002c: stelem.ref
IL_002d: stloc.1
IL_002e: ldloc.0
IL_002f: ldc.i4.0
IL_0030: ldelem.ref
IL_0031: callvirt instance !0 class '<>f__AnonymousType3`3'<int32,int32,int32>::get_X()
IL_0036: call void [mscorlib]System.Console::WriteLine(int32)
IL_003b: nop
IL_003c: ldloc.0
IL_003d: ldc.i4.1
IL_003e: ldelem.ref
IL_003f: callvirt instance !0 class '<>f__AnonymousType3`3'<int32,int32,int32>::get_X()
IL_0044: call void [mscorlib]System.Console::WriteLine(int32)
IL_0049: nop
IL_004a: ldloc.1
IL_004b: ldlen
IL_004c: conv.i4
IL_004d: call void [mscorlib]System.Console::WriteLine(int32)
IL_0052: nop
IL_0053: ret
} // end of method AnonymousTypes::JaggedArray
.method private hidebysig instance void
AnonymousTypeOutVar() cil managed
{
// Code size 29 (0x1d)
.maxstack 3
.locals init (class '<>f__AnonymousType2`2'<int32,int32> V_0)
IL_0000: nop
IL_0001: ldloca.s V_0
IL_0003: ldc.i4.1
IL_0004: ldc.i4.2
IL_0005: newobj instance void class '<>f__AnonymousType2`2'<int32,int32>::.ctor(!0,
!1)
IL_000a: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.AnonymousTypes::InlineVarDecl<class '<>f__AnonymousType2`2'<int32,int32>>(!!0&,
!!0)
IL_000f: nop
IL_0010: ldloc.0
IL_0011: callvirt instance !0 class '<>f__AnonymousType2`2'<int32,int32>::get_X()
IL_0016: call void [mscorlib]System.Console::WriteLine(int32)
IL_001b: nop
IL_001c: ret
} // end of method AnonymousTypes::AnonymousTypeOutVar
.method private hidebysig static void InlineVarDecl<T>([out] !!T& v,
!!T 'init') cil managed
{
// Code size 9 (0x9)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldarg.1
IL_0003: stobj !!T
IL_0008: ret
} // end of method AnonymousTypes::InlineVarDecl
.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 AnonymousTypes::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.AnonymousTypes
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

30
ICSharpCode.Decompiler.Tests/TestCases/Pretty/AssemblyCustomAttributes.il

@ -1,30 +0,0 @@ @@ -1,30 +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 AssemblyCustomAttributes
{
.custom instance void [mscorlib]System.CLSCompliantAttribute::.ctor(bool) = ( 01 00 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.
.permissionset reqmin
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}}
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module AssemblyCustomAttributes.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
// *********** DISASSEMBLY COMPLETE ***********************

30
ICSharpCode.Decompiler.Tests/TestCases/Pretty/AssemblyCustomAttributes.opt.il

@ -1,30 +0,0 @@ @@ -1,30 +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 AssemblyCustomAttributes.opt
{
.custom instance void [mscorlib]System.CLSCompliantAttribute::.ctor(bool) = ( 01 00 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.
.permissionset reqmin
= {[mscorlib]System.Security.Permissions.SecurityPermissionAttribute = {property bool 'SkipVerification' = bool(true)}}
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module AssemblyCustomAttributes.opt.dll
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x10000000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// *********** DISASSEMBLY COMPLETE ***********************

34
ICSharpCode.Decompiler.Tests/TestCases/Pretty/AssemblyCustomAttributes.opt.roslyn.il

@ -1,34 +0,0 @@ @@ -1,34 +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 AssemblyCustomAttributes
{
.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 )
.custom instance void [mscorlib]System.CLSCompliantAttribute::.ctor(bool) = ( 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 AssemblyCustomAttributes.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
// *********** DISASSEMBLY COMPLETE ***********************

34
ICSharpCode.Decompiler.Tests/TestCases/Pretty/AssemblyCustomAttributes.roslyn.il

@ -1,34 +0,0 @@ @@ -1,34 +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 AssemblyCustomAttributes
{
.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 )
.custom instance void [mscorlib]System.CLSCompliantAttribute::.ctor(bool) = ( 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 AssemblyCustomAttributes.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
// *********** DISASSEMBLY COMPLETE ***********************

53
ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.cs

@ -18,6 +18,7 @@ @@ -18,6 +18,7 @@
#pragma warning disable 1998
using System;
using System.Collections.Generic;
using System.Runtime.CompilerServices;
using System.Threading.Tasks;
@ -25,6 +26,8 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -25,6 +26,8 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
{
public class Async
{
private int memberField;
public async void SimpleVoidMethod()
{
Console.WriteLine("Before");
@ -71,6 +74,16 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -71,6 +74,16 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
Console.WriteLine("No Await");
}
public async Task CapturingThis()
{
await Task.Delay(memberField);
}
public async Task CapturingThisWithoutAwait()
{
Console.WriteLine(memberField);
}
public async Task<bool> SimpleBoolTaskMethod()
{
Console.WriteLine("Before");
@ -126,6 +139,46 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -126,6 +139,46 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
}
}
#endif
public static async Task<int> GetIntegerSumAsync(IEnumerable<int> items)
{
await Task.Delay(100);
int num = 0;
foreach (int item in items) {
num += item;
}
return num;
}
public static Func<Task<int>> AsyncLambda()
{
return async () => await GetIntegerSumAsync(new int[3] {
1,
2,
3
});
}
public static Func<Task<int>> AsyncDelegate()
{
return async delegate {
await Task.Delay(10);
return 2;
};
}
#if CS70
public static async Task<int> AsyncLocalFunctions()
{
return await Nested(1) + await Nested(2);
async Task<int> Nested(int i)
{
await Task.Delay(i);
return i;
}
}
#endif
}
public struct HopToThreadPoolAwaitable : INotifyCompletion

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

File diff suppressed because it is too large Load Diff

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

File diff suppressed because it is too large Load Diff

2010
ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.opt.roslyn.il

File diff suppressed because it is too large Load Diff

2438
ICSharpCode.Decompiler.Tests/TestCases/Pretty/Async.roslyn.il

File diff suppressed because it is too large Load Diff

205
ICSharpCode.Decompiler.Tests/TestCases/Pretty/AsyncMain.opt.roslyn.il

@ -1,205 +0,0 @@ @@ -1,205 +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 AsyncMain
{
.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 AsyncMain.exe
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// =============== CLASS MEMBERS DECLARATION ===================
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain
extends [mscorlib]System.Object
{
.class auto ansi sealed nested private beforefieldinit '<Main>d__0'
extends [mscorlib]System.ValueType
implements [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public int32 '<>1__state'
.field public valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder '<>t__builder'
.field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter '<>u__1'
.method private hidebysig newslot virtual final
instance void MoveNext() cil managed
{
.override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext
// Code size 157 (0x9d)
.maxstack 3
.locals init (int32 V_0,
valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_1,
class [mscorlib]System.Exception V_2)
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>1__state'
IL_0006: stloc.0
.try
{
IL_0007: ldloc.0
IL_0008: brfalse.s IL_0043
IL_000a: ldc.i4 0x3e8
IL_000f: call class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Threading.Tasks.Task::Delay(int32)
IL_0014: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter [mscorlib]System.Threading.Tasks.Task::GetAwaiter()
IL_0019: stloc.1
IL_001a: ldloca.s V_1
IL_001c: call instance bool [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::get_IsCompleted()
IL_0021: brtrue.s IL_005f
IL_0023: ldarg.0
IL_0024: ldc.i4.0
IL_0025: dup
IL_0026: stloc.0
IL_0027: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>1__state'
IL_002c: ldarg.0
IL_002d: ldloc.1
IL_002e: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>u__1'
IL_0033: ldarg.0
IL_0034: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>t__builder'
IL_0039: ldloca.s V_1
IL_003b: ldarg.0
IL_003c: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::AwaitUnsafeOnCompleted<valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter,valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'>(!!0&,
!!1&)
IL_0041: leave.s IL_009c
IL_0043: ldarg.0
IL_0044: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>u__1'
IL_0049: stloc.1
IL_004a: ldarg.0
IL_004b: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>u__1'
IL_0050: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter
IL_0056: ldarg.0
IL_0057: ldc.i4.m1
IL_0058: dup
IL_0059: stloc.0
IL_005a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>1__state'
IL_005f: ldloca.s V_1
IL_0061: call instance void [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::GetResult()
IL_0066: ldstr "Hello Wolrd!"
IL_006b: call void [mscorlib]System.Console::WriteLine(string)
IL_0070: leave.s IL_0089
} // end .try
catch [mscorlib]System.Exception
{
IL_0072: stloc.2
IL_0073: ldarg.0
IL_0074: ldc.i4.s -2
IL_0076: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>1__state'
IL_007b: ldarg.0
IL_007c: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>t__builder'
IL_0081: ldloc.2
IL_0082: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetException(class [mscorlib]System.Exception)
IL_0087: leave.s IL_009c
} // end handler
IL_0089: ldarg.0
IL_008a: ldc.i4.s -2
IL_008c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>1__state'
IL_0091: ldarg.0
IL_0092: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>t__builder'
IL_0097: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetResult()
IL_009c: ret
} // end of method '<Main>d__0'::MoveNext
.method private hidebysig newslot virtual final
instance void SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine stateMachine) cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine
// Code size 13 (0xd)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>t__builder'
IL_0006: ldarg.1
IL_0007: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine)
IL_000c: ret
} // end of method '<Main>d__0'::SetStateMachine
} // end of class '<Main>d__0'
.method public hidebysig static class [mscorlib]System.Threading.Tasks.Task
Main(string[] args) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 42 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..BICSharpCode.D
65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests.
54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty
2E 41 73 79 6E 63 4D 61 69 6E 2B 3C 4D 61 69 6E // .AsyncMain+<Main
3E 64 5F 5F 30 00 00 ) // >d__0..
// Code size 49 (0x31)
.maxstack 2
.locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0' V_0,
valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder V_1)
IL_0000: ldloca.s V_0
IL_0002: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::Create()
IL_0007: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>t__builder'
IL_000c: ldloca.s V_0
IL_000e: ldc.i4.m1
IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>1__state'
IL_0014: ldloc.0
IL_0015: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>t__builder'
IL_001a: stloc.1
IL_001b: ldloca.s V_1
IL_001d: ldloca.s V_0
IL_001f: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::Start<valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'>(!!0&)
IL_0024: ldloca.s V_0
IL_0026: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>t__builder'
IL_002b: call instance class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::get_Task()
IL_0030: ret
} // end of method AsyncMain::Main
.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 AsyncMain::.ctor
.method private hidebysig specialname static
void '<Main>'(string[] args) cil managed
{
.entrypoint
// Code size 20 (0x14)
.maxstack 1
.locals init (valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_0)
IL_0000: ldarg.0
IL_0001: call class [mscorlib]System.Threading.Tasks.Task ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain::Main(string[])
IL_0006: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter [mscorlib]System.Threading.Tasks.Task::GetAwaiter()
IL_000b: stloc.0
IL_000c: ldloca.s V_0
IL_000e: call instance void [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::GetResult()
IL_0013: ret
} // end of method AsyncMain::'<Main>'
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

233
ICSharpCode.Decompiler.Tests/TestCases/Pretty/AsyncMain.roslyn.il

@ -1,233 +0,0 @@ @@ -1,233 +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 AsyncMain
{
.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 AsyncMain.exe
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// =============== CLASS MEMBERS DECLARATION ===================
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain
extends [mscorlib]System.Object
{
.class auto ansi sealed nested private beforefieldinit '<Main>d__0'
extends [mscorlib]System.Object
implements [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public int32 '<>1__state'
.field public valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder '<>t__builder'
.field public string[] args
.field private valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter '<>u__1'
.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 '<Main>d__0'::.ctor
.method private hidebysig newslot virtual final
instance void MoveNext() cil managed
{
.override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::MoveNext
// Code size 170 (0xaa)
.maxstack 3
.locals init (int32 V_0,
valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_1,
class ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0' V_2,
class [mscorlib]System.Exception V_3)
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>1__state'
IL_0006: stloc.0
.try
{
IL_0007: ldloc.0
IL_0008: brfalse.s IL_000c
IL_000a: br.s IL_000e
IL_000c: br.s IL_004c
IL_000e: nop
IL_000f: ldc.i4 0x3e8
IL_0014: call class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Threading.Tasks.Task::Delay(int32)
IL_0019: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter [mscorlib]System.Threading.Tasks.Task::GetAwaiter()
IL_001e: stloc.1
IL_001f: ldloca.s V_1
IL_0021: call instance bool [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::get_IsCompleted()
IL_0026: brtrue.s IL_0068
IL_0028: ldarg.0
IL_0029: ldc.i4.0
IL_002a: dup
IL_002b: stloc.0
IL_002c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>1__state'
IL_0031: ldarg.0
IL_0032: ldloc.1
IL_0033: stfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>u__1'
IL_0038: ldarg.0
IL_0039: stloc.2
IL_003a: ldarg.0
IL_003b: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>t__builder'
IL_0040: ldloca.s V_1
IL_0042: ldloca.s V_2
IL_0044: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::AwaitUnsafeOnCompleted<valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter,class ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'>(!!0&,
!!1&)
IL_0049: nop
IL_004a: leave.s IL_00a9
IL_004c: ldarg.0
IL_004d: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>u__1'
IL_0052: stloc.1
IL_0053: ldarg.0
IL_0054: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>u__1'
IL_0059: initobj [mscorlib]System.Runtime.CompilerServices.TaskAwaiter
IL_005f: ldarg.0
IL_0060: ldc.i4.m1
IL_0061: dup
IL_0062: stloc.0
IL_0063: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>1__state'
IL_0068: ldloca.s V_1
IL_006a: call instance void [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::GetResult()
IL_006f: nop
IL_0070: ldstr "Hello Wolrd!"
IL_0075: call void [mscorlib]System.Console::WriteLine(string)
IL_007a: nop
IL_007b: leave.s IL_0095
} // end .try
catch [mscorlib]System.Exception
{
IL_007d: stloc.3
IL_007e: ldarg.0
IL_007f: ldc.i4.s -2
IL_0081: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>1__state'
IL_0086: ldarg.0
IL_0087: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>t__builder'
IL_008c: ldloc.3
IL_008d: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetException(class [mscorlib]System.Exception)
IL_0092: nop
IL_0093: leave.s IL_00a9
} // end handler
IL_0095: ldarg.0
IL_0096: ldc.i4.s -2
IL_0098: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>1__state'
IL_009d: ldarg.0
IL_009e: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>t__builder'
IL_00a3: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::SetResult()
IL_00a8: nop
IL_00a9: ret
} // end of method '<Main>d__0'::MoveNext
.method private hidebysig newslot virtual final
instance void SetStateMachine(class [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine stateMachine) cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.Runtime.CompilerServices.IAsyncStateMachine::SetStateMachine
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method '<Main>d__0'::SetStateMachine
} // end of class '<Main>d__0'
.method public hidebysig static class [mscorlib]System.Threading.Tasks.Task
Main(string[] args) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.AsyncStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 42 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..BICSharpCode.D
65 63 6F 6D 70 69 6C 65 72 2E 54 65 73 74 73 2E // ecompiler.Tests.
54 65 73 74 43 61 73 65 73 2E 50 72 65 74 74 79 // TestCases.Pretty
2E 41 73 79 6E 63 4D 61 69 6E 2B 3C 4D 61 69 6E // .AsyncMain+<Main
3E 64 5F 5F 30 00 00 ) // >d__0..
.custom instance void [mscorlib]System.Diagnostics.DebuggerStepThroughAttribute::.ctor() = ( 01 00 00 00 )
// Code size 59 (0x3b)
.maxstack 2
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0' V_0,
valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder V_1)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::.ctor()
IL_0005: stloc.0
IL_0006: ldloc.0
IL_0007: ldarg.0
IL_0008: stfld string[] ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::args
IL_000d: ldloc.0
IL_000e: call valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::Create()
IL_0013: stfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>t__builder'
IL_0018: ldloc.0
IL_0019: ldc.i4.m1
IL_001a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>1__state'
IL_001f: ldloc.0
IL_0020: ldfld valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>t__builder'
IL_0025: stloc.1
IL_0026: ldloca.s V_1
IL_0028: ldloca.s V_0
IL_002a: call instance void [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::Start<class ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'>(!!0&)
IL_002f: ldloc.0
IL_0030: ldflda valuetype [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain/'<Main>d__0'::'<>t__builder'
IL_0035: call instance class [mscorlib]System.Threading.Tasks.Task [mscorlib]System.Runtime.CompilerServices.AsyncTaskMethodBuilder::get_Task()
IL_003a: ret
} // end of method AsyncMain::Main
.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 AsyncMain::.ctor
.method private hidebysig specialname static
void '<Main>'(string[] args) cil managed
{
.entrypoint
// Code size 20 (0x14)
.maxstack 1
.locals init (valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter V_0)
IL_0000: ldarg.0
IL_0001: call class [mscorlib]System.Threading.Tasks.Task ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain::Main(string[])
IL_0006: callvirt instance valuetype [mscorlib]System.Runtime.CompilerServices.TaskAwaiter [mscorlib]System.Threading.Tasks.Task::GetAwaiter()
IL_000b: stloc.0
IL_000c: ldloca.s V_0
IL_000e: call instance void [mscorlib]System.Runtime.CompilerServices.TaskAwaiter::GetResult()
IL_0013: ret
} // end of method AsyncMain::'<Main>'
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.AsyncMain
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

215
ICSharpCode.Decompiler.Tests/TestCases/Pretty/AutoProperties.opt.roslyn.il

@ -1,215 +0,0 @@ @@ -1,215 +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 AutoProperties
{
.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 AutoProperties.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.Pretty.AutoProperties
extends [mscorlib]System.Object
{
.field private initonly int32 '<A>k__BackingField'
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private int32 '<B>k__BackingField'
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private static initonly int32 '<C>k__BackingField'
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private static int32 '<D>k__BackingField'
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private int32 '<PropertyWithAttributeOnBackingField>k__BackingField'
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 05 46 69 65 6C 64 00 00 ) // ...Field..
.field private initonly int32 '<issue1319>k__BackingField'
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.method public hidebysig specialname instance int32
get_A() cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<A>k__BackingField'
IL_0006: ret
} // end of method AutoProperties::get_A
.method public hidebysig specialname instance int32
get_B() cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<B>k__BackingField'
IL_0006: ret
} // end of method AutoProperties::get_B
.method public hidebysig specialname instance void
set_B(int32 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<B>k__BackingField'
IL_0007: ret
} // end of method AutoProperties::set_B
.method public hidebysig specialname static
int32 get_C() cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 6 (0x6)
.maxstack 8
IL_0000: ldsfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<C>k__BackingField'
IL_0005: ret
} // end of method AutoProperties::get_C
.method public hidebysig specialname static
int32 get_D() cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 6 (0x6)
.maxstack 8
IL_0000: ldsfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<D>k__BackingField'
IL_0005: ret
} // end of method AutoProperties::get_D
.method public hidebysig specialname static
void set_D(int32 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: stsfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<D>k__BackingField'
IL_0006: ret
} // end of method AutoProperties::set_D
.method public hidebysig specialname instance int32
get_PropertyWithAttributeOnBackingField() cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<PropertyWithAttributeOnBackingField>k__BackingField'
IL_0006: ret
} // end of method AutoProperties::get_PropertyWithAttributeOnBackingField
.method public hidebysig specialname instance void
set_PropertyWithAttributeOnBackingField(int32 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<PropertyWithAttributeOnBackingField>k__BackingField'
IL_0007: ret
} // end of method AutoProperties::set_PropertyWithAttributeOnBackingField
.method public hidebysig specialname instance int32
get_issue1319() cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<issue1319>k__BackingField'
IL_0006: ret
} // end of method AutoProperties::get_issue1319
.method public hidebysig specialname rtspecialname
instance void .ctor(int32 issue1319) cil managed
{
// Code size 28 (0x1c)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldc.i4.1
IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<A>k__BackingField'
IL_0007: ldarg.0
IL_0008: ldc.i4.2
IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<B>k__BackingField'
IL_000e: ldarg.0
IL_000f: call instance void [mscorlib]System.Object::.ctor()
IL_0014: ldarg.0
IL_0015: ldarg.1
IL_0016: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<issue1319>k__BackingField'
IL_001b: ret
} // end of method AutoProperties::.ctor
.method private hidebysig specialname rtspecialname static
void .cctor() cil managed
{
// Code size 13 (0xd)
.maxstack 8
IL_0000: ldc.i4.3
IL_0001: stsfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<C>k__BackingField'
IL_0006: ldc.i4.4
IL_0007: stsfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<D>k__BackingField'
IL_000c: ret
} // end of method AutoProperties::.cctor
.property instance int32 A()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::get_A()
} // end of property AutoProperties::A
.property instance int32 B()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::get_B()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::set_B(int32)
} // end of property AutoProperties::B
.property int32 C()
{
.get int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::get_C()
} // end of property AutoProperties::C
.property int32 D()
{
.get int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::get_D()
.set void ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::set_D(int32)
} // end of property AutoProperties::D
.property instance int32 PropertyWithAttributeOnBackingField()
{
.custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 08 50 72 6F 70 65 72 74 79 00 00 ) // ...Property..
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::get_PropertyWithAttributeOnBackingField()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::set_PropertyWithAttributeOnBackingField(int32)
} // end of property AutoProperties::PropertyWithAttributeOnBackingField
.property instance int32 issue1319()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::get_issue1319()
} // end of property AutoProperties::issue1319
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

223
ICSharpCode.Decompiler.Tests/TestCases/Pretty/AutoProperties.roslyn.il

@ -1,223 +0,0 @@ @@ -1,223 +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 AutoProperties
{
.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 AutoProperties.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.Pretty.AutoProperties
extends [mscorlib]System.Object
{
.field private initonly int32 '<A>k__BackingField'
.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 )
.field private int32 '<B>k__BackingField'
.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 )
.field private static initonly int32 '<C>k__BackingField'
.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 )
.field private static int32 '<D>k__BackingField'
.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 )
.field private int32 '<PropertyWithAttributeOnBackingField>k__BackingField'
.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 )
.custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 05 46 69 65 6C 64 00 00 ) // ...Field..
.field private initonly int32 '<issue1319>k__BackingField'
.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 int32
get_A() cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<A>k__BackingField'
IL_0006: ret
} // end of method AutoProperties::get_A
.method public hidebysig specialname instance int32
get_B() cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<B>k__BackingField'
IL_0006: ret
} // end of method AutoProperties::get_B
.method public hidebysig specialname instance void
set_B(int32 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<B>k__BackingField'
IL_0007: ret
} // end of method AutoProperties::set_B
.method public hidebysig specialname static
int32 get_C() cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 6 (0x6)
.maxstack 8
IL_0000: ldsfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<C>k__BackingField'
IL_0005: ret
} // end of method AutoProperties::get_C
.method public hidebysig specialname static
int32 get_D() cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 6 (0x6)
.maxstack 8
IL_0000: ldsfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<D>k__BackingField'
IL_0005: ret
} // end of method AutoProperties::get_D
.method public hidebysig specialname static
void set_D(int32 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: stsfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<D>k__BackingField'
IL_0006: ret
} // end of method AutoProperties::set_D
.method public hidebysig specialname instance int32
get_PropertyWithAttributeOnBackingField() cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<PropertyWithAttributeOnBackingField>k__BackingField'
IL_0006: ret
} // end of method AutoProperties::get_PropertyWithAttributeOnBackingField
.method public hidebysig specialname instance void
set_PropertyWithAttributeOnBackingField(int32 'value') cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<PropertyWithAttributeOnBackingField>k__BackingField'
IL_0007: ret
} // end of method AutoProperties::set_PropertyWithAttributeOnBackingField
.method public hidebysig specialname instance int32
get_issue1319() cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<issue1319>k__BackingField'
IL_0006: ret
} // end of method AutoProperties::get_issue1319
.method public hidebysig specialname rtspecialname
instance void .ctor(int32 issue1319) cil managed
{
// Code size 30 (0x1e)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldc.i4.1
IL_0002: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<A>k__BackingField'
IL_0007: ldarg.0
IL_0008: ldc.i4.2
IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<B>k__BackingField'
IL_000e: ldarg.0
IL_000f: call instance void [mscorlib]System.Object::.ctor()
IL_0014: nop
IL_0015: nop
IL_0016: ldarg.0
IL_0017: ldarg.1
IL_0018: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<issue1319>k__BackingField'
IL_001d: ret
} // end of method AutoProperties::.ctor
.method private hidebysig specialname rtspecialname static
void .cctor() cil managed
{
// Code size 13 (0xd)
.maxstack 8
IL_0000: ldc.i4.3
IL_0001: stsfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<C>k__BackingField'
IL_0006: ldc.i4.4
IL_0007: stsfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::'<D>k__BackingField'
IL_000c: ret
} // end of method AutoProperties::.cctor
.property instance int32 A()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::get_A()
} // end of property AutoProperties::A
.property instance int32 B()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::get_B()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::set_B(int32)
} // end of property AutoProperties::B
.property int32 C()
{
.get int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::get_C()
} // end of property AutoProperties::C
.property int32 D()
{
.get int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::get_D()
.set void ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::set_D(int32)
} // end of property AutoProperties::D
.property instance int32 PropertyWithAttributeOnBackingField()
{
.custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 08 50 72 6F 70 65 72 74 79 00 00 ) // ...Property..
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::get_PropertyWithAttributeOnBackingField()
.set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::set_PropertyWithAttributeOnBackingField(int32)
} // end of property AutoProperties::PropertyWithAttributeOnBackingField
.property instance int32 issue1319()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties::get_issue1319()
} // end of property AutoProperties::issue1319
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.AutoProperties
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

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

@ -97,6 +97,11 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -97,6 +97,11 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
RequiresCast((IFormattable)$"\ta{$"a{args.Length}" == args[0]}");
}
public void Issue1497(string[] args)
{
Console.WriteLine($"args[0]: {args[0].Trim(':').Trim('&').Trim(':').Trim('&')} asdf {args.Length:x} test");
}
public void RequiresCast(string value)
{
}

1055
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CS6_StringInterpolation.opt.roslyn.il

File diff suppressed because it is too large Load Diff

1126
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CS6_StringInterpolation.roslyn.il

File diff suppressed because it is too large Load Diff

79
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CS72_PrivateProtected.opt.roslyn.il

@ -1,79 +0,0 @@ @@ -1,79 +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 CS72_PrivateProtected
{
.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 CS72_PrivateProtected.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.Pretty.CS72_PrivateProtected
extends [mscorlib]System.Object
{
.field private initonly int32 '<Property>k__BackingField'
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.method famandassem hidebysig specialname
instance int32 get_Property() cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CS72_PrivateProtected::'<Property>k__BackingField'
IL_0006: ret
} // end of method CS72_PrivateProtected::get_Property
.method famandassem hidebysig instance void
Method() cil managed
{
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method CS72_PrivateProtected::Method
.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 CS72_PrivateProtected::.ctor
.property instance int32 Property()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CS72_PrivateProtected::get_Property()
} // end of property CS72_PrivateProtected::Property
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CS72_PrivateProtected
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

82
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CS72_PrivateProtected.roslyn.il

@ -1,82 +0,0 @@ @@ -1,82 +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 CS72_PrivateProtected
{
.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 CS72_PrivateProtected.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.Pretty.CS72_PrivateProtected
extends [mscorlib]System.Object
{
.field private initonly int32 '<Property>k__BackingField'
.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 famandassem hidebysig specialname
instance int32 get_Property() cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CS72_PrivateProtected::'<Property>k__BackingField'
IL_0006: ret
} // end of method CS72_PrivateProtected::get_Property
.method famandassem hidebysig instance void
Method() cil managed
{
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method CS72_PrivateProtected::Method
.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 CS72_PrivateProtected::.ctor
.property instance int32 Property()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CS72_PrivateProtected::get_Property()
} // end of property CS72_PrivateProtected::Property
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CS72_PrivateProtected
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

1249
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CS73_StackAllocInitializers.opt.roslyn.il

File diff suppressed because it is too large Load Diff

1406
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CS73_StackAllocInitializers.roslyn.il

File diff suppressed because it is too large Load Diff

10
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CheckedUnchecked.cs

@ -20,6 +20,11 @@ using System; @@ -20,6 +20,11 @@ using System;
namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
{
internal class Box<T>
{
public readonly T Value;
}
public class CheckedUnchecked
{
public int Operators(int a, int b)
@ -123,9 +128,4 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -123,9 +128,4 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
}
}
}
internal class Box<T>
{
public readonly T Value;
}
}

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

@ -1,708 +0,0 @@ @@ -1,708 +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 CheckedUnchecked
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
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 CheckedUnchecked.dll
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x10000000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// =============== CLASS MEMBERS DECLARATION ===================
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked
extends [mscorlib]System.Object
{
.field private static class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> 'CS$<>9__CachedAnonymousMethodDelegate1'
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private static class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> 'CS$<>9__CachedAnonymousMethodDelegate3'
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private static class [mscorlib]System.Func`2<int32[],int32[]> 'CS$<>9__CachedAnonymousMethodDelegate5'
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.method public hidebysig instance int32
Operators(int32 a,
int32 b) cil managed
{
// Code size 63 (0x3f)
.maxstack 2
.locals init (int32 V_0,
int32 V_1,
int32 V_2,
int32 V_3,
int32 V_4,
int32 V_5,
int32 V_6,
int32 V_7,
int32 V_8)
IL_0000: nop
IL_0001: ldarg.1
IL_0002: ldarg.2
IL_0003: add.ovf
IL_0004: stloc.0
IL_0005: ldarg.1
IL_0006: ldarg.2
IL_0007: add
IL_0008: stloc.1
IL_0009: ldarg.1
IL_000a: ldarg.2
IL_000b: sub.ovf
IL_000c: stloc.2
IL_000d: ldarg.1
IL_000e: ldarg.2
IL_000f: sub
IL_0010: stloc.3
IL_0011: ldarg.1
IL_0012: ldarg.2
IL_0013: mul.ovf
IL_0014: stloc.s V_4
IL_0016: ldarg.1
IL_0017: ldarg.2
IL_0018: mul
IL_0019: stloc.s V_5
IL_001b: ldarg.1
IL_001c: ldarg.2
IL_001d: div
IL_001e: stloc.s V_6
IL_0020: ldarg.1
IL_0021: ldarg.2
IL_0022: rem
IL_0023: stloc.s V_7
IL_0025: ldloc.0
IL_0026: ldloc.1
IL_0027: mul
IL_0028: ldloc.2
IL_0029: mul
IL_002a: ldloc.3
IL_002b: mul
IL_002c: ldloc.s V_4
IL_002e: mul
IL_002f: ldloc.s V_5
IL_0031: mul
IL_0032: ldloc.s V_6
IL_0034: mul
IL_0035: ldloc.s V_7
IL_0037: mul
IL_0038: stloc.s V_8
IL_003a: br.s IL_003c
IL_003c: ldloc.s V_8
IL_003e: ret
} // end of method CheckedUnchecked::Operators
.method public hidebysig instance int32
Cast(int32 a) cil managed
{
// Code size 27 (0x1b)
.maxstack 2
.locals init (int16 V_0,
int16 V_1,
uint8 V_2,
uint8 V_3,
int32 V_4)
IL_0000: nop
IL_0001: ldarg.1
IL_0002: conv.ovf.i2
IL_0003: stloc.0
IL_0004: ldarg.1
IL_0005: conv.i2
IL_0006: stloc.1
IL_0007: ldarg.1
IL_0008: conv.ovf.u1
IL_0009: stloc.2
IL_000a: ldarg.1
IL_000b: conv.u1
IL_000c: stloc.3
IL_000d: ldloc.0
IL_000e: ldloc.1
IL_000f: mul
IL_0010: ldloc.2
IL_0011: mul
IL_0012: ldloc.3
IL_0013: mul
IL_0014: stloc.s V_4
IL_0016: br.s IL_0018
IL_0018: ldloc.s V_4
IL_001a: ret
} // end of method CheckedUnchecked::Cast
.method public hidebysig instance void
ForWithCheckedIteratorAndUncheckedBody(int32 n) cil managed
{
// Code size 31 (0x1f)
.maxstack 3
.locals init (int32 V_0,
bool V_1)
IL_0000: nop
IL_0001: nop
IL_0002: ldarg.1
IL_0003: ldc.i4.1
IL_0004: add.ovf
IL_0005: stloc.0
IL_0006: br.s IL_0013
IL_0008: nop
IL_0009: ldloc.0
IL_000a: ldloc.0
IL_000b: mul
IL_000c: starg.s n
IL_000e: nop
IL_000f: ldloc.0
IL_0010: ldc.i4.1
IL_0011: add.ovf
IL_0012: stloc.0
IL_0013: ldloc.0
IL_0014: ldarg.1
IL_0015: ldc.i4.1
IL_0016: add.ovf
IL_0017: clt
IL_0019: stloc.1
IL_001a: ldloc.1
IL_001b: brtrue.s IL_0008
IL_001d: nop
IL_001e: ret
} // end of method CheckedUnchecked::ForWithCheckedIteratorAndUncheckedBody
.method public hidebysig instance void
ForWithCheckedInitializerAndUncheckedIterator(int32 n) cil managed
{
// Code size 30 (0x1e)
.maxstack 2
.locals init (int32 V_0,
bool V_1)
IL_0000: nop
IL_0001: ldarg.1
IL_0002: stloc.0
IL_0003: ldloc.0
IL_0004: ldc.i4.s 10
IL_0006: sub.ovf
IL_0007: stloc.0
IL_0008: br.s IL_0015
IL_000a: nop
IL_000b: ldarg.1
IL_000c: ldc.i4.1
IL_000d: sub
IL_000e: starg.s n
IL_0010: nop
IL_0011: ldloc.0
IL_0012: ldc.i4.1
IL_0013: add
IL_0014: stloc.0
IL_0015: ldloc.0
IL_0016: ldarg.1
IL_0017: clt
IL_0019: stloc.1
IL_001a: ldloc.1
IL_001b: brtrue.s IL_000a
IL_001d: ret
} // end of method CheckedUnchecked::ForWithCheckedInitializerAndUncheckedIterator
.method public hidebysig instance void
ObjectCreationInitializerChecked() cil managed
{
// Code size 47 (0x2f)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldc.i4.0
IL_0003: ldc.i4.0
IL_0004: newobj instance void class '<>f__AnonymousType0`2'<int32,int32>::.ctor(!0,
!1)
IL_0009: ldsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::'CS$<>9__CachedAnonymousMethodDelegate1'
IL_000e: brtrue.s IL_0023
IL_0010: ldnull
IL_0011: ldftn class '<>f__AnonymousType0`2'<int32,int32> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::'<ObjectCreationInitializerChecked>b__0'(class '<>f__AnonymousType0`2'<int32,int32>)
IL_0017: newobj instance void class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>>::.ctor(object,
native int)
IL_001c: stsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::'CS$<>9__CachedAnonymousMethodDelegate1'
IL_0021: br.s IL_0023
IL_0023: ldsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::'CS$<>9__CachedAnonymousMethodDelegate1'
IL_0028: call instance !!0 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::TestHelp<class '<>f__AnonymousType0`2'<int32,int32>>(!!0,
class [mscorlib]System.Func`2<!!0,!!0>)
IL_002d: pop
IL_002e: ret
} // end of method CheckedUnchecked::ObjectCreationInitializerChecked
.method public hidebysig instance void
ObjectCreationWithOneFieldChecked() cil managed
{
// Code size 47 (0x2f)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldc.i4.0
IL_0003: ldc.i4.0
IL_0004: newobj instance void class '<>f__AnonymousType0`2'<int32,int32>::.ctor(!0,
!1)
IL_0009: ldsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::'CS$<>9__CachedAnonymousMethodDelegate3'
IL_000e: brtrue.s IL_0023
IL_0010: ldnull
IL_0011: ldftn class '<>f__AnonymousType0`2'<int32,int32> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::'<ObjectCreationWithOneFieldChecked>b__2'(class '<>f__AnonymousType0`2'<int32,int32>)
IL_0017: newobj instance void class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>>::.ctor(object,
native int)
IL_001c: stsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::'CS$<>9__CachedAnonymousMethodDelegate3'
IL_0021: br.s IL_0023
IL_0023: ldsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::'CS$<>9__CachedAnonymousMethodDelegate3'
IL_0028: call instance !!0 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::TestHelp<class '<>f__AnonymousType0`2'<int32,int32>>(!!0,
class [mscorlib]System.Func`2<!!0,!!0>)
IL_002d: pop
IL_002e: ret
} // end of method CheckedUnchecked::ObjectCreationWithOneFieldChecked
.method public hidebysig instance void
ArrayInitializerChecked() cil managed
{
// Code size 56 (0x38)
.maxstack 4
.locals init (int32[] V_0)
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldc.i4.2
IL_0003: newarr [mscorlib]System.Int32
IL_0008: stloc.0
IL_0009: ldloc.0
IL_000a: ldc.i4.0
IL_000b: ldc.i4.1
IL_000c: stelem.i4
IL_000d: ldloc.0
IL_000e: ldc.i4.1
IL_000f: ldc.i4.2
IL_0010: stelem.i4
IL_0011: ldloc.0
IL_0012: ldsfld class [mscorlib]System.Func`2<int32[],int32[]> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::'CS$<>9__CachedAnonymousMethodDelegate5'
IL_0017: brtrue.s IL_002c
IL_0019: ldnull
IL_001a: ldftn int32[] ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::'<ArrayInitializerChecked>b__4'(int32[])
IL_0020: newobj instance void class [mscorlib]System.Func`2<int32[],int32[]>::.ctor(object,
native int)
IL_0025: stsfld class [mscorlib]System.Func`2<int32[],int32[]> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::'CS$<>9__CachedAnonymousMethodDelegate5'
IL_002a: br.s IL_002c
IL_002c: ldsfld class [mscorlib]System.Func`2<int32[],int32[]> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::'CS$<>9__CachedAnonymousMethodDelegate5'
IL_0031: call instance !!0 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::TestHelp<int32[]>(!!0,
class [mscorlib]System.Func`2<!!0,!!0>)
IL_0036: pop
IL_0037: ret
} // end of method CheckedUnchecked::ArrayInitializerChecked
.method public hidebysig instance !!T TestHelp<T>(!!T t,
class [mscorlib]System.Func`2<!!T,!!T> f) cil managed
{
// Code size 13 (0xd)
.maxstack 2
.locals init (!!T V_0)
IL_0000: nop
IL_0001: ldarg.2
IL_0002: ldarg.1
IL_0003: callvirt instance !1 class [mscorlib]System.Func`2<!!T,!!T>::Invoke(!0)
IL_0008: stloc.0
IL_0009: br.s IL_000b
IL_000b: ldloc.0
IL_000c: ret
} // end of method CheckedUnchecked::TestHelp
.method public hidebysig instance void
CheckedInArrayCreationArgument(int32 a,
int32 b) cil managed
{
// Code size 16 (0x10)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.1
IL_0002: ldarg.2
IL_0003: add.ovf
IL_0004: newarr [mscorlib]System.Int32
IL_0009: call void [mscorlib]System.Console::WriteLine(object)
IL_000e: nop
IL_000f: ret
} // end of method CheckedUnchecked::CheckedInArrayCreationArgument
.method public hidebysig instance int16
Unbox(valuetype [mscorlib]System.TypeCode c,
object b) cil managed
{
// Code size 92 (0x5c)
.maxstack 2
.locals init (float32 V_0,
int16 V_1,
valuetype [mscorlib]System.TypeCode V_2)
IL_0000: nop
IL_0001: nop
IL_0002: ldarg.1
IL_0003: stloc.2
IL_0004: ldloc.2
IL_0005: ldc.i4.s 9
IL_0007: sub
IL_0008: switch (
IL_001c,
IL_002b)
IL_0015: ldloc.2
IL_0016: ldc.i4.s 14
IL_0018: beq.s IL_003a
IL_001a: br.s IL_0054
IL_001c: ldarg.2
IL_001d: castclass class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<int32>
IL_0022: ldfld !0 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<int32>::Value
IL_0027: conv.ovf.i2
IL_0028: stloc.1
IL_0029: br.s IL_005a
IL_002b: ldarg.2
IL_002c: castclass class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<uint32>
IL_0031: ldfld !0 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<uint32>::Value
IL_0036: conv.ovf.i2.un
IL_0037: stloc.1
IL_0038: br.s IL_005a
IL_003a: nop
IL_003b: ldarg.2
IL_003c: castclass class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<float64>
IL_0041: ldfld !0 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<float64>::Value
IL_0046: conv.r4
IL_0047: stloc.0
IL_0048: ldloc.0
IL_0049: call void [mscorlib]System.Console::WriteLine(float32)
IL_004e: nop
IL_004f: ldloc.0
IL_0050: conv.ovf.i2
IL_0051: stloc.1
IL_0052: br.s IL_005a
IL_0054: newobj instance void [mscorlib]System.Exception::.ctor()
IL_0059: throw
IL_005a: ldloc.1
IL_005b: ret
} // end of method CheckedUnchecked::Unbox
.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 CheckedUnchecked::.ctor
.method private hidebysig static class '<>f__AnonymousType0`2'<int32,int32>
'<ObjectCreationInitializerChecked>b__0'(class '<>f__AnonymousType0`2'<int32,int32> n) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 26 (0x1a)
.maxstack 3
.locals init (class '<>f__AnonymousType0`2'<int32,int32> V_0)
IL_0000: ldarg.0
IL_0001: callvirt instance !0 class '<>f__AnonymousType0`2'<int32,int32>::get_x()
IL_0006: ldc.i4.1
IL_0007: add.ovf
IL_0008: ldarg.0
IL_0009: callvirt instance !1 class '<>f__AnonymousType0`2'<int32,int32>::get_l()
IL_000e: ldc.i4.1
IL_000f: add.ovf
IL_0010: newobj instance void class '<>f__AnonymousType0`2'<int32,int32>::.ctor(!0,
!1)
IL_0015: stloc.0
IL_0016: br.s IL_0018
IL_0018: ldloc.0
IL_0019: ret
} // end of method CheckedUnchecked::'<ObjectCreationInitializerChecked>b__0'
.method private hidebysig static class '<>f__AnonymousType0`2'<int32,int32>
'<ObjectCreationWithOneFieldChecked>b__2'(class '<>f__AnonymousType0`2'<int32,int32> n) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 26 (0x1a)
.maxstack 3
.locals init (class '<>f__AnonymousType0`2'<int32,int32> V_0)
IL_0000: ldarg.0
IL_0001: callvirt instance !0 class '<>f__AnonymousType0`2'<int32,int32>::get_x()
IL_0006: ldc.i4.1
IL_0007: add.ovf
IL_0008: ldarg.0
IL_0009: callvirt instance !1 class '<>f__AnonymousType0`2'<int32,int32>::get_l()
IL_000e: ldc.i4.1
IL_000f: add
IL_0010: newobj instance void class '<>f__AnonymousType0`2'<int32,int32>::.ctor(!0,
!1)
IL_0015: stloc.0
IL_0016: br.s IL_0018
IL_0018: ldloc.0
IL_0019: ret
} // end of method CheckedUnchecked::'<ObjectCreationWithOneFieldChecked>b__2'
.method private hidebysig static int32[]
'<ArrayInitializerChecked>b__4'(int32[] n) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 29 (0x1d)
.maxstack 4
.locals init (int32[] V_0,
int32[] V_1)
IL_0000: ldc.i4.2
IL_0001: newarr [mscorlib]System.Int32
IL_0006: stloc.1
IL_0007: ldloc.1
IL_0008: ldc.i4.0
IL_0009: ldarg.0
IL_000a: ldc.i4.0
IL_000b: ldelem.i4
IL_000c: ldc.i4.1
IL_000d: add.ovf
IL_000e: stelem.i4
IL_000f: ldloc.1
IL_0010: ldc.i4.1
IL_0011: ldarg.0
IL_0012: ldc.i4.1
IL_0013: ldelem.i4
IL_0014: ldc.i4.1
IL_0015: add.ovf
IL_0016: stelem.i4
IL_0017: ldloc.1
IL_0018: stloc.0
IL_0019: br.s IL_001b
IL_001b: ldloc.0
IL_001c: ret
} // end of method CheckedUnchecked::'<ArrayInitializerChecked>b__4'
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<T>
extends [mscorlib]System.Object
{
.field public initonly !T Value
.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 Box`1::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1
.class private auto ansi sealed beforefieldinit '<>f__AnonymousType0`2'<'<x>j__TPar','<l>j__TPar'>
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private initonly !'<x>j__TPar' '<x>i__Field'
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.field private initonly !'<l>j__TPar' '<l>i__Field'
.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 rtspecialname
instance void .ctor(!'<x>j__TPar' x,
!'<l>j__TPar' l) cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 21 (0x15)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld !0 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<x>i__Field'
IL_000d: ldarg.0
IL_000e: ldarg.2
IL_000f: stfld !1 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<l>i__Field'
IL_0014: ret
} // end of method '<>f__AnonymousType0`2'::.ctor
.method public hidebysig specialname instance !'<x>j__TPar'
get_x() cil managed
{
// Code size 11 (0xb)
.maxstack 1
.locals init (!'<x>j__TPar' V_0)
IL_0000: ldarg.0
IL_0001: ldfld !0 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<x>i__Field'
IL_0006: stloc.0
IL_0007: br.s IL_0009
IL_0009: ldloc.0
IL_000a: ret
} // end of method '<>f__AnonymousType0`2'::get_x
.method public hidebysig specialname instance !'<l>j__TPar'
get_l() cil managed
{
// Code size 11 (0xb)
.maxstack 1
.locals init (!'<l>j__TPar' V_0)
IL_0000: ldarg.0
IL_0001: ldfld !1 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<l>i__Field'
IL_0006: stloc.0
IL_0007: br.s IL_0009
IL_0009: ldloc.0
IL_000a: ret
} // end of method '<>f__AnonymousType0`2'::get_l
.method public hidebysig virtual instance string
ToString() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 89 (0x59)
.maxstack 2
.locals init (class [mscorlib]System.Text.StringBuilder V_0,
string V_1)
IL_0000: newobj instance void [mscorlib]System.Text.StringBuilder::.ctor()
IL_0005: stloc.0
IL_0006: ldloc.0
IL_0007: ldstr "{ x = "
IL_000c: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_0011: pop
IL_0012: ldloc.0
IL_0013: ldarg.0
IL_0014: ldfld !0 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<x>i__Field'
IL_0019: box !'<x>j__TPar'
IL_001e: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(object)
IL_0023: pop
IL_0024: ldloc.0
IL_0025: ldstr ", l = "
IL_002a: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_002f: pop
IL_0030: ldloc.0
IL_0031: ldarg.0
IL_0032: ldfld !1 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<l>i__Field'
IL_0037: box !'<l>j__TPar'
IL_003c: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(object)
IL_0041: pop
IL_0042: ldloc.0
IL_0043: ldstr " }"
IL_0048: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_004d: pop
IL_004e: ldloc.0
IL_004f: callvirt instance string [mscorlib]System.Object::ToString()
IL_0054: stloc.1
IL_0055: br.s IL_0057
IL_0057: ldloc.1
IL_0058: ret
} // end of method '<>f__AnonymousType0`2'::ToString
.method public hidebysig virtual instance bool
Equals(object 'value') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 65 (0x41)
.maxstack 3
.locals init (class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'> V_0,
bool V_1)
IL_0000: ldarg.1
IL_0001: isinst class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: brfalse.s IL_003a
IL_000a: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<x>j__TPar'>::get_Default()
IL_000f: ldarg.0
IL_0010: ldfld !0 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<x>i__Field'
IL_0015: ldloc.0
IL_0016: ldfld !0 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<x>i__Field'
IL_001b: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<x>j__TPar'>::Equals(!0,
!0)
IL_0020: brfalse.s IL_003a
IL_0022: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<l>j__TPar'>::get_Default()
IL_0027: ldarg.0
IL_0028: ldfld !1 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<l>i__Field'
IL_002d: ldloc.0
IL_002e: ldfld !1 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<l>i__Field'
IL_0033: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<l>j__TPar'>::Equals(!0,
!0)
IL_0038: br.s IL_003b
IL_003a: ldc.i4.0
IL_003b: nop
IL_003c: stloc.1
IL_003d: br.s IL_003f
IL_003f: ldloc.1
IL_0040: ret
} // end of method '<>f__AnonymousType0`2'::Equals
.method public hidebysig virtual instance int32
GetHashCode() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 62 (0x3e)
.maxstack 3
.locals init (int32 V_0,
int32 V_1)
IL_0000: ldc.i4 0xf749ae7d
IL_0005: stloc.0
IL_0006: ldc.i4 0xa5555529
IL_000b: ldloc.0
IL_000c: mul
IL_000d: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<x>j__TPar'>::get_Default()
IL_0012: ldarg.0
IL_0013: ldfld !0 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<x>i__Field'
IL_0018: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<x>j__TPar'>::GetHashCode(!0)
IL_001d: add
IL_001e: stloc.0
IL_001f: ldc.i4 0xa5555529
IL_0024: ldloc.0
IL_0025: mul
IL_0026: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<l>j__TPar'>::get_Default()
IL_002b: ldarg.0
IL_002c: ldfld !1 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<l>i__Field'
IL_0031: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<l>j__TPar'>::GetHashCode(!0)
IL_0036: add
IL_0037: stloc.0
IL_0038: ldloc.0
IL_0039: stloc.1
IL_003a: br.s IL_003c
IL_003c: ldloc.1
IL_003d: ret
} // end of method '<>f__AnonymousType0`2'::GetHashCode
.property instance !'<x>j__TPar' x()
{
.get instance !'<x>j__TPar' '<>f__AnonymousType0`2'::get_x()
} // end of property '<>f__AnonymousType0`2'::x
.property instance !'<l>j__TPar' l()
{
.get instance !'<l>j__TPar' '<>f__AnonymousType0`2'::get_l()
} // end of property '<>f__AnonymousType0`2'::l
} // end of class '<>f__AnonymousType0`2'
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

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

@ -1,611 +0,0 @@ @@ -1,611 +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 CheckedUnchecked.opt
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
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 CheckedUnchecked.opt.dll
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x10000000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// =============== CLASS MEMBERS DECLARATION ===================
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked
extends [mscorlib]System.Object
{
.field private static class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> 'CS$<>9__CachedAnonymousMethodDelegate1'
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private static class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> 'CS$<>9__CachedAnonymousMethodDelegate3'
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private static class [mscorlib]System.Func`2<int32[],int32[]> 'CS$<>9__CachedAnonymousMethodDelegate5'
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.method public hidebysig instance int32
Operators(int32 a,
int32 b) cil managed
{
// Code size 56 (0x38)
.maxstack 2
.locals init (int32 V_0,
int32 V_1,
int32 V_2,
int32 V_3,
int32 V_4,
int32 V_5,
int32 V_6,
int32 V_7)
IL_0000: ldarg.1
IL_0001: ldarg.2
IL_0002: add.ovf
IL_0003: stloc.0
IL_0004: ldarg.1
IL_0005: ldarg.2
IL_0006: add
IL_0007: stloc.1
IL_0008: ldarg.1
IL_0009: ldarg.2
IL_000a: sub.ovf
IL_000b: stloc.2
IL_000c: ldarg.1
IL_000d: ldarg.2
IL_000e: sub
IL_000f: stloc.3
IL_0010: ldarg.1
IL_0011: ldarg.2
IL_0012: mul.ovf
IL_0013: stloc.s V_4
IL_0015: ldarg.1
IL_0016: ldarg.2
IL_0017: mul
IL_0018: stloc.s V_5
IL_001a: ldarg.1
IL_001b: ldarg.2
IL_001c: div
IL_001d: stloc.s V_6
IL_001f: ldarg.1
IL_0020: ldarg.2
IL_0021: rem
IL_0022: stloc.s V_7
IL_0024: ldloc.0
IL_0025: ldloc.1
IL_0026: mul
IL_0027: ldloc.2
IL_0028: mul
IL_0029: ldloc.3
IL_002a: mul
IL_002b: ldloc.s V_4
IL_002d: mul
IL_002e: ldloc.s V_5
IL_0030: mul
IL_0031: ldloc.s V_6
IL_0033: mul
IL_0034: ldloc.s V_7
IL_0036: mul
IL_0037: ret
} // end of method CheckedUnchecked::Operators
.method public hidebysig instance int32
Cast(int32 a) cil managed
{
// Code size 20 (0x14)
.maxstack 2
.locals init (int16 V_0,
int16 V_1,
uint8 V_2,
uint8 V_3)
IL_0000: ldarg.1
IL_0001: conv.ovf.i2
IL_0002: stloc.0
IL_0003: ldarg.1
IL_0004: conv.i2
IL_0005: stloc.1
IL_0006: ldarg.1
IL_0007: conv.ovf.u1
IL_0008: stloc.2
IL_0009: ldarg.1
IL_000a: conv.u1
IL_000b: stloc.3
IL_000c: ldloc.0
IL_000d: ldloc.1
IL_000e: mul
IL_000f: ldloc.2
IL_0010: mul
IL_0011: ldloc.3
IL_0012: mul
IL_0013: ret
} // end of method CheckedUnchecked::Cast
.method public hidebysig instance void
ForWithCheckedIteratorAndUncheckedBody(int32 n) cil managed
{
// Code size 22 (0x16)
.maxstack 3
.locals init (int32 V_0)
IL_0000: ldarg.1
IL_0001: ldc.i4.1
IL_0002: add.ovf
IL_0003: stloc.0
IL_0004: br.s IL_000f
IL_0006: ldloc.0
IL_0007: ldloc.0
IL_0008: mul
IL_0009: starg.s n
IL_000b: ldloc.0
IL_000c: ldc.i4.1
IL_000d: add.ovf
IL_000e: stloc.0
IL_000f: ldloc.0
IL_0010: ldarg.1
IL_0011: ldc.i4.1
IL_0012: add.ovf
IL_0013: blt.s IL_0006
IL_0015: ret
} // end of method CheckedUnchecked::ForWithCheckedIteratorAndUncheckedBody
.method public hidebysig instance void
ForWithCheckedInitializerAndUncheckedIterator(int32 n) cil managed
{
// Code size 23 (0x17)
.maxstack 2
.locals init (int32 V_0)
IL_0000: ldarg.1
IL_0001: stloc.0
IL_0002: ldloc.0
IL_0003: ldc.i4.s 10
IL_0005: sub.ovf
IL_0006: stloc.0
IL_0007: br.s IL_0012
IL_0009: ldarg.1
IL_000a: ldc.i4.1
IL_000b: sub
IL_000c: starg.s n
IL_000e: ldloc.0
IL_000f: ldc.i4.1
IL_0010: add
IL_0011: stloc.0
IL_0012: ldloc.0
IL_0013: ldarg.1
IL_0014: blt.s IL_0009
IL_0016: ret
} // end of method CheckedUnchecked::ForWithCheckedInitializerAndUncheckedIterator
.method public hidebysig instance void
ObjectCreationInitializerChecked() cil managed
{
// Code size 44 (0x2c)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldc.i4.0
IL_0002: ldc.i4.0
IL_0003: newobj instance void class '<>f__AnonymousType0`2'<int32,int32>::.ctor(!0,
!1)
IL_0008: ldsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::'CS$<>9__CachedAnonymousMethodDelegate1'
IL_000d: brtrue.s IL_0020
IL_000f: ldnull
IL_0010: ldftn class '<>f__AnonymousType0`2'<int32,int32> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::'<ObjectCreationInitializerChecked>b__0'(class '<>f__AnonymousType0`2'<int32,int32>)
IL_0016: newobj instance void class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>>::.ctor(object,
native int)
IL_001b: stsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::'CS$<>9__CachedAnonymousMethodDelegate1'
IL_0020: ldsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::'CS$<>9__CachedAnonymousMethodDelegate1'
IL_0025: call instance !!0 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::TestHelp<class '<>f__AnonymousType0`2'<int32,int32>>(!!0,
class [mscorlib]System.Func`2<!!0,!!0>)
IL_002a: pop
IL_002b: ret
} // end of method CheckedUnchecked::ObjectCreationInitializerChecked
.method public hidebysig instance void
ObjectCreationWithOneFieldChecked() cil managed
{
// Code size 44 (0x2c)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldc.i4.0
IL_0002: ldc.i4.0
IL_0003: newobj instance void class '<>f__AnonymousType0`2'<int32,int32>::.ctor(!0,
!1)
IL_0008: ldsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::'CS$<>9__CachedAnonymousMethodDelegate3'
IL_000d: brtrue.s IL_0020
IL_000f: ldnull
IL_0010: ldftn class '<>f__AnonymousType0`2'<int32,int32> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::'<ObjectCreationWithOneFieldChecked>b__2'(class '<>f__AnonymousType0`2'<int32,int32>)
IL_0016: newobj instance void class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>>::.ctor(object,
native int)
IL_001b: stsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::'CS$<>9__CachedAnonymousMethodDelegate3'
IL_0020: ldsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::'CS$<>9__CachedAnonymousMethodDelegate3'
IL_0025: call instance !!0 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::TestHelp<class '<>f__AnonymousType0`2'<int32,int32>>(!!0,
class [mscorlib]System.Func`2<!!0,!!0>)
IL_002a: pop
IL_002b: ret
} // end of method CheckedUnchecked::ObjectCreationWithOneFieldChecked
.method public hidebysig instance void
ArrayInitializerChecked() cil managed
{
// Code size 53 (0x35)
.maxstack 4
.locals init (int32[] V_0)
IL_0000: ldarg.0
IL_0001: ldc.i4.2
IL_0002: newarr [mscorlib]System.Int32
IL_0007: stloc.0
IL_0008: ldloc.0
IL_0009: ldc.i4.0
IL_000a: ldc.i4.1
IL_000b: stelem.i4
IL_000c: ldloc.0
IL_000d: ldc.i4.1
IL_000e: ldc.i4.2
IL_000f: stelem.i4
IL_0010: ldloc.0
IL_0011: ldsfld class [mscorlib]System.Func`2<int32[],int32[]> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::'CS$<>9__CachedAnonymousMethodDelegate5'
IL_0016: brtrue.s IL_0029
IL_0018: ldnull
IL_0019: ldftn int32[] ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::'<ArrayInitializerChecked>b__4'(int32[])
IL_001f: newobj instance void class [mscorlib]System.Func`2<int32[],int32[]>::.ctor(object,
native int)
IL_0024: stsfld class [mscorlib]System.Func`2<int32[],int32[]> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::'CS$<>9__CachedAnonymousMethodDelegate5'
IL_0029: ldsfld class [mscorlib]System.Func`2<int32[],int32[]> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::'CS$<>9__CachedAnonymousMethodDelegate5'
IL_002e: call instance !!0 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::TestHelp<int32[]>(!!0,
class [mscorlib]System.Func`2<!!0,!!0>)
IL_0033: pop
IL_0034: ret
} // end of method CheckedUnchecked::ArrayInitializerChecked
.method public hidebysig instance !!T TestHelp<T>(!!T t,
class [mscorlib]System.Func`2<!!T,!!T> f) cil managed
{
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.2
IL_0001: ldarg.1
IL_0002: callvirt instance !1 class [mscorlib]System.Func`2<!!T,!!T>::Invoke(!0)
IL_0007: ret
} // end of method CheckedUnchecked::TestHelp
.method public hidebysig instance void
CheckedInArrayCreationArgument(int32 a,
int32 b) cil managed
{
// Code size 14 (0xe)
.maxstack 8
IL_0000: ldarg.1
IL_0001: ldarg.2
IL_0002: add.ovf
IL_0003: newarr [mscorlib]System.Int32
IL_0008: call void [mscorlib]System.Console::WriteLine(object)
IL_000d: ret
} // end of method CheckedUnchecked::CheckedInArrayCreationArgument
.method public hidebysig instance int16
Unbox(valuetype [mscorlib]System.TypeCode c,
object b) cil managed
{
// Code size 80 (0x50)
.maxstack 2
.locals init (float32 V_0,
valuetype [mscorlib]System.TypeCode V_1)
IL_0000: ldarg.1
IL_0001: stloc.1
IL_0002: ldloc.1
IL_0003: ldc.i4.s 9
IL_0005: sub
IL_0006: switch (
IL_001a,
IL_0027)
IL_0013: ldloc.1
IL_0014: ldc.i4.s 14
IL_0016: beq.s IL_0034
IL_0018: br.s IL_004a
IL_001a: ldarg.2
IL_001b: castclass class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<int32>
IL_0020: ldfld !0 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<int32>::Value
IL_0025: conv.ovf.i2
IL_0026: ret
IL_0027: ldarg.2
IL_0028: castclass class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<uint32>
IL_002d: ldfld !0 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<uint32>::Value
IL_0032: conv.ovf.i2.un
IL_0033: ret
IL_0034: ldarg.2
IL_0035: castclass class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<float64>
IL_003a: ldfld !0 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<float64>::Value
IL_003f: conv.r4
IL_0040: stloc.0
IL_0041: ldloc.0
IL_0042: call void [mscorlib]System.Console::WriteLine(float32)
IL_0047: ldloc.0
IL_0048: conv.ovf.i2
IL_0049: ret
IL_004a: newobj instance void [mscorlib]System.Exception::.ctor()
IL_004f: throw
} // end of method CheckedUnchecked::Unbox
.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 CheckedUnchecked::.ctor
.method private hidebysig static class '<>f__AnonymousType0`2'<int32,int32>
'<ObjectCreationInitializerChecked>b__0'(class '<>f__AnonymousType0`2'<int32,int32> n) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 22 (0x16)
.maxstack 8
IL_0000: ldarg.0
IL_0001: callvirt instance !0 class '<>f__AnonymousType0`2'<int32,int32>::get_x()
IL_0006: ldc.i4.1
IL_0007: add.ovf
IL_0008: ldarg.0
IL_0009: callvirt instance !1 class '<>f__AnonymousType0`2'<int32,int32>::get_l()
IL_000e: ldc.i4.1
IL_000f: add.ovf
IL_0010: newobj instance void class '<>f__AnonymousType0`2'<int32,int32>::.ctor(!0,
!1)
IL_0015: ret
} // end of method CheckedUnchecked::'<ObjectCreationInitializerChecked>b__0'
.method private hidebysig static class '<>f__AnonymousType0`2'<int32,int32>
'<ObjectCreationWithOneFieldChecked>b__2'(class '<>f__AnonymousType0`2'<int32,int32> n) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 22 (0x16)
.maxstack 8
IL_0000: ldarg.0
IL_0001: callvirt instance !0 class '<>f__AnonymousType0`2'<int32,int32>::get_x()
IL_0006: ldc.i4.1
IL_0007: add.ovf
IL_0008: ldarg.0
IL_0009: callvirt instance !1 class '<>f__AnonymousType0`2'<int32,int32>::get_l()
IL_000e: ldc.i4.1
IL_000f: add
IL_0010: newobj instance void class '<>f__AnonymousType0`2'<int32,int32>::.ctor(!0,
!1)
IL_0015: ret
} // end of method CheckedUnchecked::'<ObjectCreationWithOneFieldChecked>b__2'
.method private hidebysig static int32[]
'<ArrayInitializerChecked>b__4'(int32[] n) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 25 (0x19)
.maxstack 4
.locals init (int32[] V_0)
IL_0000: ldc.i4.2
IL_0001: newarr [mscorlib]System.Int32
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: ldc.i4.0
IL_0009: ldarg.0
IL_000a: ldc.i4.0
IL_000b: ldelem.i4
IL_000c: ldc.i4.1
IL_000d: add.ovf
IL_000e: stelem.i4
IL_000f: ldloc.0
IL_0010: ldc.i4.1
IL_0011: ldarg.0
IL_0012: ldc.i4.1
IL_0013: ldelem.i4
IL_0014: ldc.i4.1
IL_0015: add.ovf
IL_0016: stelem.i4
IL_0017: ldloc.0
IL_0018: ret
} // end of method CheckedUnchecked::'<ArrayInitializerChecked>b__4'
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<T>
extends [mscorlib]System.Object
{
.field public initonly !T Value
.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 Box`1::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1
.class private auto ansi sealed beforefieldinit '<>f__AnonymousType0`2'<'<x>j__TPar','<l>j__TPar'>
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private initonly !'<x>j__TPar' '<x>i__Field'
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.field private initonly !'<l>j__TPar' '<l>i__Field'
.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 rtspecialname
instance void .ctor(!'<x>j__TPar' x,
!'<l>j__TPar' l) cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 21 (0x15)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld !0 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<x>i__Field'
IL_000d: ldarg.0
IL_000e: ldarg.2
IL_000f: stfld !1 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<l>i__Field'
IL_0014: ret
} // end of method '<>f__AnonymousType0`2'::.ctor
.method public hidebysig specialname instance !'<x>j__TPar'
get_x() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !0 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<x>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType0`2'::get_x
.method public hidebysig specialname instance !'<l>j__TPar'
get_l() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !1 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<l>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType0`2'::get_l
.method public hidebysig virtual instance string
ToString() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 85 (0x55)
.maxstack 2
.locals init (class [mscorlib]System.Text.StringBuilder V_0)
IL_0000: newobj instance void [mscorlib]System.Text.StringBuilder::.ctor()
IL_0005: stloc.0
IL_0006: ldloc.0
IL_0007: ldstr "{ x = "
IL_000c: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_0011: pop
IL_0012: ldloc.0
IL_0013: ldarg.0
IL_0014: ldfld !0 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<x>i__Field'
IL_0019: box !'<x>j__TPar'
IL_001e: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(object)
IL_0023: pop
IL_0024: ldloc.0
IL_0025: ldstr ", l = "
IL_002a: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_002f: pop
IL_0030: ldloc.0
IL_0031: ldarg.0
IL_0032: ldfld !1 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<l>i__Field'
IL_0037: box !'<l>j__TPar'
IL_003c: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(object)
IL_0041: pop
IL_0042: ldloc.0
IL_0043: ldstr " }"
IL_0048: callvirt instance class [mscorlib]System.Text.StringBuilder [mscorlib]System.Text.StringBuilder::Append(string)
IL_004d: pop
IL_004e: ldloc.0
IL_004f: callvirt instance string [mscorlib]System.Object::ToString()
IL_0054: ret
} // end of method '<>f__AnonymousType0`2'::ToString
.method public hidebysig virtual instance bool
Equals(object 'value') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 59 (0x3b)
.maxstack 3
.locals init (class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'> V_0)
IL_0000: ldarg.1
IL_0001: isinst class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: brfalse.s IL_0039
IL_000a: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<x>j__TPar'>::get_Default()
IL_000f: ldarg.0
IL_0010: ldfld !0 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<x>i__Field'
IL_0015: ldloc.0
IL_0016: ldfld !0 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<x>i__Field'
IL_001b: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<x>j__TPar'>::Equals(!0,
!0)
IL_0020: brfalse.s IL_0039
IL_0022: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<l>j__TPar'>::get_Default()
IL_0027: ldarg.0
IL_0028: ldfld !1 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<l>i__Field'
IL_002d: ldloc.0
IL_002e: ldfld !1 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<l>i__Field'
IL_0033: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<l>j__TPar'>::Equals(!0,
!0)
IL_0038: ret
IL_0039: ldc.i4.0
IL_003a: ret
} // end of method '<>f__AnonymousType0`2'::Equals
.method public hidebysig virtual instance int32
GetHashCode() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 58 (0x3a)
.maxstack 3
.locals init (int32 V_0)
IL_0000: ldc.i4 0xf749ae7d
IL_0005: stloc.0
IL_0006: ldc.i4 0xa5555529
IL_000b: ldloc.0
IL_000c: mul
IL_000d: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<x>j__TPar'>::get_Default()
IL_0012: ldarg.0
IL_0013: ldfld !0 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<x>i__Field'
IL_0018: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<x>j__TPar'>::GetHashCode(!0)
IL_001d: add
IL_001e: stloc.0
IL_001f: ldc.i4 0xa5555529
IL_0024: ldloc.0
IL_0025: mul
IL_0026: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<l>j__TPar'>::get_Default()
IL_002b: ldarg.0
IL_002c: ldfld !1 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<l>i__Field'
IL_0031: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<l>j__TPar'>::GetHashCode(!0)
IL_0036: add
IL_0037: stloc.0
IL_0038: ldloc.0
IL_0039: ret
} // end of method '<>f__AnonymousType0`2'::GetHashCode
.property instance !'<x>j__TPar' x()
{
.get instance !'<x>j__TPar' '<>f__AnonymousType0`2'::get_x()
} // end of property '<>f__AnonymousType0`2'::x
.property instance !'<l>j__TPar' l()
{
.get instance !'<l>j__TPar' '<>f__AnonymousType0`2'::get_l()
} // end of property '<>f__AnonymousType0`2'::l
} // end of class '<>f__AnonymousType0`2'
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

653
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CheckedUnchecked.opt.roslyn.il

@ -1,653 +0,0 @@ @@ -1,653 +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 CheckedUnchecked
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
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 CheckedUnchecked.dll
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x10000000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// =============== CLASS MEMBERS DECLARATION ===================
.class private auto ansi sealed beforefieldinit '<>f__AnonymousType0`2'<'<x>j__TPar','<l>j__TPar'>
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private initonly !'<x>j__TPar' '<x>i__Field'
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.field private initonly !'<l>j__TPar' '<l>i__Field'
.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 !'<x>j__TPar'
get_x() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !0 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<x>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType0`2'::get_x
.method public hidebysig specialname instance !'<l>j__TPar'
get_l() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !1 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<l>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType0`2'::get_l
.method public hidebysig specialname rtspecialname
instance void .ctor(!'<x>j__TPar' x,
!'<l>j__TPar' l) cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 21 (0x15)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld !0 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<x>i__Field'
IL_000d: ldarg.0
IL_000e: ldarg.2
IL_000f: stfld !1 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<l>i__Field'
IL_0014: ret
} // end of method '<>f__AnonymousType0`2'::.ctor
.method public hidebysig virtual instance bool
Equals(object 'value') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 59 (0x3b)
.maxstack 3
.locals init (class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'> V_0)
IL_0000: ldarg.1
IL_0001: isinst class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: brfalse.s IL_0039
IL_000a: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<x>j__TPar'>::get_Default()
IL_000f: ldarg.0
IL_0010: ldfld !0 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<x>i__Field'
IL_0015: ldloc.0
IL_0016: ldfld !0 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<x>i__Field'
IL_001b: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<x>j__TPar'>::Equals(!0,
!0)
IL_0020: brfalse.s IL_0039
IL_0022: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<l>j__TPar'>::get_Default()
IL_0027: ldarg.0
IL_0028: ldfld !1 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<l>i__Field'
IL_002d: ldloc.0
IL_002e: ldfld !1 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<l>i__Field'
IL_0033: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<l>j__TPar'>::Equals(!0,
!0)
IL_0038: ret
IL_0039: ldc.i4.0
IL_003a: ret
} // end of method '<>f__AnonymousType0`2'::Equals
.method public hidebysig virtual instance int32
GetHashCode() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 52 (0x34)
.maxstack 8
IL_0000: ldc.i4 0x9256c2a8
IL_0005: ldc.i4 0xa5555529
IL_000a: mul
IL_000b: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<x>j__TPar'>::get_Default()
IL_0010: ldarg.0
IL_0011: ldfld !0 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<x>i__Field'
IL_0016: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<x>j__TPar'>::GetHashCode(!0)
IL_001b: add
IL_001c: ldc.i4 0xa5555529
IL_0021: mul
IL_0022: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<l>j__TPar'>::get_Default()
IL_0027: ldarg.0
IL_0028: ldfld !1 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<l>i__Field'
IL_002d: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<l>j__TPar'>::GetHashCode(!0)
IL_0032: add
IL_0033: ret
} // end of method '<>f__AnonymousType0`2'::GetHashCode
.method public hidebysig virtual instance string
ToString() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 136 (0x88)
.maxstack 7
.locals init (!'<x>j__TPar' V_0,
!'<x>j__TPar' V_1,
!'<l>j__TPar' V_2,
!'<l>j__TPar' V_3)
IL_0000: ldnull
IL_0001: ldstr "{{ x = {0}, l = {1} }}"
IL_0006: ldc.i4.2
IL_0007: newarr [mscorlib]System.Object
IL_000c: dup
IL_000d: ldc.i4.0
IL_000e: ldarg.0
IL_000f: ldfld !0 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<x>i__Field'
IL_0014: stloc.0
IL_0015: ldloca.s V_0
IL_0017: ldloca.s V_1
IL_0019: initobj !'<x>j__TPar'
IL_001f: ldloc.1
IL_0020: box !'<x>j__TPar'
IL_0025: brtrue.s IL_003b
IL_0027: ldobj !'<x>j__TPar'
IL_002c: stloc.1
IL_002d: ldloca.s V_1
IL_002f: ldloc.1
IL_0030: box !'<x>j__TPar'
IL_0035: brtrue.s IL_003b
IL_0037: pop
IL_0038: ldnull
IL_0039: br.s IL_0046
IL_003b: constrained. !'<x>j__TPar'
IL_0041: callvirt instance string [mscorlib]System.Object::ToString()
IL_0046: stelem.ref
IL_0047: dup
IL_0048: ldc.i4.1
IL_0049: ldarg.0
IL_004a: ldfld !1 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<l>i__Field'
IL_004f: stloc.2
IL_0050: ldloca.s V_2
IL_0052: ldloca.s V_3
IL_0054: initobj !'<l>j__TPar'
IL_005a: ldloc.3
IL_005b: box !'<l>j__TPar'
IL_0060: brtrue.s IL_0076
IL_0062: ldobj !'<l>j__TPar'
IL_0067: stloc.3
IL_0068: ldloca.s V_3
IL_006a: ldloc.3
IL_006b: box !'<l>j__TPar'
IL_0070: brtrue.s IL_0076
IL_0072: pop
IL_0073: ldnull
IL_0074: br.s IL_0081
IL_0076: constrained. !'<l>j__TPar'
IL_007c: callvirt instance string [mscorlib]System.Object::ToString()
IL_0081: stelem.ref
IL_0082: call string [mscorlib]System.String::Format(class [mscorlib]System.IFormatProvider,
string,
object[])
IL_0087: ret
} // end of method '<>f__AnonymousType0`2'::ToString
.property instance !'<x>j__TPar' x()
{
.get instance !'<x>j__TPar' '<>f__AnonymousType0`2'::get_x()
} // end of property '<>f__AnonymousType0`2'::x
.property instance !'<l>j__TPar' l()
{
.get instance !'<l>j__TPar' '<>f__AnonymousType0`2'::get_l()
} // end of property '<>f__AnonymousType0`2'::l
} // end of class '<>f__AnonymousType0`2'
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked
extends [mscorlib]System.Object
{
.class auto ansi serializable sealed nested private beforefieldinit '<>c'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public static initonly class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c' '<>9'
.field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> '<>9__4_0'
.field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> '<>9__5_0'
.field public static class [mscorlib]System.Func`2<int32[],int32[]> '<>9__6_0'
.method private hidebysig specialname rtspecialname static
void .cctor() cil managed
{
// Code size 11 (0xb)
.maxstack 8
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::.ctor()
IL_0005: stsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::'<>9'
IL_000a: ret
} // end of method '<>c'::.cctor
.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'::.ctor
.method assembly hidebysig instance class '<>f__AnonymousType0`2'<int32,int32>
'<ObjectCreationInitializerChecked>b__4_0'(class '<>f__AnonymousType0`2'<int32,int32> n) cil managed
{
// Code size 22 (0x16)
.maxstack 8
IL_0000: ldarg.1
IL_0001: callvirt instance !0 class '<>f__AnonymousType0`2'<int32,int32>::get_x()
IL_0006: ldc.i4.1
IL_0007: add.ovf
IL_0008: ldarg.1
IL_0009: callvirt instance !1 class '<>f__AnonymousType0`2'<int32,int32>::get_l()
IL_000e: ldc.i4.1
IL_000f: add.ovf
IL_0010: newobj instance void class '<>f__AnonymousType0`2'<int32,int32>::.ctor(!0,
!1)
IL_0015: ret
} // end of method '<>c'::'<ObjectCreationInitializerChecked>b__4_0'
.method assembly hidebysig instance class '<>f__AnonymousType0`2'<int32,int32>
'<ObjectCreationWithOneFieldChecked>b__5_0'(class '<>f__AnonymousType0`2'<int32,int32> n) cil managed
{
// Code size 22 (0x16)
.maxstack 8
IL_0000: ldarg.1
IL_0001: callvirt instance !0 class '<>f__AnonymousType0`2'<int32,int32>::get_x()
IL_0006: ldc.i4.1
IL_0007: add.ovf
IL_0008: ldarg.1
IL_0009: callvirt instance !1 class '<>f__AnonymousType0`2'<int32,int32>::get_l()
IL_000e: ldc.i4.1
IL_000f: add
IL_0010: newobj instance void class '<>f__AnonymousType0`2'<int32,int32>::.ctor(!0,
!1)
IL_0015: ret
} // end of method '<>c'::'<ObjectCreationWithOneFieldChecked>b__5_0'
.method assembly hidebysig instance int32[]
'<ArrayInitializerChecked>b__6_0'(int32[] n) cil managed
{
// Code size 23 (0x17)
.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: ldc.i4.0
IL_000a: ldelem.i4
IL_000b: ldc.i4.1
IL_000c: add.ovf
IL_000d: stelem.i4
IL_000e: dup
IL_000f: ldc.i4.1
IL_0010: ldarg.1
IL_0011: ldc.i4.1
IL_0012: ldelem.i4
IL_0013: ldc.i4.1
IL_0014: add.ovf
IL_0015: stelem.i4
IL_0016: ret
} // end of method '<>c'::'<ArrayInitializerChecked>b__6_0'
} // end of class '<>c'
.method public hidebysig instance int32
Operators(int32 a,
int32 b) cil managed
{
// Code size 52 (0x34)
.maxstack 3
.locals init (int32 V_0,
int32 V_1,
int32 V_2,
int32 V_3,
int32 V_4,
int32 V_5,
int32 V_6)
IL_0000: ldarg.1
IL_0001: ldarg.2
IL_0002: add.ovf
IL_0003: ldarg.1
IL_0004: ldarg.2
IL_0005: add
IL_0006: stloc.0
IL_0007: ldarg.1
IL_0008: ldarg.2
IL_0009: sub.ovf
IL_000a: stloc.1
IL_000b: ldarg.1
IL_000c: ldarg.2
IL_000d: sub
IL_000e: stloc.2
IL_000f: ldarg.1
IL_0010: ldarg.2
IL_0011: mul.ovf
IL_0012: stloc.3
IL_0013: ldarg.1
IL_0014: ldarg.2
IL_0015: mul
IL_0016: stloc.s V_4
IL_0018: ldarg.1
IL_0019: ldarg.2
IL_001a: div
IL_001b: stloc.s V_5
IL_001d: ldarg.1
IL_001e: ldarg.2
IL_001f: rem
IL_0020: stloc.s V_6
IL_0022: ldloc.0
IL_0023: mul
IL_0024: ldloc.1
IL_0025: mul
IL_0026: ldloc.2
IL_0027: mul
IL_0028: ldloc.3
IL_0029: mul
IL_002a: ldloc.s V_4
IL_002c: mul
IL_002d: ldloc.s V_5
IL_002f: mul
IL_0030: ldloc.s V_6
IL_0032: mul
IL_0033: ret
} // end of method CheckedUnchecked::Operators
.method public hidebysig instance int32
Cast(int32 a) cil managed
{
// Code size 18 (0x12)
.maxstack 2
.locals init (int16 V_0,
uint8 V_1,
uint8 V_2)
IL_0000: ldarg.1
IL_0001: conv.ovf.i2
IL_0002: ldarg.1
IL_0003: conv.i2
IL_0004: stloc.0
IL_0005: ldarg.1
IL_0006: conv.ovf.u1
IL_0007: stloc.1
IL_0008: ldarg.1
IL_0009: conv.u1
IL_000a: stloc.2
IL_000b: ldloc.0
IL_000c: mul
IL_000d: ldloc.1
IL_000e: mul
IL_000f: ldloc.2
IL_0010: mul
IL_0011: ret
} // end of method CheckedUnchecked::Cast
.method public hidebysig instance void
ForWithCheckedIteratorAndUncheckedBody(int32 n) cil managed
{
// Code size 22 (0x16)
.maxstack 3
.locals init (int32 V_0)
IL_0000: ldarg.1
IL_0001: ldc.i4.1
IL_0002: add.ovf
IL_0003: stloc.0
IL_0004: br.s IL_000f
IL_0006: ldloc.0
IL_0007: ldloc.0
IL_0008: mul
IL_0009: starg.s n
IL_000b: ldloc.0
IL_000c: ldc.i4.1
IL_000d: add.ovf
IL_000e: stloc.0
IL_000f: ldloc.0
IL_0010: ldarg.1
IL_0011: ldc.i4.1
IL_0012: add.ovf
IL_0013: blt.s IL_0006
IL_0015: ret
} // end of method CheckedUnchecked::ForWithCheckedIteratorAndUncheckedBody
.method public hidebysig instance void
ForWithCheckedInitializerAndUncheckedIterator(int32 n) cil managed
{
// Code size 23 (0x17)
.maxstack 2
.locals init (int32 V_0)
IL_0000: ldarg.1
IL_0001: stloc.0
IL_0002: ldloc.0
IL_0003: ldc.i4.s 10
IL_0005: sub.ovf
IL_0006: stloc.0
IL_0007: br.s IL_0012
IL_0009: ldarg.1
IL_000a: ldc.i4.1
IL_000b: sub
IL_000c: starg.s n
IL_000e: ldloc.0
IL_000f: ldc.i4.1
IL_0010: add
IL_0011: stloc.0
IL_0012: ldloc.0
IL_0013: ldarg.1
IL_0014: blt.s IL_0009
IL_0016: ret
} // end of method CheckedUnchecked::ForWithCheckedInitializerAndUncheckedIterator
.method public hidebysig instance void
ObjectCreationInitializerChecked() cil managed
{
// Code size 46 (0x2e)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldc.i4.0
IL_0002: ldc.i4.0
IL_0003: newobj instance void class '<>f__AnonymousType0`2'<int32,int32>::.ctor(!0,
!1)
IL_0008: ldsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::'<>9__4_0'
IL_000d: dup
IL_000e: brtrue.s IL_0027
IL_0010: pop
IL_0011: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::'<>9'
IL_0016: ldftn instance class '<>f__AnonymousType0`2'<int32,int32> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::'<ObjectCreationInitializerChecked>b__4_0'(class '<>f__AnonymousType0`2'<int32,int32>)
IL_001c: newobj instance void class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>>::.ctor(object,
native int)
IL_0021: dup
IL_0022: stsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::'<>9__4_0'
IL_0027: call instance !!0 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::TestHelp<class '<>f__AnonymousType0`2'<int32,int32>>(!!0,
class [mscorlib]System.Func`2<!!0,!!0>)
IL_002c: pop
IL_002d: ret
} // end of method CheckedUnchecked::ObjectCreationInitializerChecked
.method public hidebysig instance void
ObjectCreationWithOneFieldChecked() cil managed
{
// Code size 46 (0x2e)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldc.i4.0
IL_0002: ldc.i4.0
IL_0003: newobj instance void class '<>f__AnonymousType0`2'<int32,int32>::.ctor(!0,
!1)
IL_0008: ldsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::'<>9__5_0'
IL_000d: dup
IL_000e: brtrue.s IL_0027
IL_0010: pop
IL_0011: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::'<>9'
IL_0016: ldftn instance class '<>f__AnonymousType0`2'<int32,int32> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::'<ObjectCreationWithOneFieldChecked>b__5_0'(class '<>f__AnonymousType0`2'<int32,int32>)
IL_001c: newobj instance void class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>>::.ctor(object,
native int)
IL_0021: dup
IL_0022: stsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::'<>9__5_0'
IL_0027: call instance !!0 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::TestHelp<class '<>f__AnonymousType0`2'<int32,int32>>(!!0,
class [mscorlib]System.Func`2<!!0,!!0>)
IL_002c: pop
IL_002d: ret
} // end of method CheckedUnchecked::ObjectCreationWithOneFieldChecked
.method public hidebysig instance void
ArrayInitializerChecked() cil managed
{
// Code size 53 (0x35)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldc.i4.2
IL_0002: newarr [mscorlib]System.Int32
IL_0007: dup
IL_0008: ldc.i4.0
IL_0009: ldc.i4.1
IL_000a: stelem.i4
IL_000b: dup
IL_000c: ldc.i4.1
IL_000d: ldc.i4.2
IL_000e: stelem.i4
IL_000f: ldsfld class [mscorlib]System.Func`2<int32[],int32[]> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::'<>9__6_0'
IL_0014: dup
IL_0015: brtrue.s IL_002e
IL_0017: pop
IL_0018: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::'<>9'
IL_001d: ldftn instance int32[] ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::'<ArrayInitializerChecked>b__6_0'(int32[])
IL_0023: newobj instance void class [mscorlib]System.Func`2<int32[],int32[]>::.ctor(object,
native int)
IL_0028: dup
IL_0029: stsfld class [mscorlib]System.Func`2<int32[],int32[]> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::'<>9__6_0'
IL_002e: call instance !!0 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::TestHelp<int32[]>(!!0,
class [mscorlib]System.Func`2<!!0,!!0>)
IL_0033: pop
IL_0034: ret
} // end of method CheckedUnchecked::ArrayInitializerChecked
.method public hidebysig instance !!T TestHelp<T>(!!T t,
class [mscorlib]System.Func`2<!!T,!!T> f) cil managed
{
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.2
IL_0001: ldarg.1
IL_0002: callvirt instance !1 class [mscorlib]System.Func`2<!!T,!!T>::Invoke(!0)
IL_0007: ret
} // end of method CheckedUnchecked::TestHelp
.method public hidebysig instance void
CheckedInArrayCreationArgument(int32 a,
int32 b) cil managed
{
// Code size 14 (0xe)
.maxstack 8
IL_0000: ldarg.1
IL_0001: ldarg.2
IL_0002: add.ovf
IL_0003: newarr [mscorlib]System.Int32
IL_0008: call void [mscorlib]System.Console::WriteLine(object)
IL_000d: ret
} // end of method CheckedUnchecked::CheckedInArrayCreationArgument
.method public hidebysig instance int16
Unbox(valuetype [mscorlib]System.TypeCode c,
object b) cil managed
{
// Code size 69 (0x45)
.maxstack 2
IL_0000: ldarg.1
IL_0001: ldc.i4.s 9
IL_0003: beq.s IL_0011
IL_0005: ldarg.1
IL_0006: ldc.i4.s 10
IL_0008: beq.s IL_001e
IL_000a: ldarg.1
IL_000b: ldc.i4.s 14
IL_000d: beq.s IL_002b
IL_000f: br.s IL_003f
IL_0011: ldarg.2
IL_0012: castclass class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<int32>
IL_0017: ldfld !0 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<int32>::Value
IL_001c: conv.ovf.i2
IL_001d: ret
IL_001e: ldarg.2
IL_001f: castclass class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<uint32>
IL_0024: ldfld !0 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<uint32>::Value
IL_0029: conv.ovf.i2.un
IL_002a: ret
IL_002b: ldarg.2
IL_002c: castclass class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<float64>
IL_0031: ldfld !0 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<float64>::Value
IL_0036: conv.r4
IL_0037: dup
IL_0038: call void [mscorlib]System.Console::WriteLine(float32)
IL_003d: conv.ovf.i2
IL_003e: ret
IL_003f: newobj instance void [mscorlib]System.Exception::.ctor()
IL_0044: throw
} // end of method CheckedUnchecked::Unbox
.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 CheckedUnchecked::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<T>
extends [mscorlib]System.Object
{
.field public initonly !T Value
.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 Box`1::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

726
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CheckedUnchecked.roslyn.il

@ -1,726 +0,0 @@ @@ -1,726 +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 CheckedUnchecked
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
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 CheckedUnchecked.dll
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x10000000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// =============== CLASS MEMBERS DECLARATION ===================
.class private auto ansi sealed beforefieldinit '<>f__AnonymousType0`2'<'<x>j__TPar','<l>j__TPar'>
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.Diagnostics.DebuggerDisplayAttribute::.ctor(string) = ( 01 00 15 5C 7B 20 78 20 3D 20 7B 78 7D 2C 20 6C // ...\{ x = {x}, l
20 3D 20 7B 6C 7D 20 7D 01 00 54 0E 04 54 79 70 // = {l} }..T..Typ
65 10 3C 41 6E 6F 6E 79 6D 6F 75 73 20 54 79 70 // e.<Anonymous Typ
65 3E ) // e>
.field private initonly !'<x>j__TPar' '<x>i__Field'
.custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 )
.field private initonly !'<l>j__TPar' '<l>i__Field'
.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 !'<x>j__TPar'
get_x() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !0 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<x>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType0`2'::get_x
.method public hidebysig specialname instance !'<l>j__TPar'
get_l() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld !1 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<l>i__Field'
IL_0006: ret
} // end of method '<>f__AnonymousType0`2'::get_l
.method public hidebysig specialname rtspecialname
instance void .ctor(!'<x>j__TPar' x,
!'<l>j__TPar' l) cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 21 (0x15)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ldarg.0
IL_0007: ldarg.1
IL_0008: stfld !0 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<x>i__Field'
IL_000d: ldarg.0
IL_000e: ldarg.2
IL_000f: stfld !1 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<l>i__Field'
IL_0014: ret
} // end of method '<>f__AnonymousType0`2'::.ctor
.method public hidebysig virtual instance bool
Equals(object 'value') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 60 (0x3c)
.maxstack 3
.locals init (class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'> V_0)
IL_0000: ldarg.1
IL_0001: isinst class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: brfalse.s IL_003a
IL_000a: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<x>j__TPar'>::get_Default()
IL_000f: ldarg.0
IL_0010: ldfld !0 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<x>i__Field'
IL_0015: ldloc.0
IL_0016: ldfld !0 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<x>i__Field'
IL_001b: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<x>j__TPar'>::Equals(!0,
!0)
IL_0020: brfalse.s IL_003a
IL_0022: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<l>j__TPar'>::get_Default()
IL_0027: ldarg.0
IL_0028: ldfld !1 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<l>i__Field'
IL_002d: ldloc.0
IL_002e: ldfld !1 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<l>i__Field'
IL_0033: callvirt instance bool class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<l>j__TPar'>::Equals(!0,
!0)
IL_0038: br.s IL_003b
IL_003a: ldc.i4.0
IL_003b: ret
} // end of method '<>f__AnonymousType0`2'::Equals
.method public hidebysig virtual instance int32
GetHashCode() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 52 (0x34)
.maxstack 8
IL_0000: ldc.i4 0x9256c2a8
IL_0005: ldc.i4 0xa5555529
IL_000a: mul
IL_000b: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<x>j__TPar'>::get_Default()
IL_0010: ldarg.0
IL_0011: ldfld !0 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<x>i__Field'
IL_0016: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<x>j__TPar'>::GetHashCode(!0)
IL_001b: add
IL_001c: ldc.i4 0xa5555529
IL_0021: mul
IL_0022: call class [mscorlib]System.Collections.Generic.EqualityComparer`1<!0> class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<l>j__TPar'>::get_Default()
IL_0027: ldarg.0
IL_0028: ldfld !1 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<l>i__Field'
IL_002d: callvirt instance int32 class [mscorlib]System.Collections.Generic.EqualityComparer`1<!'<l>j__TPar'>::GetHashCode(!0)
IL_0032: add
IL_0033: ret
} // end of method '<>f__AnonymousType0`2'::GetHashCode
.method public hidebysig virtual instance string
ToString() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 136 (0x88)
.maxstack 7
.locals init (!'<x>j__TPar' V_0,
!'<x>j__TPar' V_1,
!'<l>j__TPar' V_2,
!'<l>j__TPar' V_3)
IL_0000: ldnull
IL_0001: ldstr "{{ x = {0}, l = {1} }}"
IL_0006: ldc.i4.2
IL_0007: newarr [mscorlib]System.Object
IL_000c: dup
IL_000d: ldc.i4.0
IL_000e: ldarg.0
IL_000f: ldfld !0 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<x>i__Field'
IL_0014: stloc.0
IL_0015: ldloca.s V_0
IL_0017: ldloca.s V_1
IL_0019: initobj !'<x>j__TPar'
IL_001f: ldloc.1
IL_0020: box !'<x>j__TPar'
IL_0025: brtrue.s IL_003b
IL_0027: ldobj !'<x>j__TPar'
IL_002c: stloc.1
IL_002d: ldloca.s V_1
IL_002f: ldloc.1
IL_0030: box !'<x>j__TPar'
IL_0035: brtrue.s IL_003b
IL_0037: pop
IL_0038: ldnull
IL_0039: br.s IL_0046
IL_003b: constrained. !'<x>j__TPar'
IL_0041: callvirt instance string [mscorlib]System.Object::ToString()
IL_0046: stelem.ref
IL_0047: dup
IL_0048: ldc.i4.1
IL_0049: ldarg.0
IL_004a: ldfld !1 class '<>f__AnonymousType0`2'<!'<x>j__TPar',!'<l>j__TPar'>::'<l>i__Field'
IL_004f: stloc.2
IL_0050: ldloca.s V_2
IL_0052: ldloca.s V_3
IL_0054: initobj !'<l>j__TPar'
IL_005a: ldloc.3
IL_005b: box !'<l>j__TPar'
IL_0060: brtrue.s IL_0076
IL_0062: ldobj !'<l>j__TPar'
IL_0067: stloc.3
IL_0068: ldloca.s V_3
IL_006a: ldloc.3
IL_006b: box !'<l>j__TPar'
IL_0070: brtrue.s IL_0076
IL_0072: pop
IL_0073: ldnull
IL_0074: br.s IL_0081
IL_0076: constrained. !'<l>j__TPar'
IL_007c: callvirt instance string [mscorlib]System.Object::ToString()
IL_0081: stelem.ref
IL_0082: call string [mscorlib]System.String::Format(class [mscorlib]System.IFormatProvider,
string,
object[])
IL_0087: ret
} // end of method '<>f__AnonymousType0`2'::ToString
.property instance !'<x>j__TPar' x()
{
.get instance !'<x>j__TPar' '<>f__AnonymousType0`2'::get_x()
} // end of property '<>f__AnonymousType0`2'::x
.property instance !'<l>j__TPar' l()
{
.get instance !'<l>j__TPar' '<>f__AnonymousType0`2'::get_l()
} // end of property '<>f__AnonymousType0`2'::l
} // end of class '<>f__AnonymousType0`2'
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked
extends [mscorlib]System.Object
{
.class auto ansi serializable sealed nested private beforefieldinit '<>c'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public static initonly class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c' '<>9'
.field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> '<>9__4_0'
.field public static class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> '<>9__5_0'
.field public static class [mscorlib]System.Func`2<int32[],int32[]> '<>9__6_0'
.method private hidebysig specialname rtspecialname static
void .cctor() cil managed
{
// Code size 11 (0xb)
.maxstack 8
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::.ctor()
IL_0005: stsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::'<>9'
IL_000a: ret
} // end of method '<>c'::.cctor
.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'::.ctor
.method assembly hidebysig instance class '<>f__AnonymousType0`2'<int32,int32>
'<ObjectCreationInitializerChecked>b__4_0'(class '<>f__AnonymousType0`2'<int32,int32> n) cil managed
{
// Code size 22 (0x16)
.maxstack 8
IL_0000: ldarg.1
IL_0001: callvirt instance !0 class '<>f__AnonymousType0`2'<int32,int32>::get_x()
IL_0006: ldc.i4.1
IL_0007: add.ovf
IL_0008: ldarg.1
IL_0009: callvirt instance !1 class '<>f__AnonymousType0`2'<int32,int32>::get_l()
IL_000e: ldc.i4.1
IL_000f: add.ovf
IL_0010: newobj instance void class '<>f__AnonymousType0`2'<int32,int32>::.ctor(!0,
!1)
IL_0015: ret
} // end of method '<>c'::'<ObjectCreationInitializerChecked>b__4_0'
.method assembly hidebysig instance class '<>f__AnonymousType0`2'<int32,int32>
'<ObjectCreationWithOneFieldChecked>b__5_0'(class '<>f__AnonymousType0`2'<int32,int32> n) cil managed
{
// Code size 22 (0x16)
.maxstack 8
IL_0000: ldarg.1
IL_0001: callvirt instance !0 class '<>f__AnonymousType0`2'<int32,int32>::get_x()
IL_0006: ldc.i4.1
IL_0007: add.ovf
IL_0008: ldarg.1
IL_0009: callvirt instance !1 class '<>f__AnonymousType0`2'<int32,int32>::get_l()
IL_000e: ldc.i4.1
IL_000f: add
IL_0010: newobj instance void class '<>f__AnonymousType0`2'<int32,int32>::.ctor(!0,
!1)
IL_0015: ret
} // end of method '<>c'::'<ObjectCreationWithOneFieldChecked>b__5_0'
.method assembly hidebysig instance int32[]
'<ArrayInitializerChecked>b__6_0'(int32[] n) cil managed
{
// Code size 23 (0x17)
.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: ldc.i4.0
IL_000a: ldelem.i4
IL_000b: ldc.i4.1
IL_000c: add.ovf
IL_000d: stelem.i4
IL_000e: dup
IL_000f: ldc.i4.1
IL_0010: ldarg.1
IL_0011: ldc.i4.1
IL_0012: ldelem.i4
IL_0013: ldc.i4.1
IL_0014: add.ovf
IL_0015: stelem.i4
IL_0016: ret
} // end of method '<>c'::'<ArrayInitializerChecked>b__6_0'
} // end of class '<>c'
.method public hidebysig instance int32
Operators(int32 a,
int32 b) cil managed
{
// Code size 63 (0x3f)
.maxstack 2
.locals init (int32 V_0,
int32 V_1,
int32 V_2,
int32 V_3,
int32 V_4,
int32 V_5,
int32 V_6,
int32 V_7,
int32 V_8)
IL_0000: nop
IL_0001: ldarg.1
IL_0002: ldarg.2
IL_0003: add.ovf
IL_0004: stloc.0
IL_0005: ldarg.1
IL_0006: ldarg.2
IL_0007: add
IL_0008: stloc.1
IL_0009: ldarg.1
IL_000a: ldarg.2
IL_000b: sub.ovf
IL_000c: stloc.2
IL_000d: ldarg.1
IL_000e: ldarg.2
IL_000f: sub
IL_0010: stloc.3
IL_0011: ldarg.1
IL_0012: ldarg.2
IL_0013: mul.ovf
IL_0014: stloc.s V_4
IL_0016: ldarg.1
IL_0017: ldarg.2
IL_0018: mul
IL_0019: stloc.s V_5
IL_001b: ldarg.1
IL_001c: ldarg.2
IL_001d: div
IL_001e: stloc.s V_6
IL_0020: ldarg.1
IL_0021: ldarg.2
IL_0022: rem
IL_0023: stloc.s V_7
IL_0025: ldloc.0
IL_0026: ldloc.1
IL_0027: mul
IL_0028: ldloc.2
IL_0029: mul
IL_002a: ldloc.3
IL_002b: mul
IL_002c: ldloc.s V_4
IL_002e: mul
IL_002f: ldloc.s V_5
IL_0031: mul
IL_0032: ldloc.s V_6
IL_0034: mul
IL_0035: ldloc.s V_7
IL_0037: mul
IL_0038: stloc.s V_8
IL_003a: br.s IL_003c
IL_003c: ldloc.s V_8
IL_003e: ret
} // end of method CheckedUnchecked::Operators
.method public hidebysig instance int32
Cast(int32 a) cil managed
{
// Code size 27 (0x1b)
.maxstack 2
.locals init (int16 V_0,
int16 V_1,
uint8 V_2,
uint8 V_3,
int32 V_4)
IL_0000: nop
IL_0001: ldarg.1
IL_0002: conv.ovf.i2
IL_0003: stloc.0
IL_0004: ldarg.1
IL_0005: conv.i2
IL_0006: stloc.1
IL_0007: ldarg.1
IL_0008: conv.ovf.u1
IL_0009: stloc.2
IL_000a: ldarg.1
IL_000b: conv.u1
IL_000c: stloc.3
IL_000d: ldloc.0
IL_000e: ldloc.1
IL_000f: mul
IL_0010: ldloc.2
IL_0011: mul
IL_0012: ldloc.3
IL_0013: mul
IL_0014: stloc.s V_4
IL_0016: br.s IL_0018
IL_0018: ldloc.s V_4
IL_001a: ret
} // end of method CheckedUnchecked::Cast
.method public hidebysig instance void
ForWithCheckedIteratorAndUncheckedBody(int32 n) cil managed
{
// Code size 31 (0x1f)
.maxstack 3
.locals init (int32 V_0,
bool V_1)
IL_0000: nop
IL_0001: nop
IL_0002: ldarg.1
IL_0003: ldc.i4.1
IL_0004: add.ovf
IL_0005: stloc.0
IL_0006: br.s IL_0013
IL_0008: nop
IL_0009: ldloc.0
IL_000a: ldloc.0
IL_000b: mul
IL_000c: starg.s n
IL_000e: nop
IL_000f: ldloc.0
IL_0010: ldc.i4.1
IL_0011: add.ovf
IL_0012: stloc.0
IL_0013: ldloc.0
IL_0014: ldarg.1
IL_0015: ldc.i4.1
IL_0016: add.ovf
IL_0017: clt
IL_0019: stloc.1
IL_001a: ldloc.1
IL_001b: brtrue.s IL_0008
IL_001d: nop
IL_001e: ret
} // end of method CheckedUnchecked::ForWithCheckedIteratorAndUncheckedBody
.method public hidebysig instance void
ForWithCheckedInitializerAndUncheckedIterator(int32 n) cil managed
{
// Code size 30 (0x1e)
.maxstack 2
.locals init (int32 V_0,
bool V_1)
IL_0000: nop
IL_0001: ldarg.1
IL_0002: stloc.0
IL_0003: ldloc.0
IL_0004: ldc.i4.s 10
IL_0006: sub.ovf
IL_0007: stloc.0
IL_0008: br.s IL_0015
IL_000a: nop
IL_000b: ldarg.1
IL_000c: ldc.i4.1
IL_000d: sub
IL_000e: starg.s n
IL_0010: nop
IL_0011: ldloc.0
IL_0012: ldc.i4.1
IL_0013: add
IL_0014: stloc.0
IL_0015: ldloc.0
IL_0016: ldarg.1
IL_0017: clt
IL_0019: stloc.1
IL_001a: ldloc.1
IL_001b: brtrue.s IL_000a
IL_001d: ret
} // end of method CheckedUnchecked::ForWithCheckedInitializerAndUncheckedIterator
.method public hidebysig instance void
ObjectCreationInitializerChecked() cil managed
{
// Code size 47 (0x2f)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldc.i4.0
IL_0003: ldc.i4.0
IL_0004: newobj instance void class '<>f__AnonymousType0`2'<int32,int32>::.ctor(!0,
!1)
IL_0009: ldsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::'<>9__4_0'
IL_000e: dup
IL_000f: brtrue.s IL_0028
IL_0011: pop
IL_0012: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::'<>9'
IL_0017: ldftn instance class '<>f__AnonymousType0`2'<int32,int32> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::'<ObjectCreationInitializerChecked>b__4_0'(class '<>f__AnonymousType0`2'<int32,int32>)
IL_001d: newobj instance void class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>>::.ctor(object,
native int)
IL_0022: dup
IL_0023: stsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::'<>9__4_0'
IL_0028: call instance !!0 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::TestHelp<class '<>f__AnonymousType0`2'<int32,int32>>(!!0,
class [mscorlib]System.Func`2<!!0,!!0>)
IL_002d: pop
IL_002e: ret
} // end of method CheckedUnchecked::ObjectCreationInitializerChecked
.method public hidebysig instance void
ObjectCreationWithOneFieldChecked() cil managed
{
// Code size 47 (0x2f)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldc.i4.0
IL_0003: ldc.i4.0
IL_0004: newobj instance void class '<>f__AnonymousType0`2'<int32,int32>::.ctor(!0,
!1)
IL_0009: ldsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::'<>9__5_0'
IL_000e: dup
IL_000f: brtrue.s IL_0028
IL_0011: pop
IL_0012: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::'<>9'
IL_0017: ldftn instance class '<>f__AnonymousType0`2'<int32,int32> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::'<ObjectCreationWithOneFieldChecked>b__5_0'(class '<>f__AnonymousType0`2'<int32,int32>)
IL_001d: newobj instance void class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>>::.ctor(object,
native int)
IL_0022: dup
IL_0023: stsfld class [mscorlib]System.Func`2<class '<>f__AnonymousType0`2'<int32,int32>,class '<>f__AnonymousType0`2'<int32,int32>> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::'<>9__5_0'
IL_0028: call instance !!0 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::TestHelp<class '<>f__AnonymousType0`2'<int32,int32>>(!!0,
class [mscorlib]System.Func`2<!!0,!!0>)
IL_002d: pop
IL_002e: ret
} // end of method CheckedUnchecked::ObjectCreationWithOneFieldChecked
.method public hidebysig instance void
ArrayInitializerChecked() cil managed
{
// Code size 54 (0x36)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldc.i4.2
IL_0003: newarr [mscorlib]System.Int32
IL_0008: dup
IL_0009: ldc.i4.0
IL_000a: ldc.i4.1
IL_000b: stelem.i4
IL_000c: dup
IL_000d: ldc.i4.1
IL_000e: ldc.i4.2
IL_000f: stelem.i4
IL_0010: ldsfld class [mscorlib]System.Func`2<int32[],int32[]> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::'<>9__6_0'
IL_0015: dup
IL_0016: brtrue.s IL_002f
IL_0018: pop
IL_0019: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::'<>9'
IL_001e: ldftn instance int32[] ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::'<ArrayInitializerChecked>b__6_0'(int32[])
IL_0024: newobj instance void class [mscorlib]System.Func`2<int32[],int32[]>::.ctor(object,
native int)
IL_0029: dup
IL_002a: stsfld class [mscorlib]System.Func`2<int32[],int32[]> ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked/'<>c'::'<>9__6_0'
IL_002f: call instance !!0 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked::TestHelp<int32[]>(!!0,
class [mscorlib]System.Func`2<!!0,!!0>)
IL_0034: pop
IL_0035: ret
} // end of method CheckedUnchecked::ArrayInitializerChecked
.method public hidebysig instance !!T TestHelp<T>(!!T t,
class [mscorlib]System.Func`2<!!T,!!T> f) cil managed
{
// Code size 13 (0xd)
.maxstack 2
.locals init (!!T V_0)
IL_0000: nop
IL_0001: ldarg.2
IL_0002: ldarg.1
IL_0003: callvirt instance !1 class [mscorlib]System.Func`2<!!T,!!T>::Invoke(!0)
IL_0008: stloc.0
IL_0009: br.s IL_000b
IL_000b: ldloc.0
IL_000c: ret
} // end of method CheckedUnchecked::TestHelp
.method public hidebysig instance void
CheckedInArrayCreationArgument(int32 a,
int32 b) cil managed
{
// Code size 16 (0x10)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.1
IL_0002: ldarg.2
IL_0003: add.ovf
IL_0004: newarr [mscorlib]System.Int32
IL_0009: call void [mscorlib]System.Console::WriteLine(object)
IL_000e: nop
IL_000f: ret
} // end of method CheckedUnchecked::CheckedInArrayCreationArgument
.method public hidebysig instance int16
Unbox(valuetype [mscorlib]System.TypeCode c,
object b) cil managed
{
// Code size 89 (0x59)
.maxstack 2
.locals init (valuetype [mscorlib]System.TypeCode V_0,
int16 V_1,
float32 V_2)
IL_0000: nop
IL_0001: nop
IL_0002: ldarg.1
IL_0003: stloc.0
IL_0004: ldloc.0
IL_0005: ldc.i4.s 9
IL_0007: beq.s IL_0019
IL_0009: br.s IL_000b
IL_000b: ldloc.0
IL_000c: ldc.i4.s 10
IL_000e: beq.s IL_0028
IL_0010: br.s IL_0012
IL_0012: ldloc.0
IL_0013: ldc.i4.s 14
IL_0015: beq.s IL_0037
IL_0017: br.s IL_0051
IL_0019: ldarg.2
IL_001a: castclass class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<int32>
IL_001f: ldfld !0 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<int32>::Value
IL_0024: conv.ovf.i2
IL_0025: stloc.1
IL_0026: br.s IL_0057
IL_0028: ldarg.2
IL_0029: castclass class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<uint32>
IL_002e: ldfld !0 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<uint32>::Value
IL_0033: conv.ovf.i2.un
IL_0034: stloc.1
IL_0035: br.s IL_0057
IL_0037: nop
IL_0038: ldarg.2
IL_0039: castclass class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<float64>
IL_003e: ldfld !0 class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<float64>::Value
IL_0043: conv.r4
IL_0044: stloc.2
IL_0045: ldloc.2
IL_0046: call void [mscorlib]System.Console::WriteLine(float32)
IL_004b: nop
IL_004c: ldloc.2
IL_004d: conv.ovf.i2
IL_004e: stloc.1
IL_004f: br.s IL_0057
IL_0051: newobj instance void [mscorlib]System.Exception::.ctor()
IL_0056: throw
IL_0057: ldloc.1
IL_0058: ret
} // end of method CheckedUnchecked::Unbox
.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 CheckedUnchecked::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CheckedUnchecked
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1<T>
extends [mscorlib]System.Object
{
.field public initonly !T Value
.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 Box`1::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.Box`1
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

73
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.cs

@ -4577,12 +4577,11 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -4577,12 +4577,11 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
new CustomClass().StringProp += 1;
}
#if false
public uint PreIncrementIndexer(string name)
{
return ++M()[name];
}
#endif
public int PreIncrementByRef(ref int i)
{
return ++i;
@ -4593,6 +4592,11 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -4593,6 +4592,11 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
return ++(*GetPointer());
}
public unsafe int PreIncrementOfPointer(int* ptr)
{
return *(++ptr);
}
public int PreIncrement2DArray()
{
return ++Array()[1, 2];
@ -4627,12 +4631,17 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -4627,12 +4631,17 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
{
return array[Environment.TickCount] *= 10;
}
#if false
public uint CompoundAssignIndexer(string name)
{
return M()[name] -= 2;
return M()[name] -= 2u;
}
#endif
public uint CompoundAssignIndexerComplexIndex(string name)
{
return M()[ToString()] -= 2u;
}
public int CompoundAssignIncrement2DArray()
{
return Array()[1, 2] %= 10;
@ -4643,6 +4652,11 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -4643,6 +4652,11 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
return i <<= 2;
}
public unsafe int* CompoundAssignOfPointer(int* ptr)
{
return ptr += 10;
}
public unsafe double CompoundAssignByPointer(double* ptr)
{
return *ptr /= 1.5;
@ -4669,17 +4683,19 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -4669,17 +4683,19 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
{
return array[pos]--;
}
#if false
public uint PostIncrementIndexer(string name)
{
return M()[name]++;
}
#if false
public unsafe int PostIncrementOfPointer(int* ptr)
{
return *(ptr++);
}
#endif
public int PostDecrementInstanceField()
{
return M().Field--;
@ -4704,5 +4720,50 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty @@ -4704,5 +4720,50 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
{
return (*GetPointer())++;
}
public void Issue1552Pre(CustomStruct a, CustomStruct b)
{
CustomStruct customStruct = a + b;
Console.WriteLine(++customStruct);
}
public void Issue1552Stmt(CustomStruct a, CustomStruct b)
{
CustomStruct customStruct = a + b;
++customStruct;
}
public void Issue1552StmtUseLater(CustomStruct a, CustomStruct b)
{
CustomStruct lhs = a + b;
++lhs;
Console.WriteLine();
Console.WriteLine(lhs * b);
}
public void Issue1552Decimal(decimal a)
{
// Legacy csc compiles this using op_Increment,
// ensure we don't misdetect this as an invalid pre-increment "++(a * 10m)"
Console.WriteLine(a * 10m + 1m);
}
#if !(ROSLYN && OPT)
// Roslyn opt no longer has a detectable post-increment pattern
// due to optimizing out some of the stores.
// Our emitted code is valid but has some additional temporaries.
public void Issue1552Post(CustomStruct a, CustomStruct b)
{
CustomStruct customStruct = a + b;
Console.WriteLine(customStruct++);
}
public void Issue1552StmtTwice(CustomStruct a, CustomStruct b)
{
CustomStruct customStruct = a + b;
++customStruct;
++customStruct;
}
#endif
}
}

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

File diff suppressed because it is too large Load Diff

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

File diff suppressed because it is too large Load Diff

23706
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.opt.roslyn.il

File diff suppressed because it is too large Load Diff

26199
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.roslyn.il

File diff suppressed because it is too large Load Diff

25
ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstantsTests.cs

@ -1,4 +1,6 @@ @@ -1,4 +1,6 @@
namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
using System.Threading.Tasks;
namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty
{
internal class ConstantsTests
{
@ -24,8 +26,29 @@ @@ -24,8 +26,29 @@
Test((v | 0x123) == 0);
}
public void Enum_Flag_Check(TaskCreationOptions v)
{
Test((v & TaskCreationOptions.AttachedToParent) != 0);
Test((v & TaskCreationOptions.AttachedToParent) == 0);
}
private void Test(bool expr)
{
}
private void Test(decimal expr)
{
}
public void Decimal()
{
// Roslyn and legacy csc both normalize the decimal constant references,
// but to a different representation (ctor call vs. field use)
Test(0m);
Test(1m);
Test(-1m);
Test(decimal.MinValue);
Test(decimal.MaxValue);
}
}
}

169
ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstantsTests.il

@ -1,169 +0,0 @@ @@ -1,169 +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 ConstantsTests
{
.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 ConstantsTests.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.Pretty.ConstantsTests
extends [mscorlib]System.Object
{
.method public hidebysig instance uint64
Issue1308([opt] uint64 u) cil managed
{
.param [1] = uint64(0x8)
// Code size 33 (0x21)
.maxstack 3
.locals init (uint64 V_0)
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldarg.1
IL_0003: ldc.i4.m1
IL_0004: conv.u8
IL_0005: and
IL_0006: ldc.i4.0
IL_0007: conv.i8
IL_0008: ceq
IL_000a: ldc.i4.0
IL_000b: ceq
IL_000d: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_0012: nop
IL_0013: ldc.i8 0xffffffff00000000
IL_001c: stloc.0
IL_001d: br.s IL_001f
IL_001f: ldloc.0
IL_0020: ret
} // end of method ConstantsTests::Issue1308
.method public hidebysig instance void
Byte_BitmaskingInCondition(uint8 v) cil managed
{
// Code size 64 (0x40)
.maxstack 3
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldarg.1
IL_0003: ldc.i4.s 15
IL_0005: and
IL_0006: ldc.i4.0
IL_0007: ceq
IL_0009: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_000e: nop
IL_000f: ldarg.0
IL_0010: ldarg.1
IL_0011: ldc.i4 0x123
IL_0016: and
IL_0017: ldc.i4.0
IL_0018: ceq
IL_001a: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_001f: nop
IL_0020: ldarg.0
IL_0021: ldarg.1
IL_0022: ldc.i4.s 15
IL_0024: or
IL_0025: ldc.i4.0
IL_0026: ceq
IL_0028: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_002d: nop
IL_002e: ldarg.0
IL_002f: ldarg.1
IL_0030: ldc.i4 0x123
IL_0035: or
IL_0036: ldc.i4.0
IL_0037: ceq
IL_0039: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_003e: nop
IL_003f: ret
} // end of method ConstantsTests::Byte_BitmaskingInCondition
.method public hidebysig instance void
SByte_BitmaskingInCondition(int8 v) cil managed
{
// Code size 64 (0x40)
.maxstack 3
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldarg.1
IL_0003: ldc.i4.s 15
IL_0005: and
IL_0006: ldc.i4.0
IL_0007: ceq
IL_0009: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_000e: nop
IL_000f: ldarg.0
IL_0010: ldarg.1
IL_0011: ldc.i4 0x123
IL_0016: and
IL_0017: ldc.i4.0
IL_0018: ceq
IL_001a: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_001f: nop
IL_0020: ldarg.0
IL_0021: ldarg.1
IL_0022: ldc.i4.s 15
IL_0024: or
IL_0025: ldc.i4.0
IL_0026: ceq
IL_0028: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_002d: nop
IL_002e: ldarg.0
IL_002f: ldarg.1
IL_0030: ldc.i4 0x123
IL_0035: or
IL_0036: ldc.i4.0
IL_0037: ceq
IL_0039: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_003e: nop
IL_003f: ret
} // end of method ConstantsTests::SByte_BitmaskingInCondition
.method private hidebysig instance void
Test(bool expr) cil managed
{
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method ConstantsTests::Test
.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 ConstantsTests::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

151
ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstantsTests.opt.il

@ -1,151 +0,0 @@ @@ -1,151 +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 ConstantsTests.opt
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
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 ConstantsTests.opt.dll
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x10000000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// =============== CLASS MEMBERS DECLARATION ===================
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests
extends [mscorlib]System.Object
{
.method public hidebysig instance uint64
Issue1308([opt] uint64 u) cil managed
{
.param [1] = uint64(0x8)
// Code size 27 (0x1b)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: ldc.i4.m1
IL_0003: conv.u8
IL_0004: and
IL_0005: ldc.i4.0
IL_0006: conv.i8
IL_0007: ceq
IL_0009: ldc.i4.0
IL_000a: ceq
IL_000c: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_0011: ldc.i8 0xffffffff00000000
IL_001a: ret
} // end of method ConstantsTests::Issue1308
.method public hidebysig instance void
Byte_BitmaskingInCondition(uint8 v) cil managed
{
// Code size 59 (0x3b)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: ldc.i4.s 15
IL_0004: and
IL_0005: ldc.i4.0
IL_0006: ceq
IL_0008: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_000d: ldarg.0
IL_000e: ldarg.1
IL_000f: ldc.i4 0x123
IL_0014: and
IL_0015: ldc.i4.0
IL_0016: ceq
IL_0018: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_001d: ldarg.0
IL_001e: ldarg.1
IL_001f: ldc.i4.s 15
IL_0021: or
IL_0022: ldc.i4.0
IL_0023: ceq
IL_0025: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_002a: ldarg.0
IL_002b: ldarg.1
IL_002c: ldc.i4 0x123
IL_0031: or
IL_0032: ldc.i4.0
IL_0033: ceq
IL_0035: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_003a: ret
} // end of method ConstantsTests::Byte_BitmaskingInCondition
.method public hidebysig instance void
SByte_BitmaskingInCondition(int8 v) cil managed
{
// Code size 59 (0x3b)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: ldc.i4.s 15
IL_0004: and
IL_0005: ldc.i4.0
IL_0006: ceq
IL_0008: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_000d: ldarg.0
IL_000e: ldarg.1
IL_000f: ldc.i4 0x123
IL_0014: and
IL_0015: ldc.i4.0
IL_0016: ceq
IL_0018: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_001d: ldarg.0
IL_001e: ldarg.1
IL_001f: ldc.i4.s 15
IL_0021: or
IL_0022: ldc.i4.0
IL_0023: ceq
IL_0025: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_002a: ldarg.0
IL_002b: ldarg.1
IL_002c: ldc.i4 0x123
IL_0031: or
IL_0032: ldc.i4.0
IL_0033: ceq
IL_0035: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_003a: ret
} // end of method ConstantsTests::SByte_BitmaskingInCondition
.method private hidebysig instance void
Test(bool expr) cil managed
{
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method ConstantsTests::Test
.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 ConstantsTests::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

153
ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstantsTests.opt.roslyn.il

@ -1,153 +0,0 @@ @@ -1,153 +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 ConstantsTests
{
.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 ConstantsTests.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.Pretty.ConstantsTests
extends [mscorlib]System.Object
{
.method public hidebysig instance uint64
Issue1308([opt] uint64 u) cil managed
{
.param [1] = uint64(0x8)
// Code size 24 (0x18)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: ldc.i4.m1
IL_0003: conv.u8
IL_0004: and
IL_0005: ldc.i4.0
IL_0006: conv.i8
IL_0007: cgt.un
IL_0009: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_000e: ldc.i8 0xffffffff00000000
IL_0017: ret
} // end of method ConstantsTests::Issue1308
.method public hidebysig instance void
Byte_BitmaskingInCondition(uint8 v) cil managed
{
// Code size 59 (0x3b)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: ldc.i4.s 15
IL_0004: and
IL_0005: ldc.i4.0
IL_0006: ceq
IL_0008: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_000d: ldarg.0
IL_000e: ldarg.1
IL_000f: ldc.i4 0x123
IL_0014: and
IL_0015: ldc.i4.0
IL_0016: ceq
IL_0018: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_001d: ldarg.0
IL_001e: ldarg.1
IL_001f: ldc.i4.s 15
IL_0021: or
IL_0022: ldc.i4.0
IL_0023: ceq
IL_0025: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_002a: ldarg.0
IL_002b: ldarg.1
IL_002c: ldc.i4 0x123
IL_0031: or
IL_0032: ldc.i4.0
IL_0033: ceq
IL_0035: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_003a: ret
} // end of method ConstantsTests::Byte_BitmaskingInCondition
.method public hidebysig instance void
SByte_BitmaskingInCondition(int8 v) cil managed
{
// Code size 59 (0x3b)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: ldc.i4.s 15
IL_0004: and
IL_0005: ldc.i4.0
IL_0006: ceq
IL_0008: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_000d: ldarg.0
IL_000e: ldarg.1
IL_000f: ldc.i4 0x123
IL_0014: and
IL_0015: ldc.i4.0
IL_0016: ceq
IL_0018: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_001d: ldarg.0
IL_001e: ldarg.1
IL_001f: ldc.i4.s 15
IL_0021: or
IL_0022: ldc.i4.0
IL_0023: ceq
IL_0025: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_002a: ldarg.0
IL_002b: ldarg.1
IL_002c: ldc.i4 0x123
IL_0031: or
IL_0032: ldc.i4.0
IL_0033: ceq
IL_0035: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_003a: ret
} // end of method ConstantsTests::SByte_BitmaskingInCondition
.method private hidebysig instance void
Test(bool expr) cil managed
{
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method ConstantsTests::Test
.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 ConstantsTests::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

172
ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstantsTests.roslyn.il

@ -1,172 +0,0 @@ @@ -1,172 +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 ConstantsTests
{
.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 ConstantsTests.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.Pretty.ConstantsTests
extends [mscorlib]System.Object
{
.method public hidebysig instance uint64
Issue1308([opt] uint64 u) cil managed
{
.param [1] = uint64(0x8)
// Code size 30 (0x1e)
.maxstack 3
.locals init (uint64 V_0)
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldarg.1
IL_0003: ldc.i4.m1
IL_0004: conv.u8
IL_0005: and
IL_0006: ldc.i4.0
IL_0007: conv.i8
IL_0008: cgt.un
IL_000a: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_000f: nop
IL_0010: ldc.i8 0xffffffff00000000
IL_0019: stloc.0
IL_001a: br.s IL_001c
IL_001c: ldloc.0
IL_001d: ret
} // end of method ConstantsTests::Issue1308
.method public hidebysig instance void
Byte_BitmaskingInCondition(uint8 v) cil managed
{
// Code size 64 (0x40)
.maxstack 3
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldarg.1
IL_0003: ldc.i4.s 15
IL_0005: and
IL_0006: ldc.i4.0
IL_0007: ceq
IL_0009: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_000e: nop
IL_000f: ldarg.0
IL_0010: ldarg.1
IL_0011: ldc.i4 0x123
IL_0016: and
IL_0017: ldc.i4.0
IL_0018: ceq
IL_001a: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_001f: nop
IL_0020: ldarg.0
IL_0021: ldarg.1
IL_0022: ldc.i4.s 15
IL_0024: or
IL_0025: ldc.i4.0
IL_0026: ceq
IL_0028: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_002d: nop
IL_002e: ldarg.0
IL_002f: ldarg.1
IL_0030: ldc.i4 0x123
IL_0035: or
IL_0036: ldc.i4.0
IL_0037: ceq
IL_0039: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_003e: nop
IL_003f: ret
} // end of method ConstantsTests::Byte_BitmaskingInCondition
.method public hidebysig instance void
SByte_BitmaskingInCondition(int8 v) cil managed
{
// Code size 64 (0x40)
.maxstack 3
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldarg.1
IL_0003: ldc.i4.s 15
IL_0005: and
IL_0006: ldc.i4.0
IL_0007: ceq
IL_0009: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_000e: nop
IL_000f: ldarg.0
IL_0010: ldarg.1
IL_0011: ldc.i4 0x123
IL_0016: and
IL_0017: ldc.i4.0
IL_0018: ceq
IL_001a: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_001f: nop
IL_0020: ldarg.0
IL_0021: ldarg.1
IL_0022: ldc.i4.s 15
IL_0024: or
IL_0025: ldc.i4.0
IL_0026: ceq
IL_0028: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_002d: nop
IL_002e: ldarg.0
IL_002f: ldarg.1
IL_0030: ldc.i4 0x123
IL_0035: or
IL_0036: ldc.i4.0
IL_0037: ceq
IL_0039: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests::Test(bool)
IL_003e: nop
IL_003f: ret
} // end of method ConstantsTests::SByte_BitmaskingInCondition
.method private hidebysig instance void
Test(bool expr) cil managed
{
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method ConstantsTests::Test
.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 ConstantsTests::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstantsTests
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

88
ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstructorInitializers.il

@ -1,88 +0,0 @@ @@ -1,88 +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 ConstructorInitializers
{
.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 ConstructorInitializers.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.Pretty.ConstructorInitializers
extends [mscorlib]System.Object
{
.class sequential ansi sealed nested public beforefieldinit SimpleStruct
extends [mscorlib]System.ValueType
{
.field public int32 Field1
.field public int32 Field2
} // end of class SimpleStruct
.class auto ansi nested public beforefieldinit UnsafeFields
extends [mscorlib]System.Object
{
.field public static int32 StaticSizeOf
.field public int32 SizeOf
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 20 (0x14)
.maxstack 8
IL_0000: ldarg.0
IL_0001: sizeof ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers/SimpleStruct
IL_0007: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers/UnsafeFields::SizeOf
IL_000c: ldarg.0
IL_000d: call instance void [mscorlib]System.Object::.ctor()
IL_0012: nop
IL_0013: ret
} // end of method UnsafeFields::.ctor
.method private hidebysig specialname rtspecialname static
void .cctor() cil managed
{
// Code size 12 (0xc)
.maxstack 8
IL_0000: sizeof ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers/SimpleStruct
IL_0006: stsfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers/UnsafeFields::StaticSizeOf
IL_000b: ret
} // end of method UnsafeFields::.cctor
} // end of class UnsafeFields
.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 ConstructorInitializers::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

120
ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstructorInitializers.mcs.il

@ -1,120 +0,0 @@ @@ -1,120 +0,0 @@
// Metadata version: v2.0.50727
.assembly extern mscorlib
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 2:0:0:0
}
.assembly ConstructorInitializers.mcs
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
.permissionset reqmin
bytearray (3C 00 50 00 65 00 72 00 6D 00 69 00 73 00 73 00 // <.P.e.r.m.i.s.s.
69 00 6F 00 6E 00 53 00 65 00 74 00 20 00 63 00 // i.o.n.S.e.t. .c.
6C 00 61 00 73 00 73 00 3D 00 22 00 53 00 79 00 // l.a.s.s.=.".S.y.
73 00 74 00 65 00 6D 00 2E 00 53 00 65 00 63 00 // s.t.e.m...S.e.c.
75 00 72 00 69 00 74 00 79 00 2E 00 50 00 65 00 // u.r.i.t.y...P.e.
72 00 6D 00 69 00 73 00 73 00 69 00 6F 00 6E 00 // r.m.i.s.s.i.o.n.
53 00 65 00 74 00 22 00 0D 00 0A 00 76 00 65 00 // S.e.t.".....v.e.
72 00 73 00 69 00 6F 00 6E 00 3D 00 22 00 31 00 // r.s.i.o.n.=.".1.
22 00 3E 00 0D 00 0A 00 3C 00 49 00 50 00 65 00 // ".>.....<.I.P.e.
72 00 6D 00 69 00 73 00 73 00 69 00 6F 00 6E 00 // r.m.i.s.s.i.o.n.
20 00 63 00 6C 00 61 00 73 00 73 00 3D 00 22 00 // .c.l.a.s.s.=.".
53 00 79 00 73 00 74 00 65 00 6D 00 2E 00 53 00 // S.y.s.t.e.m...S.
65 00 63 00 75 00 72 00 69 00 74 00 79 00 2E 00 // e.c.u.r.i.t.y...
50 00 65 00 72 00 6D 00 69 00 73 00 73 00 69 00 // P.e.r.m.i.s.s.i.
6F 00 6E 00 73 00 2E 00 53 00 65 00 63 00 75 00 // o.n.s...S.e.c.u.
72 00 69 00 74 00 79 00 50 00 65 00 72 00 6D 00 // r.i.t.y.P.e.r.m.
69 00 73 00 73 00 69 00 6F 00 6E 00 2C 00 20 00 // i.s.s.i.o.n.,. .
6D 00 73 00 63 00 6F 00 72 00 6C 00 69 00 62 00 // m.s.c.o.r.l.i.b.
2C 00 20 00 56 00 65 00 72 00 73 00 69 00 6F 00 // ,. .V.e.r.s.i.o.
6E 00 3D 00 32 00 2E 00 30 00 2E 00 30 00 2E 00 // n.=.2...0...0...
30 00 2C 00 20 00 43 00 75 00 6C 00 74 00 75 00 // 0.,. .C.u.l.t.u.
72 00 65 00 3D 00 6E 00 65 00 75 00 74 00 72 00 // r.e.=.n.e.u.t.r.
61 00 6C 00 2C 00 20 00 50 00 75 00 62 00 6C 00 // a.l.,. .P.u.b.l.
69 00 63 00 4B 00 65 00 79 00 54 00 6F 00 6B 00 // i.c.K.e.y.T.o.k.
65 00 6E 00 3D 00 62 00 37 00 37 00 61 00 35 00 // e.n.=.b.7.7.a.5.
63 00 35 00 36 00 31 00 39 00 33 00 34 00 65 00 // c.5.6.1.9.3.4.e.
30 00 38 00 39 00 22 00 0D 00 0A 00 76 00 65 00 // 0.8.9.".....v.e.
72 00 73 00 69 00 6F 00 6E 00 3D 00 22 00 31 00 // r.s.i.o.n.=.".1.
22 00 0D 00 0A 00 46 00 6C 00 61 00 67 00 73 00 // ".....F.l.a.g.s.
3D 00 22 00 53 00 6B 00 69 00 70 00 56 00 65 00 // =.".S.k.i.p.V.e.
72 00 69 00 66 00 69 00 63 00 61 00 74 00 69 00 // r.i.f.i.c.a.t.i.
6F 00 6E 00 22 00 2F 00 3E 00 0D 00 0A 00 3C 00 // o.n."./.>.....<.
2F 00 50 00 65 00 72 00 6D 00 69 00 73 00 73 00 // /.P.e.r.m.i.s.s.
69 00 6F 00 6E 00 53 00 65 00 74 00 3E 00 0D 00 // i.o.n.S.e.t.>...
0A 00 )
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module ConstructorInitializers.mcs.dll
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// =============== CLASS MEMBERS DECLARATION ===================
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers
extends [mscorlib]System.Object
{
.class sequential ansi sealed nested public beforefieldinit SimpleStruct
extends [mscorlib]System.ValueType
{
.field public int32 Field1
.field public int32 Field2
} // end of class SimpleStruct
.class auto ansi nested public beforefieldinit UnsafeFields
extends [mscorlib]System.Object
{
.field public static int32 StaticSizeOf
.field public int32 SizeOf
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 19 (0x13)
.maxstack 8
IL_0000: ldarg.0
IL_0001: sizeof ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers/SimpleStruct
IL_0007: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers/UnsafeFields::SizeOf
IL_000c: ldarg.0
IL_000d: call instance void [mscorlib]System.Object::.ctor()
IL_0012: ret
} // end of method UnsafeFields::.ctor
.method private specialname rtspecialname static
void .cctor() cil managed
{
// Code size 12 (0xc)
.maxstack 8
IL_0000: sizeof ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers/SimpleStruct
IL_0006: stsfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers/UnsafeFields::StaticSizeOf
IL_000b: ret
} // end of method UnsafeFields::.cctor
} // end of class UnsafeFields
.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 ConstructorInitializers::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

87
ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstructorInitializers.opt.il

@ -1,87 +0,0 @@ @@ -1,87 +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 ConstructorInitializers.opt
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
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 ConstructorInitializers.opt.dll
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x10000000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// =============== CLASS MEMBERS DECLARATION ===================
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers
extends [mscorlib]System.Object
{
.class sequential ansi sealed nested public beforefieldinit SimpleStruct
extends [mscorlib]System.ValueType
{
.field public int32 Field1
.field public int32 Field2
} // end of class SimpleStruct
.class auto ansi nested public beforefieldinit UnsafeFields
extends [mscorlib]System.Object
{
.field public static int32 StaticSizeOf
.field public int32 SizeOf
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 19 (0x13)
.maxstack 8
IL_0000: ldarg.0
IL_0001: sizeof ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers/SimpleStruct
IL_0007: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers/UnsafeFields::SizeOf
IL_000c: ldarg.0
IL_000d: call instance void [mscorlib]System.Object::.ctor()
IL_0012: ret
} // end of method UnsafeFields::.ctor
.method private hidebysig specialname rtspecialname static
void .cctor() cil managed
{
// Code size 12 (0xc)
.maxstack 8
IL_0000: sizeof ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers/SimpleStruct
IL_0006: stsfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers/UnsafeFields::StaticSizeOf
IL_000b: ret
} // end of method UnsafeFields::.cctor
} // end of class UnsafeFields
.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 ConstructorInitializers::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

120
ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstructorInitializers.opt.mcs.il

@ -1,120 +0,0 @@ @@ -1,120 +0,0 @@
// Metadata version: v2.0.50727
.assembly extern mscorlib
{
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 2:0:0:0
}
.assembly ConstructorInitializers.opt.mcs
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
.permissionset reqmin
bytearray (3C 00 50 00 65 00 72 00 6D 00 69 00 73 00 73 00 // <.P.e.r.m.i.s.s.
69 00 6F 00 6E 00 53 00 65 00 74 00 20 00 63 00 // i.o.n.S.e.t. .c.
6C 00 61 00 73 00 73 00 3D 00 22 00 53 00 79 00 // l.a.s.s.=.".S.y.
73 00 74 00 65 00 6D 00 2E 00 53 00 65 00 63 00 // s.t.e.m...S.e.c.
75 00 72 00 69 00 74 00 79 00 2E 00 50 00 65 00 // u.r.i.t.y...P.e.
72 00 6D 00 69 00 73 00 73 00 69 00 6F 00 6E 00 // r.m.i.s.s.i.o.n.
53 00 65 00 74 00 22 00 0D 00 0A 00 76 00 65 00 // S.e.t.".....v.e.
72 00 73 00 69 00 6F 00 6E 00 3D 00 22 00 31 00 // r.s.i.o.n.=.".1.
22 00 3E 00 0D 00 0A 00 3C 00 49 00 50 00 65 00 // ".>.....<.I.P.e.
72 00 6D 00 69 00 73 00 73 00 69 00 6F 00 6E 00 // r.m.i.s.s.i.o.n.
20 00 63 00 6C 00 61 00 73 00 73 00 3D 00 22 00 // .c.l.a.s.s.=.".
53 00 79 00 73 00 74 00 65 00 6D 00 2E 00 53 00 // S.y.s.t.e.m...S.
65 00 63 00 75 00 72 00 69 00 74 00 79 00 2E 00 // e.c.u.r.i.t.y...
50 00 65 00 72 00 6D 00 69 00 73 00 73 00 69 00 // P.e.r.m.i.s.s.i.
6F 00 6E 00 73 00 2E 00 53 00 65 00 63 00 75 00 // o.n.s...S.e.c.u.
72 00 69 00 74 00 79 00 50 00 65 00 72 00 6D 00 // r.i.t.y.P.e.r.m.
69 00 73 00 73 00 69 00 6F 00 6E 00 2C 00 20 00 // i.s.s.i.o.n.,. .
6D 00 73 00 63 00 6F 00 72 00 6C 00 69 00 62 00 // m.s.c.o.r.l.i.b.
2C 00 20 00 56 00 65 00 72 00 73 00 69 00 6F 00 // ,. .V.e.r.s.i.o.
6E 00 3D 00 32 00 2E 00 30 00 2E 00 30 00 2E 00 // n.=.2...0...0...
30 00 2C 00 20 00 43 00 75 00 6C 00 74 00 75 00 // 0.,. .C.u.l.t.u.
72 00 65 00 3D 00 6E 00 65 00 75 00 74 00 72 00 // r.e.=.n.e.u.t.r.
61 00 6C 00 2C 00 20 00 50 00 75 00 62 00 6C 00 // a.l.,. .P.u.b.l.
69 00 63 00 4B 00 65 00 79 00 54 00 6F 00 6B 00 // i.c.K.e.y.T.o.k.
65 00 6E 00 3D 00 62 00 37 00 37 00 61 00 35 00 // e.n.=.b.7.7.a.5.
63 00 35 00 36 00 31 00 39 00 33 00 34 00 65 00 // c.5.6.1.9.3.4.e.
30 00 38 00 39 00 22 00 0D 00 0A 00 76 00 65 00 // 0.8.9.".....v.e.
72 00 73 00 69 00 6F 00 6E 00 3D 00 22 00 31 00 // r.s.i.o.n.=.".1.
22 00 0D 00 0A 00 46 00 6C 00 61 00 67 00 73 00 // ".....F.l.a.g.s.
3D 00 22 00 53 00 6B 00 69 00 70 00 56 00 65 00 // =.".S.k.i.p.V.e.
72 00 69 00 66 00 69 00 63 00 61 00 74 00 69 00 // r.i.f.i.c.a.t.i.
6F 00 6E 00 22 00 2F 00 3E 00 0D 00 0A 00 3C 00 // o.n."./.>.....<.
2F 00 50 00 65 00 72 00 6D 00 69 00 73 00 73 00 // /.P.e.r.m.i.s.s.
69 00 6F 00 6E 00 53 00 65 00 74 00 3E 00 0D 00 // i.o.n.S.e.t.>...
0A 00 )
.hash algorithm 0x00008004
.ver 0:0:0:0
}
.module ConstructorInitializers.opt.mcs.dll
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x00400000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// =============== CLASS MEMBERS DECLARATION ===================
.class public auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers
extends [mscorlib]System.Object
{
.class sequential ansi sealed nested public beforefieldinit SimpleStruct
extends [mscorlib]System.ValueType
{
.field public int32 Field1
.field public int32 Field2
} // end of class SimpleStruct
.class auto ansi nested public beforefieldinit UnsafeFields
extends [mscorlib]System.Object
{
.field public static int32 StaticSizeOf
.field public int32 SizeOf
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 19 (0x13)
.maxstack 8
IL_0000: ldarg.0
IL_0001: sizeof ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers/SimpleStruct
IL_0007: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers/UnsafeFields::SizeOf
IL_000c: ldarg.0
IL_000d: call instance void [mscorlib]System.Object::.ctor()
IL_0012: ret
} // end of method UnsafeFields::.ctor
.method private specialname rtspecialname static
void .cctor() cil managed
{
// Code size 12 (0xc)
.maxstack 8
IL_0000: sizeof ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers/SimpleStruct
IL_0006: stsfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers/UnsafeFields::StaticSizeOf
IL_000b: ret
} // end of method UnsafeFields::.cctor
} // end of class UnsafeFields
.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 ConstructorInitializers::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

91
ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstructorInitializers.opt.roslyn.il

@ -1,91 +0,0 @@ @@ -1,91 +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 ConstructorInitializers
{
.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 ConstructorInitializers.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.Pretty.ConstructorInitializers
extends [mscorlib]System.Object
{
.class sequential ansi sealed nested public beforefieldinit SimpleStruct
extends [mscorlib]System.ValueType
{
.field public int32 Field1
.field public int32 Field2
} // end of class SimpleStruct
.class auto ansi nested public beforefieldinit UnsafeFields
extends [mscorlib]System.Object
{
.field public static int32 StaticSizeOf
.field public int32 SizeOf
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 19 (0x13)
.maxstack 8
IL_0000: ldarg.0
IL_0001: sizeof ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers/SimpleStruct
IL_0007: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers/UnsafeFields::SizeOf
IL_000c: ldarg.0
IL_000d: call instance void [mscorlib]System.Object::.ctor()
IL_0012: ret
} // end of method UnsafeFields::.ctor
.method private hidebysig specialname rtspecialname static
void .cctor() cil managed
{
// Code size 12 (0xc)
.maxstack 8
IL_0000: sizeof ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers/SimpleStruct
IL_0006: stsfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers/UnsafeFields::StaticSizeOf
IL_000b: ret
} // end of method UnsafeFields::.cctor
} // end of class UnsafeFields
.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 ConstructorInitializers::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

93
ICSharpCode.Decompiler.Tests/TestCases/Pretty/ConstructorInitializers.roslyn.il

@ -1,93 +0,0 @@ @@ -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 ConstructorInitializers
{
.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 ConstructorInitializers.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.Pretty.ConstructorInitializers
extends [mscorlib]System.Object
{
.class sequential ansi sealed nested public beforefieldinit SimpleStruct
extends [mscorlib]System.ValueType
{
.field public int32 Field1
.field public int32 Field2
} // end of class SimpleStruct
.class auto ansi nested public beforefieldinit UnsafeFields
extends [mscorlib]System.Object
{
.field public static int32 StaticSizeOf
.field public int32 SizeOf
.method public hidebysig specialname rtspecialname
instance void .ctor() cil managed
{
// Code size 20 (0x14)
.maxstack 8
IL_0000: ldarg.0
IL_0001: sizeof ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers/SimpleStruct
IL_0007: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers/UnsafeFields::SizeOf
IL_000c: ldarg.0
IL_000d: call instance void [mscorlib]System.Object::.ctor()
IL_0012: nop
IL_0013: ret
} // end of method UnsafeFields::.ctor
.method private hidebysig specialname rtspecialname static
void .cctor() cil managed
{
// Code size 12 (0xc)
.maxstack 8
IL_0000: sizeof ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers/SimpleStruct
IL_0006: stsfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers/UnsafeFields::StaticSizeOf
IL_000b: ret
} // end of method UnsafeFields::.cctor
} // end of class UnsafeFields
.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 ConstructorInitializers::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.ConstructorInitializers
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

83
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeConflicts.cs

@ -53,10 +53,11 @@ namespace CustomAttributeConflicts @@ -53,10 +53,11 @@ namespace CustomAttributeConflicts
}
}
}
// The order of types in namespaces is completely different when compiling with the Roslyn compiler
#if ROSLYN
namespace CustomAttributeConflicts.NS1
{
internal class AttributeWithSameNameAsNormalType : Attribute
{
}
internal class OtherAttribute : Attribute
{
}
@ -70,12 +71,6 @@ namespace CustomAttributeConflicts.NS2 @@ -70,12 +71,6 @@ namespace CustomAttributeConflicts.NS2
{
}
}
namespace CustomAttributeConflicts.NS1
{
internal class AttributeWithSameNameAsNormalType : Attribute
{
}
}
namespace CustomAttributeConflicts.NSWithConflictingTypes
{
internal class My : Attribute
@ -84,22 +79,6 @@ namespace CustomAttributeConflicts.NSWithConflictingTypes @@ -84,22 +79,6 @@ namespace CustomAttributeConflicts.NSWithConflictingTypes
internal class MyAttribute : Attribute
{
}
}
namespace CustomAttributeConflicts.NSWithConflictingTypes2
{
internal class MyOther : Attribute
{
}
internal class MyOtherAttribute : Attribute
{
}
internal class MyOtherAttributeAttribute : Attribute
{
}
}
namespace CustomAttributeConflicts.NSWithConflictingTypes
{
internal class MyAttributeAttribute : Attribute
{
}
@ -113,72 +92,16 @@ namespace CustomAttributeConflicts.NSWithConflictingTypes @@ -113,72 +92,16 @@ namespace CustomAttributeConflicts.NSWithConflictingTypes
{
}
}
#else
namespace CustomAttributeConflicts.NS1
{
internal class OtherAttribute : Attribute
{
}
internal class SimpleAttribute : Attribute
{
}
}
namespace CustomAttributeConflicts.NS2
{
internal class SimpleAttribute : Attribute
{
}
}
namespace CustomAttributeConflicts.NS1
{
internal class AttributeWithSameNameAsNormalType : Attribute
{
}
}
namespace CustomAttributeConflicts.NSWithConflictingTypes
{
internal class My : Attribute
{
}
internal class MyAttribute : Attribute
{
}
}
namespace CustomAttributeConflicts.NSWithConflictingTypes2
{
internal class MyOther : Attribute
{
}
internal class MyOtherAttribute : Attribute
{
}
}
namespace CustomAttributeConflicts.NSWithConflictingTypes
{
internal class MyAttributeAttribute : Attribute
{
}
internal class MyOther : Attribute
{
}
internal class MyOtherAttribute : Attribute
{
}
internal class MyOtherAttributeAttribute : Attribute
{
}
}
namespace CustomAttributeConflicts.NSWithConflictingTypes2
{
internal class MyOtherAttributeAttribute : Attribute
{
}
}
#endif

340
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeConflicts.il

@ -1,340 +0,0 @@ @@ -1,340 +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 CustomAttributeConflicts
{
.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 CustomAttributeConflicts.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 CustomAttributeConflicts.AttributeWithSameNameAsNormalType
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 AttributeWithSameNameAsNormalType::.ctor
} // end of class CustomAttributeConflicts.AttributeWithSameNameAsNormalType
.class private auto ansi beforefieldinit CustomAttributeConflicts.TestClass
extends [mscorlib]System.Object
{
.method public hidebysig instance void
Test1() cil managed
{
.custom instance void CustomAttributeConflicts.NS1.OtherAttribute::.ctor() = ( 01 00 00 00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method TestClass::Test1
.method public hidebysig instance void
Test2() cil managed
{
.custom instance void CustomAttributeConflicts.NS1.SimpleAttribute::.ctor() = ( 01 00 00 00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method TestClass::Test2
.method public hidebysig instance void
Test3() cil managed
{
.custom instance void CustomAttributeConflicts.NS2.SimpleAttribute::.ctor() = ( 01 00 00 00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method TestClass::Test3
.method public hidebysig instance void
Test4() cil managed
{
.custom instance void CustomAttributeConflicts.NS1.AttributeWithSameNameAsNormalType::.ctor() = ( 01 00 00 00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method TestClass::Test4
.method public hidebysig instance void
Test5() cil managed
{
.custom instance void CustomAttributeConflicts.NSWithConflictingTypes.My::.ctor() = ( 01 00 00 00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method TestClass::Test5
.method public hidebysig instance void
Test6() cil managed
{
.custom instance void CustomAttributeConflicts.NSWithConflictingTypes.MyAttribute::.ctor() = ( 01 00 00 00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method TestClass::Test6
.method public hidebysig instance void
Test7() cil managed
{
.custom instance void CustomAttributeConflicts.NSWithConflictingTypes2.MyOther::.ctor() = ( 01 00 00 00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method TestClass::Test7
.method public hidebysig instance void
Test8() cil managed
{
.custom instance void CustomAttributeConflicts.NSWithConflictingTypes2.MyOtherAttribute::.ctor() = ( 01 00 00 00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method TestClass::Test8
.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 TestClass::.ctor
} // end of class CustomAttributeConflicts.TestClass
.class private auto ansi beforefieldinit CustomAttributeConflicts.NS1.OtherAttribute
extends [mscorlib]System.Attribute
{
.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 OtherAttribute::.ctor
} // end of class CustomAttributeConflicts.NS1.OtherAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NS1.SimpleAttribute
extends [mscorlib]System.Attribute
{
.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 SimpleAttribute::.ctor
} // end of class CustomAttributeConflicts.NS1.SimpleAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NS2.SimpleAttribute
extends [mscorlib]System.Attribute
{
.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 SimpleAttribute::.ctor
} // end of class CustomAttributeConflicts.NS2.SimpleAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NS1.AttributeWithSameNameAsNormalType
extends [mscorlib]System.Attribute
{
.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 AttributeWithSameNameAsNormalType::.ctor
} // end of class CustomAttributeConflicts.NS1.AttributeWithSameNameAsNormalType
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes.My
extends [mscorlib]System.Attribute
{
.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 My::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes.My
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes.MyAttribute
extends [mscorlib]System.Attribute
{
.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 MyAttribute::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes.MyAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes2.MyOther
extends [mscorlib]System.Attribute
{
.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 MyOther::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes2.MyOther
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes2.MyOtherAttribute
extends [mscorlib]System.Attribute
{
.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 MyOtherAttribute::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes2.MyOtherAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes.MyAttributeAttribute
extends [mscorlib]System.Attribute
{
.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 MyAttributeAttribute::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes.MyAttributeAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes.MyOther
extends [mscorlib]System.Attribute
{
.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 MyOther::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes.MyOther
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes.MyOtherAttribute
extends [mscorlib]System.Attribute
{
.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 MyOtherAttribute::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes.MyOtherAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes.MyOtherAttributeAttribute
extends [mscorlib]System.Attribute
{
.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 MyOtherAttributeAttribute::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes.MyOtherAttributeAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes2.MyOtherAttributeAttribute
extends [mscorlib]System.Attribute
{
.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 MyOtherAttributeAttribute::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes2.MyOtherAttributeAttribute
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

332
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeConflicts.opt.il

@ -1,332 +0,0 @@ @@ -1,332 +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 CustomAttributeConflicts.opt
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
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 CustomAttributeConflicts.opt.dll
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x10000000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// =============== CLASS MEMBERS DECLARATION ===================
.class private auto ansi beforefieldinit CustomAttributeConflicts.AttributeWithSameNameAsNormalType
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 AttributeWithSameNameAsNormalType::.ctor
} // end of class CustomAttributeConflicts.AttributeWithSameNameAsNormalType
.class private auto ansi beforefieldinit CustomAttributeConflicts.TestClass
extends [mscorlib]System.Object
{
.method public hidebysig instance void
Test1() cil managed
{
.custom instance void CustomAttributeConflicts.NS1.OtherAttribute::.ctor() = ( 01 00 00 00 )
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method TestClass::Test1
.method public hidebysig instance void
Test2() cil managed
{
.custom instance void CustomAttributeConflicts.NS1.SimpleAttribute::.ctor() = ( 01 00 00 00 )
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method TestClass::Test2
.method public hidebysig instance void
Test3() cil managed
{
.custom instance void CustomAttributeConflicts.NS2.SimpleAttribute::.ctor() = ( 01 00 00 00 )
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method TestClass::Test3
.method public hidebysig instance void
Test4() cil managed
{
.custom instance void CustomAttributeConflicts.NS1.AttributeWithSameNameAsNormalType::.ctor() = ( 01 00 00 00 )
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method TestClass::Test4
.method public hidebysig instance void
Test5() cil managed
{
.custom instance void CustomAttributeConflicts.NSWithConflictingTypes.My::.ctor() = ( 01 00 00 00 )
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method TestClass::Test5
.method public hidebysig instance void
Test6() cil managed
{
.custom instance void CustomAttributeConflicts.NSWithConflictingTypes.MyAttribute::.ctor() = ( 01 00 00 00 )
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method TestClass::Test6
.method public hidebysig instance void
Test7() cil managed
{
.custom instance void CustomAttributeConflicts.NSWithConflictingTypes2.MyOther::.ctor() = ( 01 00 00 00 )
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method TestClass::Test7
.method public hidebysig instance void
Test8() cil managed
{
.custom instance void CustomAttributeConflicts.NSWithConflictingTypes2.MyOtherAttribute::.ctor() = ( 01 00 00 00 )
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method TestClass::Test8
.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 TestClass::.ctor
} // end of class CustomAttributeConflicts.TestClass
.class private auto ansi beforefieldinit CustomAttributeConflicts.NS1.OtherAttribute
extends [mscorlib]System.Attribute
{
.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 OtherAttribute::.ctor
} // end of class CustomAttributeConflicts.NS1.OtherAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NS1.SimpleAttribute
extends [mscorlib]System.Attribute
{
.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 SimpleAttribute::.ctor
} // end of class CustomAttributeConflicts.NS1.SimpleAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NS2.SimpleAttribute
extends [mscorlib]System.Attribute
{
.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 SimpleAttribute::.ctor
} // end of class CustomAttributeConflicts.NS2.SimpleAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NS1.AttributeWithSameNameAsNormalType
extends [mscorlib]System.Attribute
{
.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 AttributeWithSameNameAsNormalType::.ctor
} // end of class CustomAttributeConflicts.NS1.AttributeWithSameNameAsNormalType
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes.My
extends [mscorlib]System.Attribute
{
.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 My::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes.My
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes.MyAttribute
extends [mscorlib]System.Attribute
{
.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 MyAttribute::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes.MyAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes2.MyOther
extends [mscorlib]System.Attribute
{
.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 MyOther::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes2.MyOther
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes2.MyOtherAttribute
extends [mscorlib]System.Attribute
{
.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 MyOtherAttribute::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes2.MyOtherAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes.MyAttributeAttribute
extends [mscorlib]System.Attribute
{
.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 MyAttributeAttribute::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes.MyAttributeAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes.MyOther
extends [mscorlib]System.Attribute
{
.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 MyOther::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes.MyOther
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes.MyOtherAttribute
extends [mscorlib]System.Attribute
{
.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 MyOtherAttribute::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes.MyOtherAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes.MyOtherAttributeAttribute
extends [mscorlib]System.Attribute
{
.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 MyOtherAttributeAttribute::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes.MyOtherAttributeAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes2.MyOtherAttributeAttribute
extends [mscorlib]System.Attribute
{
.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 MyOtherAttributeAttribute::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes2.MyOtherAttributeAttribute
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

336
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeConflicts.opt.roslyn.il

@ -1,336 +0,0 @@ @@ -1,336 +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 CustomAttributeConflicts
{
.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 CustomAttributeConflicts.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 CustomAttributeConflicts.AttributeWithSameNameAsNormalType
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 AttributeWithSameNameAsNormalType::.ctor
} // end of class CustomAttributeConflicts.AttributeWithSameNameAsNormalType
.class private auto ansi beforefieldinit CustomAttributeConflicts.TestClass
extends [mscorlib]System.Object
{
.method public hidebysig instance void
Test1() cil managed
{
.custom instance void CustomAttributeConflicts.NS1.OtherAttribute::.ctor() = ( 01 00 00 00 )
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method TestClass::Test1
.method public hidebysig instance void
Test2() cil managed
{
.custom instance void CustomAttributeConflicts.NS1.SimpleAttribute::.ctor() = ( 01 00 00 00 )
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method TestClass::Test2
.method public hidebysig instance void
Test3() cil managed
{
.custom instance void CustomAttributeConflicts.NS2.SimpleAttribute::.ctor() = ( 01 00 00 00 )
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method TestClass::Test3
.method public hidebysig instance void
Test4() cil managed
{
.custom instance void CustomAttributeConflicts.NS1.AttributeWithSameNameAsNormalType::.ctor() = ( 01 00 00 00 )
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method TestClass::Test4
.method public hidebysig instance void
Test5() cil managed
{
.custom instance void CustomAttributeConflicts.NSWithConflictingTypes.My::.ctor() = ( 01 00 00 00 )
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method TestClass::Test5
.method public hidebysig instance void
Test6() cil managed
{
.custom instance void CustomAttributeConflicts.NSWithConflictingTypes.MyAttribute::.ctor() = ( 01 00 00 00 )
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method TestClass::Test6
.method public hidebysig instance void
Test7() cil managed
{
.custom instance void CustomAttributeConflicts.NSWithConflictingTypes2.MyOther::.ctor() = ( 01 00 00 00 )
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method TestClass::Test7
.method public hidebysig instance void
Test8() cil managed
{
.custom instance void CustomAttributeConflicts.NSWithConflictingTypes2.MyOtherAttribute::.ctor() = ( 01 00 00 00 )
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method TestClass::Test8
.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 TestClass::.ctor
} // end of class CustomAttributeConflicts.TestClass
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes2.MyOther
extends [mscorlib]System.Attribute
{
.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 MyOther::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes2.MyOther
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes2.MyOtherAttribute
extends [mscorlib]System.Attribute
{
.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 MyOtherAttribute::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes2.MyOtherAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes2.MyOtherAttributeAttribute
extends [mscorlib]System.Attribute
{
.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 MyOtherAttributeAttribute::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes2.MyOtherAttributeAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes.My
extends [mscorlib]System.Attribute
{
.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 My::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes.My
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes.MyAttribute
extends [mscorlib]System.Attribute
{
.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 MyAttribute::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes.MyAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes.MyAttributeAttribute
extends [mscorlib]System.Attribute
{
.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 MyAttributeAttribute::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes.MyAttributeAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes.MyOther
extends [mscorlib]System.Attribute
{
.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 MyOther::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes.MyOther
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes.MyOtherAttribute
extends [mscorlib]System.Attribute
{
.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 MyOtherAttribute::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes.MyOtherAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes.MyOtherAttributeAttribute
extends [mscorlib]System.Attribute
{
.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 MyOtherAttributeAttribute::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes.MyOtherAttributeAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NS2.SimpleAttribute
extends [mscorlib]System.Attribute
{
.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 SimpleAttribute::.ctor
} // end of class CustomAttributeConflicts.NS2.SimpleAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NS1.OtherAttribute
extends [mscorlib]System.Attribute
{
.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 OtherAttribute::.ctor
} // end of class CustomAttributeConflicts.NS1.OtherAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NS1.SimpleAttribute
extends [mscorlib]System.Attribute
{
.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 SimpleAttribute::.ctor
} // end of class CustomAttributeConflicts.NS1.SimpleAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NS1.AttributeWithSameNameAsNormalType
extends [mscorlib]System.Attribute
{
.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 AttributeWithSameNameAsNormalType::.ctor
} // end of class CustomAttributeConflicts.NS1.AttributeWithSameNameAsNormalType
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

359
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeConflicts.roslyn.il

@ -1,359 +0,0 @@ @@ -1,359 +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 CustomAttributeConflicts
{
.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 CustomAttributeConflicts.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 CustomAttributeConflicts.AttributeWithSameNameAsNormalType
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 AttributeWithSameNameAsNormalType::.ctor
} // end of class CustomAttributeConflicts.AttributeWithSameNameAsNormalType
.class private auto ansi beforefieldinit CustomAttributeConflicts.TestClass
extends [mscorlib]System.Object
{
.method public hidebysig instance void
Test1() cil managed
{
.custom instance void CustomAttributeConflicts.NS1.OtherAttribute::.ctor() = ( 01 00 00 00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method TestClass::Test1
.method public hidebysig instance void
Test2() cil managed
{
.custom instance void CustomAttributeConflicts.NS1.SimpleAttribute::.ctor() = ( 01 00 00 00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method TestClass::Test2
.method public hidebysig instance void
Test3() cil managed
{
.custom instance void CustomAttributeConflicts.NS2.SimpleAttribute::.ctor() = ( 01 00 00 00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method TestClass::Test3
.method public hidebysig instance void
Test4() cil managed
{
.custom instance void CustomAttributeConflicts.NS1.AttributeWithSameNameAsNormalType::.ctor() = ( 01 00 00 00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method TestClass::Test4
.method public hidebysig instance void
Test5() cil managed
{
.custom instance void CustomAttributeConflicts.NSWithConflictingTypes.My::.ctor() = ( 01 00 00 00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method TestClass::Test5
.method public hidebysig instance void
Test6() cil managed
{
.custom instance void CustomAttributeConflicts.NSWithConflictingTypes.MyAttribute::.ctor() = ( 01 00 00 00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method TestClass::Test6
.method public hidebysig instance void
Test7() cil managed
{
.custom instance void CustomAttributeConflicts.NSWithConflictingTypes2.MyOther::.ctor() = ( 01 00 00 00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method TestClass::Test7
.method public hidebysig instance void
Test8() cil managed
{
.custom instance void CustomAttributeConflicts.NSWithConflictingTypes2.MyOtherAttribute::.ctor() = ( 01 00 00 00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method TestClass::Test8
.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 TestClass::.ctor
} // end of class CustomAttributeConflicts.TestClass
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes2.MyOther
extends [mscorlib]System.Attribute
{
.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 MyOther::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes2.MyOther
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes2.MyOtherAttribute
extends [mscorlib]System.Attribute
{
.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 MyOtherAttribute::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes2.MyOtherAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes2.MyOtherAttributeAttribute
extends [mscorlib]System.Attribute
{
.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 MyOtherAttributeAttribute::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes2.MyOtherAttributeAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes.My
extends [mscorlib]System.Attribute
{
.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 My::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes.My
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes.MyAttribute
extends [mscorlib]System.Attribute
{
.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 MyAttribute::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes.MyAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes.MyAttributeAttribute
extends [mscorlib]System.Attribute
{
.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 MyAttributeAttribute::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes.MyAttributeAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes.MyOther
extends [mscorlib]System.Attribute
{
.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 MyOther::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes.MyOther
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes.MyOtherAttribute
extends [mscorlib]System.Attribute
{
.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 MyOtherAttribute::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes.MyOtherAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NSWithConflictingTypes.MyOtherAttributeAttribute
extends [mscorlib]System.Attribute
{
.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 MyOtherAttributeAttribute::.ctor
} // end of class CustomAttributeConflicts.NSWithConflictingTypes.MyOtherAttributeAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NS2.SimpleAttribute
extends [mscorlib]System.Attribute
{
.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 SimpleAttribute::.ctor
} // end of class CustomAttributeConflicts.NS2.SimpleAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NS1.OtherAttribute
extends [mscorlib]System.Attribute
{
.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 OtherAttribute::.ctor
} // end of class CustomAttributeConflicts.NS1.OtherAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NS1.SimpleAttribute
extends [mscorlib]System.Attribute
{
.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 SimpleAttribute::.ctor
} // end of class CustomAttributeConflicts.NS1.SimpleAttribute
.class private auto ansi beforefieldinit CustomAttributeConflicts.NS1.AttributeWithSameNameAsNormalType
extends [mscorlib]System.Attribute
{
.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 AttributeWithSameNameAsNormalType::.ctor
} // end of class CustomAttributeConflicts.NS1.AttributeWithSameNameAsNormalType
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

215
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeSamples.cs

@ -45,90 +45,33 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples @@ -45,90 +45,33 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples
{
}
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Interface)]
public class MyMethodOrInterfaceAttributeAttribute : Attribute
{
}
[Obsolete("message")]
public class ObsoleteClass
{
}
[AttributeUsage(AttributeTargets.All)]
public class MyTypeAttribute : Attribute
{
public MyTypeAttribute(Type t)
{
}
}
[MyType(typeof(Attribute))]
public class SomeClass
public class MyAttributeNamedInitializerFieldEnumAttribute : Attribute
{
public AttributeTargets Field;
}
public class TestClass
[AttributeUsage(AttributeTargets.All)]
public class MyAttributeNamedInitializerPropertyEnumAttribute : Attribute
{
[MyAttribute]
public int Field;
[Obsolete("reason")]
#if ROSLYN
public int Property => 0;
#else
public int Property {
get {
return 0;
}
}
#endif
public int PropertyAttributeOnGetter {
[MyAttribute]
get {
return 0;
}
}
public int PropertyAttributeOnSetter {
public AttributeTargets Prop {
get {
return 3;
return AttributeTargets.All;
}
[MyAttribute]
set {
}
}
}
[Obsolete("reason")]
#if ROSLYN
public int this[int i] => 0;
#else
public int this[int i] {
get {
return 0;
}
}
#endif
[MyAttribute]
public event EventHandler MyEvent;
[method: MyAttribute]
public event EventHandler MyEvent2;
[MyAttribute]
public void Method()
{
}
public void Method([MyAttribute] int val)
{
}
[AttributeUsage(AttributeTargets.All)]
public class MyAttributeOnReturnTypeOfDelegateAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public class MyAttributeWithNamedArgumentAppliedAttribute : Attribute
[AttributeUsage(AttributeTargets.All)]
public class MyAttributeTargetPropertyIndexSetMultiParamAttribute : Attribute
{
public int Field;
}
[AttributeUsage(AttributeTargets.All)]
@ -143,8 +86,8 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples @@ -143,8 +86,8 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples
}
}
[MyAttributeWithCustomProperty(Prop = "value")]
public class MyClass
[AttributeUsage(AttributeTargets.Method, AllowMultiple = true)]
public class MyAttributeWithNamedArgumentAppliedAttribute : Attribute
{
}
@ -160,39 +103,31 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples @@ -160,39 +103,31 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples
}
}
[MyAttributeWithNamedInitializerPropertyType(Prop = typeof(Enum))]
public class MyClass2
[MyAttributeWithCustomProperty(Prop = "value")]
public class MyClass
{
}
[AttributeUsage(AttributeTargets.All)]
public class MyAttributeNamedInitializerPropertyEnumAttribute : Attribute
public class MyClass<[MyClassAttributeOnTypeParameter] T>
{
public AttributeTargets Prop {
get {
return AttributeTargets.All;
}
set {
}
}
}
[MyAttributeNamedInitializerPropertyEnum(Prop = (AttributeTargets.Class | AttributeTargets.Method))]
public class MyClass3
[MyAttributeWithNamedInitializerPropertyType(Prop = typeof(Enum))]
public class MyClass02
{
}
[AttributeUsage(AttributeTargets.All)]
public class MyAttributeNamedInitializerFieldEnumAttribute : Attribute
[MyAttributeNamedInitializerPropertyEnum(Prop = (AttributeTargets.Class | AttributeTargets.Method))]
public class MyClass03
{
public AttributeTargets Field;
}
[MyAttributeNamedInitializerFieldEnum(Field = (AttributeTargets.Class | AttributeTargets.Method))]
public class MyClass4
public class MyClass04
{
}
public class MyClass5
public class MyClass05
{
[return: MyAttribute]
public int MyMethod()
@ -202,7 +137,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples @@ -202,7 +137,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples
}
public class MyClass6
public class MyClass06
{
public int Prop {
[return: MyAttribute]
@ -212,7 +147,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples @@ -212,7 +147,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples
}
}
public class MyClass7
public class MyClass07
{
public int Prop {
[param: MyAttribute]
@ -222,7 +157,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples @@ -222,7 +157,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples
}
public class MyClass8
public class MyClass08
{
public int Prop {
get {
@ -234,8 +169,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples @@ -234,8 +169,7 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples
}
}
public class MyClass9
public class MyClass09
{
public int this[string s] {
[return: MyAttribute]
@ -245,7 +179,6 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples @@ -245,7 +179,6 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples
}
}
public class MyClass10
{
public int this[[MyAttribute] string s] {
@ -254,7 +187,6 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples @@ -254,7 +187,6 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples
}
}
public class MyClass11
{
#if ROSLYN
@ -280,11 +212,6 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples @@ -280,11 +212,6 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples
}
}
[AttributeUsage(AttributeTargets.All)]
public class MyAttributeTargetPropertyIndexSetMultiParamAttribute : Attribute
{
public int Field;
}
public class MyClass13
{
public string this[[MyAttributeTargetPropertyIndexSetMultiParam(Field = 2)] int index1, [MyAttributeTargetPropertyIndexSetMultiParam(Field = 3)] int index2] {
@ -296,19 +223,93 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples @@ -296,19 +223,93 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.CustomAttributeSamples
}
}
}
[AttributeUsage(AttributeTargets.All)]
public class MyAttributeOnReturnTypeOfDelegateAttribute : Attribute
public class MyClassAttributeOnTypeParameterAttribute : Attribute
{
}
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Interface)]
public class MyMethodOrInterfaceAttributeAttribute : Attribute
{
}
[return: MyAttributeOnReturnTypeOfDelegate]
public delegate void Test();
[AttributeUsage(AttributeTargets.All)]
public class MyClassAttributeOnTypeParameterAttribute : Attribute
public class MyTypeAttribute : Attribute
{
public MyTypeAttribute(Type t)
{
}
}
public class MyClass<[MyClassAttributeOnTypeParameter] T>
[Obsolete("message")]
public class ObsoleteClass
{
}
[MyType(typeof(Attribute))]
public class SomeClass
{
}
[return: MyAttributeOnReturnTypeOfDelegate]
public delegate void Test();
public class TestClass
{
[MyAttribute]
public int Field;
[Obsolete("reason")]
#if ROSLYN
public int Property => 0;
#else
public int Property {
get {
return 0;
}
}
#endif
public int PropertyAttributeOnGetter {
[MyAttribute]
get {
return 0;
}
}
public int PropertyAttributeOnSetter {
get {
return 3;
}
[MyAttribute]
set {
}
}
[Obsolete("reason")]
#if ROSLYN
public int this[int i] => 0;
#else
public int this[int i] {
get {
return 0;
}
}
#endif
[MyAttribute]
public event EventHandler MyEvent;
[method: MyAttribute]
public event EventHandler MyEvent2;
[MyAttribute]
public void Method()
{
}
public void Method([MyAttribute] int val)
{
}
}
}

1193
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeSamples.il

File diff suppressed because it is too large Load Diff

1071
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeSamples.opt.il

File diff suppressed because it is too large Load Diff

1081
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeSamples.opt.roslyn.il

File diff suppressed because it is too large Load Diff

1207
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributeSamples.roslyn.il

File diff suppressed because it is too large Load Diff

356
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributes.il

@ -1,356 +0,0 @@ @@ -1,356 +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 CustomAttributes
{
.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 CustomAttributes.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 abstract auto ansi sealed beforefieldinit CustomAttributes.CustomAttributes
extends [mscorlib]System.Object
{
.class auto ansi sealed nested public EnumWithFlag
extends [mscorlib]System.Enum
{
.custom instance void [mscorlib]System.FlagsAttribute::.ctor() = ( 01 00 00 00 )
.field public specialname rtspecialname int32 value__
.field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag All = int32(0x0000000F)
.field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag None = int32(0x00000000)
.field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item1 = int32(0x00000001)
.field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item2 = int32(0x00000002)
.field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item3 = int32(0x00000004)
.field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item4 = int32(0x00000008)
} // end of class EnumWithFlag
.class auto ansi nested public beforefieldinit MyAttribute
extends [mscorlib]System.Attribute
{
.custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 )
.method public hidebysig specialname rtspecialname
instance void .ctor(object val) cil managed
{
// Code size 10 (0xa)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Attribute::.ctor()
IL_0006: nop
IL_0007: nop
IL_0008: nop
IL_0009: ret
} // end of method MyAttribute::.ctor
} // end of class MyAttribute
.class auto ansi sealed nested public ULongEnum
extends [mscorlib]System.Enum
{
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 55 2B 43 75 73 74 6F 6D 41 74 74 72 69 62 // ..U+CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 55 4C 6F 6E 67 45 6E 75 6D FF // butes+ULongEnum.
FF FF FF FF FF FF FF 00 00 )
.field public specialname rtspecialname uint64 value__
.field public static literal valuetype CustomAttributes.CustomAttributes/ULongEnum MaxUInt64 = uint64(0xFFFFFFFFFFFFFFFF)
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 0E FF 00 00 )
} // end of class ULongEnum
.class auto ansi nested public beforefieldinit TypesAttribute
extends [mscorlib]System.Attribute
{
.custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 00 01 00 00 00 00 )
.method public hidebysig specialname rtspecialname
instance void .ctor(class [mscorlib]System.Type 'type') cil managed
{
// Code size 10 (0xa)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Attribute::.ctor()
IL_0006: nop
IL_0007: nop
IL_0008: nop
IL_0009: ret
} // end of method TypesAttribute::.ctor
} // end of class TypesAttribute
.class auto ansi nested private beforefieldinit SomeType`1<T>
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 SomeType`1::.ctor
} // end of class SomeType`1
.class auto ansi nested private beforefieldinit SomeType`2<K,V>
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 SomeType`2::.ctor
} // end of class SomeType`2
.class sequential ansi sealed nested private beforefieldinit DataType
extends [mscorlib]System.ValueType
{
.field private int32 i
} // end of class DataType
.field private static int32 typeattr_int
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 59 53 79 73 74 65 6D 2E 49 6E 74 33 32 2C // ..YSystem.Int32,
20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 // mscorlib, Versi
6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 // on=4.0.0.0, Cult
75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 // ure=neutral, Pub
6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 // licKeyToken=b77a
35 63 35 36 31 39 33 34 65 30 38 39 00 00 ) // 5c561934e089..
.field private static int32 typeattr_null
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 FF 00 00 )
.field private static int32 typeattr_list_of_int
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 CB 53 79 73 74 65 6D 2E 43 6F 6C 6C 65 // ....System.Colle
63 74 69 6F 6E 73 2E 47 65 6E 65 72 69 63 2E 4C // ctions.Generic.L
69 73 74 60 31 5B 5B 53 79 73 74 65 6D 2E 49 6E // ist`1[[System.In
74 33 32 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 // t32, mscorlib, V
65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 // ersion=4.0.0.0,
43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C // Culture=neutral,
20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D // PublicKeyToken=
62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 // b77a5c561934e089
5D 5D 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 // ]], mscorlib, Ve
72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 // rsion=4.0.0.0, C
75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 // ulture=neutral,
50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 // PublicKeyToken=b
37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 00 // 77a5c561934e089.
00 )
.field private static int32 typeattr_list_unbound
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 6E 53 79 73 74 65 6D 2E 43 6F 6C 6C 65 63 // ..nSystem.Collec
74 69 6F 6E 73 2E 47 65 6E 65 72 69 63 2E 4C 69 // tions.Generic.Li
73 74 60 31 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 // st`1, mscorlib,
56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C // Version=4.0.0.0,
20 43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C // Culture=neutral
2C 20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E // , PublicKeyToken
3D 62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 // =b77a5c561934e08
39 00 00 ) // 9..
.field private static int32 typeattr_sometype_of_datatype
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 58 43 75 73 74 6F 6D 41 74 74 72 69 62 75 // ..XCustomAttribu
74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 // tes.CustomAttrib
75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 31 5B // utes+SomeType`1[
43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 // CustomAttributes
2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // .CustomAttribute
73 2B 44 61 74 61 54 79 70 65 5D 00 00 ) // s+DataType]..
.field private static int32 typeattr_sometype_of_datatype2
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 83 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2
5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute
73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut
65 73 2B 44 61 74 61 54 79 70 65 2C 43 75 73 74 // es+DataType,Cust
6F 6D 41 74 74 72 69 62 75 74 65 73 2E 43 75 73 // omAttributes.Cus
74 6F 6D 41 74 74 72 69 62 75 74 65 73 2B 44 61 // tomAttributes+Da
74 61 54 79 70 65 5D 00 00 ) // taType]..
.field private static int32 typeattr_sometype_of_datatype_and_int
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 B4 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2
5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute
73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut
65 73 2B 44 61 74 61 54 79 70 65 2C 5B 53 79 73 // es+DataType,[Sys
74 65 6D 2E 49 6E 74 33 32 2C 20 6D 73 63 6F 72 // tem.Int32, mscor
6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 // lib, Version=4.0
2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 // .0.0, Culture=ne
75 74 72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 // utral, PublicKey
54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 // Token=b77a5c5619
33 34 65 30 38 39 5D 5D 00 00 ) // 34e089]]..
.field private static int32 typeattr_sometype_of_datatype_array_and_int
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 B6 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2
5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute
73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut
65 73 2B 44 61 74 61 54 79 70 65 5B 5D 2C 5B 53 // es+DataType[],[S
79 73 74 65 6D 2E 49 6E 74 33 32 2C 20 6D 73 63 // ystem.Int32, msc
6F 72 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D 34 // orlib, Version=4
2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 3D // .0.0.0, Culture=
6E 65 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 4B // neutral, PublicK
65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 36 // eyToken=b77a5c56
31 39 33 34 65 30 38 39 5D 5D 00 00 ) // 1934e089]]..
.field private static int32 typeattr_sometype_of_nested_sometype
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 E2 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2
5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute
73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut
65 73 2B 53 6F 6D 65 54 79 70 65 60 31 5B 43 75 // es+SomeType`1[Cu
73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2E 43 // stomAttributes.C
75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2B // ustomAttributes+
44 61 74 61 54 79 70 65 5D 2C 5B 53 79 73 74 65 // DataType],[Syste
6D 2E 49 6E 74 33 32 2C 20 6D 73 63 6F 72 6C 69 // m.Int32, mscorli
62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 // b, Version=4.0.0
2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 75 74 // .0, Culture=neut
72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 54 6F // ral, PublicKeyTo
6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 33 34 // ken=b77a5c561934
65 30 38 39 5D 5D 00 00 ) // e089]]..
.field private static int32 typeattr_sometype_of_int_and_datatype
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 B4 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2
5B 5B 53 79 73 74 65 6D 2E 49 6E 74 33 32 2C 20 // [[System.Int32,
6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F // mscorlib, Versio
6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 // n=4.0.0.0, Cultu
72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C // re=neutral, Publ
69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 // icKeyToken=b77a5
63 35 36 31 39 33 34 65 30 38 39 5D 2C 43 75 73 // c561934e089],Cus
74 6F 6D 41 74 74 72 69 62 75 74 65 73 2E 43 75 // tomAttributes.Cu
73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2B 44 // stomAttributes+D
61 74 61 54 79 70 65 5D 00 00 ) // ataType]..
.field private static int32 typeattr_array_of_int
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 5B 53 79 73 74 65 6D 2E 49 6E 74 33 32 5B // ..[System.Int32[
5D 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 // ], mscorlib, Ver
73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 // sion=4.0.0.0, Cu
6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 // lture=neutral, P
75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 // ublicKeyToken=b7
37 61 35 63 35 36 31 39 33 34 65 30 38 39 00 00 ) // 7a5c561934e089..
.field private static int32 typeattr_multidim_array_of_int
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 61 53 79 73 74 65 6D 2E 49 6E 74 33 32 5B // ..aSystem.Int32[
2C 5D 5B 2C 2C 2C 5D 2C 20 6D 73 63 6F 72 6C 69 // ,][,,,], mscorli
62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 // b, Version=4.0.0
2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 75 74 // .0, Culture=neut
72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 54 6F // ral, PublicKeyTo
6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 33 34 // ken=b77a5c561934
65 30 38 39 00 00 ) // e089..
.field private static int32 'field'
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 55 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 // ..U.CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 45 6E 75 6D 57 69 74 68 46 6C // butes+EnumWithFl
61 67 03 00 00 00 00 00 ) // ag......
.method public hidebysig specialname static
string get_Property() cil managed
{
// Code size 11 (0xb)
.maxstack 1
.locals init (string V_0)
IL_0000: nop
IL_0001: ldstr "aa"
IL_0006: stloc.0
IL_0007: br.s IL_0009
IL_0009: ldloc.0
IL_000a: ret
} // end of method CustomAttributes::get_Property
.method public hidebysig static void ObsoletedMethod() cil managed
{
.custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 0C 73 6F 6D 65 20 6D 65 73 73 61 67 65 00 // ...some message.
00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method CustomAttributes::ObsoletedMethod
.method public hidebysig static void EnumArray() cil managed
{
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 1D 55 64 53 79 73 74 65 6D 2E 53 74 72 69 // ...UdSystem.Stri
6E 67 43 6F 6D 70 61 72 69 73 6F 6E 2C 20 6D 73 // ngComparison, ms
63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D // corlib, Version=
34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 // 4.0.0.0, Culture
3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 // =neutral, Public
4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 // KeyToken=b77a5c5
36 31 39 33 34 65 30 38 39 02 00 00 00 04 00 00 // 61934e089.......
00 00 00 00 00 00 00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method CustomAttributes::EnumArray
.method public hidebysig static void BoxedEnumArray() cil managed
{
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 1D 51 02 00 00 00 55 64 53 79 73 74 65 6D // ...Q....UdSystem
2E 53 74 72 69 6E 67 43 6F 6D 70 61 72 69 73 6F // .StringCompariso
6E 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 // n, mscorlib, Ver
73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 // sion=4.0.0.0, Cu
6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 // lture=neutral, P
75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 // ublicKeyToken=b7
37 61 35 63 35 36 31 39 33 34 65 30 38 39 04 00 // 7a5c561934e089..
00 00 55 64 53 79 73 74 65 6D 2E 53 74 72 69 6E // ..UdSystem.Strin
67 43 6F 6D 70 61 72 69 73 6F 6E 2C 20 6D 73 63 // gComparison, msc
6F 72 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D 34 // orlib, Version=4
2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 3D // .0.0.0, Culture=
6E 65 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 4B // neutral, PublicK
65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 36 // eyToken=b77a5c56
31 39 33 34 65 30 38 39 00 00 00 00 00 00 ) // 1934e089......
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method CustomAttributes::BoxedEnumArray
.method public hidebysig static void BoxedLiteralsArray() cil managed
{
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 1D 51 13 00 00 00 08 01 00 00 00 09 02 00 // ...Q............
00 00 0A 03 00 00 00 00 00 00 00 0B 04 00 00 00
00 00 00 00 06 05 00 07 06 00 05 07 04 08 03 61 // ...............a
00 03 00 00 03 FF FE 03 FF FF 0C 00 00 80 3F 0D // ..............?.
00 00 00 00 00 00 00 40 0E 04 74 65 78 74 0E FF // .......@..text..
50 59 53 79 73 74 65 6D 2E 49 6E 74 33 32 2C 20 // PYSystem.Int32,
6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F // mscorlib, Versio
6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 // n=4.0.0.0, Cultu
72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C // re=neutral, Publ
69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 // icKeyToken=b77a5
63 35 36 31 39 33 34 65 30 38 39 1D 51 01 00 00 // c561934e089.Q...
00 08 01 00 00 00 1D 08 01 00 00 00 01 00 00 00
00 00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method CustomAttributes::BoxedLiteralsArray
.property string Property()
{
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 55 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 // ..U.CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 45 6E 75 6D 57 69 74 68 46 6C // butes+EnumWithFl
61 67 0F 00 00 00 00 00 ) // ag......
.get string CustomAttributes.CustomAttributes::get_Property()
} // end of property CustomAttributes::Property
} // end of class CustomAttributes.CustomAttributes
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

340
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributes.opt.il

@ -1,340 +0,0 @@ @@ -1,340 +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 CustomAttributes.opt
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 )
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx
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 CustomAttributes.opt.dll
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x10000000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// =============== CLASS MEMBERS DECLARATION ===================
.class public abstract auto ansi sealed beforefieldinit CustomAttributes.CustomAttributes
extends [mscorlib]System.Object
{
.class auto ansi sealed nested public EnumWithFlag
extends [mscorlib]System.Enum
{
.custom instance void [mscorlib]System.FlagsAttribute::.ctor() = ( 01 00 00 00 )
.field public specialname rtspecialname int32 value__
.field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag All = int32(0x0000000F)
.field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag None = int32(0x00000000)
.field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item1 = int32(0x00000001)
.field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item2 = int32(0x00000002)
.field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item3 = int32(0x00000004)
.field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item4 = int32(0x00000008)
} // end of class EnumWithFlag
.class auto ansi nested public beforefieldinit MyAttribute
extends [mscorlib]System.Attribute
{
.custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 )
.method public hidebysig specialname rtspecialname
instance void .ctor(object val) 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 MyAttribute::.ctor
} // end of class MyAttribute
.class auto ansi sealed nested public ULongEnum
extends [mscorlib]System.Enum
{
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 55 2B 43 75 73 74 6F 6D 41 74 74 72 69 62 // ..U+CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 55 4C 6F 6E 67 45 6E 75 6D FF // butes+ULongEnum.
FF FF FF FF FF FF FF 00 00 )
.field public specialname rtspecialname uint64 value__
.field public static literal valuetype CustomAttributes.CustomAttributes/ULongEnum MaxUInt64 = uint64(0xFFFFFFFFFFFFFFFF)
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 0E FF 00 00 )
} // end of class ULongEnum
.class auto ansi nested public beforefieldinit TypesAttribute
extends [mscorlib]System.Attribute
{
.custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 00 01 00 00 00 00 )
.method public hidebysig specialname rtspecialname
instance void .ctor(class [mscorlib]System.Type 'type') 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 TypesAttribute::.ctor
} // end of class TypesAttribute
.class auto ansi nested private beforefieldinit SomeType`1<T>
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 SomeType`1::.ctor
} // end of class SomeType`1
.class auto ansi nested private beforefieldinit SomeType`2<K,V>
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 SomeType`2::.ctor
} // end of class SomeType`2
.class sequential ansi sealed nested private beforefieldinit DataType
extends [mscorlib]System.ValueType
{
.field private int32 i
} // end of class DataType
.field private static int32 typeattr_int
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 59 53 79 73 74 65 6D 2E 49 6E 74 33 32 2C // ..YSystem.Int32,
20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 // mscorlib, Versi
6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 // on=4.0.0.0, Cult
75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 // ure=neutral, Pub
6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 // licKeyToken=b77a
35 63 35 36 31 39 33 34 65 30 38 39 00 00 ) // 5c561934e089..
.field private static int32 typeattr_null
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 FF 00 00 )
.field private static int32 typeattr_list_of_int
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 CB 53 79 73 74 65 6D 2E 43 6F 6C 6C 65 // ....System.Colle
63 74 69 6F 6E 73 2E 47 65 6E 65 72 69 63 2E 4C // ctions.Generic.L
69 73 74 60 31 5B 5B 53 79 73 74 65 6D 2E 49 6E // ist`1[[System.In
74 33 32 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 // t32, mscorlib, V
65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 // ersion=4.0.0.0,
43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C // Culture=neutral,
20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D // PublicKeyToken=
62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 // b77a5c561934e089
5D 5D 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 // ]], mscorlib, Ve
72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 // rsion=4.0.0.0, C
75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 // ulture=neutral,
50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 // PublicKeyToken=b
37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 00 // 77a5c561934e089.
00 )
.field private static int32 typeattr_list_unbound
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 6E 53 79 73 74 65 6D 2E 43 6F 6C 6C 65 63 // ..nSystem.Collec
74 69 6F 6E 73 2E 47 65 6E 65 72 69 63 2E 4C 69 // tions.Generic.Li
73 74 60 31 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 // st`1, mscorlib,
56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C // Version=4.0.0.0,
20 43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C // Culture=neutral
2C 20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E // , PublicKeyToken
3D 62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 // =b77a5c561934e08
39 00 00 ) // 9..
.field private static int32 typeattr_sometype_of_datatype
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 58 43 75 73 74 6F 6D 41 74 74 72 69 62 75 // ..XCustomAttribu
74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 // tes.CustomAttrib
75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 31 5B // utes+SomeType`1[
43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 // CustomAttributes
2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // .CustomAttribute
73 2B 44 61 74 61 54 79 70 65 5D 00 00 ) // s+DataType]..
.field private static int32 typeattr_sometype_of_datatype2
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 83 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2
5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute
73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut
65 73 2B 44 61 74 61 54 79 70 65 2C 43 75 73 74 // es+DataType,Cust
6F 6D 41 74 74 72 69 62 75 74 65 73 2E 43 75 73 // omAttributes.Cus
74 6F 6D 41 74 74 72 69 62 75 74 65 73 2B 44 61 // tomAttributes+Da
74 61 54 79 70 65 5D 00 00 ) // taType]..
.field private static int32 typeattr_sometype_of_datatype_and_int
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 B4 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2
5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute
73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut
65 73 2B 44 61 74 61 54 79 70 65 2C 5B 53 79 73 // es+DataType,[Sys
74 65 6D 2E 49 6E 74 33 32 2C 20 6D 73 63 6F 72 // tem.Int32, mscor
6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 // lib, Version=4.0
2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 // .0.0, Culture=ne
75 74 72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 // utral, PublicKey
54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 // Token=b77a5c5619
33 34 65 30 38 39 5D 5D 00 00 ) // 34e089]]..
.field private static int32 typeattr_sometype_of_datatype_array_and_int
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 B6 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2
5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute
73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut
65 73 2B 44 61 74 61 54 79 70 65 5B 5D 2C 5B 53 // es+DataType[],[S
79 73 74 65 6D 2E 49 6E 74 33 32 2C 20 6D 73 63 // ystem.Int32, msc
6F 72 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D 34 // orlib, Version=4
2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 3D // .0.0.0, Culture=
6E 65 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 4B // neutral, PublicK
65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 36 // eyToken=b77a5c56
31 39 33 34 65 30 38 39 5D 5D 00 00 ) // 1934e089]]..
.field private static int32 typeattr_sometype_of_nested_sometype
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 E2 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2
5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute
73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut
65 73 2B 53 6F 6D 65 54 79 70 65 60 31 5B 43 75 // es+SomeType`1[Cu
73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2E 43 // stomAttributes.C
75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2B // ustomAttributes+
44 61 74 61 54 79 70 65 5D 2C 5B 53 79 73 74 65 // DataType],[Syste
6D 2E 49 6E 74 33 32 2C 20 6D 73 63 6F 72 6C 69 // m.Int32, mscorli
62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 // b, Version=4.0.0
2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 75 74 // .0, Culture=neut
72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 54 6F // ral, PublicKeyTo
6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 33 34 // ken=b77a5c561934
65 30 38 39 5D 5D 00 00 ) // e089]]..
.field private static int32 typeattr_sometype_of_int_and_datatype
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 B4 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2
5B 5B 53 79 73 74 65 6D 2E 49 6E 74 33 32 2C 20 // [[System.Int32,
6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F // mscorlib, Versio
6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 // n=4.0.0.0, Cultu
72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C // re=neutral, Publ
69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 // icKeyToken=b77a5
63 35 36 31 39 33 34 65 30 38 39 5D 2C 43 75 73 // c561934e089],Cus
74 6F 6D 41 74 74 72 69 62 75 74 65 73 2E 43 75 // tomAttributes.Cu
73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2B 44 // stomAttributes+D
61 74 61 54 79 70 65 5D 00 00 ) // ataType]..
.field private static int32 typeattr_array_of_int
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 5B 53 79 73 74 65 6D 2E 49 6E 74 33 32 5B // ..[System.Int32[
5D 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 // ], mscorlib, Ver
73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 // sion=4.0.0.0, Cu
6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 // lture=neutral, P
75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 // ublicKeyToken=b7
37 61 35 63 35 36 31 39 33 34 65 30 38 39 00 00 ) // 7a5c561934e089..
.field private static int32 typeattr_multidim_array_of_int
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 61 53 79 73 74 65 6D 2E 49 6E 74 33 32 5B // ..aSystem.Int32[
2C 5D 5B 2C 2C 2C 5D 2C 20 6D 73 63 6F 72 6C 69 // ,][,,,], mscorli
62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 // b, Version=4.0.0
2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 75 74 // .0, Culture=neut
72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 54 6F // ral, PublicKeyTo
6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 33 34 // ken=b77a5c561934
65 30 38 39 00 00 ) // e089..
.field private static int32 'field'
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 55 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 // ..U.CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 45 6E 75 6D 57 69 74 68 46 6C // butes+EnumWithFl
61 67 03 00 00 00 00 00 ) // ag......
.method public hidebysig specialname static
string get_Property() cil managed
{
// Code size 6 (0x6)
.maxstack 8
IL_0000: ldstr "aa"
IL_0005: ret
} // end of method CustomAttributes::get_Property
.method public hidebysig static void ObsoletedMethod() cil managed
{
.custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 0C 73 6F 6D 65 20 6D 65 73 73 61 67 65 00 // ...some message.
00 )
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method CustomAttributes::ObsoletedMethod
.method public hidebysig static void EnumArray() cil managed
{
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 1D 55 64 53 79 73 74 65 6D 2E 53 74 72 69 // ...UdSystem.Stri
6E 67 43 6F 6D 70 61 72 69 73 6F 6E 2C 20 6D 73 // ngComparison, ms
63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D // corlib, Version=
34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 // 4.0.0.0, Culture
3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 // =neutral, Public
4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 // KeyToken=b77a5c5
36 31 39 33 34 65 30 38 39 02 00 00 00 04 00 00 // 61934e089.......
00 00 00 00 00 00 00 )
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method CustomAttributes::EnumArray
.method public hidebysig static void BoxedEnumArray() cil managed
{
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 1D 51 02 00 00 00 55 64 53 79 73 74 65 6D // ...Q....UdSystem
2E 53 74 72 69 6E 67 43 6F 6D 70 61 72 69 73 6F // .StringCompariso
6E 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 // n, mscorlib, Ver
73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 // sion=4.0.0.0, Cu
6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 // lture=neutral, P
75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 // ublicKeyToken=b7
37 61 35 63 35 36 31 39 33 34 65 30 38 39 04 00 // 7a5c561934e089..
00 00 55 64 53 79 73 74 65 6D 2E 53 74 72 69 6E // ..UdSystem.Strin
67 43 6F 6D 70 61 72 69 73 6F 6E 2C 20 6D 73 63 // gComparison, msc
6F 72 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D 34 // orlib, Version=4
2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 3D // .0.0.0, Culture=
6E 65 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 4B // neutral, PublicK
65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 36 // eyToken=b77a5c56
31 39 33 34 65 30 38 39 00 00 00 00 00 00 ) // 1934e089......
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method CustomAttributes::BoxedEnumArray
.method public hidebysig static void BoxedLiteralsArray() cil managed
{
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 1D 51 13 00 00 00 08 01 00 00 00 09 02 00 // ...Q............
00 00 0A 03 00 00 00 00 00 00 00 0B 04 00 00 00
00 00 00 00 06 05 00 07 06 00 05 07 04 08 03 61 // ...............a
00 03 00 00 03 FF FE 03 FF FF 0C 00 00 80 3F 0D // ..............?.
00 00 00 00 00 00 00 40 0E 04 74 65 78 74 0E FF // .......@..text..
50 59 53 79 73 74 65 6D 2E 49 6E 74 33 32 2C 20 // PYSystem.Int32,
6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F // mscorlib, Versio
6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 // n=4.0.0.0, Cultu
72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C // re=neutral, Publ
69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 // icKeyToken=b77a5
63 35 36 31 39 33 34 65 30 38 39 1D 51 01 00 00 // c561934e089.Q...
00 08 01 00 00 00 1D 08 01 00 00 00 01 00 00 00
00 00 )
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method CustomAttributes::BoxedLiteralsArray
.property string Property()
{
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 55 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 // ..U.CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 45 6E 75 6D 57 69 74 68 46 6C // butes+EnumWithFl
61 67 0F 00 00 00 00 00 ) // ag......
.get string CustomAttributes.CustomAttributes::get_Property()
} // end of property CustomAttributes::Property
} // end of class CustomAttributes.CustomAttributes
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

344
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributes.opt.roslyn.il

@ -1,344 +0,0 @@ @@ -1,344 +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 CustomAttributes
{
.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 CustomAttributes.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 abstract auto ansi sealed beforefieldinit CustomAttributes.CustomAttributes
extends [mscorlib]System.Object
{
.class auto ansi sealed nested public EnumWithFlag
extends [mscorlib]System.Enum
{
.custom instance void [mscorlib]System.FlagsAttribute::.ctor() = ( 01 00 00 00 )
.field public specialname rtspecialname int32 value__
.field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag All = int32(0x0000000F)
.field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag None = int32(0x00000000)
.field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item1 = int32(0x00000001)
.field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item2 = int32(0x00000002)
.field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item3 = int32(0x00000004)
.field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item4 = int32(0x00000008)
} // end of class EnumWithFlag
.class auto ansi nested public beforefieldinit MyAttribute
extends [mscorlib]System.Attribute
{
.custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 )
.method public hidebysig specialname rtspecialname
instance void .ctor(object val) 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 MyAttribute::.ctor
} // end of class MyAttribute
.class auto ansi sealed nested public ULongEnum
extends [mscorlib]System.Enum
{
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 55 2B 43 75 73 74 6F 6D 41 74 74 72 69 62 // ..U+CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 55 4C 6F 6E 67 45 6E 75 6D FF // butes+ULongEnum.
FF FF FF FF FF FF FF 00 00 )
.field public specialname rtspecialname uint64 value__
.field public static literal valuetype CustomAttributes.CustomAttributes/ULongEnum MaxUInt64 = uint64(0xFFFFFFFFFFFFFFFF)
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 0E FF 00 00 )
} // end of class ULongEnum
.class auto ansi nested public beforefieldinit TypesAttribute
extends [mscorlib]System.Attribute
{
.custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 00 01 00 00 00 00 )
.method public hidebysig specialname rtspecialname
instance void .ctor(class [mscorlib]System.Type 'type') 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 TypesAttribute::.ctor
} // end of class TypesAttribute
.class auto ansi nested private beforefieldinit SomeType`1<T>
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 SomeType`1::.ctor
} // end of class SomeType`1
.class auto ansi nested private beforefieldinit SomeType`2<K,V>
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 SomeType`2::.ctor
} // end of class SomeType`2
.class sequential ansi sealed nested private beforefieldinit DataType
extends [mscorlib]System.ValueType
{
.field private int32 i
} // end of class DataType
.field private static int32 typeattr_int
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 59 53 79 73 74 65 6D 2E 49 6E 74 33 32 2C // ..YSystem.Int32,
20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 // mscorlib, Versi
6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 // on=4.0.0.0, Cult
75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 // ure=neutral, Pub
6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 // licKeyToken=b77a
35 63 35 36 31 39 33 34 65 30 38 39 00 00 ) // 5c561934e089..
.field private static int32 typeattr_null
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 FF 00 00 )
.field private static int32 typeattr_list_of_int
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 CB 53 79 73 74 65 6D 2E 43 6F 6C 6C 65 // ....System.Colle
63 74 69 6F 6E 73 2E 47 65 6E 65 72 69 63 2E 4C // ctions.Generic.L
69 73 74 60 31 5B 5B 53 79 73 74 65 6D 2E 49 6E // ist`1[[System.In
74 33 32 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 // t32, mscorlib, V
65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 // ersion=4.0.0.0,
43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C // Culture=neutral,
20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D // PublicKeyToken=
62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 // b77a5c561934e089
5D 5D 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 // ]], mscorlib, Ve
72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 // rsion=4.0.0.0, C
75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 // ulture=neutral,
50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 // PublicKeyToken=b
37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 00 // 77a5c561934e089.
00 )
.field private static int32 typeattr_list_unbound
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 6E 53 79 73 74 65 6D 2E 43 6F 6C 6C 65 63 // ..nSystem.Collec
74 69 6F 6E 73 2E 47 65 6E 65 72 69 63 2E 4C 69 // tions.Generic.Li
73 74 60 31 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 // st`1, mscorlib,
56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C // Version=4.0.0.0,
20 43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C // Culture=neutral
2C 20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E // , PublicKeyToken
3D 62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 // =b77a5c561934e08
39 00 00 ) // 9..
.field private static int32 typeattr_sometype_of_datatype
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 58 43 75 73 74 6F 6D 41 74 74 72 69 62 75 // ..XCustomAttribu
74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 // tes.CustomAttrib
75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 31 5B // utes+SomeType`1[
43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 // CustomAttributes
2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // .CustomAttribute
73 2B 44 61 74 61 54 79 70 65 5D 00 00 ) // s+DataType]..
.field private static int32 typeattr_sometype_of_datatype2
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 83 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2
5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute
73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut
65 73 2B 44 61 74 61 54 79 70 65 2C 43 75 73 74 // es+DataType,Cust
6F 6D 41 74 74 72 69 62 75 74 65 73 2E 43 75 73 // omAttributes.Cus
74 6F 6D 41 74 74 72 69 62 75 74 65 73 2B 44 61 // tomAttributes+Da
74 61 54 79 70 65 5D 00 00 ) // taType]..
.field private static int32 typeattr_sometype_of_datatype_and_int
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 B4 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2
5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute
73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut
65 73 2B 44 61 74 61 54 79 70 65 2C 5B 53 79 73 // es+DataType,[Sys
74 65 6D 2E 49 6E 74 33 32 2C 20 6D 73 63 6F 72 // tem.Int32, mscor
6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 // lib, Version=4.0
2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 // .0.0, Culture=ne
75 74 72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 // utral, PublicKey
54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 // Token=b77a5c5619
33 34 65 30 38 39 5D 5D 00 00 ) // 34e089]]..
.field private static int32 typeattr_sometype_of_datatype_array_and_int
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 B6 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2
5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute
73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut
65 73 2B 44 61 74 61 54 79 70 65 5B 5D 2C 5B 53 // es+DataType[],[S
79 73 74 65 6D 2E 49 6E 74 33 32 2C 20 6D 73 63 // ystem.Int32, msc
6F 72 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D 34 // orlib, Version=4
2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 3D // .0.0.0, Culture=
6E 65 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 4B // neutral, PublicK
65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 36 // eyToken=b77a5c56
31 39 33 34 65 30 38 39 5D 5D 00 00 ) // 1934e089]]..
.field private static int32 typeattr_sometype_of_nested_sometype
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 E2 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2
5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute
73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut
65 73 2B 53 6F 6D 65 54 79 70 65 60 31 5B 43 75 // es+SomeType`1[Cu
73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2E 43 // stomAttributes.C
75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2B // ustomAttributes+
44 61 74 61 54 79 70 65 5D 2C 5B 53 79 73 74 65 // DataType],[Syste
6D 2E 49 6E 74 33 32 2C 20 6D 73 63 6F 72 6C 69 // m.Int32, mscorli
62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 // b, Version=4.0.0
2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 75 74 // .0, Culture=neut
72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 54 6F // ral, PublicKeyTo
6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 33 34 // ken=b77a5c561934
65 30 38 39 5D 5D 00 00 ) // e089]]..
.field private static int32 typeattr_sometype_of_int_and_datatype
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 B4 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2
5B 5B 53 79 73 74 65 6D 2E 49 6E 74 33 32 2C 20 // [[System.Int32,
6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F // mscorlib, Versio
6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 // n=4.0.0.0, Cultu
72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C // re=neutral, Publ
69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 // icKeyToken=b77a5
63 35 36 31 39 33 34 65 30 38 39 5D 2C 43 75 73 // c561934e089],Cus
74 6F 6D 41 74 74 72 69 62 75 74 65 73 2E 43 75 // tomAttributes.Cu
73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2B 44 // stomAttributes+D
61 74 61 54 79 70 65 5D 00 00 ) // ataType]..
.field private static int32 typeattr_array_of_int
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 5B 53 79 73 74 65 6D 2E 49 6E 74 33 32 5B // ..[System.Int32[
5D 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 // ], mscorlib, Ver
73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 // sion=4.0.0.0, Cu
6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 // lture=neutral, P
75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 // ublicKeyToken=b7
37 61 35 63 35 36 31 39 33 34 65 30 38 39 00 00 ) // 7a5c561934e089..
.field private static int32 typeattr_multidim_array_of_int
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 61 53 79 73 74 65 6D 2E 49 6E 74 33 32 5B // ..aSystem.Int32[
2C 5D 5B 2C 2C 2C 5D 2C 20 6D 73 63 6F 72 6C 69 // ,][,,,], mscorli
62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 // b, Version=4.0.0
2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 75 74 // .0, Culture=neut
72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 54 6F // ral, PublicKeyTo
6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 33 34 // ken=b77a5c561934
65 30 38 39 00 00 ) // e089..
.field private static int32 'field'
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 55 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 // ..U.CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 45 6E 75 6D 57 69 74 68 46 6C // butes+EnumWithFl
61 67 03 00 00 00 00 00 ) // ag......
.method public hidebysig specialname static
string get_Property() cil managed
{
// Code size 6 (0x6)
.maxstack 8
IL_0000: ldstr "aa"
IL_0005: ret
} // end of method CustomAttributes::get_Property
.method public hidebysig static void ObsoletedMethod() cil managed
{
.custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 0C 73 6F 6D 65 20 6D 65 73 73 61 67 65 00 // ...some message.
00 )
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method CustomAttributes::ObsoletedMethod
.method public hidebysig static void EnumArray() cil managed
{
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 1D 55 64 53 79 73 74 65 6D 2E 53 74 72 69 // ...UdSystem.Stri
6E 67 43 6F 6D 70 61 72 69 73 6F 6E 2C 20 6D 73 // ngComparison, ms
63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D // corlib, Version=
34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 // 4.0.0.0, Culture
3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 // =neutral, Public
4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 // KeyToken=b77a5c5
36 31 39 33 34 65 30 38 39 02 00 00 00 04 00 00 // 61934e089.......
00 00 00 00 00 00 00 )
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method CustomAttributes::EnumArray
.method public hidebysig static void BoxedEnumArray() cil managed
{
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 1D 51 02 00 00 00 55 64 53 79 73 74 65 6D // ...Q....UdSystem
2E 53 74 72 69 6E 67 43 6F 6D 70 61 72 69 73 6F // .StringCompariso
6E 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 // n, mscorlib, Ver
73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 // sion=4.0.0.0, Cu
6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 // lture=neutral, P
75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 // ublicKeyToken=b7
37 61 35 63 35 36 31 39 33 34 65 30 38 39 04 00 // 7a5c561934e089..
00 00 55 64 53 79 73 74 65 6D 2E 53 74 72 69 6E // ..UdSystem.Strin
67 43 6F 6D 70 61 72 69 73 6F 6E 2C 20 6D 73 63 // gComparison, msc
6F 72 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D 34 // orlib, Version=4
2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 3D // .0.0.0, Culture=
6E 65 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 4B // neutral, PublicK
65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 36 // eyToken=b77a5c56
31 39 33 34 65 30 38 39 00 00 00 00 00 00 ) // 1934e089......
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method CustomAttributes::BoxedEnumArray
.method public hidebysig static void BoxedLiteralsArray() cil managed
{
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 1D 51 13 00 00 00 08 01 00 00 00 09 02 00 // ...Q............
00 00 0A 03 00 00 00 00 00 00 00 0B 04 00 00 00
00 00 00 00 06 05 00 07 06 00 05 07 04 08 03 61 // ...............a
00 03 00 00 03 FF FE 03 FF FF 0C 00 00 80 3F 0D // ..............?.
00 00 00 00 00 00 00 40 0E 04 74 65 78 74 0E FF // .......@..text..
50 59 53 79 73 74 65 6D 2E 49 6E 74 33 32 2C 20 // PYSystem.Int32,
6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F // mscorlib, Versio
6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 // n=4.0.0.0, Cultu
72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C // re=neutral, Publ
69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 // icKeyToken=b77a5
63 35 36 31 39 33 34 65 30 38 39 1D 51 01 00 00 // c561934e089.Q...
00 08 01 00 00 00 1D 08 01 00 00 00 01 00 00 00
00 00 )
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method CustomAttributes::BoxedLiteralsArray
.property string Property()
{
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 55 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 // ..U.CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 45 6E 75 6D 57 69 74 68 46 6C // butes+EnumWithFl
61 67 0F 00 00 00 00 00 ) // ag......
.get string CustomAttributes.CustomAttributes::get_Property()
} // end of property CustomAttributes::Property
} // end of class CustomAttributes.CustomAttributes
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

360
ICSharpCode.Decompiler.Tests/TestCases/Pretty/CustomAttributes.roslyn.il

@ -1,360 +0,0 @@ @@ -1,360 +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 CustomAttributes
{
.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 CustomAttributes.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 abstract auto ansi sealed beforefieldinit CustomAttributes.CustomAttributes
extends [mscorlib]System.Object
{
.class auto ansi sealed nested public EnumWithFlag
extends [mscorlib]System.Enum
{
.custom instance void [mscorlib]System.FlagsAttribute::.ctor() = ( 01 00 00 00 )
.field public specialname rtspecialname int32 value__
.field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag All = int32(0x0000000F)
.field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag None = int32(0x00000000)
.field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item1 = int32(0x00000001)
.field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item2 = int32(0x00000002)
.field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item3 = int32(0x00000004)
.field public static literal valuetype CustomAttributes.CustomAttributes/EnumWithFlag Item4 = int32(0x00000008)
} // end of class EnumWithFlag
.class auto ansi nested public beforefieldinit MyAttribute
extends [mscorlib]System.Attribute
{
.custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 FF 7F 00 00 00 00 )
.method public hidebysig specialname rtspecialname
instance void .ctor(object val) 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 MyAttribute::.ctor
} // end of class MyAttribute
.class auto ansi sealed nested public ULongEnum
extends [mscorlib]System.Enum
{
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 55 2B 43 75 73 74 6F 6D 41 74 74 72 69 62 // ..U+CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 55 4C 6F 6E 67 45 6E 75 6D FF // butes+ULongEnum.
FF FF FF FF FF FF FF 00 00 )
.field public specialname rtspecialname uint64 value__
.field public static literal valuetype CustomAttributes.CustomAttributes/ULongEnum MaxUInt64 = uint64(0xFFFFFFFFFFFFFFFF)
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 0E FF 00 00 )
} // end of class ULongEnum
.class auto ansi nested public beforefieldinit TypesAttribute
extends [mscorlib]System.Attribute
{
.custom instance void [mscorlib]System.AttributeUsageAttribute::.ctor(valuetype [mscorlib]System.AttributeTargets) = ( 01 00 00 01 00 00 00 00 )
.method public hidebysig specialname rtspecialname
instance void .ctor(class [mscorlib]System.Type 'type') 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 TypesAttribute::.ctor
} // end of class TypesAttribute
.class auto ansi nested private beforefieldinit SomeType`1<T>
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 SomeType`1::.ctor
} // end of class SomeType`1
.class auto ansi nested private beforefieldinit SomeType`2<K,V>
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 SomeType`2::.ctor
} // end of class SomeType`2
.class sequential ansi sealed nested private beforefieldinit DataType
extends [mscorlib]System.ValueType
{
.field private int32 i
} // end of class DataType
.field private static int32 typeattr_int
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 59 53 79 73 74 65 6D 2E 49 6E 74 33 32 2C // ..YSystem.Int32,
20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 // mscorlib, Versi
6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 // on=4.0.0.0, Cult
75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 // ure=neutral, Pub
6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 // licKeyToken=b77a
35 63 35 36 31 39 33 34 65 30 38 39 00 00 ) // 5c561934e089..
.field private static int32 typeattr_null
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 FF 00 00 )
.field private static int32 typeattr_list_of_int
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 CB 53 79 73 74 65 6D 2E 43 6F 6C 6C 65 // ....System.Colle
63 74 69 6F 6E 73 2E 47 65 6E 65 72 69 63 2E 4C // ctions.Generic.L
69 73 74 60 31 5B 5B 53 79 73 74 65 6D 2E 49 6E // ist`1[[System.In
74 33 32 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 // t32, mscorlib, V
65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 // ersion=4.0.0.0,
43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C // Culture=neutral,
20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D // PublicKeyToken=
62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 // b77a5c561934e089
5D 5D 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 // ]], mscorlib, Ve
72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 // rsion=4.0.0.0, C
75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 // ulture=neutral,
50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 // PublicKeyToken=b
37 37 61 35 63 35 36 31 39 33 34 65 30 38 39 00 // 77a5c561934e089.
00 )
.field private static int32 typeattr_list_unbound
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 6E 53 79 73 74 65 6D 2E 43 6F 6C 6C 65 63 // ..nSystem.Collec
74 69 6F 6E 73 2E 47 65 6E 65 72 69 63 2E 4C 69 // tions.Generic.Li
73 74 60 31 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 // st`1, mscorlib,
56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C // Version=4.0.0.0,
20 43 75 6C 74 75 72 65 3D 6E 65 75 74 72 61 6C // Culture=neutral
2C 20 50 75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E // , PublicKeyToken
3D 62 37 37 61 35 63 35 36 31 39 33 34 65 30 38 // =b77a5c561934e08
39 00 00 ) // 9..
.field private static int32 typeattr_sometype_of_datatype
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 58 43 75 73 74 6F 6D 41 74 74 72 69 62 75 // ..XCustomAttribu
74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 // tes.CustomAttrib
75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 31 5B // utes+SomeType`1[
43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 // CustomAttributes
2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // .CustomAttribute
73 2B 44 61 74 61 54 79 70 65 5D 00 00 ) // s+DataType]..
.field private static int32 typeattr_sometype_of_datatype2
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 83 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2
5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute
73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut
65 73 2B 44 61 74 61 54 79 70 65 2C 43 75 73 74 // es+DataType,Cust
6F 6D 41 74 74 72 69 62 75 74 65 73 2E 43 75 73 // omAttributes.Cus
74 6F 6D 41 74 74 72 69 62 75 74 65 73 2B 44 61 // tomAttributes+Da
74 61 54 79 70 65 5D 00 00 ) // taType]..
.field private static int32 typeattr_sometype_of_datatype_and_int
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 B4 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2
5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute
73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut
65 73 2B 44 61 74 61 54 79 70 65 2C 5B 53 79 73 // es+DataType,[Sys
74 65 6D 2E 49 6E 74 33 32 2C 20 6D 73 63 6F 72 // tem.Int32, mscor
6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 // lib, Version=4.0
2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 // .0.0, Culture=ne
75 74 72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 // utral, PublicKey
54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 // Token=b77a5c5619
33 34 65 30 38 39 5D 5D 00 00 ) // 34e089]]..
.field private static int32 typeattr_sometype_of_datatype_array_and_int
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 B6 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2
5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute
73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut
65 73 2B 44 61 74 61 54 79 70 65 5B 5D 2C 5B 53 // es+DataType[],[S
79 73 74 65 6D 2E 49 6E 74 33 32 2C 20 6D 73 63 // ystem.Int32, msc
6F 72 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D 34 // orlib, Version=4
2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 3D // .0.0.0, Culture=
6E 65 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 4B // neutral, PublicK
65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 36 // eyToken=b77a5c56
31 39 33 34 65 30 38 39 5D 5D 00 00 ) // 1934e089]]..
.field private static int32 typeattr_sometype_of_nested_sometype
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 E2 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2
5B 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 // [CustomAttribute
73 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 75 74 // s.CustomAttribut
65 73 2B 53 6F 6D 65 54 79 70 65 60 31 5B 43 75 // es+SomeType`1[Cu
73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2E 43 // stomAttributes.C
75 73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2B // ustomAttributes+
44 61 74 61 54 79 70 65 5D 2C 5B 53 79 73 74 65 // DataType],[Syste
6D 2E 49 6E 74 33 32 2C 20 6D 73 63 6F 72 6C 69 // m.Int32, mscorli
62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 // b, Version=4.0.0
2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 75 74 // .0, Culture=neut
72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 54 6F // ral, PublicKeyTo
6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 33 34 // ken=b77a5c561934
65 30 38 39 5D 5D 00 00 ) // e089]]..
.field private static int32 typeattr_sometype_of_int_and_datatype
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 80 B4 43 75 73 74 6F 6D 41 74 74 72 69 62 // ....CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 53 6F 6D 65 54 79 70 65 60 32 // butes+SomeType`2
5B 5B 53 79 73 74 65 6D 2E 49 6E 74 33 32 2C 20 // [[System.Int32,
6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F // mscorlib, Versio
6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 // n=4.0.0.0, Cultu
72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C // re=neutral, Publ
69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 // icKeyToken=b77a5
63 35 36 31 39 33 34 65 30 38 39 5D 2C 43 75 73 // c561934e089],Cus
74 6F 6D 41 74 74 72 69 62 75 74 65 73 2E 43 75 // tomAttributes.Cu
73 74 6F 6D 41 74 74 72 69 62 75 74 65 73 2B 44 // stomAttributes+D
61 74 61 54 79 70 65 5D 00 00 ) // ataType]..
.field private static int32 typeattr_array_of_int
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 5B 53 79 73 74 65 6D 2E 49 6E 74 33 32 5B // ..[System.Int32[
5D 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 // ], mscorlib, Ver
73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 // sion=4.0.0.0, Cu
6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 // lture=neutral, P
75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 // ublicKeyToken=b7
37 61 35 63 35 36 31 39 33 34 65 30 38 39 00 00 ) // 7a5c561934e089..
.field private static int32 typeattr_multidim_array_of_int
.custom instance void CustomAttributes.CustomAttributes/TypesAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 61 53 79 73 74 65 6D 2E 49 6E 74 33 32 5B // ..aSystem.Int32[
2C 5D 5B 2C 2C 2C 5D 2C 20 6D 73 63 6F 72 6C 69 // ,][,,,], mscorli
62 2C 20 56 65 72 73 69 6F 6E 3D 34 2E 30 2E 30 // b, Version=4.0.0
2E 30 2C 20 43 75 6C 74 75 72 65 3D 6E 65 75 74 // .0, Culture=neut
72 61 6C 2C 20 50 75 62 6C 69 63 4B 65 79 54 6F // ral, PublicKeyTo
6B 65 6E 3D 62 37 37 61 35 63 35 36 31 39 33 34 // ken=b77a5c561934
65 30 38 39 00 00 ) // e089..
.field private static int32 'field'
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 55 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 // ..U.CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 45 6E 75 6D 57 69 74 68 46 6C // butes+EnumWithFl
61 67 03 00 00 00 00 00 ) // ag......
.method public hidebysig specialname static
string get_Property() cil managed
{
// Code size 11 (0xb)
.maxstack 1
.locals init (string V_0)
IL_0000: nop
IL_0001: ldstr "aa"
IL_0006: stloc.0
IL_0007: br.s IL_0009
IL_0009: ldloc.0
IL_000a: ret
} // end of method CustomAttributes::get_Property
.method public hidebysig static void ObsoletedMethod() cil managed
{
.custom instance void [mscorlib]System.ObsoleteAttribute::.ctor(string) = ( 01 00 0C 73 6F 6D 65 20 6D 65 73 73 61 67 65 00 // ...some message.
00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method CustomAttributes::ObsoletedMethod
.method public hidebysig static void EnumArray() cil managed
{
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 1D 55 64 53 79 73 74 65 6D 2E 53 74 72 69 // ...UdSystem.Stri
6E 67 43 6F 6D 70 61 72 69 73 6F 6E 2C 20 6D 73 // ngComparison, ms
63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D // corlib, Version=
34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 // 4.0.0.0, Culture
3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 // =neutral, Public
4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 // KeyToken=b77a5c5
36 31 39 33 34 65 30 38 39 02 00 00 00 04 00 00 // 61934e089.......
00 00 00 00 00 00 00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method CustomAttributes::EnumArray
.method public hidebysig static void BoxedEnumArray() cil managed
{
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 1D 51 02 00 00 00 55 64 53 79 73 74 65 6D // ...Q....UdSystem
2E 53 74 72 69 6E 67 43 6F 6D 70 61 72 69 73 6F // .StringCompariso
6E 2C 20 6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 // n, mscorlib, Ver
73 69 6F 6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 // sion=4.0.0.0, Cu
6C 74 75 72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 // lture=neutral, P
75 62 6C 69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 // ublicKeyToken=b7
37 61 35 63 35 36 31 39 33 34 65 30 38 39 04 00 // 7a5c561934e089..
00 00 55 64 53 79 73 74 65 6D 2E 53 74 72 69 6E // ..UdSystem.Strin
67 43 6F 6D 70 61 72 69 73 6F 6E 2C 20 6D 73 63 // gComparison, msc
6F 72 6C 69 62 2C 20 56 65 72 73 69 6F 6E 3D 34 // orlib, Version=4
2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 72 65 3D // .0.0.0, Culture=
6E 65 75 74 72 61 6C 2C 20 50 75 62 6C 69 63 4B // neutral, PublicK
65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 63 35 36 // eyToken=b77a5c56
31 39 33 34 65 30 38 39 00 00 00 00 00 00 ) // 1934e089......
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method CustomAttributes::BoxedEnumArray
.method public hidebysig static void BoxedLiteralsArray() cil managed
{
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 1D 51 13 00 00 00 08 01 00 00 00 09 02 00 // ...Q............
00 00 0A 03 00 00 00 00 00 00 00 0B 04 00 00 00
00 00 00 00 06 05 00 07 06 00 05 07 04 08 03 61 // ...............a
00 03 00 00 03 FF FE 03 FF FF 0C 00 00 80 3F 0D // ..............?.
00 00 00 00 00 00 00 40 0E 04 74 65 78 74 0E FF // .......@..text..
50 59 53 79 73 74 65 6D 2E 49 6E 74 33 32 2C 20 // PYSystem.Int32,
6D 73 63 6F 72 6C 69 62 2C 20 56 65 72 73 69 6F // mscorlib, Versio
6E 3D 34 2E 30 2E 30 2E 30 2C 20 43 75 6C 74 75 // n=4.0.0.0, Cultu
72 65 3D 6E 65 75 74 72 61 6C 2C 20 50 75 62 6C // re=neutral, Publ
69 63 4B 65 79 54 6F 6B 65 6E 3D 62 37 37 61 35 // icKeyToken=b77a5
63 35 36 31 39 33 34 65 30 38 39 1D 51 01 00 00 // c561934e089.Q...
00 08 01 00 00 00 1D 08 01 00 00 00 01 00 00 00
00 00 )
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method CustomAttributes::BoxedLiteralsArray
.property string Property()
{
.custom instance void CustomAttributes.CustomAttributes/MyAttribute::.ctor(object) = ( 01 00 55 2E 43 75 73 74 6F 6D 41 74 74 72 69 62 // ..U.CustomAttrib
75 74 65 73 2E 43 75 73 74 6F 6D 41 74 74 72 69 // utes.CustomAttri
62 75 74 65 73 2B 45 6E 75 6D 57 69 74 68 46 6C // butes+EnumWithFl
61 67 0F 00 00 00 00 00 ) // ag......
.get string CustomAttributes.CustomAttributes::get_Property()
} // end of property CustomAttributes::Property
} // end of class CustomAttributes.CustomAttributes
// =============================================================
// *********** DISASSEMBLY COMPLETE ***********************

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save