Browse Source

Add more tests.

pull/903/head
mohe2015 8 years ago
parent
commit
33a7e2bf1d
  1. 62
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/FixProxyCalls.cs
  2. 823
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/FixProxyCalls.il
  3. 683
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/FixProxyCalls.opt.il
  4. 663
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/FixProxyCalls.opt.roslyn.il
  5. 729
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/FixProxyCalls.roslyn.il

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

@ -53,4 +53,66 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.ILPretty @@ -53,4 +53,66 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.ILPretty
return func(test);
}
}
internal class G
{
protected internal virtual void Test(string test)
{
string.Join(test, "fsdf");
}
}
internal class H : G
{
protected internal override void Test(string test)
{
Action<string> action = (Action<string>)delegate(string a) {
base.Test(a);
};
if (test.Equals(1)) {
throw new Exception("roslyn optimize is inlining the assignment which lets the test fail");
}
action(test);
}
}
internal class I
{
protected internal virtual void Test(int a)
{
}
}
internal class J : I
{
protected internal override void Test(int a)
{
Action action = (Action)delegate() {
base.Test(a);
};
if (a.Equals(1)) {
throw new Exception("roslyn optimize is inlining the assignment which lets the test fail");
}
action();
}
}
internal class K
{
protected internal virtual IEnumerable<int> Test(int p)
{
yield return p + 1;
yield return p + 2;
}
}
internal class L : K
{
protected internal override IEnumerable<int> Test(int p)
{
yield return base.Test(base.Test(0).GetEnumerator().Current).GetEnumerator().Current;
}
}
}

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

