diff --git a/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenDisplayClassOptimisationTests.cs b/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenDisplayClassOptimisationTests.cs index 9de4494e5794c..3d22fd8422f03 100644 --- a/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenDisplayClassOptimisationTests.cs +++ b/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenDisplayClassOptimisationTests.cs @@ -7568,7 +7568,7 @@ .maxstack 8 } // end of class Program"); } - [Fact] + [Fact, CompilerTrait(CompilerFeature.Iterator)] public void YieldReturnCorrectDisplayClasseAreCreated() { var source = @@ -7604,416 +7604,419 @@ public IEnumerable M() { VerifyTypeIL(compilation, "C", @" .class public auto ansi beforefieldinit C - extends [mscorlib]System.Object + extends [mscorlib]System.Object { - // Nested Types - .class nested private auto ansi sealed beforefieldinit '<>c__DisplayClass0_0' - extends [mscorlib]System.Object - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( - 01 00 00 00 - ) - // Fields - .field public int32 a - // Methods - .method public hidebysig specialname rtspecialname - instance void .ctor () cil managed - { - // Method begins at RVA 0x2059 - // 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 - } // end of class <>c__DisplayClass0_0 - .class nested private auto ansi sealed beforefieldinit '<>c__DisplayClass0_1' - extends [mscorlib]System.Object - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( - 01 00 00 00 - ) - // Fields - .field public int32 b - .field public int32 c - .field public class C/'<>c__DisplayClass0_0' 'CS$<>8__locals1' - // Methods - .method public hidebysig specialname rtspecialname - instance void .ctor () cil managed - { - // Method begins at RVA 0x2059 - // 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_1'::.ctor - } // end of class <>c__DisplayClass0_1 - .class nested private auto ansi sealed beforefieldinit '<>c__DisplayClass0_2' - extends [mscorlib]System.Object - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( - 01 00 00 00 - ) - // Fields - .field public int32 d - .field public class C/'<>c__DisplayClass0_1' 'CS$<>8__locals2' - // Methods - .method public hidebysig specialname rtspecialname - instance void .ctor () cil managed - { - // Method begins at RVA 0x2059 - // 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_2'::.ctor - .method assembly hidebysig - instance void 'b__0' () cil managed - { - // Method begins at RVA 0x2061 - // Code size 53 (0x35) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld class C/'<>c__DisplayClass0_1' C/'<>c__DisplayClass0_2'::'CS$<>8__locals2' - IL_0006: ldfld class C/'<>c__DisplayClass0_0' C/'<>c__DisplayClass0_1'::'CS$<>8__locals1' - IL_000b: ldfld int32 C/'<>c__DisplayClass0_0'::a - IL_0010: ldarg.0 - IL_0011: ldfld class C/'<>c__DisplayClass0_1' C/'<>c__DisplayClass0_2'::'CS$<>8__locals2' - IL_0016: ldfld int32 C/'<>c__DisplayClass0_1'::b - IL_001b: add - IL_001c: ldarg.0 - IL_001d: ldfld class C/'<>c__DisplayClass0_1' C/'<>c__DisplayClass0_2'::'CS$<>8__locals2' - IL_0022: ldfld int32 C/'<>c__DisplayClass0_1'::c - IL_0027: add - IL_0028: ldarg.0 - IL_0029: ldfld int32 C/'<>c__DisplayClass0_2'::d - IL_002e: add - IL_002f: call void [mscorlib]System.Console::WriteLine(int32) - IL_0034: ret - } // end of method '<>c__DisplayClass0_2'::'b__0' - } // end of class <>c__DisplayClass0_2 - .class nested private auto ansi sealed beforefieldinit 'd__0' - extends [mscorlib]System.Object - implements class [mscorlib]System.Collections.Generic.IEnumerable`1, - [mscorlib]System.Collections.IEnumerable, - class [mscorlib]System.Collections.Generic.IEnumerator`1, - [mscorlib]System.IDisposable, - [mscorlib]System.Collections.IEnumerator - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( - 01 00 00 00 - ) - // Fields - .field private int32 '<>1__state' - .field private int32 '<>2__current' - .field private int32 '<>l__initialThreadId' - .field private class C/'<>c__DisplayClass0_0' '<>8__1' - .field private class C/'<>c__DisplayClass0_1' '<>8__2' - .field private class C/'<>c__DisplayClass0_2' '<>8__3' - // Methods - .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 - ) - // Method begins at RVA 0x2097 - // 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 C/'d__0'::'<>1__state' - IL_000d: ldarg.0 - IL_000e: call int32 [mscorlib]System.Environment::get_CurrentManagedThreadId() - IL_0013: stfld int32 C/'d__0'::'<>l__initialThreadId' - IL_0018: ret - } // end of method 'd__0'::.ctor - .method private final hidebysig newslot virtual - instance void System.IDisposable.Dispose () cil managed - { - .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( - 01 00 00 00 - ) - .override method instance void [mscorlib]System.IDisposable::Dispose() - // Method begins at RVA 0x20b1 - // Code size 22 (0x16) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldnull - IL_0002: stfld class C/'<>c__DisplayClass0_0' C/'d__0'::'<>8__1' - IL_0007: ldarg.0 - IL_0008: ldnull - IL_0009: stfld class C/'<>c__DisplayClass0_1' C/'d__0'::'<>8__2' - IL_000e: ldarg.0 - IL_000f: ldnull - IL_0010: stfld class C/'<>c__DisplayClass0_2' C/'d__0'::'<>8__3' - IL_0015: ret - } // end of method 'd__0'::System.IDisposable.Dispose - .method private final hidebysig newslot virtual - instance bool MoveNext () cil managed - { - .override method instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() - // Method begins at RVA 0x20c8 - // Code size 342 (0x156) - .maxstack 2 - .locals init ( - [0] int32 - ) - IL_0000: ldarg.0 - IL_0001: ldfld int32 C/'d__0'::'<>1__state' - IL_0006: stloc.0 - IL_0007: ldloc.0 - IL_0008: switch (IL_002f, IL_005d, IL_0090, IL_00b3, IL_00ca, IL_00ed, IL_0120, IL_0135) - IL_002d: ldc.i4.0 - IL_002e: ret - IL_002f: ldarg.0 - IL_0030: ldc.i4.m1 - IL_0031: stfld int32 C/'d__0'::'<>1__state' - IL_0036: ldarg.0 - IL_0037: newobj instance void C/'<>c__DisplayClass0_0'::.ctor() - IL_003c: stfld class C/'<>c__DisplayClass0_0' C/'d__0'::'<>8__1' - IL_0041: ldarg.0 - IL_0042: ldfld class C/'<>c__DisplayClass0_0' C/'d__0'::'<>8__1' - IL_0047: ldc.i4.1 - IL_0048: stfld int32 C/'<>c__DisplayClass0_0'::a - IL_004d: ldarg.0 - IL_004e: ldc.i4.1 - IL_004f: stfld int32 C/'d__0'::'<>2__current' - IL_0054: ldarg.0 - IL_0055: ldc.i4.1 - IL_0056: stfld int32 C/'d__0'::'<>1__state' - IL_005b: ldc.i4.1 - IL_005c: ret - IL_005d: ldarg.0 - IL_005e: ldc.i4.m1 - IL_005f: stfld int32 C/'d__0'::'<>1__state' - IL_0064: ldarg.0 - IL_0065: newobj instance void C/'<>c__DisplayClass0_1'::.ctor() - IL_006a: stfld class C/'<>c__DisplayClass0_1' C/'d__0'::'<>8__2' - IL_006f: ldarg.0 - IL_0070: ldfld class C/'<>c__DisplayClass0_1' C/'d__0'::'<>8__2' - IL_0075: ldarg.0 - IL_0076: ldfld class C/'<>c__DisplayClass0_0' C/'d__0'::'<>8__1' - IL_007b: stfld class C/'<>c__DisplayClass0_0' C/'<>c__DisplayClass0_1'::'CS$<>8__locals1' - IL_0080: ldarg.0 - IL_0081: ldc.i4.2 - IL_0082: stfld int32 C/'d__0'::'<>2__current' - IL_0087: ldarg.0 - IL_0088: ldc.i4.2 - IL_0089: stfld int32 C/'d__0'::'<>1__state' - IL_008e: ldc.i4.1 - IL_008f: ret - IL_0090: ldarg.0 - IL_0091: ldc.i4.m1 - IL_0092: stfld int32 C/'d__0'::'<>1__state' - IL_0097: ldarg.0 - IL_0098: ldfld class C/'<>c__DisplayClass0_1' C/'d__0'::'<>8__2' - IL_009d: ldc.i4.2 - IL_009e: stfld int32 C/'<>c__DisplayClass0_1'::b - IL_00a3: ldarg.0 - IL_00a4: ldc.i4.3 - IL_00a5: stfld int32 C/'d__0'::'<>2__current' - IL_00aa: ldarg.0 - IL_00ab: ldc.i4.3 - IL_00ac: stfld int32 C/'d__0'::'<>1__state' - IL_00b1: ldc.i4.1 - IL_00b2: ret - IL_00b3: ldarg.0 - IL_00b4: ldc.i4.m1 - IL_00b5: stfld int32 C/'d__0'::'<>1__state' - IL_00ba: ldarg.0 - IL_00bb: ldc.i4.4 - IL_00bc: stfld int32 C/'d__0'::'<>2__current' - IL_00c1: ldarg.0 - IL_00c2: ldc.i4.4 - IL_00c3: stfld int32 C/'d__0'::'<>1__state' - IL_00c8: ldc.i4.1 - IL_00c9: ret - IL_00ca: ldarg.0 - IL_00cb: ldc.i4.m1 - IL_00cc: stfld int32 C/'d__0'::'<>1__state' - IL_00d1: ldarg.0 - IL_00d2: ldfld class C/'<>c__DisplayClass0_1' C/'d__0'::'<>8__2' - IL_00d7: ldc.i4.3 - IL_00d8: stfld int32 C/'<>c__DisplayClass0_1'::c - IL_00dd: ldarg.0 - IL_00de: ldc.i4.5 - IL_00df: stfld int32 C/'d__0'::'<>2__current' - IL_00e4: ldarg.0 - IL_00e5: ldc.i4.5 - IL_00e6: stfld int32 C/'d__0'::'<>1__state' - IL_00eb: ldc.i4.1 - IL_00ec: ret - IL_00ed: ldarg.0 - IL_00ee: ldc.i4.m1 - IL_00ef: stfld int32 C/'d__0'::'<>1__state' - IL_00f4: ldarg.0 - IL_00f5: newobj instance void C/'<>c__DisplayClass0_2'::.ctor() - IL_00fa: stfld class C/'<>c__DisplayClass0_2' C/'d__0'::'<>8__3' - IL_00ff: ldarg.0 - IL_0100: ldfld class C/'<>c__DisplayClass0_2' C/'d__0'::'<>8__3' - IL_0105: ldarg.0 - IL_0106: ldfld class C/'<>c__DisplayClass0_1' C/'d__0'::'<>8__2' - IL_010b: stfld class C/'<>c__DisplayClass0_1' C/'<>c__DisplayClass0_2'::'CS$<>8__locals2' - IL_0110: ldarg.0 - IL_0111: ldc.i4.6 - IL_0112: stfld int32 C/'d__0'::'<>2__current' - IL_0117: ldarg.0 - IL_0118: ldc.i4.6 - IL_0119: stfld int32 C/'d__0'::'<>1__state' - IL_011e: ldc.i4.1 - IL_011f: ret - IL_0120: ldarg.0 - IL_0121: ldc.i4.m1 - IL_0122: stfld int32 C/'d__0'::'<>1__state' - IL_0127: ldarg.0 - IL_0128: ldfld class C/'<>c__DisplayClass0_2' C/'d__0'::'<>8__3' - IL_012d: ldc.i4.4 - IL_012e: stfld int32 C/'<>c__DisplayClass0_2'::d - IL_0133: br.s IL_00dd - IL_0135: ldarg.0 - IL_0136: ldc.i4.m1 - IL_0137: stfld int32 C/'d__0'::'<>1__state' - IL_013c: ldarg.0 - IL_013d: ldfld class C/'<>c__DisplayClass0_2' C/'d__0'::'<>8__3' - IL_0142: pop - IL_0143: ldarg.0 - IL_0144: ldnull - IL_0145: stfld class C/'<>c__DisplayClass0_2' C/'d__0'::'<>8__3' - IL_014a: ldarg.0 - IL_014b: ldnull - IL_014c: stfld class C/'<>c__DisplayClass0_1' C/'d__0'::'<>8__2' - IL_0151: br IL_0064 - } // end of method 'd__0'::MoveNext - .method private final hidebysig specialname newslot virtual - instance int32 'System.Collections.Generic.IEnumerator.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::get_Current() - // Method begins at RVA 0x222a - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 C/'d__0'::'<>2__current' - IL_0006: ret - } // end of method 'd__0'::'System.Collections.Generic.IEnumerator.get_Current' - .method private final hidebysig newslot virtual - instance void System.Collections.IEnumerator.Reset () cil managed - { - .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( - 01 00 00 00 - ) - .override method instance void [mscorlib]System.Collections.IEnumerator::Reset() - // Method begins at RVA 0x2232 - // Code size 6 (0x6) - .maxstack 8 - IL_0000: newobj instance void [mscorlib]System.NotSupportedException::.ctor() - IL_0005: throw - } // end of method 'd__0'::System.Collections.IEnumerator.Reset - .method private final hidebysig specialname newslot virtual - instance object System.Collections.IEnumerator.get_Current () cil managed - { - .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( - 01 00 00 00 - ) - .override method instance object [mscorlib]System.Collections.IEnumerator::get_Current() - // Method begins at RVA 0x2239 - // Code size 12 (0xc) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: ldfld int32 C/'d__0'::'<>2__current' - IL_0006: box [mscorlib]System.Int32 - IL_000b: ret - } // end of method 'd__0'::System.Collections.IEnumerator.get_Current - .method private final hidebysig newslot virtual - instance class [mscorlib]System.Collections.Generic.IEnumerator`1 'System.Collections.Generic.IEnumerable.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 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() - // Method begins at RVA 0x2248 - // Code size 43 (0x2b) - .maxstack 2 - .locals init ( - [0] class C/'d__0' - ) - IL_0000: ldarg.0 - IL_0001: ldfld int32 C/'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 C/'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 C/'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 C/'d__0'::.ctor(int32) - IL_0028: stloc.0 - IL_0029: ldloc.0 - IL_002a: ret - } // end of method 'd__0'::'System.Collections.Generic.IEnumerable.GetEnumerator' - .method private final hidebysig newslot virtual - 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 method instance class [mscorlib]System.Collections.IEnumerator [mscorlib]System.Collections.IEnumerable::GetEnumerator() - // Method begins at RVA 0x227f - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance class [mscorlib]System.Collections.Generic.IEnumerator`1 C/'d__0'::'System.Collections.Generic.IEnumerable.GetEnumerator'() - IL_0006: ret - } // end of method 'd__0'::System.Collections.IEnumerable.GetEnumerator - // Properties - .property instance int32 'System.Collections.Generic.IEnumerator.Current'() - { - .get instance int32 C/'d__0'::'System.Collections.Generic.IEnumerator.get_Current'() - } - .property instance object System.Collections.IEnumerator.Current() - { - .get instance object C/'d__0'::System.Collections.IEnumerator.get_Current() - } - } // end of class d__0 - // Methods - .method public hidebysig - instance class [mscorlib]System.Collections.Generic.IEnumerable`1 M () cil managed - { - .custom instance void [mscorlib]System.Runtime.CompilerServices.IteratorStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( - 01 00 09 43 2b 3c 4d 3e 64 5f 5f 30 00 00 - ) - // Method begins at RVA 0x2050 - // Code size 8 (0x8) - .maxstack 8 - IL_0000: ldc.i4.s -2 - IL_0002: newobj instance void C/'d__0'::.ctor(int32) - IL_0007: ret - } // end of method C::M - .method public hidebysig specialname rtspecialname - instance void .ctor () cil managed - { - // Method begins at RVA 0x2059 - // Code size 7 (0x7) - .maxstack 8 - IL_0000: ldarg.0 - IL_0001: call instance void [mscorlib]System.Object::.ctor() - IL_0006: ret - } // end of method C::.ctor + // Nested Types + .class nested private auto ansi sealed beforefieldinit '<>c__DisplayClass0_0' + extends [mscorlib]System.Object + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( + 01 00 00 00 + ) + // Fields + .field public int32 a + // Methods + .method public hidebysig specialname rtspecialname + instance void .ctor () cil managed + { + // Method begins at RVA 0x2059 + // 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 + } // end of class <>c__DisplayClass0_0 + .class nested private auto ansi sealed beforefieldinit '<>c__DisplayClass0_1' + extends [mscorlib]System.Object + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( + 01 00 00 00 + ) + // Fields + .field public int32 b + .field public int32 c + .field public class C/'<>c__DisplayClass0_0' 'CS$<>8__locals1' + // Methods + .method public hidebysig specialname rtspecialname + instance void .ctor () cil managed + { + // Method begins at RVA 0x2059 + // 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_1'::.ctor + } // end of class <>c__DisplayClass0_1 + .class nested private auto ansi sealed beforefieldinit '<>c__DisplayClass0_2' + extends [mscorlib]System.Object + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( + 01 00 00 00 + ) + // Fields + .field public int32 d + .field public class C/'<>c__DisplayClass0_1' 'CS$<>8__locals2' + // Methods + .method public hidebysig specialname rtspecialname + instance void .ctor () cil managed + { + // Method begins at RVA 0x2059 + // 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_2'::.ctor + .method assembly hidebysig + instance void 'b__0' () cil managed + { + // Method begins at RVA 0x2061 + // Code size 53 (0x35) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld class C/'<>c__DisplayClass0_1' C/'<>c__DisplayClass0_2'::'CS$<>8__locals2' + IL_0006: ldfld class C/'<>c__DisplayClass0_0' C/'<>c__DisplayClass0_1'::'CS$<>8__locals1' + IL_000b: ldfld int32 C/'<>c__DisplayClass0_0'::a + IL_0010: ldarg.0 + IL_0011: ldfld class C/'<>c__DisplayClass0_1' C/'<>c__DisplayClass0_2'::'CS$<>8__locals2' + IL_0016: ldfld int32 C/'<>c__DisplayClass0_1'::b + IL_001b: add + IL_001c: ldarg.0 + IL_001d: ldfld class C/'<>c__DisplayClass0_1' C/'<>c__DisplayClass0_2'::'CS$<>8__locals2' + IL_0022: ldfld int32 C/'<>c__DisplayClass0_1'::c + IL_0027: add + IL_0028: ldarg.0 + IL_0029: ldfld int32 C/'<>c__DisplayClass0_2'::d + IL_002e: add + IL_002f: call void [mscorlib]System.Console::WriteLine(int32) + IL_0034: ret + } // end of method '<>c__DisplayClass0_2'::'b__0' + } // end of class <>c__DisplayClass0_2 + .class nested private auto ansi sealed beforefieldinit 'd__0' + extends [mscorlib]System.Object + implements class [mscorlib]System.Collections.Generic.IEnumerable`1, + [mscorlib]System.Collections.IEnumerable, + class [mscorlib]System.Collections.Generic.IEnumerator`1, + [mscorlib]System.IDisposable, + [mscorlib]System.Collections.IEnumerator + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( + 01 00 00 00 + ) + // Fields + .field private int32 '<>1__state' + .field private int32 '<>2__current' + .field private int32 '<>l__initialThreadId' + .field private class C/'<>c__DisplayClass0_0' '<>8__1' + .field private class C/'<>c__DisplayClass0_1' '<>8__2' + .field private class C/'<>c__DisplayClass0_2' '<>8__3' + // Methods + .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 + ) + // Method begins at RVA 0x2097 + // 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 C/'d__0'::'<>1__state' + IL_000d: ldarg.0 + IL_000e: call int32 [mscorlib]System.Environment::get_CurrentManagedThreadId() + IL_0013: stfld int32 C/'d__0'::'<>l__initialThreadId' + IL_0018: ret + } // end of method 'd__0'::.ctor + .method private final hidebysig newslot virtual + instance void System.IDisposable.Dispose () cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( + 01 00 00 00 + ) + .override method instance void [mscorlib]System.IDisposable::Dispose() + // Method begins at RVA 0x20b1 + // Code size 30 (0x1e) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldnull + IL_0002: stfld class C/'<>c__DisplayClass0_0' C/'d__0'::'<>8__1' + IL_0007: ldarg.0 + IL_0008: ldnull + IL_0009: stfld class C/'<>c__DisplayClass0_1' C/'d__0'::'<>8__2' + IL_000e: ldarg.0 + IL_000f: ldnull + IL_0010: stfld class C/'<>c__DisplayClass0_2' C/'d__0'::'<>8__3' + IL_0015: ldarg.0 + IL_0016: ldc.i4.s -2 + IL_0018: stfld int32 C/'d__0'::'<>1__state' + IL_001d: ret + } // end of method 'd__0'::System.IDisposable.Dispose + .method private final hidebysig newslot virtual + instance bool MoveNext () cil managed + { + .override method instance bool [mscorlib]System.Collections.IEnumerator::MoveNext() + // Method begins at RVA 0x20d0 + // Code size 342 (0x156) + .maxstack 2 + .locals init ( + [0] int32 + ) + IL_0000: ldarg.0 + IL_0001: ldfld int32 C/'d__0'::'<>1__state' + IL_0006: stloc.0 + IL_0007: ldloc.0 + IL_0008: switch (IL_002f, IL_005d, IL_0090, IL_00b3, IL_00ca, IL_00ed, IL_0120, IL_0135) + IL_002d: ldc.i4.0 + IL_002e: ret + IL_002f: ldarg.0 + IL_0030: ldc.i4.m1 + IL_0031: stfld int32 C/'d__0'::'<>1__state' + IL_0036: ldarg.0 + IL_0037: newobj instance void C/'<>c__DisplayClass0_0'::.ctor() + IL_003c: stfld class C/'<>c__DisplayClass0_0' C/'d__0'::'<>8__1' + IL_0041: ldarg.0 + IL_0042: ldfld class C/'<>c__DisplayClass0_0' C/'d__0'::'<>8__1' + IL_0047: ldc.i4.1 + IL_0048: stfld int32 C/'<>c__DisplayClass0_0'::a + IL_004d: ldarg.0 + IL_004e: ldc.i4.1 + IL_004f: stfld int32 C/'d__0'::'<>2__current' + IL_0054: ldarg.0 + IL_0055: ldc.i4.1 + IL_0056: stfld int32 C/'d__0'::'<>1__state' + IL_005b: ldc.i4.1 + IL_005c: ret + IL_005d: ldarg.0 + IL_005e: ldc.i4.m1 + IL_005f: stfld int32 C/'d__0'::'<>1__state' + IL_0064: ldarg.0 + IL_0065: newobj instance void C/'<>c__DisplayClass0_1'::.ctor() + IL_006a: stfld class C/'<>c__DisplayClass0_1' C/'d__0'::'<>8__2' + IL_006f: ldarg.0 + IL_0070: ldfld class C/'<>c__DisplayClass0_1' C/'d__0'::'<>8__2' + IL_0075: ldarg.0 + IL_0076: ldfld class C/'<>c__DisplayClass0_0' C/'d__0'::'<>8__1' + IL_007b: stfld class C/'<>c__DisplayClass0_0' C/'<>c__DisplayClass0_1'::'CS$<>8__locals1' + IL_0080: ldarg.0 + IL_0081: ldc.i4.2 + IL_0082: stfld int32 C/'d__0'::'<>2__current' + IL_0087: ldarg.0 + IL_0088: ldc.i4.2 + IL_0089: stfld int32 C/'d__0'::'<>1__state' + IL_008e: ldc.i4.1 + IL_008f: ret + IL_0090: ldarg.0 + IL_0091: ldc.i4.m1 + IL_0092: stfld int32 C/'d__0'::'<>1__state' + IL_0097: ldarg.0 + IL_0098: ldfld class C/'<>c__DisplayClass0_1' C/'d__0'::'<>8__2' + IL_009d: ldc.i4.2 + IL_009e: stfld int32 C/'<>c__DisplayClass0_1'::b + IL_00a3: ldarg.0 + IL_00a4: ldc.i4.3 + IL_00a5: stfld int32 C/'d__0'::'<>2__current' + IL_00aa: ldarg.0 + IL_00ab: ldc.i4.3 + IL_00ac: stfld int32 C/'d__0'::'<>1__state' + IL_00b1: ldc.i4.1 + IL_00b2: ret + IL_00b3: ldarg.0 + IL_00b4: ldc.i4.m1 + IL_00b5: stfld int32 C/'d__0'::'<>1__state' + IL_00ba: ldarg.0 + IL_00bb: ldc.i4.4 + IL_00bc: stfld int32 C/'d__0'::'<>2__current' + IL_00c1: ldarg.0 + IL_00c2: ldc.i4.4 + IL_00c3: stfld int32 C/'d__0'::'<>1__state' + IL_00c8: ldc.i4.1 + IL_00c9: ret + IL_00ca: ldarg.0 + IL_00cb: ldc.i4.m1 + IL_00cc: stfld int32 C/'d__0'::'<>1__state' + IL_00d1: ldarg.0 + IL_00d2: ldfld class C/'<>c__DisplayClass0_1' C/'d__0'::'<>8__2' + IL_00d7: ldc.i4.3 + IL_00d8: stfld int32 C/'<>c__DisplayClass0_1'::c + IL_00dd: ldarg.0 + IL_00de: ldc.i4.5 + IL_00df: stfld int32 C/'d__0'::'<>2__current' + IL_00e4: ldarg.0 + IL_00e5: ldc.i4.5 + IL_00e6: stfld int32 C/'d__0'::'<>1__state' + IL_00eb: ldc.i4.1 + IL_00ec: ret + IL_00ed: ldarg.0 + IL_00ee: ldc.i4.m1 + IL_00ef: stfld int32 C/'d__0'::'<>1__state' + IL_00f4: ldarg.0 + IL_00f5: newobj instance void C/'<>c__DisplayClass0_2'::.ctor() + IL_00fa: stfld class C/'<>c__DisplayClass0_2' C/'d__0'::'<>8__3' + IL_00ff: ldarg.0 + IL_0100: ldfld class C/'<>c__DisplayClass0_2' C/'d__0'::'<>8__3' + IL_0105: ldarg.0 + IL_0106: ldfld class C/'<>c__DisplayClass0_1' C/'d__0'::'<>8__2' + IL_010b: stfld class C/'<>c__DisplayClass0_1' C/'<>c__DisplayClass0_2'::'CS$<>8__locals2' + IL_0110: ldarg.0 + IL_0111: ldc.i4.6 + IL_0112: stfld int32 C/'d__0'::'<>2__current' + IL_0117: ldarg.0 + IL_0118: ldc.i4.6 + IL_0119: stfld int32 C/'d__0'::'<>1__state' + IL_011e: ldc.i4.1 + IL_011f: ret + IL_0120: ldarg.0 + IL_0121: ldc.i4.m1 + IL_0122: stfld int32 C/'d__0'::'<>1__state' + IL_0127: ldarg.0 + IL_0128: ldfld class C/'<>c__DisplayClass0_2' C/'d__0'::'<>8__3' + IL_012d: ldc.i4.4 + IL_012e: stfld int32 C/'<>c__DisplayClass0_2'::d + IL_0133: br.s IL_00dd + IL_0135: ldarg.0 + IL_0136: ldc.i4.m1 + IL_0137: stfld int32 C/'d__0'::'<>1__state' + IL_013c: ldarg.0 + IL_013d: ldfld class C/'<>c__DisplayClass0_2' C/'d__0'::'<>8__3' + IL_0142: pop + IL_0143: ldarg.0 + IL_0144: ldnull + IL_0145: stfld class C/'<>c__DisplayClass0_2' C/'d__0'::'<>8__3' + IL_014a: ldarg.0 + IL_014b: ldnull + IL_014c: stfld class C/'<>c__DisplayClass0_1' C/'d__0'::'<>8__2' + IL_0151: br IL_0064 + } // end of method 'd__0'::MoveNext + .method private final hidebysig specialname newslot virtual + instance int32 'System.Collections.Generic.IEnumerator.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::get_Current() + // Method begins at RVA 0x2232 + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 C/'d__0'::'<>2__current' + IL_0006: ret + } // end of method 'd__0'::'System.Collections.Generic.IEnumerator.get_Current' + .method private final hidebysig newslot virtual + instance void System.Collections.IEnumerator.Reset () cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( + 01 00 00 00 + ) + .override method instance void [mscorlib]System.Collections.IEnumerator::Reset() + // Method begins at RVA 0x223a + // Code size 6 (0x6) + .maxstack 8 + IL_0000: newobj instance void [mscorlib]System.NotSupportedException::.ctor() + IL_0005: throw + } // end of method 'd__0'::System.Collections.IEnumerator.Reset + .method private final hidebysig specialname newslot virtual + instance object System.Collections.IEnumerator.get_Current () cil managed + { + .custom instance void [mscorlib]System.Diagnostics.DebuggerHiddenAttribute::.ctor() = ( + 01 00 00 00 + ) + .override method instance object [mscorlib]System.Collections.IEnumerator::get_Current() + // Method begins at RVA 0x2241 + // Code size 12 (0xc) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld int32 C/'d__0'::'<>2__current' + IL_0006: box [mscorlib]System.Int32 + IL_000b: ret + } // end of method 'd__0'::System.Collections.IEnumerator.get_Current + .method private final hidebysig newslot virtual + instance class [mscorlib]System.Collections.Generic.IEnumerator`1 'System.Collections.Generic.IEnumerable.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 class [mscorlib]System.Collections.Generic.IEnumerable`1::GetEnumerator() + // Method begins at RVA 0x2250 + // Code size 43 (0x2b) + .maxstack 2 + .locals init ( + [0] class C/'d__0' + ) + IL_0000: ldarg.0 + IL_0001: ldfld int32 C/'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 C/'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 C/'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 C/'d__0'::.ctor(int32) + IL_0028: stloc.0 + IL_0029: ldloc.0 + IL_002a: ret + } // end of method 'd__0'::'System.Collections.Generic.IEnumerable.GetEnumerator' + .method private final hidebysig newslot virtual + 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 method instance class [mscorlib]System.Collections.IEnumerator [mscorlib]System.Collections.IEnumerable::GetEnumerator() + // Method begins at RVA 0x2287 + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance class [mscorlib]System.Collections.Generic.IEnumerator`1 C/'d__0'::'System.Collections.Generic.IEnumerable.GetEnumerator'() + IL_0006: ret + } // end of method 'd__0'::System.Collections.IEnumerable.GetEnumerator + // Properties + .property instance int32 'System.Collections.Generic.IEnumerator.Current'() + { + .get instance int32 C/'d__0'::'System.Collections.Generic.IEnumerator.get_Current'() + } + .property instance object System.Collections.IEnumerator.Current() + { + .get instance object C/'d__0'::System.Collections.IEnumerator.get_Current() + } + } // end of class d__0 + // Methods + .method public hidebysig + instance class [mscorlib]System.Collections.Generic.IEnumerable`1 M () cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.IteratorStateMachineAttribute::.ctor(class [mscorlib]System.Type) = ( + 01 00 09 43 2b 3c 4d 3e 64 5f 5f 30 00 00 + ) + // Method begins at RVA 0x2050 + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldc.i4.s -2 + IL_0002: newobj instance void C/'d__0'::.ctor(int32) + IL_0007: ret + } // end of method C::M + .method public hidebysig specialname rtspecialname + instance void .ctor () cil managed + { + // Method begins at RVA 0x2059 + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance void [mscorlib]System.Object::.ctor() + IL_0006: ret + } // end of method C::.ctor } // end of class C"); } diff --git a/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenIterators.cs b/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenIterators.cs index fe7abb4484d16..4434f5dff2d76 100644 --- a/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenIterators.cs +++ b/src/Compilers/CSharp/Test/Emit/CodeGen/CodeGenIterators.cs @@ -12,6 +12,7 @@ namespace Microsoft.CodeAnalysis.CSharp.UnitTests.CodeGen { + [CompilerTrait(CompilerFeature.Iterator)] public class CodeGenIterators : CSharpTestBase { [Fact] @@ -4808,6 +4809,9 @@ .maxstack 2 System.Console.Write(object.ReferenceEquals(enumerable, enumerable.GetEnumerator())); } +enumerator.Dispose(); +System.Console.Write(object.ReferenceEquals(enumerable, enumerable.GetEnumerator())); + class C { public static System.Collections.Generic.IEnumerable Produce() @@ -4819,7 +4823,7 @@ public static System.Collections.Generic.IEnumerable Produce() """; // We're not setting the state to "after"/"finished" // Tracked by https://github.com/dotnet/roslyn/issues/76089 - CompileAndVerify(src2, expectedOutput: "TrueTrueFalse").VerifyDiagnostics(); + CompileAndVerify(src2, expectedOutput: "TrueTrueFalseTrue").VerifyDiagnostics(); } [Fact, WorkItem("https://github.com/dotnet/roslyn/issues/76078")] diff --git a/src/Compilers/CSharp/Test/Emit2/Emit/EditAndContinue/EditAndContinueStateMachineTests.cs b/src/Compilers/CSharp/Test/Emit2/Emit/EditAndContinue/EditAndContinueStateMachineTests.cs index 41169ac72a8ff..374d2e0ff27ba 100644 --- a/src/Compilers/CSharp/Test/Emit2/Emit/EditAndContinue/EditAndContinueStateMachineTests.cs +++ b/src/Compilers/CSharp/Test/Emit2/Emit/EditAndContinue/EditAndContinueStateMachineTests.cs @@ -19,6 +19,7 @@ namespace Microsoft.CodeAnalysis.CSharp.EditAndContinue.UnitTests { + [CompilerTrait(CompilerFeature.Iterator, CompilerFeature.Async, CompilerFeature.AsyncStreams)] public class EditAndContinueStateMachineTests(ITestOutputHelper logger) : EditAndContinueTestBase { private readonly ITestOutputHelper _logger = logger; @@ -4747,7 +4748,7 @@ .maxstack 2 v0.VerifyIL("C.d__0.System.IDisposable.Dispose", @" { - // Code size 33 (0x21) + // Code size 41 (0x29) .maxstack 2 .locals init (int V_0) IL_0000: ldarg.0 @@ -4773,12 +4774,15 @@ .locals init (int V_0) IL_001d: endfinally } IL_001e: br.s IL_0020 - IL_0020: ret + IL_0020: ldarg.0 + IL_0021: ldc.i4.s -2 + IL_0023: stfld ""int C.d__0.<>1__state"" + IL_0028: ret } "); diff1.VerifyIL("C.d__0.System.IDisposable.Dispose", @" { - // Code size 108 (0x6c) + // Code size 116 (0x74) .maxstack 2 .locals init (int V_0) IL_0000: ldarg.0 @@ -4843,7 +4847,10 @@ .locals init (int V_0) IL_0068: endfinally } IL_0069: br.s IL_006b - IL_006b: ret + IL_006b: ldarg.0 + IL_006c: ldc.i4.s -2 + IL_006e: stfld ""int C.d__0.<>1__state"" + IL_0073: ret } "); @@ -5176,7 +5183,7 @@ .maxstack 2 v0.VerifyIL("C.d__0.System.IDisposable.Dispose", @" { - // Code size 40 (0x28) + // Code size 48 (0x30) .maxstack 2 .locals init (int V_0) IL_0000: ldarg.0 @@ -5205,12 +5212,15 @@ .locals init (int V_0) IL_0020: ldarg.0 IL_0021: ldnull IL_0022: stfld ""System.IDisposable C.d__0.5__1"" - IL_0027: ret + IL_0027: ldarg.0 + IL_0028: ldc.i4.s -2 + IL_002a: stfld ""int C.d__0.<>1__state"" + IL_002f: ret } "); diff1.VerifyIL("C.d__0.System.IDisposable.Dispose", @" { - // Code size 42 (0x2a) + // Code size 50 (0x32) .maxstack 2 .locals init (int V_0) IL_0000: ldarg.0 @@ -5241,7 +5251,10 @@ .locals init (int V_0) IL_0022: ldarg.0 IL_0023: ldnull IL_0024: stfld ""System.IDisposable C.d__0.5__1"" - IL_0029: ret + IL_0029: ldarg.0 + IL_002a: ldc.i4.s -2 + IL_002c: stfld ""int C.d__0.<>1__state"" + IL_0031: ret } "); diff --git a/src/Compilers/Test/Core/CompilationVerifier.cs b/src/Compilers/Test/Core/CompilationVerifier.cs index ebc1cd681856e..f0c2666b88049 100644 --- a/src/Compilers/Test/Core/CompilationVerifier.cs +++ b/src/Compilers/Test/Core/CompilationVerifier.cs @@ -224,7 +224,7 @@ private static string FixupCodeSizeComments(string output) /// An action to invoke with the emitted IL. public void VerifyTypeIL(string typeName, Action validateExpected) { - var output = new ICSharpCode.Decompiler.PlainTextOutput(); + var output = new ICSharpCode.Decompiler.PlainTextOutput() { IndentationString = " "}; using (var testEnvironment = RuntimeEnvironmentFactory.Create(_dependencies)) { string mainModuleFullName = Emit(testEnvironment, manifestResources: null, EmitOptions.Default); diff --git a/src/Compilers/VisualBasic/Test/Emit/CodeGen/CodeGenIterators.vb b/src/Compilers/VisualBasic/Test/Emit/CodeGen/CodeGenIterators.vb index 8ffb401f582d0..73b45685c551e 100644 --- a/src/Compilers/VisualBasic/Test/Emit/CodeGen/CodeGenIterators.vb +++ b/src/Compilers/VisualBasic/Test/Emit/CodeGen/CodeGenIterators.vb @@ -3070,7 +3070,9 @@ End Class - CompileAndVerify(source2, expectedOutput:="True finally True") + ' We're not setting the state to "after"/"finished" + ' Tracked by https://github.com/dotnet/roslyn/issues/76089 + CompileAndVerify(source2, expectedOutput:="True finally False") End Sub diff --git a/src/Compilers/VisualBasic/Test/Emit/Emit/EditAndContinue/EditAndContinueStateMachineTests.vb b/src/Compilers/VisualBasic/Test/Emit/Emit/EditAndContinue/EditAndContinueStateMachineTests.vb index 291ba6541fb9f..805965edc6ba0 100644 --- a/src/Compilers/VisualBasic/Test/Emit/Emit/EditAndContinue/EditAndContinueStateMachineTests.vb +++ b/src/Compilers/VisualBasic/Test/Emit/Emit/EditAndContinue/EditAndContinueStateMachineTests.vb @@ -13,6 +13,7 @@ Imports Xunit.Abstractions Namespace Microsoft.CodeAnalysis.VisualBasic.UnitTests + Public Class EditAndContinueStateMachineTests Inherits EditAndContinueTestBase @@ -4996,7 +4997,7 @@ End Try v0.VerifyIL("C.VB$StateMachine_9_F.Dispose", " { - // Code size 38 (0x26) + // Code size 46 (0x2e) .maxstack 2 .locals init (Integer V_0) IL_0000: ldarg.0 @@ -5016,11 +5017,14 @@ End Try IL_001e: ldarg.0 IL_001f: call ""Function C.VB$StateMachine_9_F.MoveNext() As Boolean"" IL_0024: pop - IL_0025: ret + IL_0025: ldarg.0 + IL_0026: ldc.i4.s -2 + IL_0028: stfld ""C.VB$StateMachine_9_F.$State As Integer"" + IL_002d: ret }") diff1.VerifyIL("C.VB$StateMachine_9_F.Dispose", " { - // Code size 78 (0x4e) + // Code size 86 (0x56) .maxstack 2 .locals init (Integer V_0) IL_0000: ldarg.0 @@ -5053,7 +5057,10 @@ End Try IL_0046: ldarg.0 IL_0047: call ""Function C.VB$StateMachine_9_F.MoveNext() As Boolean"" IL_004c: pop - IL_004d: ret + IL_004d: ldarg.0 + IL_004e: ldc.i4.s -2 + IL_0050: stfld ""C.VB$StateMachine_9_F.$State As Integer"" + IL_0055: ret }") v0.VerifyIL("C.VB$StateMachine_9_F.MoveNext", " { @@ -5499,8 +5506,8 @@ End Using "C: {VB$StateMachine_6_F}") v0.VerifyIL("C.VB$StateMachine_6_F.Dispose", " - { - // Code size 38 (0x26) +{ + // Code size 46 (0x2e) .maxstack 2 .locals init (Integer V_0) IL_0000: ldarg.0 @@ -5510,24 +5517,24 @@ End Using IL_0008: ldc.i4.1 IL_0009: beq.s IL_000d IL_000b: br.s IL_0017 - IL_000d: ldarg.0 IL_000e: ldc.i4.s -3 IL_0010: stfld ""C.VB$StateMachine_6_F.$State As Integer"" IL_0015: br.s IL_001e - IL_0017: ldarg.0 IL_0018: ldc.i4.m1 IL_0019: stfld ""C.VB$StateMachine_6_F.$State As Integer"" - IL_001e: ldarg.0 IL_001f: call ""Function C.VB$StateMachine_6_F.MoveNext() As Boolean"" IL_0024: pop - IL_0025: ret + IL_0025: ldarg.0 + IL_0026: ldc.i4.s -2 + IL_0028: stfld ""C.VB$StateMachine_6_F.$State As Integer"" + IL_002d: ret }") diff1.VerifyIL("C.VB$StateMachine_6_F.Dispose", " { - // Code size 40 (0x28) + // Code size 48 (0x30) .maxstack 2 .locals init (Integer V_0) IL_0000: ldarg.0 @@ -5539,20 +5546,20 @@ End Using IL_000a: ldc.i4.1 IL_000b: ble.un.s IL_000f IL_000d: br.s IL_0019 - IL_000f: ldarg.0 IL_0010: ldc.i4.s -3 IL_0012: stfld ""C.VB$StateMachine_6_F.$State As Integer"" IL_0017: br.s IL_0020 - IL_0019: ldarg.0 IL_001a: ldc.i4.m1 IL_001b: stfld ""C.VB$StateMachine_6_F.$State As Integer"" - IL_0020: ldarg.0 IL_0021: call ""Function C.VB$StateMachine_6_F.MoveNext() As Boolean"" IL_0026: pop - IL_0027: ret + IL_0027: ldarg.0 + IL_0028: ldc.i4.s -2 + IL_002a: stfld ""C.VB$StateMachine_6_F.$State As Integer"" + IL_002f: ret }") v0.VerifyIL("C.VB$StateMachine_6_F.MoveNext", " {