Browse Source

Merge branch 'master' of https://github.com/icsharpcode/ILSpy into srm

pull/1198/head
Siegfried Pammer 8 years ago
parent
commit
9f455c3530
  1. 2
      BuildTools/appveyor-install.ps1
  2. 2
      BuildTools/update-assemblyinfo.ps1
  3. 2
      DecompilerNuGetDemos.workbook
  4. 4
      ICSharpCode.Decompiler.Console/ICSharpCode.Decompiler.Console.csproj
  5. 4
      ICSharpCode.Decompiler.PowerShell/ICSharpCode.Decompiler.PowerShell.csproj
  6. 2
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/FixProxyCalls.cs
  7. 52
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/QualifierTests.cs
  8. 141
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/QualifierTests.il
  9. 123
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/QualifierTests.opt.il
  10. 200
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/QualifierTests.opt.roslyn.il
  11. 220
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/QualifierTests.roslyn.il
  12. 2
      ICSharpCode.Decompiler/CSharp/CallBuilder.cs
  13. 2
      ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs
  14. 2
      ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs
  15. 46
      ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs
  16. 42
      ILSpy.AddIn/Commands/OpenReferenceCommand.cs
  17. 2
      ILSpy.AddIn/source.extension.vsixmanifest
  18. 43
      ILSpy/Commands/RemoveAssembliesWithLoadErrors.cs
  19. 1
      ILSpy/ILSpy.csproj
  20. 2
      README.md
  21. 1
      appveyor.yml

2
BuildTools/appveyor-install.ps1

@ -3,7 +3,7 @@ $ErrorActionPreference = "Stop"
$baseCommit = "d779383cb85003d6dabeb976f0845631e07bf463"; $baseCommit = "d779383cb85003d6dabeb976f0845631e07bf463";
$baseCommitRev = 1; $baseCommitRev = 1;
$masterBranches = @("master", "3.0.x"); $masterBranches = @("master", "3.0.x", "3.1.x");
$globalAssemblyInfoTemplateFile = "ILSpy/Properties/AssemblyInfo.template.cs"; $globalAssemblyInfoTemplateFile = "ILSpy/Properties/AssemblyInfo.template.cs";

2
BuildTools/update-assemblyinfo.ps1

@ -3,7 +3,7 @@
$baseCommit = "d779383cb85003d6dabeb976f0845631e07bf463"; $baseCommit = "d779383cb85003d6dabeb976f0845631e07bf463";
$baseCommitRev = 1; $baseCommitRev = 1;
$masterBranches = @("master", "3.0.x"); $masterBranches = @("master", "3.0.x", "3.1.x");
$globalAssemblyInfoTemplateFile = "ILSpy/Properties/AssemblyInfo.template.cs"; $globalAssemblyInfoTemplateFile = "ILSpy/Properties/AssemblyInfo.template.cs";

2
DecompilerNuGetDemos.workbook

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

4
ICSharpCode.Decompiler.Console/ICSharpCode.Decompiler.Console.csproj

@ -13,8 +13,8 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="2.0.1" /> <PackageReference Include="McMaster.Extensions.CommandLineUtils" Version="2.2.0" />
<PackageReference Include="ICSharpCode.Decompiler" Version="3.1.0.3570-alpha1-debug" /> <PackageReference Include="ICSharpCode.Decompiler" Version="3.1.0.3652" />
<PackageReference Include="System.IO.FileSystem.Primitives" Version="4.3.0" /> <PackageReference Include="System.IO.FileSystem.Primitives" Version="4.3.0" />
<PackageReference Include="System.Runtime.Handles" Version="4.3.0" /> <PackageReference Include="System.Runtime.Handles" Version="4.3.0" />

4
ICSharpCode.Decompiler.PowerShell/ICSharpCode.Decompiler.PowerShell.csproj

@ -7,8 +7,8 @@
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="PowerShellStandard.Library" Version="3.0.0-preview-01" /> <PackageReference Include="PowerShellStandard.Library" Version="5.1.0-preview-03" />
<PackageReference Include="ICSharpCode.Decompiler" Version="3.1.0.3570-alpha1-debug" /> <PackageReference Include="ICSharpCode.Decompiler" Version="3.1.0.3652" />
</ItemGroup> </ItemGroup>
</Project> </Project>

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

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

52
ICSharpCode.Decompiler.Tests/TestCases/Pretty/QualifierTests.cs

@ -76,6 +76,58 @@ namespace ICSharpCode.Decompiler.Tests.Pretty
} }
} }
internal class Parent
{
public virtual void Virtual()
{
}
public virtual void NewVirtual()
{
}
public void New()
{
}
public void BaseOnly()
{
}
}
internal class Child : Parent
{
public override void Virtual()
{
base.Virtual();
}
public new void NewVirtual()
{
base.NewVirtual();
}
public new void New()
{
base.New();
}
public void BaseQualifiers()
{
Virtual();
base.Virtual();
NewVirtual();
base.NewVirtual();
New();
base.New();
BaseOnly();
}
}
private int fieldConflict; private int fieldConflict;
private int innerConflict; private int innerConflict;

141
ICSharpCode.Decompiler.Tests/TestCases/Pretty/QualifierTests.il