@ -10,25 +10,25 @@ @@ -10,25 +10,25 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly '3zqosgit'
.assembly kjibydgt
{
.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.
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 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 '3zqosgit.dll'
// MVID: {6F515237-D053-4A08-B075-52009B7D06CA}
.module kjibydgt.dll
// MVID: {7F7E319E-D28C-421B-B3A6-A5F71C1BC3A5}
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x10000000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x01410000
// Image base: 0x02700000
// =============== CLASS MEMBERS DECLARATION ===================
@ -759,6 +759,819 @@ @@ -759,6 +759,819 @@
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.F
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.G
extends [mscorlib]System.Object
{
.method famorassem hidebysig newslot virtual
instance void Test(string test) cil managed
{
// Code size 25 (0x19)
.maxstack 4
.locals init (string[] V_0)
IL_0000: nop
IL_0001: ldarg.1
IL_0002: ldc.i4.1
IL_0003: newarr [mscorlib]System.String
IL_0008: stloc.0
IL_0009: ldloc.0
IL_000a: ldc.i4.0
IL_000b: ldstr "fsdf"
IL_0010: stelem.ref
IL_0011: ldloc.0
IL_0012: call string [mscorlib]System.String::Join(string,
string[])
IL_0017: pop
IL_0018: ret
} // end of method G::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 G::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.G
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.H
extends ICSharpCode.Decompiler.Tests.TestCases.ILPretty.G
{
.method famorassem hidebysig virtual instance void
Test(string test) cil managed
{
// Code size 54 (0x36)
.maxstack 2
.locals init (class [mscorlib]System.Action`1<string> V_0,
bool V_1)
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.H::'<Test>b__0'(string)
IL_0008: newobj instance void class [mscorlib]System.Action`1<string>::.ctor(object,
native int)
IL_000d: stloc.0
IL_000e: ldarg.1
IL_000f: ldc.i4.1
IL_0010: box [mscorlib]System.Int32
IL_0015: callvirt instance bool [mscorlib]System.Object::Equals(object)
IL_001a: ldc.i4.0
IL_001b: ceq
IL_001d: stloc.1
IL_001e: ldloc.1
IL_001f: brtrue.s IL_002d
IL_0021: nop
IL_0022: ldstr "roslyn optimize is inlining the assignment which l"
+ "ets the test fail"
IL_0027: newobj instance void [mscorlib]System.Exception::.ctor(string)
IL_002c: throw
IL_002d: ldloc.0
IL_002e: ldarg.1
IL_002f: callvirt instance void class [mscorlib]System.Action`1<string>::Invoke(!0)
IL_0034: nop
IL_0035: ret
} // end of method H::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 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.G::.ctor()
IL_0006: ret
} // end of method H::.ctor
.method private hidebysig instance void
'<>n__FabricatedMethod1'(string A_1) 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: call instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.G::Test(string)
IL_0007: ret
} // end of method H::'<>n__FabricatedMethod1'
.method private hidebysig instance void
'<Test>b__0'(string a) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 10 (0xa)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldarg.1
IL_0003: call instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.H::'<>n__FabricatedMethod1'(string)
IL_0008: nop
IL_0009: ret
} // end of method H::'<Test>b__0'
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.H
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.I
extends [mscorlib]System.Object
{
.method famorassem hidebysig newslot virtual
instance void Test(int32 a) cil managed
{
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method I::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 I::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.I
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J
extends ICSharpCode.Decompiler.Tests.TestCases.ILPretty.I
{
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass1'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J '<>4__this'
.field public int32 a
.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__DisplayClass1'::.ctor
.method public hidebysig instance void
'<Test>b__0'() cil managed
{
// Code size 20 (0x14)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass1'::'<>4__this'
IL_0007: ldarg.0
IL_0008: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass1'::a
IL_000d: call instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J::'<>n__FabricatedMethod3'(int32)
IL_0012: nop
IL_0013: ret
} // end of method '<>c__DisplayClass1'::'<Test>b__0'
} // end of class '<>c__DisplayClass1'
.method famorassem hidebysig virtual instance void
Test(int32 a) cil managed
{
// Code size 74 (0x4a)
.maxstack 2
.locals init (class [mscorlib]System.Action V_0,
class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass1' V_1,
bool V_2)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass1'::.ctor()
IL_0005: stloc.1
IL_0006: ldloc.1
IL_0007: ldarg.1
IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass1'::a
IL_000d: ldloc.1
IL_000e: ldarg.0
IL_000f: stfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass1'::'<>4__this'
IL_0014: nop
IL_0015: ldloc.1
IL_0016: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass1'::'<Test>b__0'()
IL_001c: newobj instance void [mscorlib]System.Action::.ctor(object,
native int)
IL_0021: stloc.0
IL_0022: ldloc.1
IL_0023: ldflda int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass1'::a
IL_0028: ldc.i4.1
IL_0029: call instance bool [mscorlib]System.Int32::Equals(int32)
IL_002e: ldc.i4.0
IL_002f: ceq
IL_0031: stloc.2
IL_0032: ldloc.2
IL_0033: brtrue.s IL_0041
IL_0035: nop
IL_0036: ldstr "roslyn optimize is inlining the assignment which l"
+ "ets the test fail"
IL_003b: newobj instance void [mscorlib]System.Exception::.ctor(string)
IL_0040: throw
IL_0041: ldloc.0
IL_0042: callvirt instance void [mscorlib]System.Action::Invoke()
IL_0047: nop
IL_0048: nop
IL_0049: ret
} // end of method J::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 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.I::.ctor()
IL_0006: ret
} // end of method J::.ctor
.method private hidebysig instance void
'<>n__FabricatedMethod3'(int32 A_1) 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: call instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.I::Test(int32)
IL_0007: ret
} // end of method J::'<>n__FabricatedMethod3'
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K
extends [mscorlib]System.Object
{
.class auto ansi sealed nested private beforefieldinit '<Test>d__0'
extends [mscorlib]System.Object
implements class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>,
[mscorlib]System.Collections.IEnumerable,
class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>,
[mscorlib]System.Collections.IEnumerator,
[mscorlib]System.IDisposable
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private int32 '<>2__current'
.field private int32 '<>1__state'
.field private int32 '<>l__initialThreadId'
.field public class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K '<>4__this'
.field public int32 p
.field public int32 '<>3__p'
.method private hidebysig newslot virtual final
instance class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>
'System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator'() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override method instance class [mscorlib]System.Collections.Generic.IEnumerator`1<!0> class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator()
// Code size 82 (0x52)
.maxstack 2
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0' V_0,
class [mscorlib]System.Collections.Generic.IEnumerator`1<int32> V_1,
bool V_2)
IL_0000: call int32 [mscorlib]System.Environment::get_CurrentManagedThreadId()
IL_0005: ldarg.0
IL_0006: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>l__initialThreadId'
IL_000b: bne.un.s IL_001c
IL_000d: ldarg.0
IL_000e: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_0013: ldc.i4.s -2
IL_0015: ceq
IL_0017: ldc.i4.0
IL_0018: ceq
IL_001a: br.s IL_001d
IL_001c: ldc.i4.1
IL_001d: nop
IL_001e: stloc.2
IL_001f: ldloc.2
IL_0020: brtrue.s IL_002d
IL_0022: ldarg.0
IL_0023: ldc.i4.0
IL_0024: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_0029: ldarg.0
IL_002a: stloc.0
IL_002b: br.s IL_0040
IL_002d: ldc.i4.0
IL_002e: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::.ctor(int32)
IL_0033: stloc.0
IL_0034: ldloc.0
IL_0035: ldarg.0
IL_0036: ldfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>4__this'
IL_003b: stfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>4__this'
IL_0040: ldloc.0
IL_0041: ldarg.0
IL_0042: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>3__p'
IL_0047: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::p
IL_004c: ldloc.0
IL_004d: stloc.1
IL_004e: br.s IL_0050
IL_0050: ldloc.1
IL_0051: ret
} // end of method '<Test>d__0'::'System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator'
.method private hidebysig newslot virtual final
instance class [mscorlib]System.Collections.IEnumerator
System.Collections.IEnumerable.GetEnumerator() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.Collections.IEnumerable::GetEnumerator
// Code size 11 (0xb)
.maxstack 1
.locals init (class [mscorlib]System.Collections.IEnumerator V_0)
IL_0000: ldarg.0
IL_0001: call instance class [mscorlib]System.Collections.Generic.IEnumerator`1<int32> ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator'()
IL_0006: stloc.0
IL_0007: br.s IL_0009
IL_0009: ldloc.0
IL_000a: ret
} // end of method '<Test>d__0'::System.Collections.IEnumerable.GetEnumerator
.method private hidebysig newslot virtual final
instance bool MoveNext() cil managed
{
.override [mscorlib]System.Collections.IEnumerator::MoveNext
// Code size 114 (0x72)
.maxstack 3
.locals init (bool V_0,
int32 V_1)
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_0006: stloc.1
IL_0007: ldloc.1
IL_0008: switch (
IL_001f,
IL_001b,
IL_001d)
IL_0019: br.s IL_0021
IL_001b: br.s IL_0044
IL_001d: br.s IL_0064
IL_001f: br.s IL_0023
IL_0021: br.s IL_006c
IL_0023: ldarg.0
IL_0024: ldc.i4.m1
IL_0025: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_002a: nop
IL_002b: ldarg.0
IL_002c: ldarg.0
IL_002d: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::p
IL_0032: ldc.i4.1
IL_0033: add
IL_0034: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>2__current'
IL_0039: ldarg.0
IL_003a: ldc.i4.1
IL_003b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_0040: ldc.i4.1
IL_0041: stloc.0
IL_0042: br.s IL_0070
IL_0044: ldarg.0
IL_0045: ldc.i4.m1
IL_0046: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_004b: ldarg.0
IL_004c: ldarg.0
IL_004d: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::p
IL_0052: ldc.i4.2
IL_0053: add
IL_0054: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>2__current'
IL_0059: ldarg.0
IL_005a: ldc.i4.2
IL_005b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_0060: ldc.i4.1
IL_0061: stloc.0
IL_0062: br.s IL_0070
IL_0064: ldarg.0
IL_0065: ldc.i4.m1
IL_0066: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_006b: nop
IL_006c: ldc.i4.0
IL_006d: stloc.0
IL_006e: br.s IL_0070
IL_0070: ldloc.0
IL_0071: ret
} // end of method '<Test>d__0'::MoveNext
.method private hidebysig newslot specialname virtual final
instance int32 'System.Collections.Generic.IEnumerator<System.Int32>.get_Current'() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override method instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
// Code size 11 (0xb)
.maxstack 1
.locals init (int32 V_0)
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>2__current'
IL_0006: stloc.0
IL_0007: br.s IL_0009
IL_0009: ldloc.0
IL_000a: ret
} // end of method '<Test>d__0'::'System.Collections.Generic.IEnumerator<System.Int32>.get_Current'
.method private hidebysig newslot virtual final
instance void System.Collections.IEnumerator.Reset() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.Collections.IEnumerator::Reset
// Code size 6 (0x6)
.maxstack 8
IL_0000: newobj instance void [mscorlib]System.NotSupportedException::.ctor()
IL_0005: throw
} // end of method '<Test>d__0'::System.Collections.IEnumerator.Reset
.method private hidebysig newslot virtual final
instance void System.IDisposable.Dispose() cil managed
{
.override [mscorlib]System.IDisposable::Dispose
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method '<Test>d__0'::System.IDisposable.Dispose
.method private hidebysig newslot specialname virtual final
instance object System.Collections.IEnumerator.get_Current() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.Collections.IEnumerator::get_Current
// Code size 16 (0x10)
.maxstack 1
.locals init (object V_0)
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>2__current'
IL_0006: box [mscorlib]System.Int32
IL_000b: stloc.0
IL_000c: br.s IL_000e
IL_000e: ldloc.0
IL_000f: ret
} // end of method '<Test>d__0'::System.Collections.IEnumerator.get_Current
.method public hidebysig specialname rtspecialname
instance void .ctor(int32 '<>1__state') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 25 (0x19)
.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 int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_000d: ldarg.0
IL_000e: call int32 [mscorlib]System.Environment::get_CurrentManagedThreadId()
IL_0013: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>l__initialThreadId'
IL_0018: ret
} // end of method '<Test>d__0'::.ctor
.property instance int32 'System.Collections.Generic.IEnumerator<System.Int32>.Current'()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'System.Collections.Generic.IEnumerator<System.Int32>.get_Current'()
} // end of property '<Test>d__0'::'System.Collections.Generic.IEnumerator<System.Int32>.Current'
.property instance object System.Collections.IEnumerator.Current()
{
.get instance object ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::System.Collections.IEnumerator.get_Current()
} // end of property '<Test>d__0'::System.Collections.IEnumerator.Current
} // end of class '<Test>d__0'
.method famorassem hidebysig newslot virtual
instance class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>
Test(int32 p) cil managed
{
// Code size 28 (0x1c)
.maxstack 2
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0' V_0,
class [mscorlib]System.Collections.Generic.IEnumerable`1<int32> V_1)
IL_0000: ldc.i4.s -2
IL_0002: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::.ctor(int32)
IL_0007: stloc.0
IL_0008: ldloc.0
IL_0009: ldarg.0
IL_000a: stfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>4__this'
IL_000f: ldloc.0
IL_0010: ldarg.1
IL_0011: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>3__p'
IL_0016: ldloc.0
IL_0017: stloc.1
IL_0018: br.s IL_001a
IL_001a: ldloc.1
IL_001b: ret
} // end of method K::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 K::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L
extends ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K
{
.class auto ansi sealed nested private beforefieldinit '<Test>d__0'
extends [mscorlib]System.Object
implements class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>,
[mscorlib]System.Collections.IEnumerable,
class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>,
[mscorlib]System.Collections.IEnumerator,
[mscorlib]System.IDisposable
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private int32 '<>2__current'
.field private int32 '<>1__state'
.field private int32 '<>l__initialThreadId'
.field public class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L '<>4__this'
.field public int32 p
.field public int32 '<>3__p'
.method private hidebysig newslot virtual final
instance class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>
'System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator'() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override method instance class [mscorlib]System.Collections.Generic.IEnumerator`1<!0> class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator()
// Code size 82 (0x52)
.maxstack 2
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0' V_0,
class [mscorlib]System.Collections.Generic.IEnumerator`1<int32> V_1,
bool V_2)
IL_0000: call int32 [mscorlib]System.Environment::get_CurrentManagedThreadId()
IL_0005: ldarg.0
IL_0006: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>l__initialThreadId'
IL_000b: bne.un.s IL_001c
IL_000d: ldarg.0
IL_000e: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_0013: ldc.i4.s -2
IL_0015: ceq
IL_0017: ldc.i4.0
IL_0018: ceq
IL_001a: br.s IL_001d
IL_001c: ldc.i4.1
IL_001d: nop
IL_001e: stloc.2
IL_001f: ldloc.2
IL_0020: brtrue.s IL_002d
IL_0022: ldarg.0
IL_0023: ldc.i4.0
IL_0024: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_0029: ldarg.0
IL_002a: stloc.0
IL_002b: br.s IL_0040
IL_002d: ldc.i4.0
IL_002e: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::.ctor(int32)
IL_0033: stloc.0
IL_0034: ldloc.0
IL_0035: ldarg.0
IL_0036: ldfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>4__this'
IL_003b: stfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>4__this'
IL_0040: ldloc.0
IL_0041: ldarg.0
IL_0042: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>3__p'
IL_0047: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::p
IL_004c: ldloc.0
IL_004d: stloc.1
IL_004e: br.s IL_0050
IL_0050: ldloc.1
IL_0051: ret
} // end of method '<Test>d__0'::'System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator'
.method private hidebysig newslot virtual final
instance class [mscorlib]System.Collections.IEnumerator
System.Collections.IEnumerable.GetEnumerator() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.Collections.IEnumerable::GetEnumerator
// Code size 11 (0xb)
.maxstack 1
.locals init (class [mscorlib]System.Collections.IEnumerator V_0)
IL_0000: ldarg.0
IL_0001: call instance class [mscorlib]System.Collections.Generic.IEnumerator`1<int32> ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator'()
IL_0006: stloc.0
IL_0007: br.s IL_0009
IL_0009: ldloc.0
IL_000a: ret
} // end of method '<Test>d__0'::System.Collections.IEnumerable.GetEnumerator
.method private hidebysig newslot virtual final
instance bool MoveNext() cil managed
{
.override [mscorlib]System.Collections.IEnumerator::MoveNext
// Code size 111 (0x6f)
.maxstack 4
.locals init (bool V_0,
int32 V_1)
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_0006: stloc.1
IL_0007: ldloc.1
IL_0008: switch (
IL_0019,
IL_0017)
IL_0015: br.s IL_001b
IL_0017: br.s IL_0061
IL_0019: br.s IL_001d
IL_001b: br.s IL_0069
IL_001d: ldarg.0
IL_001e: ldc.i4.m1
IL_001f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_0024: nop
IL_0025: ldarg.0
IL_0026: ldarg.0
IL_0027: ldfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>4__this'
IL_002c: ldarg.0
IL_002d: ldfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>4__this'
IL_0032: ldc.i4.0
IL_0033: call instance class [mscorlib]System.Collections.Generic.IEnumerable`1<int32> ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L::'<>n__FabricatedMethod1'(int32)
IL_0038: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1<!0> class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator()
IL_003d: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
IL_0042: call instance class [mscorlib]System.Collections.Generic.IEnumerable`1<int32> ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L::'<>n__FabricatedMethod1'(int32)
IL_0047: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1<!0> class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator()
IL_004c: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
IL_0051: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>2__current'
IL_0056: ldarg.0
IL_0057: ldc.i4.1
IL_0058: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_005d: ldc.i4.1
IL_005e: stloc.0
IL_005f: br.s IL_006d
IL_0061: ldarg.0
IL_0062: ldc.i4.m1
IL_0063: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_0068: nop
IL_0069: ldc.i4.0
IL_006a: stloc.0
IL_006b: br.s IL_006d
IL_006d: ldloc.0
IL_006e: ret
} // end of method '<Test>d__0'::MoveNext
.method private hidebysig newslot specialname virtual final
instance int32 'System.Collections.Generic.IEnumerator<System.Int32>.get_Current'() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override method instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
// Code size 11 (0xb)
.maxstack 1
.locals init (int32 V_0)
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>2__current'
IL_0006: stloc.0
IL_0007: br.s IL_0009
IL_0009: ldloc.0
IL_000a: ret
} // end of method '<Test>d__0'::'System.Collections.Generic.IEnumerator<System.Int32>.get_Current'
.method private hidebysig newslot virtual final
instance void System.Collections.IEnumerator.Reset() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.Collections.IEnumerator::Reset
// Code size 6 (0x6)
.maxstack 8
IL_0000: newobj instance void [mscorlib]System.NotSupportedException::.ctor()
IL_0005: throw
} // end of method '<Test>d__0'::System.Collections.IEnumerator.Reset
.method private hidebysig newslot virtual final
instance void System.IDisposable.Dispose() cil managed
{
.override [mscorlib]System.IDisposable::Dispose
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method '<Test>d__0'::System.IDisposable.Dispose
.method private hidebysig newslot specialname virtual final
instance object System.Collections.IEnumerator.get_Current() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.Collections.IEnumerator::get_Current
// Code size 16 (0x10)
.maxstack 1
.locals init (object V_0)
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>2__current'
IL_0006: box [mscorlib]System.Int32
IL_000b: stloc.0
IL_000c: br.s IL_000e
IL_000e: ldloc.0
IL_000f: ret
} // end of method '<Test>d__0'::System.Collections.IEnumerator.get_Current
.method public hidebysig specialname rtspecialname
instance void .ctor(int32 '<>1__state') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 25 (0x19)
.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 int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_000d: ldarg.0
IL_000e: call int32 [mscorlib]System.Environment::get_CurrentManagedThreadId()
IL_0013: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>l__initialThreadId'
IL_0018: ret
} // end of method '<Test>d__0'::.ctor
.property instance int32 'System.Collections.Generic.IEnumerator<System.Int32>.Current'()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'System.Collections.Generic.IEnumerator<System.Int32>.get_Current'()
} // end of property '<Test>d__0'::'System.Collections.Generic.IEnumerator<System.Int32>.Current'
.property instance object System.Collections.IEnumerator.Current()
{
.get instance object ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::System.Collections.IEnumerator.get_Current()
} // end of property '<Test>d__0'::System.Collections.IEnumerator.Current
} // end of class '<Test>d__0'
.method famorassem hidebysig virtual instance class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>
Test(int32 p) cil managed
{
// Code size 28 (0x1c)
.maxstack 2
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0' V_0,
class [mscorlib]System.Collections.Generic.IEnumerable`1<int32> V_1)
IL_0000: ldc.i4.s -2
IL_0002: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::.ctor(int32)
IL_0007: stloc.0
IL_0008: ldloc.0
IL_0009: ldarg.0
IL_000a: stfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>4__this'
IL_000f: ldloc.0
IL_0010: ldarg.1
IL_0011: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>3__p'
IL_0016: ldloc.0
IL_0017: stloc.1
IL_0018: br.s IL_001a
IL_001a: ldloc.1
IL_001b: ret
} // end of method L::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 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K::.ctor()
IL_0006: ret
} // end of method L::.ctor
.method private hidebysig instance class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>
'<>n__FabricatedMethod1'(int32 A_1) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 12 (0xc)
.maxstack 2
.locals init (class [mscorlib]System.Collections.Generic.IEnumerable`1<int32> V_0)
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: call instance class [mscorlib]System.Collections.Generic.IEnumerable`1<int32> ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K::Test(int32)
IL_0007: stloc.0
IL_0008: br.s IL_000a
IL_000a: ldloc.0
IL_000b: ret
} // end of method L::'<>n__FabricatedMethod1'
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L
// =============================================================

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

@ -10,25 +10,25 @@ @@ -10,25 +10,25 @@
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4..
.ver 4:0:0:0
}
.assembly jub0alhf
.assembly b0rqcnnq
{
.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.
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 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 jub0alhf.dll
// MVID: {B209562F-4B42-47D5-8725-45EAB5E79932}
.module b0rqcnnq.dll
// MVID: {D8989CD1-06F3-4E8C-8C4C-7F7B95ACB488}
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x10000000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x004E0000
// Image base: 0x00810000
// =============== CLASS MEMBERS DECLARATION ===================
@ -643,6 +643,679 @@ @@ -643,6 +643,679 @@
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.F
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.G
extends [mscorlib]System.Object
{
.method famorassem hidebysig newslot virtual
instance void Test(string test) cil managed
{
// Code size 24 (0x18)
.maxstack 4
.locals init (string[] V_0)
IL_0000: ldarg.1
IL_0001: ldc.i4.1
IL_0002: newarr [mscorlib]System.String
IL_0007: stloc.0
IL_0008: ldloc.0
IL_0009: ldc.i4.0
IL_000a: ldstr "fsdf"
IL_000f: stelem.ref
IL_0010: ldloc.0
IL_0011: call string [mscorlib]System.String::Join(string,
string[])
IL_0016: pop
IL_0017: ret
} // end of method G::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 G::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.G
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.H
extends ICSharpCode.Decompiler.Tests.TestCases.ILPretty.G
{
.method famorassem hidebysig virtual instance void
Test(string test) cil managed
{
// Code size 46 (0x2e)
.maxstack 2
.locals init (class [mscorlib]System.Action`1<string> V_0)
IL_0000: ldarg.0
IL_0001: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.H::'<Test>b__0'(string)
IL_0007: newobj instance void class [mscorlib]System.Action`1<string>::.ctor(object,
native int)
IL_000c: stloc.0
IL_000d: ldarg.1
IL_000e: ldc.i4.1
IL_000f: box [mscorlib]System.Int32
IL_0014: callvirt instance bool [mscorlib]System.Object::Equals(object)
IL_0019: brfalse.s IL_0026
IL_001b: ldstr "roslyn optimize is inlining the assignment which l"
+ "ets the test fail"
IL_0020: newobj instance void [mscorlib]System.Exception::.ctor(string)
IL_0025: throw
IL_0026: ldloc.0
IL_0027: ldarg.1
IL_0028: callvirt instance void class [mscorlib]System.Action`1<string>::Invoke(!0)
IL_002d: ret
} // end of method H::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 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.G::.ctor()
IL_0006: ret
} // end of method H::.ctor
.method private hidebysig instance void
'<>n__FabricatedMethod1'(string A_1) 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: call instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.G::Test(string)
IL_0007: ret
} // end of method H::'<>n__FabricatedMethod1'
.method private hidebysig instance void
'<Test>b__0'(string a) 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: call instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.H::'<>n__FabricatedMethod1'(string)
IL_0007: ret
} // end of method H::'<Test>b__0'
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.H
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.I
extends [mscorlib]System.Object
{
.method famorassem hidebysig newslot virtual
instance void Test(int32 a) cil managed
{
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method I::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 I::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.I
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J
extends ICSharpCode.Decompiler.Tests.TestCases.ILPretty.I
{
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass1'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J '<>4__this'
.field public int32 a
.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__DisplayClass1'::.ctor
.method public hidebysig instance void
'<Test>b__0'() cil managed
{
// Code size 18 (0x12)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass1'::'<>4__this'
IL_0006: ldarg.0
IL_0007: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass1'::a
IL_000c: call instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J::'<>n__FabricatedMethod3'(int32)
IL_0011: ret
} // end of method '<>c__DisplayClass1'::'<Test>b__0'
} // end of class '<>c__DisplayClass1'
.method famorassem hidebysig virtual instance void
Test(int32 a) cil managed
{
// Code size 65 (0x41)
.maxstack 2
.locals init (class [mscorlib]System.Action V_0,
class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass1' V_1)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass1'::.ctor()
IL_0005: stloc.1
IL_0006: ldloc.1
IL_0007: ldarg.1
IL_0008: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass1'::a
IL_000d: ldloc.1
IL_000e: ldarg.0
IL_000f: stfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass1'::'<>4__this'
IL_0014: ldloc.1
IL_0015: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass1'::'<Test>b__0'()
IL_001b: newobj instance void [mscorlib]System.Action::.ctor(object,
native int)
IL_0020: stloc.0
IL_0021: ldloc.1
IL_0022: ldflda int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass1'::a
IL_0027: ldc.i4.1
IL_0028: call instance bool [mscorlib]System.Int32::Equals(int32)
IL_002d: brfalse.s IL_003a
IL_002f: ldstr "roslyn optimize is inlining the assignment which l"
+ "ets the test fail"
IL_0034: newobj instance void [mscorlib]System.Exception::.ctor(string)
IL_0039: throw
IL_003a: ldloc.0
IL_003b: callvirt instance void [mscorlib]System.Action::Invoke()
IL_0040: ret
} // end of method J::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 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.I::.ctor()
IL_0006: ret
} // end of method J::.ctor
.method private hidebysig instance void
'<>n__FabricatedMethod3'(int32 A_1) 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: call instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.I::Test(int32)
IL_0007: ret
} // end of method J::'<>n__FabricatedMethod3'
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K
extends [mscorlib]System.Object
{
.class auto ansi sealed nested private beforefieldinit '<Test>d__0'
extends [mscorlib]System.Object
implements class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>,
[mscorlib]System.Collections.IEnumerable,
class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>,
[mscorlib]System.Collections.IEnumerator,
[mscorlib]System.IDisposable
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private int32 '<>2__current'
.field private int32 '<>1__state'
.field private int32 '<>l__initialThreadId'
.field public int32 p
.field public int32 '<>3__p'
.field public class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K '<>4__this'
.method private hidebysig newslot virtual final
instance class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>
'System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator'() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override method instance class [mscorlib]System.Collections.Generic.IEnumerator`1<!0> class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator()
// Code size 67 (0x43)
.maxstack 2
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0' V_0)
IL_0000: call int32 [mscorlib]System.Environment::get_CurrentManagedThreadId()
IL_0005: ldarg.0
IL_0006: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>l__initialThreadId'
IL_000b: bne.un.s IL_0022
IL_000d: ldarg.0
IL_000e: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_0013: ldc.i4.s -2
IL_0015: bne.un.s IL_0022
IL_0017: ldarg.0
IL_0018: ldc.i4.0
IL_0019: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_001e: ldarg.0
IL_001f: stloc.0
IL_0020: br.s IL_0035
IL_0022: ldc.i4.0
IL_0023: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::.ctor(int32)
IL_0028: stloc.0
IL_0029: ldloc.0
IL_002a: ldarg.0
IL_002b: ldfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>4__this'
IL_0030: stfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>4__this'
IL_0035: ldloc.0
IL_0036: ldarg.0
IL_0037: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>3__p'
IL_003c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::p
IL_0041: ldloc.0
IL_0042: ret
} // end of method '<Test>d__0'::'System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator'
.method private hidebysig newslot virtual final
instance class [mscorlib]System.Collections.IEnumerator
System.Collections.IEnumerable.GetEnumerator() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.Collections.IEnumerable::GetEnumerator
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance class [mscorlib]System.Collections.Generic.IEnumerator`1<int32> ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator'()
IL_0006: ret
} // end of method '<Test>d__0'::System.Collections.IEnumerable.GetEnumerator
.method private hidebysig newslot virtual final
instance bool MoveNext() cil managed
{
.override [mscorlib]System.Collections.IEnumerator::MoveNext
// Code size 96 (0x60)
.maxstack 3
.locals init (int32 V_0)
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: switch (
IL_001b,
IL_0039,
IL_0057)
IL_0019: br.s IL_005e
IL_001b: ldarg.0
IL_001c: ldc.i4.m1
IL_001d: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_0022: ldarg.0
IL_0023: ldarg.0
IL_0024: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::p
IL_0029: ldc.i4.1
IL_002a: add
IL_002b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>2__current'
IL_0030: ldarg.0
IL_0031: ldc.i4.1
IL_0032: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_0037: ldc.i4.1
IL_0038: ret
IL_0039: ldarg.0
IL_003a: ldc.i4.m1
IL_003b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_0040: ldarg.0
IL_0041: ldarg.0
IL_0042: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::p
IL_0047: ldc.i4.2
IL_0048: add
IL_0049: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>2__current'
IL_004e: ldarg.0
IL_004f: ldc.i4.2
IL_0050: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_0055: ldc.i4.1
IL_0056: ret
IL_0057: ldarg.0
IL_0058: ldc.i4.m1
IL_0059: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_005e: ldc.i4.0
IL_005f: ret
} // end of method '<Test>d__0'::MoveNext
.method private hidebysig newslot specialname virtual final
instance int32 'System.Collections.Generic.IEnumerator<System.Int32>.get_Current'() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override method instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>2__current'
IL_0006: ret
} // end of method '<Test>d__0'::'System.Collections.Generic.IEnumerator<System.Int32>.get_Current'
.method private hidebysig newslot virtual final
instance void System.Collections.IEnumerator.Reset() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.Collections.IEnumerator::Reset
// Code size 6 (0x6)
.maxstack 8
IL_0000: newobj instance void [mscorlib]System.NotSupportedException::.ctor()
IL_0005: throw
} // end of method '<Test>d__0'::System.Collections.IEnumerator.Reset
.method private hidebysig newslot virtual final
instance void System.IDisposable.Dispose() cil managed
{
.override [mscorlib]System.IDisposable::Dispose
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method '<Test>d__0'::System.IDisposable.Dispose
.method private hidebysig newslot specialname virtual final
instance object System.Collections.IEnumerator.get_Current() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.Collections.IEnumerator::get_Current
// Code size 12 (0xc)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>2__current'
IL_0006: box [mscorlib]System.Int32
IL_000b: ret
} // end of method '<Test>d__0'::System.Collections.IEnumerator.get_Current
.method public hidebysig specialname rtspecialname
instance void .ctor(int32 '<>1__state') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 25 (0x19)
.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 int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_000d: ldarg.0
IL_000e: call int32 [mscorlib]System.Environment::get_CurrentManagedThreadId()
IL_0013: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>l__initialThreadId'
IL_0018: ret
} // end of method '<Test>d__0'::.ctor
.property instance int32 'System.Collections.Generic.IEnumerator<System.Int32>.Current'()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'System.Collections.Generic.IEnumerator<System.Int32>.get_Current'()
} // end of property '<Test>d__0'::'System.Collections.Generic.IEnumerator<System.Int32>.Current'
.property instance object System.Collections.IEnumerator.Current()
{
.get instance object ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::System.Collections.IEnumerator.get_Current()
} // end of property '<Test>d__0'::System.Collections.IEnumerator.Current
} // end of class '<Test>d__0'
.method famorassem hidebysig newslot virtual
instance class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>
Test(int32 p) cil managed
{
// Code size 24 (0x18)
.maxstack 2
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0' V_0)
IL_0000: ldc.i4.s -2
IL_0002: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::.ctor(int32)
IL_0007: stloc.0
IL_0008: ldloc.0
IL_0009: ldarg.0
IL_000a: stfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>4__this'
IL_000f: ldloc.0
IL_0010: ldarg.1
IL_0011: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>3__p'
IL_0016: ldloc.0
IL_0017: ret
} // end of method K::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 K::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L
extends ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K
{
.class auto ansi sealed nested private beforefieldinit '<Test>d__0'
extends [mscorlib]System.Object
implements class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>,
[mscorlib]System.Collections.IEnumerable,
class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>,
[mscorlib]System.Collections.IEnumerator,
[mscorlib]System.IDisposable
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private int32 '<>2__current'
.field private int32 '<>1__state'
.field private int32 '<>l__initialThreadId'
.field public class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L '<>4__this'
.method private hidebysig newslot virtual final
instance class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>
'System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator'() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override method instance class [mscorlib]System.Collections.Generic.IEnumerator`1<!0> class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator()
// Code size 55 (0x37)
.maxstack 2
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0' V_0)
IL_0000: call int32 [mscorlib]System.Environment::get_CurrentManagedThreadId()
IL_0005: ldarg.0
IL_0006: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>l__initialThreadId'
IL_000b: bne.un.s IL_0022
IL_000d: ldarg.0
IL_000e: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_0013: ldc.i4.s -2
IL_0015: bne.un.s IL_0022
IL_0017: ldarg.0
IL_0018: ldc.i4.0
IL_0019: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_001e: ldarg.0
IL_001f: stloc.0
IL_0020: br.s IL_0035
IL_0022: ldc.i4.0
IL_0023: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::.ctor(int32)
IL_0028: stloc.0
IL_0029: ldloc.0
IL_002a: ldarg.0
IL_002b: ldfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>4__this'
IL_0030: stfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>4__this'
IL_0035: ldloc.0
IL_0036: ret
} // end of method '<Test>d__0'::'System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator'
.method private hidebysig newslot virtual final
instance class [mscorlib]System.Collections.IEnumerator
System.Collections.IEnumerable.GetEnumerator() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.Collections.IEnumerable::GetEnumerator
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance class [mscorlib]System.Collections.Generic.IEnumerator`1<int32> ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator'()
IL_0006: ret
} // end of method '<Test>d__0'::System.Collections.IEnumerable.GetEnumerator
.method private hidebysig newslot virtual final
instance bool MoveNext() cil managed
{
.override [mscorlib]System.Collections.IEnumerator::MoveNext
// Code size 97 (0x61)
.maxstack 4
.locals init (int32 V_0)
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: switch (
IL_0017,
IL_0058)
IL_0015: br.s IL_005f
IL_0017: ldarg.0
IL_0018: ldc.i4.m1
IL_0019: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_001e: ldarg.0
IL_001f: ldarg.0
IL_0020: ldfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>4__this'
IL_0025: ldarg.0
IL_0026: ldfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>4__this'
IL_002b: ldc.i4.0
IL_002c: call instance class [mscorlib]System.Collections.Generic.IEnumerable`1<int32> ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L::'<>n__FabricatedMethod1'(int32)
IL_0031: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1<!0> class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator()
IL_0036: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
IL_003b: call instance class [mscorlib]System.Collections.Generic.IEnumerable`1<int32> ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L::'<>n__FabricatedMethod1'(int32)
IL_0040: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1<!0> class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator()
IL_0045: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
IL_004a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>2__current'
IL_004f: ldarg.0
IL_0050: ldc.i4.1
IL_0051: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_0056: ldc.i4.1
IL_0057: ret
IL_0058: ldarg.0
IL_0059: ldc.i4.m1
IL_005a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_005f: ldc.i4.0
IL_0060: ret
} // end of method '<Test>d__0'::MoveNext
.method private hidebysig newslot specialname virtual final
instance int32 'System.Collections.Generic.IEnumerator<System.Int32>.get_Current'() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override method instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>2__current'
IL_0006: ret
} // end of method '<Test>d__0'::'System.Collections.Generic.IEnumerator<System.Int32>.get_Current'
.method private hidebysig newslot virtual final
instance void System.Collections.IEnumerator.Reset() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.Collections.IEnumerator::Reset
// Code size 6 (0x6)
.maxstack 8
IL_0000: newobj instance void [mscorlib]System.NotSupportedException::.ctor()
IL_0005: throw
} // end of method '<Test>d__0'::System.Collections.IEnumerator.Reset
.method private hidebysig newslot virtual final
instance void System.IDisposable.Dispose() cil managed
{
.override [mscorlib]System.IDisposable::Dispose
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method '<Test>d__0'::System.IDisposable.Dispose
.method private hidebysig newslot specialname virtual final
instance object System.Collections.IEnumerator.get_Current() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.Collections.IEnumerator::get_Current
// Code size 12 (0xc)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>2__current'
IL_0006: box [mscorlib]System.Int32
IL_000b: ret
} // end of method '<Test>d__0'::System.Collections.IEnumerator.get_Current
.method public hidebysig specialname rtspecialname
instance void .ctor(int32 '<>1__state') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 25 (0x19)
.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 int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_000d: ldarg.0
IL_000e: call int32 [mscorlib]System.Environment::get_CurrentManagedThreadId()
IL_0013: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>l__initialThreadId'
IL_0018: ret
} // end of method '<Test>d__0'::.ctor
.property instance int32 'System.Collections.Generic.IEnumerator<System.Int32>.Current'()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'System.Collections.Generic.IEnumerator<System.Int32>.get_Current'()
} // end of property '<Test>d__0'::'System.Collections.Generic.IEnumerator<System.Int32>.Current'
.property instance object System.Collections.IEnumerator.Current()
{
.get instance object ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::System.Collections.IEnumerator.get_Current()
} // end of property '<Test>d__0'::System.Collections.IEnumerator.Current
} // end of class '<Test>d__0'
.method famorassem hidebysig virtual instance class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>
Test(int32 p) cil managed
{
// Code size 17 (0x11)
.maxstack 2
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0' V_0)
IL_0000: ldc.i4.s -2
IL_0002: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::.ctor(int32)
IL_0007: stloc.0
IL_0008: ldloc.0
IL_0009: ldarg.0
IL_000a: stfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>4__this'
IL_000f: ldloc.0
IL_0010: ret
} // end of method L::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 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K::.ctor()
IL_0006: ret
} // end of method L::.ctor
.method private hidebysig instance class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>
'<>n__FabricatedMethod1'(int32 A_1) 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: call instance class [mscorlib]System.Collections.Generic.IEnumerable`1<int32> ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K::Test(int32)
IL_0007: ret
} // end of method L::'<>n__FabricatedMethod1'
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L
// =============================================================

663
ICSharpCode.Decompiler.Tests/TestCases/Pretty/FixProxyCalls.opt.roslyn.il

@ -25,14 +25,14 @@ @@ -25,14 +25,14 @@
.ver 0:0:0:0
}
.module FixProxyCalls.dll
// MVID: {4ED058B3-70DA-4FB5-B699-61DBE42057C4}
// MVID: {68453617-6425-4063-8DF9-B48E31C1B6A2}
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x10000000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x009D0000
// Image base: 0x00D00000
// =============== CLASS MEMBERS DECLARATION ===================
@ -629,6 +629,665 @@ @@ -629,6 +629,665 @@
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.F
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.G
extends [mscorlib]System.Object
{
.method famorassem hidebysig newslot virtual
instance void Test(string test) cil managed
{
// Code size 22 (0x16)
.maxstack 8
IL_0000: ldarg.1
IL_0001: ldc.i4.1
IL_0002: newarr [mscorlib]System.String
IL_0007: dup
IL_0008: ldc.i4.0
IL_0009: ldstr "fsdf"
IL_000e: stelem.ref
IL_000f: call string [mscorlib]System.String::Join(string,
string[])
IL_0014: pop
IL_0015: ret
} // end of method G::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 G::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.G
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.H
extends ICSharpCode.Decompiler.Tests.TestCases.ILPretty.G
{
.method famorassem hidebysig virtual instance void
Test(string test) cil managed
{
// Code size 44 (0x2c)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.H::'<Test>b__0_0'(string)
IL_0007: newobj instance void class [mscorlib]System.Action`1<string>::.ctor(object,
native int)
IL_000c: ldarg.1
IL_000d: ldc.i4.1
IL_000e: box [mscorlib]System.Int32
IL_0013: callvirt instance bool [mscorlib]System.Object::Equals(object)
IL_0018: brfalse.s IL_0025
IL_001a: ldstr "roslyn optimize is inlining the assignment which l"
+ "ets the test fail"
IL_001f: newobj instance void [mscorlib]System.Exception::.ctor(string)
IL_0024: throw
IL_0025: ldarg.1
IL_0026: callvirt instance void class [mscorlib]System.Action`1<string>::Invoke(!0)
IL_002b: ret
} // end of method H::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 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.G::.ctor()
IL_0006: ret
} // end of method H::.ctor
.method private hidebysig instance void
'<Test>b__0_0'(string a) 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: call instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.G::Test(string)
IL_0007: ret
} // end of method H::'<Test>b__0_0'
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.H
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.I
extends [mscorlib]System.Object
{
.method famorassem hidebysig newslot virtual
instance void Test(int32 a) cil managed
{
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method I::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 I::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.I
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J
extends ICSharpCode.Decompiler.Tests.TestCases.ILPretty.I
{
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass0_0'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public int32 a
.field public class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J '<>4__this'
.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__DisplayClass0_0'::.ctor
.method assembly hidebysig instance void
'<Test>b__0'() cil managed
{
// Code size 18 (0x12)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass0_0'::'<>4__this'
IL_0006: ldarg.0
IL_0007: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass0_0'::a
IL_000c: call instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J::'<>n__0'(int32)
IL_0011: ret
} // end of method '<>c__DisplayClass0_0'::'<Test>b__0'
} // end of class '<>c__DisplayClass0_0'
.method famorassem hidebysig virtual instance void
Test(int32 a) cil managed
{
// Code size 63 (0x3f)
.maxstack 3
.locals init (class [mscorlib]System.Action V_0)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass0_0'::.ctor()
IL_0005: dup
IL_0006: ldarg.0
IL_0007: stfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass0_0'::'<>4__this'
IL_000c: dup
IL_000d: ldarg.1
IL_000e: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass0_0'::a
IL_0013: dup
IL_0014: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass0_0'::'<Test>b__0'()
IL_001a: newobj instance void [mscorlib]System.Action::.ctor(object,
native int)
IL_001f: stloc.0
IL_0020: ldflda int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass0_0'::a
IL_0025: ldc.i4.1
IL_0026: call instance bool [mscorlib]System.Int32::Equals(int32)
IL_002b: brfalse.s IL_0038
IL_002d: ldstr "roslyn optimize is inlining the assignment which l"
+ "ets the test fail"
IL_0032: newobj instance void [mscorlib]System.Exception::.ctor(string)
IL_0037: throw
IL_0038: ldloc.0
IL_0039: callvirt instance void [mscorlib]System.Action::Invoke()
IL_003e: ret
} // end of method J::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 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.I::.ctor()
IL_0006: ret
} // end of method J::.ctor
.method private hidebysig instance void
'<>n__0'(int32 a) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: call instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.I::Test(int32)
IL_0007: ret
} // end of method J::'<>n__0'
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K
extends [mscorlib]System.Object
{
.class auto ansi sealed nested private beforefieldinit '<Test>d__0'
extends [mscorlib]System.Object
implements class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>,
[mscorlib]System.Collections.IEnumerable,
class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>,
[mscorlib]System.IDisposable,
[mscorlib]System.Collections.IEnumerator
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private int32 '<>1__state'
.field private int32 '<>2__current'
.field private int32 '<>l__initialThreadId'
.field private int32 p
.field public int32 '<>3__p'
.method public hidebysig specialname rtspecialname
instance void .ctor(int32 '<>1__state') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 25 (0x19)
.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 int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_000d: ldarg.0
IL_000e: call int32 [mscorlib]System.Environment::get_CurrentManagedThreadId()
IL_0013: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>l__initialThreadId'
IL_0018: ret
} // end of method '<Test>d__0'::.ctor
.method private hidebysig newslot virtual final
instance void System.IDisposable.Dispose() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.IDisposable::Dispose
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method '<Test>d__0'::System.IDisposable.Dispose
.method private hidebysig newslot virtual final
instance bool MoveNext() cil managed
{
.override [mscorlib]System.Collections.IEnumerator::MoveNext
// Code size 96 (0x60)
.maxstack 3
.locals init (int32 V_0)
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: switch (
IL_001b,
IL_0039,
IL_0057)
IL_0019: ldc.i4.0
IL_001a: ret
IL_001b: ldarg.0
IL_001c: ldc.i4.m1
IL_001d: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_0022: ldarg.0
IL_0023: ldarg.0
IL_0024: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::p
IL_0029: ldc.i4.1
IL_002a: add
IL_002b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>2__current'
IL_0030: ldarg.0
IL_0031: ldc.i4.1
IL_0032: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_0037: ldc.i4.1
IL_0038: ret
IL_0039: ldarg.0
IL_003a: ldc.i4.m1
IL_003b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_0040: ldarg.0
IL_0041: ldarg.0
IL_0042: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::p
IL_0047: ldc.i4.2
IL_0048: add
IL_0049: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>2__current'
IL_004e: ldarg.0
IL_004f: ldc.i4.2
IL_0050: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_0055: ldc.i4.1
IL_0056: ret
IL_0057: ldarg.0
IL_0058: ldc.i4.m1
IL_0059: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_005e: ldc.i4.0
IL_005f: ret
} // end of method '<Test>d__0'::MoveNext
.method private hidebysig newslot specialname virtual final
instance int32 'System.Collections.Generic.IEnumerator<System.Int32>.get_Current'() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override method instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>2__current'
IL_0006: ret
} // end of method '<Test>d__0'::'System.Collections.Generic.IEnumerator<System.Int32>.get_Current'
.method private hidebysig newslot virtual final
instance void System.Collections.IEnumerator.Reset() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.Collections.IEnumerator::Reset
// Code size 6 (0x6)
.maxstack 8
IL_0000: newobj instance void [mscorlib]System.NotSupportedException::.ctor()
IL_0005: throw
} // end of method '<Test>d__0'::System.Collections.IEnumerator.Reset
.method private hidebysig newslot specialname virtual final
instance object System.Collections.IEnumerator.get_Current() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.Collections.IEnumerator::get_Current
// Code size 12 (0xc)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>2__current'
IL_0006: box [mscorlib]System.Int32
IL_000b: ret
} // end of method '<Test>d__0'::System.Collections.IEnumerator.get_Current
.method private hidebysig newslot virtual final
instance class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>
'System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator'() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override method instance class [mscorlib]System.Collections.Generic.IEnumerator`1<!0> class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator()
// Code size 55 (0x37)
.maxstack 2
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0' V_0)
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_0006: ldc.i4.s -2
IL_0008: bne.un.s IL_0022
IL_000a: ldarg.0
IL_000b: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>l__initialThreadId'
IL_0010: call int32 [mscorlib]System.Environment::get_CurrentManagedThreadId()
IL_0015: bne.un.s IL_0022
IL_0017: ldarg.0
IL_0018: ldc.i4.0
IL_0019: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_001e: ldarg.0
IL_001f: stloc.0
IL_0020: br.s IL_0029
IL_0022: ldc.i4.0
IL_0023: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::.ctor(int32)
IL_0028: stloc.0
IL_0029: ldloc.0
IL_002a: ldarg.0
IL_002b: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>3__p'
IL_0030: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::p
IL_0035: ldloc.0
IL_0036: ret
} // end of method '<Test>d__0'::'System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator'
.method private hidebysig newslot virtual final
instance class [mscorlib]System.Collections.IEnumerator
System.Collections.IEnumerable.GetEnumerator() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.Collections.IEnumerable::GetEnumerator
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance class [mscorlib]System.Collections.Generic.IEnumerator`1<int32> ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator'()
IL_0006: ret
} // end of method '<Test>d__0'::System.Collections.IEnumerable.GetEnumerator
.property instance int32 'System.Collections.Generic.IEnumerator<System.Int32>.Current'()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'System.Collections.Generic.IEnumerator<System.Int32>.get_Current'()
} // end of property '<Test>d__0'::'System.Collections.Generic.IEnumerator<System.Int32>.Current'
.property instance object System.Collections.IEnumerator.Current()
{
.get instance object ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::System.Collections.IEnumerator.get_Current()
} // end of property '<Test>d__0'::System.Collections.IEnumerator.Current
} // end of class '<Test>d__0'
.method famorassem hidebysig newslot virtual
instance class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>
Test(int32 p) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.IteratorStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 3C 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..<ICSharpCode.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 49 4C 50 72 65 74 // TestCases.ILPret
74 79 2E 4B 2B 3C 54 65 73 74 3E 64 5F 5F 30 00 // ty.K+<Test>d__0.
00 )
// Code size 15 (0xf)
.maxstack 8
IL_0000: ldc.i4.s -2
IL_0002: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::.ctor(int32)
IL_0007: dup
IL_0008: ldarg.1
IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>3__p'
IL_000e: ret
} // end of method K::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 K::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L
extends ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K
{
.class auto ansi sealed nested private beforefieldinit '<Test>d__0'
extends [mscorlib]System.Object
implements class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>,
[mscorlib]System.Collections.IEnumerable,
class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>,
[mscorlib]System.IDisposable,
[mscorlib]System.Collections.IEnumerator
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private int32 '<>1__state'
.field private int32 '<>2__current'
.field private int32 '<>l__initialThreadId'
.field public class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L '<>4__this'
.method public hidebysig specialname rtspecialname
instance void .ctor(int32 '<>1__state') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 25 (0x19)
.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 int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_000d: ldarg.0
IL_000e: call int32 [mscorlib]System.Environment::get_CurrentManagedThreadId()
IL_0013: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>l__initialThreadId'
IL_0018: ret
} // end of method '<Test>d__0'::.ctor
.method private hidebysig newslot virtual final
instance void System.IDisposable.Dispose() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.IDisposable::Dispose
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method '<Test>d__0'::System.IDisposable.Dispose
.method private hidebysig newslot virtual final
instance bool MoveNext() cil managed
{
.override [mscorlib]System.Collections.IEnumerator::MoveNext
// Code size 87 (0x57)
.maxstack 4
.locals init (int32 V_0,
class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L V_1)
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_0006: stloc.0
IL_0007: ldarg.0
IL_0008: ldfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>4__this'
IL_000d: stloc.1
IL_000e: ldloc.0
IL_000f: brfalse.s IL_0017
IL_0011: ldloc.0
IL_0012: ldc.i4.1
IL_0013: beq.s IL_004e
IL_0015: ldc.i4.0
IL_0016: ret
IL_0017: ldarg.0
IL_0018: ldc.i4.m1
IL_0019: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_001e: ldarg.0
IL_001f: ldloc.1
IL_0020: ldloc.1
IL_0021: ldc.i4.0
IL_0022: call instance class [mscorlib]System.Collections.Generic.IEnumerable`1<int32> ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L::'<>n__0'(int32)
IL_0027: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1<!0> class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator()
IL_002c: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
IL_0031: call instance class [mscorlib]System.Collections.Generic.IEnumerable`1<int32> ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L::'<>n__0'(int32)
IL_0036: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1<!0> class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator()
IL_003b: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
IL_0040: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>2__current'
IL_0045: ldarg.0
IL_0046: ldc.i4.1
IL_0047: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_004c: ldc.i4.1
IL_004d: ret
IL_004e: ldarg.0
IL_004f: ldc.i4.m1
IL_0050: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_0055: ldc.i4.0
IL_0056: ret
} // end of method '<Test>d__0'::MoveNext
.method private hidebysig newslot specialname virtual final
instance int32 'System.Collections.Generic.IEnumerator<System.Int32>.get_Current'() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override method instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>2__current'
IL_0006: ret
} // end of method '<Test>d__0'::'System.Collections.Generic.IEnumerator<System.Int32>.get_Current'
.method private hidebysig newslot virtual final
instance void System.Collections.IEnumerator.Reset() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.Collections.IEnumerator::Reset
// Code size 6 (0x6)
.maxstack 8
IL_0000: newobj instance void [mscorlib]System.NotSupportedException::.ctor()
IL_0005: throw
} // end of method '<Test>d__0'::System.Collections.IEnumerator.Reset
.method private hidebysig newslot specialname virtual final
instance object System.Collections.IEnumerator.get_Current() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.Collections.IEnumerator::get_Current
// Code size 12 (0xc)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>2__current'
IL_0006: box [mscorlib]System.Int32
IL_000b: ret
} // end of method '<Test>d__0'::System.Collections.IEnumerator.get_Current
.method private hidebysig newslot virtual final
instance class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>
'System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator'() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override method instance class [mscorlib]System.Collections.Generic.IEnumerator`1<!0> class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator()
// Code size 55 (0x37)
.maxstack 2
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0' V_0)
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_0006: ldc.i4.s -2
IL_0008: bne.un.s IL_0022
IL_000a: ldarg.0
IL_000b: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>l__initialThreadId'
IL_0010: call int32 [mscorlib]System.Environment::get_CurrentManagedThreadId()
IL_0015: bne.un.s IL_0022
IL_0017: ldarg.0
IL_0018: ldc.i4.0
IL_0019: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_001e: ldarg.0
IL_001f: stloc.0
IL_0020: br.s IL_0035
IL_0022: ldc.i4.0
IL_0023: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::.ctor(int32)
IL_0028: stloc.0
IL_0029: ldloc.0
IL_002a: ldarg.0
IL_002b: ldfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>4__this'
IL_0030: stfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>4__this'
IL_0035: ldloc.0
IL_0036: ret
} // end of method '<Test>d__0'::'System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator'
.method private hidebysig newslot virtual final
instance class [mscorlib]System.Collections.IEnumerator
System.Collections.IEnumerable.GetEnumerator() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.Collections.IEnumerable::GetEnumerator
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance class [mscorlib]System.Collections.Generic.IEnumerator`1<int32> ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator'()
IL_0006: ret
} // end of method '<Test>d__0'::System.Collections.IEnumerable.GetEnumerator
.property instance int32 'System.Collections.Generic.IEnumerator<System.Int32>.Current'()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'System.Collections.Generic.IEnumerator<System.Int32>.get_Current'()
} // end of property '<Test>d__0'::'System.Collections.Generic.IEnumerator<System.Int32>.Current'
.property instance object System.Collections.IEnumerator.Current()
{
.get instance object ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::System.Collections.IEnumerator.get_Current()
} // end of property '<Test>d__0'::System.Collections.IEnumerator.Current
} // end of class '<Test>d__0'
.method famorassem hidebysig virtual instance class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>
Test(int32 p) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.IteratorStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 3C 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..<ICSharpCode.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 49 4C 50 72 65 74 // TestCases.ILPret
74 79 2E 4C 2B 3C 54 65 73 74 3E 64 5F 5F 30 00 // ty.L+<Test>d__0.
00 )
// Code size 15 (0xf)
.maxstack 8
IL_0000: ldc.i4.s -2
IL_0002: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::.ctor(int32)
IL_0007: dup
IL_0008: ldarg.0
IL_0009: stfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>4__this'
IL_000e: ret
} // end of method L::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 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K::.ctor()
IL_0006: ret
} // end of method L::.ctor
.method private hidebysig instance class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>
'<>n__0'(int32 p) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: call instance class [mscorlib]System.Collections.Generic.IEnumerable`1<int32> ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K::Test(int32)
IL_0007: ret
} // end of method L::'<>n__0'
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L
// =============================================================