@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -15,7 +13,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0 .ver 4:0:0:0
} }
.assembly zgfoqdfc .assembly QualifierTests
{ {
.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 .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. 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
@ -26,15 +24,13 @@
.hash algorithm 0x00008004 .hash algorithm 0x00008004
.ver 0:0:0:0 .ver 0:0:0:0
} }
.module zgfoqdfc.dll .module QualifierTests.dll
// MVID: {1C0110BE-438D-48BD-8A01-FFE7CCD962C7}
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x10000000 .imagebase 0x10000000
.file alignment 0x00000200 .file alignment 0x00000200
.stackreserve 0x00100000 .stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI .subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY .corflags 0x00000001 // ILONLY
// Image base: 0x00810000
// =============== CLASS MEMBERS DECLARATION =================== // =============== CLASS MEMBERS DECLARATION ===================
@ -208,6 +204,138 @@
} // end of class Test } // end of class Test
.class auto ansi nested assembly beforefieldinit Parent
extends [mscorlib]System.Object
{
.method public hidebysig newslot virtual
instance void Virtual() cil managed
{
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method Parent::Virtual
.method public hidebysig newslot virtual
instance void NewVirtual() cil managed
{
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method Parent::NewVirtual
.method public hidebysig instance void
New() cil managed
{
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method Parent::New
.method public hidebysig instance void
BaseOnly() cil managed
{
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method Parent::BaseOnly
.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 Parent::.ctor
} // end of class Parent
.class auto ansi nested assembly beforefieldinit Child
extends ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent
{
.method public hidebysig virtual instance void
Virtual() cil managed
{
// Code size 9 (0x9)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.0
IL_0002: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::Virtual()
IL_0007: nop
IL_0008: ret
} // end of method Child::Virtual
.method public hidebysig instance void
NewVirtual() cil managed
{
// Code size 9 (0x9)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.0
IL_0002: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::NewVirtual()
IL_0007: nop
IL_0008: ret
} // end of method Child::NewVirtual
.method public hidebysig instance void
New() cil managed
{
// Code size 9 (0x9)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.0
IL_0002: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::New()
IL_0007: nop
IL_0008: ret
} // end of method Child::New
.method public hidebysig instance void
BaseQualifiers() cil managed
{
// Code size 51 (0x33)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.0
IL_0002: callvirt instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::Virtual()
IL_0007: nop
IL_0008: ldarg.0
IL_0009: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::Virtual()
IL_000e: nop
IL_000f: ldarg.0
IL_0010: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Child::NewVirtual()
IL_0015: nop
IL_0016: ldarg.0
IL_0017: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::NewVirtual()
IL_001c: nop
IL_001d: ldarg.0
IL_001e: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Child::New()
IL_0023: nop
IL_0024: ldarg.0
IL_0025: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::New()
IL_002a: nop
IL_002b: ldarg.0
IL_002c: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::BaseOnly()
IL_0031: nop
IL_0032: ret
} // end of method Child::BaseQualifiers
.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 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::.ctor()
IL_0006: ret
} // end of method Child::.ctor
} // end of class Child
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass1' .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass1'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
@ -609,4 +737,3 @@
// ============================================================= // =============================================================
// *********** DISASSEMBLY COMPLETE *********************** // *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file C:\Users\Siegfried\Projects\ILSpy\ICSharpCode.Decompiler.Tests\bin\Debug\net46\../../../TestCases/Pretty\QualifierTests.res

123
ICSharpCode.Decompiler.Tests/TestCases/Pretty/QualifierTests.opt.il

@ -1,6 +1,4 @@
// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0
// Copyright (c) Microsoft Corporation. All rights reserved.
@ -15,7 +13,7 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0 .ver 4:0:0:0
} }
.assembly a2ezv3zo .assembly QualifierTests.opt
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx .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. 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows.
@ -26,15 +24,13 @@
.hash algorithm 0x00008004 .hash algorithm 0x00008004
.ver 0:0:0:0 .ver 0:0:0:0
} }
.module a2ezv3zo.dll .module QualifierTests.opt.dll
// MVID: {7C524CF6-1164-4EF8-B967-C3D2C3C0FCC5}
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x10000000 .imagebase 0x10000000
.file alignment 0x00000200 .file alignment 0x00000200
.stackreserve 0x00100000 .stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI .subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY .corflags 0x00000001 // ILONLY
// Image base: 0x030E0000
// =============== CLASS MEMBERS DECLARATION =================== // =============== CLASS MEMBERS DECLARATION ===================
@ -183,6 +179,120 @@
} // end of class Test } // end of class Test
.class auto ansi nested assembly beforefieldinit Parent
extends [mscorlib]System.Object
{
.method public hidebysig newslot virtual
instance void Virtual() cil managed
{
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method Parent::Virtual
.method public hidebysig newslot virtual
instance void NewVirtual() cil managed
{
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method Parent::NewVirtual
.method public hidebysig instance void
New() cil managed
{
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method Parent::New
.method public hidebysig instance void
BaseOnly() cil managed
{
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method Parent::BaseOnly
.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 Parent::.ctor
} // end of class Parent
.class auto ansi nested assembly beforefieldinit Child
extends ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent
{
.method public hidebysig virtual instance void
Virtual() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::Virtual()
IL_0006: ret
} // end of method Child::Virtual
.method public hidebysig instance void
NewVirtual() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::NewVirtual()
IL_0006: ret
} // end of method Child::NewVirtual
.method public hidebysig instance void
New() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::New()
IL_0006: ret
} // end of method Child::New
.method public hidebysig instance void
BaseQualifiers() cil managed
{
// Code size 43 (0x2b)
.maxstack 8
IL_0000: ldarg.0
IL_0001: callvirt instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::Virtual()
IL_0006: ldarg.0
IL_0007: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::Virtual()
IL_000c: ldarg.0
IL_000d: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Child::NewVirtual()
IL_0012: ldarg.0
IL_0013: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::NewVirtual()
IL_0018: ldarg.0
IL_0019: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Child::New()
IL_001e: ldarg.0
IL_001f: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::New()
IL_0024: ldarg.0
IL_0025: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::BaseOnly()
IL_002a: ret
} // end of method Child::BaseQualifiers
.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 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::.ctor()
IL_0006: ret
} // end of method Child::.ctor
} // end of class Child
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass1' .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass1'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
@ -530,4 +640,3 @@
// ============================================================= // =============================================================
// *********** DISASSEMBLY COMPLETE *********************** // *********** DISASSEMBLY COMPLETE ***********************
// WARNING: Created Win32 resource file C:\Users\Siegfried\Projects\ILSpy\ICSharpCode.Decompiler.Tests\bin\Debug\net46\../../../TestCases/Pretty\QualifierTests.opt.res

200
ICSharpCode.Decompiler.Tests/TestCases/Pretty/QualifierTests.opt.roslyn.il