729
ICSharpCode.Decompiler.Tests/TestCases/Pretty/FixProxyCalls.roslyn.il

@ -25,14 +25,14 @@ @@ -25,14 +25,14 @@
.ver 0:0:0:0
}
.module FixProxyCalls.dll
// MVID: {7BB86323-1120-4703-BABC-BC12F69CE2C1}
// MVID: {337B20CD-03F0-410E-9868-F4B4F95C9AEF}
.custom instance void [mscorlib]System.Security.UnverifiableCodeAttribute::.ctor() = ( 01 00 00 00 )
.imagebase 0x10000000
.file alignment 0x00000200
.stackreserve 0x00100000
.subsystem 0x0003 // WINDOWS_CUI
.corflags 0x00000001 // ILONLY
// Image base: 0x00E50000
// Image base: 0x00DC0000
// =============== CLASS MEMBERS DECLARATION ===================
@ -693,6 +693,731 @@ @@ -693,6 +693,731 @@
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.F
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.G
extends [mscorlib]System.Object
{
.method famorassem hidebysig newslot virtual
instance void Test(string test) cil managed
{
// Code size 23 (0x17)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.1
IL_0002: ldc.i4.1
IL_0003: newarr [mscorlib]System.String
IL_0008: dup
IL_0009: ldc.i4.0
IL_000a: ldstr "fsdf"
IL_000f: stelem.ref
IL_0010: call string [mscorlib]System.String::Join(string,
string[])
IL_0015: pop
IL_0016: ret
} // end of method G::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 G::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.G
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.H
extends ICSharpCode.Decompiler.Tests.TestCases.ILPretty.G
{
.method famorassem hidebysig virtual instance void
Test(string test) cil managed
{
// Code size 51 (0x33)
.maxstack 2
.locals init (class [mscorlib]System.Action`1<string> V_0,
bool V_1)
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.H::'<Test>b__0_0'(string)
IL_0008: newobj instance void class [mscorlib]System.Action`1<string>::.ctor(object,
native int)
IL_000d: stloc.0
IL_000e: ldarg.1
IL_000f: ldc.i4.1
IL_0010: box [mscorlib]System.Int32
IL_0015: callvirt instance bool [mscorlib]System.Object::Equals(object)
IL_001a: stloc.1
IL_001b: ldloc.1
IL_001c: brfalse.s IL_002a
IL_001e: nop
IL_001f: ldstr "roslyn optimize is inlining the assignment which l"
+ "ets the test fail"
IL_0024: newobj instance void [mscorlib]System.Exception::.ctor(string)
IL_0029: throw
IL_002a: ldloc.0
IL_002b: ldarg.1
IL_002c: callvirt instance void class [mscorlib]System.Action`1<string>::Invoke(!0)
IL_0031: nop
IL_0032: ret
} // end of method H::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 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.G::.ctor()
IL_0006: nop
IL_0007: ret
} // end of method H::.ctor
.method private hidebysig instance void
'<Test>b__0_0'(string a) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
// Code size 10 (0xa)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldarg.1
IL_0003: call instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.G::Test(string)
IL_0008: nop
IL_0009: ret
} // end of method H::'<Test>b__0_0'
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.H
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.I
extends [mscorlib]System.Object
{
.method famorassem hidebysig newslot virtual
instance void Test(int32 a) cil managed
{
// Code size 2 (0x2)
.maxstack 8
IL_0000: nop
IL_0001: ret
} // end of method I::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 I::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.I
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J
extends ICSharpCode.Decompiler.Tests.TestCases.ILPretty.I
{
.class auto ansi sealed nested private beforefieldinit '<>c__DisplayClass0_0'
extends [mscorlib]System.Object
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public int32 a
.field public class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J '<>4__this'
.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__DisplayClass0_0'::.ctor
.method assembly hidebysig instance void
'<Test>b__0'() cil managed
{
// Code size 20 (0x14)
.maxstack 8
IL_0000: nop
IL_0001: ldarg.0
IL_0002: ldfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass0_0'::'<>4__this'
IL_0007: ldarg.0
IL_0008: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass0_0'::a
IL_000d: call instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J::'<>n__0'(int32)
IL_0012: nop
IL_0013: ret
} // end of method '<>c__DisplayClass0_0'::'<Test>b__0'
} // end of class '<>c__DisplayClass0_0'
.method famorassem hidebysig virtual instance void
Test(int32 a) cil managed
{
// Code size 70 (0x46)
.maxstack 2
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass0_0' V_0,
class [mscorlib]System.Action V_1,
bool V_2)
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass0_0'::.ctor()
IL_0005: stloc.0
IL_0006: ldloc.0
IL_0007: ldarg.0
IL_0008: stfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass0_0'::'<>4__this'
IL_000d: ldloc.0
IL_000e: ldarg.1
IL_000f: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass0_0'::a
IL_0014: nop
IL_0015: ldloc.0
IL_0016: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass0_0'::'<Test>b__0'()
IL_001c: newobj instance void [mscorlib]System.Action::.ctor(object,
native int)
IL_0021: stloc.1
IL_0022: ldloc.0
IL_0023: ldflda int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J/'<>c__DisplayClass0_0'::a
IL_0028: ldc.i4.1
IL_0029: call instance bool [mscorlib]System.Int32::Equals(int32)
IL_002e: stloc.2
IL_002f: ldloc.2
IL_0030: brfalse.s IL_003e
IL_0032: nop
IL_0033: ldstr "roslyn optimize is inlining the assignment which l"
+ "ets the test fail"
IL_0038: newobj instance void [mscorlib]System.Exception::.ctor(string)
IL_003d: throw
IL_003e: ldloc.1
IL_003f: callvirt instance void [mscorlib]System.Action::Invoke()
IL_0044: nop
IL_0045: ret
} // end of method J::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 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.I::.ctor()
IL_0006: nop
IL_0007: ret
} // end of method J::.ctor
.method private hidebysig instance void
'<>n__0'(int32 a) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: call instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.I::Test(int32)
IL_0007: ret
} // end of method J::'<>n__0'
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.J
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K
extends [mscorlib]System.Object
{
.class auto ansi sealed nested private beforefieldinit '<Test>d__0'
extends [mscorlib]System.Object
implements class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>,
[mscorlib]System.Collections.IEnumerable,
class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>,
[mscorlib]System.IDisposable,
[mscorlib]System.Collections.IEnumerator
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private int32 '<>1__state'
.field private int32 '<>2__current'
.field private int32 '<>l__initialThreadId'
.field private int32 p
.field public int32 '<>3__p'
.field public class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K '<>4__this'
.method public hidebysig specialname rtspecialname
instance void .ctor(int32 '<>1__state') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 26 (0x1a)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop
IL_0007: ldarg.0
IL_0008: ldarg.1
IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_000e: ldarg.0
IL_000f: call int32 [mscorlib]System.Environment::get_CurrentManagedThreadId()
IL_0014: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>l__initialThreadId'
IL_0019: ret
} // end of method '<Test>d__0'::.ctor
.method private hidebysig newslot virtual final
instance void System.IDisposable.Dispose() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.IDisposable::Dispose
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method '<Test>d__0'::System.IDisposable.Dispose
.method private hidebysig newslot virtual final
instance bool MoveNext() cil managed
{
.override [mscorlib]System.Collections.IEnumerator::MoveNext
// Code size 105 (0x69)
.maxstack 3
.locals init (int32 V_0)
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: switch (
IL_001b,
IL_001d,
IL_001f)
IL_0019: br.s IL_0021
IL_001b: br.s IL_0023
IL_001d: br.s IL_0042
IL_001f: br.s IL_0060
IL_0021: ldc.i4.0
IL_0022: ret
IL_0023: ldarg.0
IL_0024: ldc.i4.m1
IL_0025: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_002a: nop
IL_002b: ldarg.0
IL_002c: ldarg.0
IL_002d: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::p
IL_0032: ldc.i4.1
IL_0033: add
IL_0034: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>2__current'
IL_0039: ldarg.0
IL_003a: ldc.i4.1
IL_003b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_0040: ldc.i4.1
IL_0041: ret
IL_0042: ldarg.0
IL_0043: ldc.i4.m1
IL_0044: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_0049: ldarg.0
IL_004a: ldarg.0
IL_004b: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::p
IL_0050: ldc.i4.2
IL_0051: add
IL_0052: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>2__current'
IL_0057: ldarg.0
IL_0058: ldc.i4.2
IL_0059: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_005e: ldc.i4.1
IL_005f: ret
IL_0060: ldarg.0
IL_0061: ldc.i4.m1
IL_0062: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_0067: ldc.i4.0
IL_0068: ret
} // end of method '<Test>d__0'::MoveNext
.method private hidebysig newslot specialname virtual final
instance int32 'System.Collections.Generic.IEnumerator<System.Int32>.get_Current'() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override method instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>2__current'
IL_0006: ret
} // end of method '<Test>d__0'::'System.Collections.Generic.IEnumerator<System.Int32>.get_Current'
.method private hidebysig newslot virtual final
instance void System.Collections.IEnumerator.Reset() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.Collections.IEnumerator::Reset
// Code size 6 (0x6)
.maxstack 8
IL_0000: newobj instance void [mscorlib]System.NotSupportedException::.ctor()
IL_0005: throw
} // end of method '<Test>d__0'::System.Collections.IEnumerator.Reset
.method private hidebysig newslot specialname virtual final
instance object System.Collections.IEnumerator.get_Current() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.Collections.IEnumerator::get_Current
// Code size 12 (0xc)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>2__current'
IL_0006: box [mscorlib]System.Int32
IL_000b: ret
} // end of method '<Test>d__0'::System.Collections.IEnumerator.get_Current
.method private hidebysig newslot virtual final
instance class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>
'System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator'() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override method instance class [mscorlib]System.Collections.Generic.IEnumerator`1<!0> class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator()
// Code size 67 (0x43)
.maxstack 2
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0' V_0)
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_0006: ldc.i4.s -2
IL_0008: bne.un.s IL_0022
IL_000a: ldarg.0
IL_000b: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>l__initialThreadId'
IL_0010: call int32 [mscorlib]System.Environment::get_CurrentManagedThreadId()
IL_0015: bne.un.s IL_0022
IL_0017: ldarg.0
IL_0018: ldc.i4.0
IL_0019: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>1__state'
IL_001e: ldarg.0
IL_001f: stloc.0
IL_0020: br.s IL_0035
IL_0022: ldc.i4.0
IL_0023: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::.ctor(int32)
IL_0028: stloc.0
IL_0029: ldloc.0
IL_002a: ldarg.0
IL_002b: ldfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>4__this'
IL_0030: stfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>4__this'
IL_0035: ldloc.0
IL_0036: ldarg.0
IL_0037: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>3__p'
IL_003c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::p
IL_0041: ldloc.0
IL_0042: ret
} // end of method '<Test>d__0'::'System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator'
.method private hidebysig newslot virtual final
instance class [mscorlib]System.Collections.IEnumerator
System.Collections.IEnumerable.GetEnumerator() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.Collections.IEnumerable::GetEnumerator
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance class [mscorlib]System.Collections.Generic.IEnumerator`1<int32> ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator'()
IL_0006: ret
} // end of method '<Test>d__0'::System.Collections.IEnumerable.GetEnumerator
.property instance int32 'System.Collections.Generic.IEnumerator<System.Int32>.Current'()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'System.Collections.Generic.IEnumerator<System.Int32>.get_Current'()
} // end of property '<Test>d__0'::'System.Collections.Generic.IEnumerator<System.Int32>.Current'
.property instance object System.Collections.IEnumerator.Current()
{
.get instance object ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::System.Collections.IEnumerator.get_Current()
} // end of property '<Test>d__0'::System.Collections.IEnumerator.Current
} // end of class '<Test>d__0'
.method famorassem hidebysig newslot virtual
instance class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>
Test(int32 p) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.IteratorStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 3C 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..<ICSharpCode.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 49 4C 50 72 65 74 // TestCases.ILPret
74 79 2E 4B 2B 3C 54 65 73 74 3E 64 5F 5F 30 00 // ty.K+<Test>d__0.
00 )
// Code size 22 (0x16)
.maxstack 8
IL_0000: ldc.i4.s -2
IL_0002: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::.ctor(int32)
IL_0007: dup
IL_0008: ldarg.0
IL_0009: stfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>4__this'
IL_000e: dup
IL_000f: ldarg.1
IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K/'<Test>d__0'::'<>3__p'
IL_0015: ret
} // end of method K::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 K::.ctor
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K
.class private auto ansi beforefieldinit ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L
extends ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K
{
.class auto ansi sealed nested private beforefieldinit '<Test>d__0'
extends [mscorlib]System.Object
implements class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>,
[mscorlib]System.Collections.IEnumerable,
class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>,
[mscorlib]System.IDisposable,
[mscorlib]System.Collections.IEnumerator
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field private int32 '<>1__state'
.field private int32 '<>2__current'
.field private int32 '<>l__initialThreadId'
.field private int32 p
.field public int32 '<>3__p'
.field public class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L '<>4__this'
.method public hidebysig specialname rtspecialname
instance void .ctor(int32 '<>1__state') cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 26 (0x1a)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance void [mscorlib]System.Object::.ctor()
IL_0006: nop
IL_0007: ldarg.0
IL_0008: ldarg.1
IL_0009: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_000e: ldarg.0
IL_000f: call int32 [mscorlib]System.Environment::get_CurrentManagedThreadId()
IL_0014: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>l__initialThreadId'
IL_0019: ret
} // end of method '<Test>d__0'::.ctor
.method private hidebysig newslot virtual final
instance void System.IDisposable.Dispose() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.IDisposable::Dispose
// Code size 1 (0x1)
.maxstack 8
IL_0000: ret
} // end of method '<Test>d__0'::System.IDisposable.Dispose
.method private hidebysig newslot virtual final
instance bool MoveNext() cil managed
{
.override [mscorlib]System.Collections.IEnumerator::MoveNext
// Code size 99 (0x63)
.maxstack 4
.locals init (int32 V_0)
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: brfalse.s IL_0012
IL_000a: br.s IL_000c
IL_000c: ldloc.0
IL_000d: ldc.i4.1
IL_000e: beq.s IL_0014
IL_0010: br.s IL_0016
IL_0012: br.s IL_0018
IL_0014: br.s IL_005a
IL_0016: ldc.i4.0
IL_0017: ret
IL_0018: ldarg.0
IL_0019: ldc.i4.m1
IL_001a: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_001f: nop
IL_0020: ldarg.0
IL_0021: ldarg.0
IL_0022: ldfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>4__this'
IL_0027: ldarg.0
IL_0028: ldfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>4__this'
IL_002d: ldc.i4.0
IL_002e: call instance class [mscorlib]System.Collections.Generic.IEnumerable`1<int32> ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L::'<>n__0'(int32)
IL_0033: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1<!0> class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator()
IL_0038: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
IL_003d: call instance class [mscorlib]System.Collections.Generic.IEnumerable`1<int32> ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L::'<>n__0'(int32)
IL_0042: callvirt instance class [mscorlib]System.Collections.Generic.IEnumerator`1<!0> class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator()
IL_0047: callvirt instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
IL_004c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>2__current'
IL_0051: ldarg.0
IL_0052: ldc.i4.1
IL_0053: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_0058: ldc.i4.1
IL_0059: ret
IL_005a: ldarg.0
IL_005b: ldc.i4.m1
IL_005c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_0061: ldc.i4.0
IL_0062: ret
} // end of method '<Test>d__0'::MoveNext
.method private hidebysig newslot specialname virtual final
instance int32 'System.Collections.Generic.IEnumerator<System.Int32>.get_Current'() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override method instance !0 class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>::get_Current()
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>2__current'
IL_0006: ret
} // end of method '<Test>d__0'::'System.Collections.Generic.IEnumerator<System.Int32>.get_Current'
.method private hidebysig newslot virtual final
instance void System.Collections.IEnumerator.Reset() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.Collections.IEnumerator::Reset
// Code size 6 (0x6)
.maxstack 8
IL_0000: newobj instance void [mscorlib]System.NotSupportedException::.ctor()
IL_0005: throw
} // end of method '<Test>d__0'::System.Collections.IEnumerator.Reset
.method private hidebysig newslot specialname virtual final
instance object System.Collections.IEnumerator.get_Current() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.Collections.IEnumerator::get_Current
// Code size 12 (0xc)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>2__current'
IL_0006: box [mscorlib]System.Int32
IL_000b: ret
} // end of method '<Test>d__0'::System.Collections.IEnumerator.get_Current
.method private hidebysig newslot virtual final
instance class [mscorlib]System.Collections.Generic.IEnumerator`1<int32>
'System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator'() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override method instance class [mscorlib]System.Collections.Generic.IEnumerator`1<!0> class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>::GetEnumerator()
// Code size 67 (0x43)
.maxstack 2
.locals init (class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0' V_0)
IL_0000: ldarg.0
IL_0001: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_0006: ldc.i4.s -2
IL_0008: bne.un.s IL_0022
IL_000a: ldarg.0
IL_000b: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>l__initialThreadId'
IL_0010: call int32 [mscorlib]System.Environment::get_CurrentManagedThreadId()
IL_0015: bne.un.s IL_0022
IL_0017: ldarg.0
IL_0018: ldc.i4.0
IL_0019: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>1__state'
IL_001e: ldarg.0
IL_001f: stloc.0
IL_0020: br.s IL_0035
IL_0022: ldc.i4.0
IL_0023: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::.ctor(int32)
IL_0028: stloc.0
IL_0029: ldloc.0
IL_002a: ldarg.0
IL_002b: ldfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>4__this'
IL_0030: stfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>4__this'
IL_0035: ldloc.0
IL_0036: ldarg.0
IL_0037: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>3__p'
IL_003c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::p
IL_0041: ldloc.0
IL_0042: ret
} // end of method '<Test>d__0'::'System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator'
.method private hidebysig newslot virtual final
instance class [mscorlib]System.Collections.IEnumerator
System.Collections.IEnumerable.GetEnumerator() cil managed
{
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
.override [mscorlib]System.Collections.IEnumerable::GetEnumerator
// Code size 7 (0x7)
.maxstack 8
IL_0000: ldarg.0
IL_0001: call instance class [mscorlib]System.Collections.Generic.IEnumerator`1<int32> ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'System.Collections.Generic.IEnumerable<System.Int32>.GetEnumerator'()
IL_0006: ret
} // end of method '<Test>d__0'::System.Collections.IEnumerable.GetEnumerator
.property instance int32 'System.Collections.Generic.IEnumerator<System.Int32>.Current'()
{
.get instance int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'System.Collections.Generic.IEnumerator<System.Int32>.get_Current'()
} // end of property '<Test>d__0'::'System.Collections.Generic.IEnumerator<System.Int32>.Current'
.property instance object System.Collections.IEnumerator.Current()
{
.get instance object ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::System.Collections.IEnumerator.get_Current()
} // end of property '<Test>d__0'::System.Collections.IEnumerator.Current
} // end of class '<Test>d__0'
.method famorassem hidebysig virtual instance class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>
Test(int32 p) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.IteratorStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( 01 00 3C 49 43 53 68 61 72 70 43 6F 64 65 2E 44 // ..<ICSharpCode.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 49 4C 50 72 65 74 // TestCases.ILPret
74 79 2E 4C 2B 3C 54 65 73 74 3E 64 5F 5F 30 00 // ty.L+<Test>d__0.
00 )
// Code size 22 (0x16)
.maxstack 8
IL_0000: ldc.i4.s -2
IL_0002: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::.ctor(int32)
IL_0007: dup
IL_0008: ldarg.0
IL_0009: stfld class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>4__this'
IL_000e: dup
IL_000f: ldarg.1
IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L/'<Test>d__0'::'<>3__p'
IL_0015: ret
} // end of method L::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 ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K::.ctor()
IL_0006: nop
IL_0007: ret
} // end of method L::.ctor
.method private hidebysig instance class [mscorlib]System.Collections.Generic.IEnumerable`1<int32>
'<>n__0'(int32 p) cil managed
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( 01 00 00 00 )
// Code size 8 (0x8)
.maxstack 8
IL_0000: ldarg.0
IL_0001: ldarg.1
IL_0002: call instance class [mscorlib]System.Collections.Generic.IEnumerable`1<int32> ICSharpCode.Decompiler.Tests.TestCases.ILPretty.K::Test(int32)
IL_0007: ret
} // end of method L::'<>n__0'
} // end of class ICSharpCode.Decompiler.Tests.TestCases.ILPretty.L
// =============================================================

Loading…
Cancel
Save