@ -183,7 +183,121 @@
} // end of class Test } // end of class Test
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass12_0' .class auto ansi nested assembly beforefieldinit Parent
extends [mscorlib]System.Object
{
.method public hidebysig newslot virtual
instance void Virtual() cil managed
{
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method Parent::Virtual
.method public hidebysig newslot virtual
instance void NewVirtual() cil managed
{
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method Parent::NewVirtual
.method public hidebysig instance void
New() cil managed
{
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method Parent::New
.method public hidebysig instance void
BaseOnly() cil managed
{
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method Parent::BaseOnly
.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 Parent::.ctor
} // end of class Parent
.class auto ansi nested assembly beforefieldinit Child
extends ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent
{
.method public hidebysig virtual instance void
Virtual() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::Virtual()
IL_0006: ret
} // end of method Child::Virtual
.method public hidebysig instance void
NewVirtual() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::NewVirtual()
IL_0006: ret
} // end of method Child::NewVirtual
.method public hidebysig instance void
New() cil managed
{
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::New()
IL_0006: ret
} // end of method Child::New
.method public hidebysig instance void
BaseQualifiers() cil managed
{
// Code size 43 (0x2b)
.maxstack 8
IL_0000: ldarg.0
IL_0001: callvirt instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::Virtual()
IL_0006: ldarg.0
IL_0007: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::Virtual()
IL_000c: ldarg.0
IL_000d: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Child::NewVirtual()
IL_0012: ldarg.0
IL_0013: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::NewVirtual()
IL_0018: ldarg.0
IL_0019: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Child::New()
IL_001e: ldarg.0
IL_001f: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::New()
IL_0024: ldarg.0
IL_0025: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::BaseOnly()
IL_002a: ret
} // end of method Child::BaseQualifiers
.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 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::.ctor()
IL_0006: ret
} // end of method Child::.ctor
} // end of class Child
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass14_0'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
@ -196,7 +310,7 @@
IL_0000: ldarg.0 IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret IL_0006: ret
} // end of method '<>c__DisplayClass12_0'::.ctor } // end of method '<>c__DisplayClass14_0'::.ctor
.method assembly hidebysig instance int32 .method assembly hidebysig instance int32
'<Conflicts>b__0'() cil managed '<Conflicts>b__0'() cil managed
@ -204,13 +318,13 @@
// Code size 7 (0x7) // Code size 7 (0x7)
.maxstack 8 .maxstack 8
IL_0000: ldarg.0 IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass12_0'::conflictWithVariable IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass14_0'::conflictWithVariable
IL_0006: ret IL_0006: ret
} // end of method '<>c__DisplayClass12_0'::'<Conflicts>b__0' } // end of method '<>c__DisplayClass14_0'::'<Conflicts>b__0'
} // end of class '<>c__DisplayClass12_0' } // end of class '<>c__DisplayClass14_0'
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass13_0' .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass15_0'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
@ -224,7 +338,7 @@
IL_0000: ldarg.0 IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret IL_0006: ret
} // end of method '<>c__DisplayClass13_0'::.ctor } // end of method '<>c__DisplayClass15_0'::.ctor
.method assembly hidebysig instance int32 .method assembly hidebysig instance int32
'<Capturing>b__0'() cil managed '<Capturing>b__0'() cil managed
@ -232,53 +346,53 @@
// Code size 19 (0x13) // Code size 19 (0x13)
.maxstack 8 .maxstack 8
IL_0000: ldarg.0 IL_0000: ldarg.0
IL_0001: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0'::'<>4__this' IL_0001: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0'::'<>4__this'
IL_0006: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::fieldConflict IL_0006: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::fieldConflict
IL_000b: ldarg.0 IL_000b: ldarg.0
IL_000c: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0'::fieldConflict IL_000c: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0'::fieldConflict
IL_0011: add IL_0011: add
IL_0012: ret IL_0012: ret
} // end of method '<>c__DisplayClass13_0'::'<Capturing>b__0' } // end of method '<>c__DisplayClass15_0'::'<Capturing>b__0'
.method assembly hidebysig instance int32 .method assembly hidebysig instance int32
'<Capturing>b__1'() cil managed '<Capturing>b__1'() cil managed
{ {
// Code size 63 (0x3f) // Code size 63 (0x3f)
.maxstack 4 .maxstack 4
.locals init (class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_1' V_0) .locals init (class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_1' V_0)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_1'::.ctor() IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_1'::.ctor()
IL_0005: stloc.0 IL_0005: stloc.0
IL_0006: ldloc.0 IL_0006: ldloc.0
IL_0007: ldarg.0 IL_0007: ldarg.0
IL_0008: stfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0' ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_1'::'CS$<>8__locals1' IL_0008: stfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0' ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_1'::'CS$<>8__locals1'
IL_000d: ldloc.0 IL_000d: ldloc.0
IL_000e: ldc.i4.5 IL_000e: ldc.i4.5
IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_1'::innerConflict IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_1'::innerConflict
IL_0014: ldarg.0 IL_0014: ldarg.0
IL_0015: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0'::'<>4__this' IL_0015: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0'::'<>4__this'
IL_001a: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::fieldConflict IL_001a: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::fieldConflict
IL_001f: ldarg.0 IL_001f: ldarg.0
IL_0020: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0'::fieldConflict IL_0020: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0'::fieldConflict
IL_0025: add IL_0025: add
IL_0026: ldarg.0 IL_0026: ldarg.0
IL_0027: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0'::'<>4__this' IL_0027: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0'::'<>4__this'
IL_002c: ldloc.0 IL_002c: ldloc.0
IL_002d: ldftn instance int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_1'::'<Capturing>b__2'() IL_002d: ldftn instance int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_1'::'<Capturing>b__2'()
IL_0033: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object, IL_0033: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object,
native int) native int)
IL_0038: call instance int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::Capturer2(class [mscorlib]System.Func`1<int32>) IL_0038: call instance int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::Capturer2(class [mscorlib]System.Func`1<int32>)
IL_003d: add IL_003d: add
IL_003e: ret IL_003e: ret
} // end of method '<>c__DisplayClass13_0'::'<Capturing>b__1' } // end of method '<>c__DisplayClass15_0'::'<Capturing>b__1'
} // end of class '<>c__DisplayClass13_0' } // end of class '<>c__DisplayClass15_0'
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass13_1' .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass15_1'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public int32 innerConflict .field public int32 innerConflict
.field public class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0' 'CS$<>8__locals1' .field public class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0' 'CS$<>8__locals1'
.method public hidebysig specialname rtspecialname .method public hidebysig specialname rtspecialname
instance void .ctor() cil managed instance void .ctor() cil managed
{ {
@ -287,7 +401,7 @@
IL_0000: ldarg.0 IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: ret IL_0006: ret
} // end of method '<>c__DisplayClass13_1'::.ctor } // end of method '<>c__DisplayClass15_1'::.ctor
.method assembly hidebysig instance int32 .method assembly hidebysig instance int32
'<Capturing>b__2'() cil managed '<Capturing>b__2'() cil managed
@ -295,25 +409,25 @@
// Code size 53 (0x35) // Code size 53 (0x35)
.maxstack 8 .maxstack 8
IL_0000: ldarg.0 IL_0000: ldarg.0
IL_0001: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0' ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_1'::'CS$<>8__locals1' IL_0001: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0' ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_1'::'CS$<>8__locals1'
IL_0006: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0'::'<>4__this' IL_0006: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0'::'<>4__this'
IL_000b: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::innerConflict IL_000b: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::innerConflict
IL_0010: ldarg.0 IL_0010: ldarg.0
IL_0011: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_1'::innerConflict IL_0011: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_1'::innerConflict
IL_0016: add IL_0016: add
IL_0017: ldarg.0 IL_0017: ldarg.0
IL_0018: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0' ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_1'::'CS$<>8__locals1' IL_0018: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0' ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_1'::'CS$<>8__locals1'
IL_001d: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0'::'<>4__this' IL_001d: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0'::'<>4__this'
IL_0022: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::fieldConflict IL_0022: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::fieldConflict
IL_0027: add IL_0027: add
IL_0028: ldarg.0 IL_0028: ldarg.0
IL_0029: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0' ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_1'::'CS$<>8__locals1' IL_0029: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0' ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_1'::'CS$<>8__locals1'
IL_002e: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0'::fieldConflict IL_002e: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0'::fieldConflict
IL_0033: add IL_0033: add
IL_0034: ret IL_0034: ret
} // end of method '<>c__DisplayClass13_1'::'<Capturing>b__2' } // end of method '<>c__DisplayClass15_1'::'<Capturing>b__2'
} // end of class '<>c__DisplayClass13_1' } // end of class '<>c__DisplayClass15_1'
.field private int32 fieldConflict .field private int32 fieldConflict
.field private int32 innerConflict .field private int32 innerConflict
@ -405,19 +519,19 @@
{ {
// Code size 44 (0x2c) // Code size 44 (0x2c)
.maxstack 3 .maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass12_0' V_0) .locals init (class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass14_0' V_0)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass12_0'::.ctor() IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass14_0'::.ctor()
IL_0005: stloc.0 IL_0005: stloc.0
IL_0006: ldloc.0 IL_0006: ldloc.0
IL_0007: ldc.i4.5 IL_0007: ldc.i4.5
IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass12_0'::conflictWithVariable IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass14_0'::conflictWithVariable
IL_000d: ldarg.0 IL_000d: ldarg.0
IL_000e: ldloc.0 IL_000e: ldloc.0
IL_000f: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass12_0'::conflictWithVariable IL_000f: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass14_0'::conflictWithVariable
IL_0014: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::conflictWithVariable(int32) IL_0014: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::conflictWithVariable(int32)
IL_0019: ldarg.0 IL_0019: ldarg.0
IL_001a: ldloc.0 IL_001a: ldloc.0
IL_001b: ldftn instance int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass12_0'::'<Conflicts>b__0'() IL_001b: ldftn instance int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass14_0'::'<Conflicts>b__0'()
IL_0021: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object, IL_0021: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object,
native int) native int)
IL_0026: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::Capturer(class [mscorlib]System.Func`1<int32>) IL_0026: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::Capturer(class [mscorlib]System.Func`1<int32>)
@ -429,24 +543,24 @@
{ {
// Code size 57 (0x39) // Code size 57 (0x39)
.maxstack 3 .maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0' V_0) .locals init (class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0' V_0)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0'::.ctor() IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0'::.ctor()
IL_0005: stloc.0 IL_0005: stloc.0
IL_0006: ldloc.0 IL_0006: ldloc.0
IL_0007: ldarg.0 IL_0007: ldarg.0
IL_0008: stfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0'::'<>4__this' IL_0008: stfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0'::'<>4__this'
IL_000d: ldloc.0 IL_000d: ldloc.0
IL_000e: ldc.i4.5 IL_000e: ldc.i4.5
IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0'::fieldConflict IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0'::fieldConflict
IL_0014: ldarg.0 IL_0014: ldarg.0
IL_0015: ldloc.0 IL_0015: ldloc.0
IL_0016: ldftn instance int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0'::'<Capturing>b__0'() IL_0016: ldftn instance int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0'::'<Capturing>b__0'()
IL_001c: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object, IL_001c: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object,
native int) native int)
IL_0021: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::Capturer(class [mscorlib]System.Func`1<int32>) IL_0021: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::Capturer(class [mscorlib]System.Func`1<int32>)
IL_0026: ldarg.0 IL_0026: ldarg.0
IL_0027: ldloc.0 IL_0027: ldloc.0
IL_0028: ldftn instance int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0'::'<Capturing>b__1'() IL_0028: ldftn instance int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0'::'<Capturing>b__1'()
IL_002e: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object, IL_002e: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object,
native int) native int)
IL_0033: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::Capturer(class [mscorlib]System.Func`1<int32>) IL_0033: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::Capturer(class [mscorlib]System.Func`1<int32>)

220
ICSharpCode.Decompiler.Tests/TestCases/Pretty/QualifierTests.roslyn.il

@ -208,7 +208,141 @@
} // end of class Test } // end of class Test
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass12_0' .class auto ansi nested assembly beforefieldinit Parent
extends [mscorlib]System.Object
{
.method public hidebysig newslot virtual
instance void Virtual() cil managed
{
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method Parent::Virtual
.method public hidebysig newslot virtual
instance void NewVirtual() cil managed
{
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method Parent::NewVirtual
.method public hidebysig instance void
New() cil managed
{
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method Parent::New
.method public hidebysig instance void
BaseOnly() cil managed
{
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method Parent::BaseOnly
.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 Parent::.ctor
} // end of class Parent
.class auto ansi nested assembly beforefieldinit Child
extends ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent
{
.method public hidebysig virtual instance void
Virtual() cil managed
{
// Code size 9 (0x9)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.0
IL_0002: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::Virtual()
IL_0007: nop
IL_0008: ret
} // end of method Child::Virtual
.method public hidebysig instance void
NewVirtual() cil managed
{
// Code size 9 (0x9)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.0
IL_0002: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::NewVirtual()
IL_0007: nop
IL_0008: ret
} // end of method Child::NewVirtual
.method public hidebysig instance void
New() cil managed
{
// Code size 9 (0x9)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.0
IL_0002: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::New()
IL_0007: nop
IL_0008: ret
} // end of method Child::New
.method public hidebysig instance void
BaseQualifiers() cil managed
{
// Code size 51 (0x33)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.0
IL_0002: callvirt instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::Virtual()
IL_0007: nop
IL_0008: ldarg.0
IL_0009: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::Virtual()
IL_000e: nop
IL_000f: ldarg.0
IL_0010: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Child::NewVirtual()
IL_0015: nop
IL_0016: ldarg.0
IL_0017: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::NewVirtual()
IL_001c: nop
IL_001d: ldarg.0
IL_001e: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Child::New()
IL_0023: nop
IL_0024: ldarg.0
IL_0025: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::New()
IL_002a: nop
IL_002b: ldarg.0
IL_002c: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::BaseOnly()
IL_0031: nop
IL_0032: ret
} // end of method Child::BaseQualifiers
.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 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/Parent::.ctor()
IL_0006: nop
IL_0007: ret
} // end of method Child::.ctor
} // end of class Child
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass14_0'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
@ -222,7 +356,7 @@
IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop IL_0006: nop
IL_0007: ret IL_0007: ret
} // end of method '<>c__DisplayClass12_0'::.ctor } // end of method '<>c__DisplayClass14_0'::.ctor
.method assembly hidebysig instance int32 .method assembly hidebysig instance int32
'<Conflicts>b__0'() cil managed '<Conflicts>b__0'() cil managed
@ -230,13 +364,13 @@
// Code size 7 (0x7) // Code size 7 (0x7)
.maxstack 8 .maxstack 8
IL_0000: ldarg.0 IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass12_0'::conflictWithVariable IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass14_0'::conflictWithVariable
IL_0006: ret IL_0006: ret
} // end of method '<>c__DisplayClass12_0'::'<Conflicts>b__0' } // end of method '<>c__DisplayClass14_0'::'<Conflicts>b__0'
} // end of class '<>c__DisplayClass12_0' } // end of class '<>c__DisplayClass14_0'
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass13_0' .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass15_0'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
@ -251,7 +385,7 @@
IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop IL_0006: nop
IL_0007: ret IL_0007: ret
} // end of method '<>c__DisplayClass13_0'::.ctor } // end of method '<>c__DisplayClass15_0'::.ctor
.method assembly hidebysig instance int32 .method assembly hidebysig instance int32
'<Capturing>b__0'() cil managed '<Capturing>b__0'() cil managed
@ -259,40 +393,40 @@
// Code size 19 (0x13) // Code size 19 (0x13)
.maxstack 8 .maxstack 8
IL_0000: ldarg.0 IL_0000: ldarg.0
IL_0001: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0'::'<>4__this' IL_0001: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0'::'<>4__this'
IL_0006: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::fieldConflict IL_0006: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::fieldConflict
IL_000b: ldarg.0 IL_000b: ldarg.0
IL_000c: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0'::fieldConflict IL_000c: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0'::fieldConflict
IL_0011: add IL_0011: add
IL_0012: ret IL_0012: ret
} // end of method '<>c__DisplayClass13_0'::'<Capturing>b__0' } // end of method '<>c__DisplayClass15_0'::'<Capturing>b__0'
.method assembly hidebysig instance int32 .method assembly hidebysig instance int32
'<Capturing>b__1'() cil managed '<Capturing>b__1'() cil managed
{ {
// Code size 68 (0x44) // Code size 68 (0x44)
.maxstack 4 .maxstack 4
.locals init (class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_1' V_0, .locals init (class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_1' V_0,
int32 V_1) int32 V_1)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_1'::.ctor() IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_1'::.ctor()
IL_0005: stloc.0 IL_0005: stloc.0
IL_0006: ldloc.0 IL_0006: ldloc.0
IL_0007: ldarg.0 IL_0007: ldarg.0
IL_0008: stfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0' ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_1'::'CS$<>8__locals1' IL_0008: stfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0' ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_1'::'CS$<>8__locals1'
IL_000d: nop IL_000d: nop
IL_000e: ldloc.0 IL_000e: ldloc.0
IL_000f: ldc.i4.5 IL_000f: ldc.i4.5
IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_1'::innerConflict IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_1'::innerConflict
IL_0015: ldarg.0 IL_0015: ldarg.0
IL_0016: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0'::'<>4__this' IL_0016: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0'::'<>4__this'
IL_001b: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::fieldConflict IL_001b: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::fieldConflict
IL_0020: ldarg.0 IL_0020: ldarg.0
IL_0021: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0'::fieldConflict IL_0021: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0'::fieldConflict
IL_0026: add IL_0026: add
IL_0027: ldarg.0 IL_0027: ldarg.0
IL_0028: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0'::'<>4__this' IL_0028: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0'::'<>4__this'
IL_002d: ldloc.0 IL_002d: ldloc.0
IL_002e: ldftn instance int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_1'::'<Capturing>b__2'() IL_002e: ldftn instance int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_1'::'<Capturing>b__2'()
IL_0034: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object, IL_0034: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object,
native int) native int)
IL_0039: call instance int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::Capturer2(class [mscorlib]System.Func`1<int32>) IL_0039: call instance int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::Capturer2(class [mscorlib]System.Func`1<int32>)
@ -302,16 +436,16 @@
IL_0042: ldloc.1 IL_0042: ldloc.1
IL_0043: ret IL_0043: ret
} // end of method '<>c__DisplayClass13_0'::'<Capturing>b__1' } // end of method '<>c__DisplayClass15_0'::'<Capturing>b__1'
} // end of class '<>c__DisplayClass13_0' } // end of class '<>c__DisplayClass15_0'
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass13_1' .class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass15_1'
extends [mscorlib]System.Object extends [mscorlib]System.Object
{ {
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public int32 innerConflict .field public int32 innerConflict
.field public class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0' 'CS$<>8__locals1' .field public class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0' 'CS$<>8__locals1'
.method public hidebysig specialname rtspecialname .method public hidebysig specialname rtspecialname
instance void .ctor() cil managed instance void .ctor() cil managed
{ {
@ -321,7 +455,7 @@
IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop IL_0006: nop
IL_0007: ret IL_0007: ret
} // end of method '<>c__DisplayClass13_1'::.ctor } // end of method '<>c__DisplayClass15_1'::.ctor
.method assembly hidebysig instance int32 .method assembly hidebysig instance int32
'<Capturing>b__2'() cil managed '<Capturing>b__2'() cil managed
@ -329,25 +463,25 @@
// Code size 53 (0x35) // Code size 53 (0x35)
.maxstack 8 .maxstack 8
IL_0000: ldarg.0 IL_0000: ldarg.0
IL_0001: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0' ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_1'::'CS$<>8__locals1' IL_0001: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0' ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_1'::'CS$<>8__locals1'
IL_0006: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0'::'<>4__this' IL_0006: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0'::'<>4__this'
IL_000b: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::innerConflict IL_000b: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::innerConflict
IL_0010: ldarg.0 IL_0010: ldarg.0
IL_0011: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_1'::innerConflict IL_0011: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_1'::innerConflict
IL_0016: add IL_0016: add
IL_0017: ldarg.0 IL_0017: ldarg.0
IL_0018: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0' ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_1'::'CS$<>8__locals1' IL_0018: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0' ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_1'::'CS$<>8__locals1'
IL_001d: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0'::'<>4__this' IL_001d: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0'::'<>4__this'
IL_0022: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::fieldConflict IL_0022: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::fieldConflict
IL_0027: add IL_0027: add
IL_0028: ldarg.0 IL_0028: ldarg.0
IL_0029: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0' ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_1'::'CS$<>8__locals1' IL_0029: ldfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0' ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_1'::'CS$<>8__locals1'
IL_002e: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0'::fieldConflict IL_002e: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0'::fieldConflict
IL_0033: add IL_0033: add
IL_0034: ret IL_0034: ret
} // end of method '<>c__DisplayClass13_1'::'<Capturing>b__2' } // end of method '<>c__DisplayClass15_1'::'<Capturing>b__2'
} // end of class '<>c__DisplayClass13_1' } // end of class '<>c__DisplayClass15_1'
.field private int32 fieldConflict .field private int32 fieldConflict
.field private int32 innerConflict .field private int32 innerConflict
@ -451,21 +585,21 @@
{ {
// Code size 47 (0x2f) // Code size 47 (0x2f)
.maxstack 3 .maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass12_0' V_0) .locals init (class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass14_0' V_0)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass12_0'::.ctor() IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass14_0'::.ctor()
IL_0005: stloc.0 IL_0005: stloc.0
IL_0006: nop IL_0006: nop
IL_0007: ldloc.0 IL_0007: ldloc.0
IL_0008: ldc.i4.5 IL_0008: ldc.i4.5
IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass12_0'::conflictWithVariable IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass14_0'::conflictWithVariable
IL_000e: ldarg.0 IL_000e: ldarg.0
IL_000f: ldloc.0 IL_000f: ldloc.0
IL_0010: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass12_0'::conflictWithVariable IL_0010: ldfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass14_0'::conflictWithVariable
IL_0015: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::conflictWithVariable(int32) IL_0015: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::conflictWithVariable(int32)
IL_001a: nop IL_001a: nop
IL_001b: ldarg.0 IL_001b: ldarg.0
IL_001c: ldloc.0 IL_001c: ldloc.0
IL_001d: ldftn instance int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass12_0'::'<Conflicts>b__0'() IL_001d: ldftn instance int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass14_0'::'<Conflicts>b__0'()
IL_0023: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object, IL_0023: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object,
native int) native int)
IL_0028: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::Capturer(class [mscorlib]System.Func`1<int32>) IL_0028: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::Capturer(class [mscorlib]System.Func`1<int32>)
@ -478,26 +612,26 @@
{ {
// Code size 60 (0x3c) // Code size 60 (0x3c)
.maxstack 3 .maxstack 3
.locals init (class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0' V_0) .locals init (class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0' V_0)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0'::.ctor() IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0'::.ctor()
IL_0005: stloc.0 IL_0005: stloc.0
IL_0006: ldloc.0 IL_0006: ldloc.0
IL_0007: ldarg.0 IL_0007: ldarg.0
IL_0008: stfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0'::'<>4__this' IL_0008: stfld class ICSharpCode.Decompiler.Tests.Pretty.QualifierTests ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0'::'<>4__this'
IL_000d: nop IL_000d: nop
IL_000e: ldloc.0 IL_000e: ldloc.0
IL_000f: ldc.i4.5 IL_000f: ldc.i4.5
IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0'::fieldConflict IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0'::fieldConflict
IL_0015: ldarg.0 IL_0015: ldarg.0
IL_0016: ldloc.0 IL_0016: ldloc.0
IL_0017: ldftn instance int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0'::'<Capturing>b__0'() IL_0017: ldftn instance int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0'::'<Capturing>b__0'()
IL_001d: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object, IL_001d: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object,
native int) native int)
IL_0022: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::Capturer(class [mscorlib]System.Func`1<int32>) IL_0022: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::Capturer(class [mscorlib]System.Func`1<int32>)
IL_0027: nop IL_0027: nop
IL_0028: ldarg.0 IL_0028: ldarg.0
IL_0029: ldloc.0 IL_0029: ldloc.0
IL_002a: ldftn instance int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass13_0'::'<Capturing>b__1'() IL_002a: ldftn instance int32 ICSharpCode.Decompiler.Tests.Pretty.QualifierTests/'<>c__DisplayClass15_0'::'<Capturing>b__1'()
IL_0030: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object, IL_0030: newobj instance void class [mscorlib]System.Func`1<int32>::.ctor(object,
native int) native int)
IL_0035: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::Capturer(class [mscorlib]System.Func`1<int32>) IL_0035: call instance void ICSharpCode.Decompiler.Tests.Pretty.QualifierTests::Capturer(class [mscorlib]System.Func`1<int32>)

2
ICSharpCode.Decompiler/CSharp/CallBuilder.cs

@ -210,7 +210,7 @@ namespace ICSharpCode.Decompiler.CSharp
if (method.IsStatic) if (method.IsStatic)
requireTarget = !expressionBuilder.IsCurrentOrContainingType(method.DeclaringTypeDefinition) || method.Name == ".cctor"; requireTarget = !expressionBuilder.IsCurrentOrContainingType(method.DeclaringTypeDefinition) || method.Name == ".cctor";
else else
requireTarget = !(target.Expression is ThisReferenceExpression) || method.Name == ".ctor"; requireTarget = !(target.Expression is ThisReferenceExpression || target.Expression is BaseReferenceExpression) || method.Name == ".ctor";
} }
bool targetCasted = false; bool targetCasted = false;
bool argumentsCasted = false; bool argumentsCasted = false;

2
ICSharpCode.Decompiler/CSharp/ExpressionBuilder.cs

@ -196,7 +196,7 @@ namespace ICSharpCode.Decompiler.CSharp
{ {
var target = TranslateTarget(field, targetInstruction, true); var target = TranslateTarget(field, targetInstruction, true);
bool requireTarget = HidesVariableWithName(field.Name) bool requireTarget = HidesVariableWithName(field.Name)
|| (field.IsStatic ? !IsCurrentOrContainingType(field.DeclaringTypeDefinition) : !(target.Expression is ThisReferenceExpression)); || (field.IsStatic ? !IsCurrentOrContainingType(field.DeclaringTypeDefinition) : !(target.Expression is ThisReferenceExpression || target.Expression is BaseReferenceExpression));
bool targetCasted = false; bool targetCasted = false;
var targetResolveResult = requireTarget ? target.ResolveResult : null; var targetResolveResult = requireTarget ? target.ResolveResult : null;

2
ICSharpCode.Decompiler/IL/ControlFlow/AsyncAwaitDecompiler.cs

@ -157,7 +157,7 @@ namespace ICSharpCode.Decompiler.IL.ControlFlow
new RemoveDeadVariableInit().Run(function, context); new RemoveDeadVariableInit().Run(function, context);
// Run inlining, but don't remove dead variables (they might get revived by TranslateFieldsToLocalAccess) // Run inlining, but don't remove dead variables (they might get revived by TranslateFieldsToLocalAccess)
foreach (var block in function.Descendants.OfType<Block>()) { foreach (var block in function.Descendants.OfType<Block>()) {
ILInlining.InlineAllInBlock(block, context); ILInlining.InlineAllInBlock(function, block, context);
} }
context.StepEndGroup(); context.StepEndGroup();
} }

46
ICSharpCode.Decompiler/IL/Transforms/ILInlining.cs

@ -30,15 +30,16 @@ namespace ICSharpCode.Decompiler.IL.Transforms
{ {
public void Run(ILFunction function, ILTransformContext context) public void Run(ILFunction function, ILTransformContext context)
{ {
int? ctorCallStart = null;
foreach (var block in function.Descendants.OfType<Block>()) { foreach (var block in function.Descendants.OfType<Block>()) {
InlineAllInBlock(block, context); InlineAllInBlock(function, block, context, ref ctorCallStart);
} }
function.Variables.RemoveDead(); function.Variables.RemoveDead();
} }
public void Run(Block block, BlockTransformContext context) public void Run(Block block, BlockTransformContext context)
{ {
InlineAllInBlock(block, context); InlineAllInBlock(context.Function, block, context);
} }
public void Run(Block block, int pos, StatementTransformContext context) public void Run(Block block, int pos, StatementTransformContext context)
@ -46,12 +47,19 @@ namespace ICSharpCode.Decompiler.IL.Transforms
InlineOneIfPossible(block, pos, aggressive: IsCatchWhenBlock(block), context: context); InlineOneIfPossible(block, pos, aggressive: IsCatchWhenBlock(block), context: context);
} }
public static bool InlineAllInBlock(Block block, ILTransformContext context) public static bool InlineAllInBlock(ILFunction function, Block block, ILTransformContext context)
{
int? ctorCallStart = null;
return InlineAllInBlock(function, block, context, ref ctorCallStart);
}
static bool InlineAllInBlock(ILFunction function, Block block, ILTransformContext context, ref int? ctorCallStart)
{ {
bool modified = false; bool modified = false;
int i = 0; var instructions = block.Instructions;
while (i < block.Instructions.Count) { for (int i = 0; i < instructions.Count;) {
if (InlineOneIfPossible(block, i, aggressive: IsCatchWhenBlock(block) || IsInConstructorInitializer(i, block), context: context)) { if (instructions[i] is StLoc inst
&& InlineOneIfPossible(block, i, aggressive: IsCatchWhenBlock(block) || IsInConstructorInitializer(function, inst, ref ctorCallStart), context: context)) {
modified = true; modified = true;
i = Math.Max(0, i - 1); i = Math.Max(0, i - 1);
// Go back one step // Go back one step
@ -62,21 +70,23 @@ namespace ICSharpCode.Decompiler.IL.Transforms
return modified; return modified;
} }
static bool IsInConstructorInitializer(int i, Block block) static bool IsInConstructorInitializer(ILFunction function, ILInstruction inst, ref int? ctorCallStart)
{ {
var inst = block.Instructions[i]; if (ctorCallStart == null) {
var topLevelBlock = inst.Ancestors.OfType<Block>().LastOrDefault(); if (function == null || !function.Method.IsConstructor)
var function = topLevelBlock.Ancestors.OfType<ILFunction>().FirstOrDefault(f => f.Parent == null); ctorCallStart = -1;
if (topLevelBlock == null || function == null || !function.Method.IsConstructor) else
ctorCallStart = function.Descendants.FirstOrDefault(d => d is CallInstruction call && !(call is NewObj)
&& call.Method.IsConstructor
&& call.Method.DeclaringType.IsReferenceType == true
&& call.Parent is Block)?.ILRange.Start ?? -1;
}
if (inst.ILRange.InclusiveEnd >= ctorCallStart.GetValueOrDefault())
return false; return false;
var topLevelInst = inst.Ancestors.FirstOrDefault(instr => instr.Parent == topLevelBlock); var topLevelInst = inst.Ancestors.LastOrDefault(instr => instr.Parent is Block);
var ctorCall = function.Descendants.OfType<CallInstruction>().FirstOrDefault(call => !(call is NewObj) if (topLevelInst == null)
&& call.Method.IsConstructor
&& call.Method.DeclaringType.IsReferenceType == true
&& call.Parent is Block);
if (topLevelInst == null || ctorCall == null)
return false; return false;
return topLevelInst.ILRange.InclusiveEnd < ctorCall.ILRange.Start; return topLevelInst.ILRange.InclusiveEnd < ctorCallStart.GetValueOrDefault();
} }
static bool IsCatchWhenBlock(Block block) static bool IsCatchWhenBlock(Block block)

42
ILSpy.AddIn/Commands/OpenReferenceCommand.cs

@ -33,24 +33,44 @@ namespace ICSharpCode.ILSpy.AddIn.Commands
owner.ShowMessage("Could not find reference '{0}', please ensure the project and all references were built correctly!", reference.Name); owner.ShowMessage("Could not find reference '{0}', please ensure the project and all references were built correctly!", reference.Name);
} else { } else {
dynamic referenceObject = item.Object; dynamic referenceObject = item.Object;
var values = GetProperties(referenceObject.Properties, "Type", "FusionName", "ResolvedPath"); if (TryGetProjectFileName(referenceObject, out string fileName)) {
if (values[0] == "Package") { var roslynProject = owner.Workspace.CurrentSolution.Projects.FirstOrDefault(p => p.FilePath == fileName);
values = GetProperties(referenceObject.Properties, "Name", "Version", "Path"); var references = GetReferences(roslynProject);
if (values[0] != null && values[1] != null && values[2] != null) { if (references.TryGetValue(referenceObject.Name, out string path)) {
OpenAssembliesInILSpy(new[] { $"{values[2]}\\{values[0]}.{values[1]}.nupkg" }); OpenAssembliesInILSpy(new[] { path });
return;
}
} else {
var values = GetProperties(referenceObject.Properties, "Type", "FusionName", "ResolvedPath");
if (values[0] == "Package") {
values = GetProperties(referenceObject.Properties, "Name", "Version", "Path");
if (values[0] != null && values[1] != null && values[2] != null) {
OpenAssembliesInILSpy(new[] { $"{values[2]}\\{values[0]}.{values[1]}.nupkg" });
return;
}
} else if (values[2] != null) {
OpenAssembliesInILSpy(new[] { $"{values[2]}" });
return;
} else if (!string.IsNullOrWhiteSpace(values[1])) {
OpenAssembliesInILSpy(new string[] { GacInterop.FindAssemblyInNetGac(AssemblyNameReference.Parse(values[1])) });
return; return;
} }
} else if (values[2] != null) {
OpenAssembliesInILSpy(new[] { $"{values[2]}" });
return;
} else if (!string.IsNullOrWhiteSpace(values[1])) {
OpenAssembliesInILSpy(new string[] { GacInterop.FindAssemblyInNetGac(AssemblyNameReference.Parse(values[1])) });
return;
} }
owner.ShowMessage("Could not find reference '{0}', please ensure the project and all references were built correctly!", referenceObject.Name); owner.ShowMessage("Could not find reference '{0}', please ensure the project and all references were built correctly!", referenceObject.Name);
} }
} }
private bool TryGetProjectFileName(dynamic referenceObject, out string fileName)
{
try {
fileName = referenceObject.Project.FileName;
return true;
} catch (Microsoft.CSharp.RuntimeBinder.RuntimeBinderException) {
fileName = null;
return false;
}
}
private string[] GetProperties(Properties properties, params string[] names) private string[] GetProperties(Properties properties, params string[] names)
{ {
string[] values = new string[names.Length]; string[] values = new string[names.Length];

2
ILSpy.AddIn/source.extension.vsixmanifest

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<PackageManifest Version="2.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011"> <PackageManifest Version="2.0" xmlns="http://schemas.microsoft.com/developer/vsx-schema/2011" xmlns:d="http://schemas.microsoft.com/developer/vsx-schema-design/2011">
<Metadata> <Metadata>
<Identity Id="a9120dbe-164a-4891-842f-fb7829273838" Version="1.7.3.0" Language="en-US" Publisher="ic#code" /> <Identity Id="a9120dbe-164a-4891-842f-fb7829273838" Version="1.8.0.0" Language="en-US" Publisher="ic#code" />
<DisplayName>ILSpy</DisplayName> <DisplayName>ILSpy</DisplayName>
<Description xml:space="preserve">Integrates the ILSpy decompiler into Visual Studio.</Description> <Description xml:space="preserve">Integrates the ILSpy decompiler into Visual Studio.</Description>
<MoreInfo>http://www.ilspy.net</MoreInfo> <MoreInfo>http://www.ilspy.net</MoreInfo>

43
ILSpy/Commands/RemoveAssembliesWithLoadErrors.cs

@ -0,0 +1,43 @@
// Copyright (c) 2018 AlphaSierraPapa for the SharpDevelop Team
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
// software and associated documentation files (the "Software"), to deal in the Software
// without restriction, including without limitation the rights to use, copy, modify, merge,
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
// to whom the Software is furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in all copies or
// substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections.Generic;
using System.Linq;
namespace ICSharpCode.ILSpy
{
[ExportMainMenuCommand(Menu = "_File", Header = "_Remove Assemblies with load errors", MenuCategory = "Remove", MenuOrder = 2.6)]
class RemoveAssembliesWithLoadErrors : SimpleCommand
{
public override bool CanExecute(object parameter)
{
return MainWindow.Instance.CurrentAssemblyList?.GetAssemblies().Any(l => l.HasLoadError) == true;
}
public override void Execute(object parameter)
{
foreach (var asm in MainWindow.Instance.CurrentAssemblyList.GetAssemblies()) {
if (!asm.HasLoadError) continue;
var node = MainWindow.Instance.AssemblyListTreeNode.FindAssemblyNode(asm);
if (node != null && node.CanDelete())
node.Delete();
}
}
}
}

1
ILSpy/ILSpy.csproj

@ -85,6 +85,7 @@
<Compile Include="Commands\ExitCommand.cs" /> <Compile Include="Commands\ExitCommand.cs" />
<Compile Include="Commands\CommandWrapper.cs" /> <Compile Include="Commands\CommandWrapper.cs" />
<Compile Include="Commands\OpenListCommand.cs" /> <Compile Include="Commands\OpenListCommand.cs" />
<Compile Include="Commands\RemoveAssembliesWithLoadErrors.cs" />
<Compile Include="Commands\ShowDebugSteps.cs" /> <Compile Include="Commands\ShowDebugSteps.cs" />
<Compile Include="Commands\SortAssemblyListCommand.cs" /> <Compile Include="Commands\SortAssemblyListCommand.cs" />
<Compile Include="Controls\BoolToVisibilityConverter.cs" /> <Compile Include="Controls\BoolToVisibilityConverter.cs" />

2
README.md

@ -57,7 +57,7 @@ Unix:
Add `Sdk="Microsoft.NET.Sdk"` to the `Project` element. Add `Sdk="Microsoft.NET.Sdk"` to the `Project` element.
This is required due to a tooling issue on Unix. This is required due to a tooling issue on Unix.
Please do not commit this when contributing a pull request! Please do not commit this when contributing a pull request!
- Use ICSharpCode.Decompiler.Console.sln to work. - Use Frontends.sln to work.
How to contribute How to contribute
----------------- -----------------

1
appveyor.yml

@ -32,6 +32,7 @@ for:
only: only:
- master - master
- 3.0.x - 3.0.x
- 3.1.x
artifacts: artifacts:
- path: ILSpy_binaries.zip - path: ILSpy_binaries.zip
name: ILSpy %APPVEYOR_REPO_BRANCH% %ILSPY_VERSION_NUMBER% binaries name: ILSpy %APPVEYOR_REPO_BRANCH% %ILSPY_VERSION_NUMBER% binaries

Loading…
Cancel
Save