diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.cs index 4730703aa..e09609a66 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.cs @@ -30,7 +30,15 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty Two = 2, Four = 4 } - + + public enum ShortEnum : short + { + None = 0, + One = 1, + Two = 2, + Four = 4 + } + private struct StructContainer { public bool HasIndex; @@ -40,11 +48,17 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty public class MutableClass { public int Field; + public short ShortField; public int Property { get; set; } + + public byte ByteProperty { + get; + set; + } public uint this[string name] { get { @@ -65,12 +79,18 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty private StructContainer field1; private MyEnum enumField; public static int StaticField; - + public static short StaticShortField; + public static int StaticProperty { get; set; } - + + public static ShortEnum StaticShortProperty { + get; + set; + } + private MutableClass M() { return new MutableClass(); @@ -230,15 +250,30 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty array[pos]++; } + public int PreIncrementShortArrayElement(short[] array, int pos) + { + return --array[pos]; + } + + public int PostIncrementShortArrayElement(short[] array, int pos) + { + return array[pos]++; + } + + public void IncrementShortArrayElement(short[] array, int pos) + { + array[pos]++; + } + public int PreIncrementInstanceField() { return ++this.M().Field; } - //public int PostIncrementInstanceField() - //{ - // return this.M().Field++; - //} + public int PostIncrementInstanceField() + { + return this.M().Field++; + } public void IncrementInstanceField() { @@ -250,31 +285,61 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty return ++m.Field; } - //public int PostIncrementInstanceField2(MutableClass m) - //{ - // return m.Field++; - //} + public int PostIncrementInstanceField2(MutableClass m) + { + return m.Field++; + } public void IncrementInstanceField2(MutableClass m) { m.Field++; } + public int PreIncrementInstanceFieldShort() + { + return ++this.M().ShortField; + } + + public int PostIncrementInstanceFieldShort() + { + return this.M().ShortField++; + } + + public void IncrementInstanceFieldShort() + { + this.M().ShortField++; + } + public int PreIncrementInstanceProperty() { return ++this.M().Property; } - //public int PostIncrementInstanceProperty() - //{ - // return this.M().Property++; - //} + public int PostIncrementInstanceProperty() + { + return this.M().Property++; + } public void IncrementInstanceProperty() { this.M().Property++; } + public int PreIncrementInstancePropertyByte() + { + return ++this.M().ByteProperty; + } + + public int PostIncrementInstancePropertyByte() + { + return this.M().ByteProperty++; + } + + public void IncrementInstancePropertyByte() + { + this.M().ByteProperty++; + } + public int PreIncrementStaticField() { return ++CompoundAssignmentTest.StaticField; @@ -290,21 +355,51 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty CompoundAssignmentTest.StaticField++; } + public int PreIncrementStaticFieldShort() + { + return ++CompoundAssignmentTest.StaticShortField; + } + + public int PostIncrementStaticFieldShort() + { + return CompoundAssignmentTest.StaticShortField++; + } + + public void IncrementStaticFieldShort() + { + CompoundAssignmentTest.StaticShortField++; + } + public int PreIncrementStaticProperty() { return ++CompoundAssignmentTest.StaticProperty; } - //public int PostIncrementStaticProperty() - //{ - // return CompoundAssignmentTest.StaticProperty++; - //} + public int PostIncrementStaticProperty() + { + return CompoundAssignmentTest.StaticProperty++; + } public void IncrementStaticProperty() { CompoundAssignmentTest.StaticProperty++; } - + + public ShortEnum PreIncrementStaticPropertyShort() + { + return ++CompoundAssignmentTest.StaticShortProperty; + } + + public ShortEnum PostIncrementStaticPropertyShort() + { + return CompoundAssignmentTest.StaticShortProperty++; + } + + public void IncrementStaticPropertyShort() + { + CompoundAssignmentTest.StaticShortProperty++; + } + private static Item GetItem(object obj) { return null; diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.il index dfc206ce2..5d1d21eda 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.il +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.il @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.18020 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -10,7 +10,7 @@ .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. .ver 4:0:0:0 } -.assembly kiryblux +.assembly w1xcwa3w { .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 @@ -20,15 +20,15 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 } -.module kiryblux.dll -// MVID: {34EC794D-1FFD-488F-9BDC-2D5D9C15854D} +.module w1xcwa3w.dll +// MVID: {FAFFB825-2101-4417-8C03-0E0B083653E5} .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: 0x02A30000 +// Image base: 0x00D60000 // =============== CLASS MEMBERS DECLARATION =================== @@ -47,6 +47,16 @@ .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MyEnum Four = int32(0x00000004) } // end of class MyEnum + .class auto ansi sealed nested public ShortEnum + extends [mscorlib]System.Enum + { + .field public specialname rtspecialname int16 value__ + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum None = int16(0x0000) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum One = int16(0x0001) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum Two = int16(0x0002) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum Four = int16(0x0004) + } // end of class ShortEnum + .class sequential ansi sealed nested private beforefieldinit StructContainer extends [mscorlib]System.ValueType { @@ -59,8 +69,11 @@ { .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. .field public int32 Field + .field public int16 ShortField .field private int32 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private uint8 'k__BackingField' + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .method public hidebysig specialname instance int32 get_Property() cil managed { @@ -89,6 +102,34 @@ IL_0007: ret } // end of method MutableClass::set_Property + .method public hidebysig specialname + instance uint8 get_ByteProperty() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 11 (0xb) + .maxstack 1 + .locals init (uint8 V_0) + IL_0000: ldarg.0 + IL_0001: ldfld uint8 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::'k__BackingField' + IL_0006: stloc.0 + IL_0007: br.s IL_0009 + + IL_0009: ldloc.0 + IL_000a: ret + } // end of method MutableClass::get_ByteProperty + + .method public hidebysig specialname + instance void set_ByteProperty(uint8 'value') cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld uint8 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::'k__BackingField' + IL_0007: ret + } // end of method MutableClass::set_ByteProperty + .method public hidebysig specialname instance uint32 get_Item(string name) cil managed { @@ -129,6 +170,11 @@ .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_Property() .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::set_Property(int32) } // end of property MutableClass::Property + .property instance uint8 ByteProperty() + { + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::set_ByteProperty(uint8) + .get instance uint8 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_ByteProperty() + } // end of property MutableClass::ByteProperty .property instance uint32 Item(string) { .get instance uint32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_Item(string) @@ -158,8 +204,11 @@ .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/StructContainer field1 .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MyEnum enumField .field public static int32 StaticField + .field public static int16 StaticShortField .field private static int32 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum 'k__BackingField' + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .method public hidebysig specialname static int32 get_StaticProperty() cil managed { @@ -186,6 +235,33 @@ IL_0006: ret } // end of method CompoundAssignmentTest::set_StaticProperty + .method public hidebysig specialname static + valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum + get_StaticShortProperty() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 10 (0xa) + .maxstack 1 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum V_0) + IL_0000: ldsfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::'k__BackingField' + IL_0005: stloc.0 + IL_0006: br.s IL_0008 + + IL_0008: ldloc.0 + IL_0009: ret + } // end of method CompoundAssignmentTest::get_StaticShortProperty + + .method public hidebysig specialname static + void set_StaticShortProperty(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum 'value') cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: stsfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::'k__BackingField' + IL_0006: ret + } // end of method CompoundAssignmentTest::set_StaticShortProperty + .method private hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass M() cil managed { @@ -807,6 +883,81 @@ IL_0015: ret } // end of method CompoundAssignmentTest::IncrementArrayElement + .method public hidebysig instance int32 + PreIncrementShortArrayElement(int16[] 'array', + int32 pos) cil managed + { + // Code size 30 (0x1e) + .maxstack 3 + .locals init (int32 V_0, + int16 V_1) + IL_0000: nop + IL_0001: ldarg.1 + IL_0002: ldarg.2 + IL_0003: ldelema [mscorlib]System.Int16 + IL_0008: dup + IL_0009: ldobj [mscorlib]System.Int16 + IL_000e: ldc.i4.1 + IL_000f: sub + IL_0010: conv.i2 + IL_0011: dup + IL_0012: stloc.1 + IL_0013: stobj [mscorlib]System.Int16 + IL_0018: ldloc.1 + IL_0019: stloc.0 + IL_001a: br.s IL_001c + + IL_001c: ldloc.0 + IL_001d: ret + } // end of method CompoundAssignmentTest::PreIncrementShortArrayElement + + .method public hidebysig instance int32 + PostIncrementShortArrayElement(int16[] 'array', + int32 pos) cil managed + { + // Code size 30 (0x1e) + .maxstack 3 + .locals init (int32 V_0, + int16 V_1) + IL_0000: nop + IL_0001: ldarg.1 + IL_0002: ldarg.2 + IL_0003: ldelema [mscorlib]System.Int16 + IL_0008: dup + IL_0009: ldobj [mscorlib]System.Int16 + IL_000e: dup + IL_000f: stloc.1 + IL_0010: ldc.i4.1 + IL_0011: add + IL_0012: conv.i2 + IL_0013: stobj [mscorlib]System.Int16 + IL_0018: ldloc.1 + IL_0019: stloc.0 + IL_001a: br.s IL_001c + + IL_001c: ldloc.0 + IL_001d: ret + } // end of method CompoundAssignmentTest::PostIncrementShortArrayElement + + .method public hidebysig instance void + IncrementShortArrayElement(int16[] 'array', + int32 pos) cil managed + { + // Code size 23 (0x17) + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.1 + IL_0002: ldarg.2 + IL_0003: ldelema [mscorlib]System.Int16 + IL_0008: dup + IL_0009: ldobj [mscorlib]System.Int16 + IL_000e: ldc.i4.1 + IL_000f: add + IL_0010: conv.i2 + IL_0011: stobj [mscorlib]System.Int16 + IL_0016: ret + } // end of method CompoundAssignmentTest::IncrementShortArrayElement + .method public hidebysig instance int32 PreIncrementInstanceField() cil managed { @@ -832,6 +983,31 @@ IL_001b: ret } // end of method CompoundAssignmentTest::PreIncrementInstanceField + .method public hidebysig instance int32 + PostIncrementInstanceField() cil managed + { + // Code size 28 (0x1c) + .maxstack 3 + .locals init (int32 V_0, + int32 V_1) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0007: dup + IL_0008: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::Field + IL_000d: dup + IL_000e: stloc.1 + IL_000f: ldc.i4.1 + IL_0010: add + IL_0011: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::Field + IL_0016: ldloc.1 + IL_0017: stloc.0 + IL_0018: br.s IL_001a + + IL_001a: ldloc.0 + IL_001b: ret + } // end of method CompoundAssignmentTest::PostIncrementInstanceField + .method public hidebysig instance void IncrementInstanceField() cil managed { @@ -872,6 +1048,30 @@ IL_0016: ret } // end of method CompoundAssignmentTest::PreIncrementInstanceField2 + .method public hidebysig instance int32 + PostIncrementInstanceField2(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass m) cil managed + { + // Code size 23 (0x17) + .maxstack 3 + .locals init (int32 V_0, + int32 V_1) + IL_0000: nop + IL_0001: ldarg.1 + IL_0002: dup + IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::Field + IL_0008: dup + IL_0009: stloc.1 + IL_000a: ldc.i4.1 + IL_000b: add + IL_000c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::Field + IL_0011: ldloc.1 + IL_0012: stloc.0 + IL_0013: br.s IL_0015 + + IL_0015: ldloc.0 + IL_0016: ret + } // end of method CompoundAssignmentTest::PostIncrementInstanceField2 + .method public hidebysig instance void IncrementInstanceField2(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass m) cil managed { @@ -887,6 +1087,75 @@ IL_000f: ret } // end of method CompoundAssignmentTest::IncrementInstanceField2 + .method public hidebysig instance int32 + PreIncrementInstanceFieldShort() cil managed + { + // Code size 29 (0x1d) + .maxstack 3 + .locals init (int32 V_0, + int16 V_1) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0007: dup + IL_0008: ldfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::ShortField + IL_000d: ldc.i4.1 + IL_000e: add + IL_000f: conv.i2 + IL_0010: dup + IL_0011: stloc.1 + IL_0012: stfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::ShortField + IL_0017: ldloc.1 + IL_0018: stloc.0 + IL_0019: br.s IL_001b + + IL_001b: ldloc.0 + IL_001c: ret + } // end of method CompoundAssignmentTest::PreIncrementInstanceFieldShort + + .method public hidebysig instance int32 + PostIncrementInstanceFieldShort() cil managed + { + // Code size 29 (0x1d) + .maxstack 3 + .locals init (int32 V_0, + int16 V_1) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0007: dup + IL_0008: ldfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::ShortField + IL_000d: dup + IL_000e: stloc.1 + IL_000f: ldc.i4.1 + IL_0010: add + IL_0011: conv.i2 + IL_0012: stfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::ShortField + IL_0017: ldloc.1 + IL_0018: stloc.0 + IL_0019: br.s IL_001b + + IL_001b: ldloc.0 + IL_001c: ret + } // end of method CompoundAssignmentTest::PostIncrementInstanceFieldShort + + .method public hidebysig instance void + IncrementInstanceFieldShort() cil managed + { + // Code size 22 (0x16) + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0007: dup + IL_0008: ldfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::ShortField + IL_000d: ldc.i4.1 + IL_000e: add + IL_000f: conv.i2 + IL_0010: stfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::ShortField + IL_0015: ret + } // end of method CompoundAssignmentTest::IncrementInstanceFieldShort + .method public hidebysig instance int32 PreIncrementInstanceProperty() cil managed { @@ -913,6 +1182,32 @@ IL_001c: ret } // end of method CompoundAssignmentTest::PreIncrementInstanceProperty + .method public hidebysig instance int32 + PostIncrementInstanceProperty() cil managed + { + // Code size 29 (0x1d) + .maxstack 3 + .locals init (int32 V_0, + int32 V_1) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0007: dup + IL_0008: callvirt instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_Property() + IL_000d: dup + IL_000e: stloc.1 + IL_000f: ldc.i4.1 + IL_0010: add + IL_0011: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::set_Property(int32) + IL_0016: nop + IL_0017: ldloc.1 + IL_0018: stloc.0 + IL_0019: br.s IL_001b + + IL_001b: ldloc.0 + IL_001c: ret + } // end of method CompoundAssignmentTest::PostIncrementInstanceProperty + .method public hidebysig instance void IncrementInstanceProperty() cil managed { @@ -930,6 +1225,78 @@ IL_0015: ret } // end of method CompoundAssignmentTest::IncrementInstanceProperty + .method public hidebysig instance int32 + PreIncrementInstancePropertyByte() cil managed + { + // Code size 30 (0x1e) + .maxstack 3 + .locals init (int32 V_0, + uint8 V_1) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0007: dup + IL_0008: callvirt instance uint8 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_ByteProperty() + IL_000d: ldc.i4.1 + IL_000e: add + IL_000f: conv.u1 + IL_0010: dup + IL_0011: stloc.1 + IL_0012: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::set_ByteProperty(uint8) + IL_0017: nop + IL_0018: ldloc.1 + IL_0019: stloc.0 + IL_001a: br.s IL_001c + + IL_001c: ldloc.0 + IL_001d: ret + } // end of method CompoundAssignmentTest::PreIncrementInstancePropertyByte + + .method public hidebysig instance int32 + PostIncrementInstancePropertyByte() cil managed + { + // Code size 30 (0x1e) + .maxstack 3 + .locals init (int32 V_0, + uint8 V_1) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0007: dup + IL_0008: callvirt instance uint8 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_ByteProperty() + IL_000d: dup + IL_000e: stloc.1 + IL_000f: ldc.i4.1 + IL_0010: add + IL_0011: conv.u1 + IL_0012: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::set_ByteProperty(uint8) + IL_0017: nop + IL_0018: ldloc.1 + IL_0019: stloc.0 + IL_001a: br.s IL_001c + + IL_001c: ldloc.0 + IL_001d: ret + } // end of method CompoundAssignmentTest::PostIncrementInstancePropertyByte + + .method public hidebysig instance void + IncrementInstancePropertyByte() cil managed + { + // Code size 23 (0x17) + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0007: dup + IL_0008: callvirt instance uint8 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_ByteProperty() + IL_000d: ldc.i4.1 + IL_000e: add + IL_000f: conv.u1 + IL_0010: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::set_ByteProperty(uint8) + IL_0015: nop + IL_0016: ret + } // end of method CompoundAssignmentTest::IncrementInstancePropertyByte + .method public hidebysig instance int32 PreIncrementStaticField() cil managed { @@ -981,6 +1348,60 @@ IL_000d: ret } // end of method CompoundAssignmentTest::IncrementStaticField + .method public hidebysig instance int32 + PreIncrementStaticFieldShort() cil managed + { + // Code size 20 (0x14) + .maxstack 2 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldsfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::StaticShortField + IL_0006: ldc.i4.1 + IL_0007: add + IL_0008: conv.i2 + IL_0009: dup + IL_000a: stsfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::StaticShortField + IL_000f: stloc.0 + IL_0010: br.s IL_0012 + + IL_0012: ldloc.0 + IL_0013: ret + } // end of method CompoundAssignmentTest::PreIncrementStaticFieldShort + + .method public hidebysig instance int32 + PostIncrementStaticFieldShort() cil managed + { + // Code size 20 (0x14) + .maxstack 3 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldsfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::StaticShortField + IL_0006: dup + IL_0007: ldc.i4.1 + IL_0008: add + IL_0009: conv.i2 + IL_000a: stsfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::StaticShortField + IL_000f: stloc.0 + IL_0010: br.s IL_0012 + + IL_0012: ldloc.0 + IL_0013: ret + } // end of method CompoundAssignmentTest::PostIncrementStaticFieldShort + + .method public hidebysig instance void + IncrementStaticFieldShort() cil managed + { + // Code size 15 (0xf) + .maxstack 8 + IL_0000: nop + IL_0001: ldsfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::StaticShortField + IL_0006: ldc.i4.1 + IL_0007: add + IL_0008: conv.i2 + IL_0009: stsfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::StaticShortField + IL_000e: ret + } // end of method CompoundAssignmentTest::IncrementStaticFieldShort + .method public hidebysig instance int32 PreIncrementStaticProperty() cil managed { @@ -1001,6 +1422,26 @@ IL_0013: ret } // end of method CompoundAssignmentTest::PreIncrementStaticProperty + .method public hidebysig instance int32 + PostIncrementStaticProperty() cil managed + { + // Code size 20 (0x14) + .maxstack 3 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: call int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::get_StaticProperty() + IL_0006: dup + IL_0007: ldc.i4.1 + IL_0008: add + IL_0009: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::set_StaticProperty(int32) + IL_000e: nop + IL_000f: stloc.0 + IL_0010: br.s IL_0012 + + IL_0012: ldloc.0 + IL_0013: ret + } // end of method CompoundAssignmentTest::PostIncrementStaticProperty + .method public hidebysig instance void IncrementStaticProperty() cil managed { @@ -1015,6 +1456,63 @@ IL_000e: ret } // end of method CompoundAssignmentTest::IncrementStaticProperty + .method public hidebysig instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum + PreIncrementStaticPropertyShort() cil managed + { + // Code size 21 (0x15) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum V_0) + IL_0000: nop + IL_0001: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::get_StaticShortProperty() + IL_0006: ldc.i4.1 + IL_0007: add + IL_0008: conv.i2 + IL_0009: dup + IL_000a: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::set_StaticShortProperty(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum) + IL_000f: nop + IL_0010: stloc.0 + IL_0011: br.s IL_0013 + + IL_0013: ldloc.0 + IL_0014: ret + } // end of method CompoundAssignmentTest::PreIncrementStaticPropertyShort + + .method public hidebysig instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum + PostIncrementStaticPropertyShort() cil managed + { + // Code size 21 (0x15) + .maxstack 3 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum V_0) + IL_0000: nop + IL_0001: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::get_StaticShortProperty() + IL_0006: dup + IL_0007: ldc.i4.1 + IL_0008: add + IL_0009: conv.i2 + IL_000a: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::set_StaticShortProperty(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum) + IL_000f: nop + IL_0010: stloc.0 + IL_0011: br.s IL_0013 + + IL_0013: ldloc.0 + IL_0014: ret + } // end of method CompoundAssignmentTest::PostIncrementStaticPropertyShort + + .method public hidebysig instance void + IncrementStaticPropertyShort() cil managed + { + // Code size 16 (0x10) + .maxstack 8 + IL_0000: nop + IL_0001: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::get_StaticShortProperty() + IL_0006: ldc.i4.1 + IL_0007: add + IL_0008: conv.i2 + IL_0009: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::set_StaticShortProperty(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum) + IL_000e: nop + IL_000f: ret + } // end of method CompoundAssignmentTest::IncrementStaticPropertyShort + .method private hidebysig static class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/Item GetItem(object obj) cil managed { @@ -1060,6 +1558,12 @@ .get int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::get_StaticProperty() .set void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::set_StaticProperty(int32) } // end of property CompoundAssignmentTest::StaticProperty + .property valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum + StaticShortProperty() + { + .get valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::get_StaticShortProperty() + .set void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::set_StaticShortProperty(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum) + } // end of property CompoundAssignmentTest::StaticShortProperty } // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.opt.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.opt.il index 2dea51f56..09d5a0a91 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.opt.il +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.opt.il @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.18020 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -10,7 +10,7 @@ .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. .ver 4:0:0:0 } -.assembly d4bhqxbe +.assembly pbv15mad { .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 @@ -20,15 +20,15 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 } -.module d4bhqxbe.dll -// MVID: {B884BD61-6FE3-4893-B161-02EE675C0DF0} +.module pbv15mad.dll +// MVID: {7F137601-6720-4272-9855-AEC542FD460D} .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: 0x003A0000 +// Image base: 0x01300000 // =============== CLASS MEMBERS DECLARATION =================== @@ -47,6 +47,16 @@ .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MyEnum Four = int32(0x00000004) } // end of class MyEnum + .class auto ansi sealed nested public ShortEnum + extends [mscorlib]System.Enum + { + .field public specialname rtspecialname int16 value__ + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum None = int16(0x0000) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum One = int16(0x0001) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum Two = int16(0x0002) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum Four = int16(0x0004) + } // end of class ShortEnum + .class sequential ansi sealed nested private beforefieldinit StructContainer extends [mscorlib]System.ValueType { @@ -59,8 +69,11 @@ { .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. .field public int32 Field + .field public int16 ShortField .field private int32 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private uint8 'k__BackingField' + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .method public hidebysig specialname instance int32 get_Property() cil managed { @@ -84,6 +97,29 @@ IL_0007: ret } // end of method MutableClass::set_Property + .method public hidebysig specialname + instance uint8 get_ByteProperty() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld uint8 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::'k__BackingField' + IL_0006: ret + } // end of method MutableClass::get_ByteProperty + + .method public hidebysig specialname + instance void set_ByteProperty(uint8 'value') cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld uint8 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::'k__BackingField' + IL_0007: ret + } // end of method MutableClass::set_ByteProperty + .method public hidebysig specialname instance uint32 get_Item(string name) cil managed { @@ -117,6 +153,11 @@ .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_Property() .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::set_Property(int32) } // end of property MutableClass::Property + .property instance uint8 ByteProperty() + { + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::set_ByteProperty(uint8) + .get instance uint8 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_ByteProperty() + } // end of property MutableClass::ByteProperty .property instance uint32 Item(string) { .get instance uint32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_Item(string) @@ -146,8 +187,11 @@ .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/StructContainer field1 .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MyEnum enumField .field public static int32 StaticField + .field public static int16 StaticShortField .field private static int32 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum 'k__BackingField' + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .method public hidebysig specialname static int32 get_StaticProperty() cil managed { @@ -169,6 +213,28 @@ IL_0006: ret } // end of method CompoundAssignmentTest::set_StaticProperty + .method public hidebysig specialname static + valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum + get_StaticShortProperty() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::'k__BackingField' + IL_0005: ret + } // end of method CompoundAssignmentTest::get_StaticShortProperty + + .method public hidebysig specialname static + void set_StaticShortProperty(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum 'value') cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: stsfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::'k__BackingField' + IL_0006: ret + } // end of method CompoundAssignmentTest::set_StaticShortProperty + .method private hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass M() cil managed { @@ -685,6 +751,68 @@ IL_0014: ret } // end of method CompoundAssignmentTest::IncrementArrayElement + .method public hidebysig instance int32 + PreIncrementShortArrayElement(int16[] 'array', + int32 pos) cil managed + { + // Code size 25 (0x19) + .maxstack 3 + .locals init (int16 V_0) + IL_0000: ldarg.1 + IL_0001: ldarg.2 + IL_0002: ldelema [mscorlib]System.Int16 + IL_0007: dup + IL_0008: ldobj [mscorlib]System.Int16 + IL_000d: ldc.i4.1 + IL_000e: sub + IL_000f: conv.i2 + IL_0010: dup + IL_0011: stloc.0 + IL_0012: stobj [mscorlib]System.Int16 + IL_0017: ldloc.0 + IL_0018: ret + } // end of method CompoundAssignmentTest::PreIncrementShortArrayElement + + .method public hidebysig instance int32 + PostIncrementShortArrayElement(int16[] 'array', + int32 pos) cil managed + { + // Code size 25 (0x19) + .maxstack 3 + .locals init (int16 V_0) + IL_0000: ldarg.1 + IL_0001: ldarg.2 + IL_0002: ldelema [mscorlib]System.Int16 + IL_0007: dup + IL_0008: ldobj [mscorlib]System.Int16 + IL_000d: dup + IL_000e: stloc.0 + IL_000f: ldc.i4.1 + IL_0010: add + IL_0011: conv.i2 + IL_0012: stobj [mscorlib]System.Int16 + IL_0017: ldloc.0 + IL_0018: ret + } // end of method CompoundAssignmentTest::PostIncrementShortArrayElement + + .method public hidebysig instance void + IncrementShortArrayElement(int16[] 'array', + int32 pos) cil managed + { + // Code size 22 (0x16) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.2 + IL_0002: ldelema [mscorlib]System.Int16 + IL_0007: dup + IL_0008: ldobj [mscorlib]System.Int16 + IL_000d: ldc.i4.1 + IL_000e: add + IL_000f: conv.i2 + IL_0010: stobj [mscorlib]System.Int16 + IL_0015: ret + } // end of method CompoundAssignmentTest::IncrementShortArrayElement + .method public hidebysig instance int32 PreIncrementInstanceField() cil managed { @@ -704,6 +832,25 @@ IL_0016: ret } // end of method CompoundAssignmentTest::PreIncrementInstanceField + .method public hidebysig instance int32 + PostIncrementInstanceField() cil managed + { + // Code size 23 (0x17) + .maxstack 3 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0006: dup + IL_0007: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::Field + IL_000c: dup + IL_000d: stloc.0 + IL_000e: ldc.i4.1 + IL_000f: add + IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::Field + IL_0015: ldloc.0 + IL_0016: ret + } // end of method CompoundAssignmentTest::PostIncrementInstanceField + .method public hidebysig instance void IncrementInstanceField() cil managed { @@ -737,6 +884,24 @@ IL_0011: ret } // end of method CompoundAssignmentTest::PreIncrementInstanceField2 + .method public hidebysig instance int32 + PostIncrementInstanceField2(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass m) cil managed + { + // Code size 18 (0x12) + .maxstack 3 + .locals init (int32 V_0) + IL_0000: ldarg.1 + IL_0001: dup + IL_0002: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::Field + IL_0007: dup + IL_0008: stloc.0 + IL_0009: ldc.i4.1 + IL_000a: add + IL_000b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::Field + IL_0010: ldloc.0 + IL_0011: ret + } // end of method CompoundAssignmentTest::PostIncrementInstanceField2 + .method public hidebysig instance void IncrementInstanceField2(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass m) cil managed { @@ -751,6 +916,62 @@ IL_000e: ret } // end of method CompoundAssignmentTest::IncrementInstanceField2 + .method public hidebysig instance int32 + PreIncrementInstanceFieldShort() cil managed + { + // Code size 24 (0x18) + .maxstack 3 + .locals init (int16 V_0) + IL_0000: ldarg.0 + IL_0001: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0006: dup + IL_0007: ldfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::ShortField + IL_000c: ldc.i4.1 + IL_000d: add + IL_000e: conv.i2 + IL_000f: dup + IL_0010: stloc.0 + IL_0011: stfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::ShortField + IL_0016: ldloc.0 + IL_0017: ret + } // end of method CompoundAssignmentTest::PreIncrementInstanceFieldShort + + .method public hidebysig instance int32 + PostIncrementInstanceFieldShort() cil managed + { + // Code size 24 (0x18) + .maxstack 3 + .locals init (int16 V_0) + IL_0000: ldarg.0 + IL_0001: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0006: dup + IL_0007: ldfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::ShortField + IL_000c: dup + IL_000d: stloc.0 + IL_000e: ldc.i4.1 + IL_000f: add + IL_0010: conv.i2 + IL_0011: stfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::ShortField + IL_0016: ldloc.0 + IL_0017: ret + } // end of method CompoundAssignmentTest::PostIncrementInstanceFieldShort + + .method public hidebysig instance void + IncrementInstanceFieldShort() cil managed + { + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0006: dup + IL_0007: ldfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::ShortField + IL_000c: ldc.i4.1 + IL_000d: add + IL_000e: conv.i2 + IL_000f: stfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::ShortField + IL_0014: ret + } // end of method CompoundAssignmentTest::IncrementInstanceFieldShort + .method public hidebysig instance int32 PreIncrementInstanceProperty() cil managed { @@ -770,6 +991,25 @@ IL_0016: ret } // end of method CompoundAssignmentTest::PreIncrementInstanceProperty + .method public hidebysig instance int32 + PostIncrementInstanceProperty() cil managed + { + // Code size 23 (0x17) + .maxstack 3 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0006: dup + IL_0007: callvirt instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_Property() + IL_000c: dup + IL_000d: stloc.0 + IL_000e: ldc.i4.1 + IL_000f: add + IL_0010: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::set_Property(int32) + IL_0015: ldloc.0 + IL_0016: ret + } // end of method CompoundAssignmentTest::PostIncrementInstanceProperty + .method public hidebysig instance void IncrementInstanceProperty() cil managed { @@ -785,6 +1025,62 @@ IL_0013: ret } // end of method CompoundAssignmentTest::IncrementInstanceProperty + .method public hidebysig instance int32 + PreIncrementInstancePropertyByte() cil managed + { + // Code size 24 (0x18) + .maxstack 3 + .locals init (uint8 V_0) + IL_0000: ldarg.0 + IL_0001: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0006: dup + IL_0007: callvirt instance uint8 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_ByteProperty() + IL_000c: ldc.i4.1 + IL_000d: add + IL_000e: conv.u1 + IL_000f: dup + IL_0010: stloc.0 + IL_0011: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::set_ByteProperty(uint8) + IL_0016: ldloc.0 + IL_0017: ret + } // end of method CompoundAssignmentTest::PreIncrementInstancePropertyByte + + .method public hidebysig instance int32 + PostIncrementInstancePropertyByte() cil managed + { + // Code size 24 (0x18) + .maxstack 3 + .locals init (uint8 V_0) + IL_0000: ldarg.0 + IL_0001: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0006: dup + IL_0007: callvirt instance uint8 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_ByteProperty() + IL_000c: dup + IL_000d: stloc.0 + IL_000e: ldc.i4.1 + IL_000f: add + IL_0010: conv.u1 + IL_0011: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::set_ByteProperty(uint8) + IL_0016: ldloc.0 + IL_0017: ret + } // end of method CompoundAssignmentTest::PostIncrementInstancePropertyByte + + .method public hidebysig instance void + IncrementInstancePropertyByte() cil managed + { + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0006: dup + IL_0007: callvirt instance uint8 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_ByteProperty() + IL_000c: ldc.i4.1 + IL_000d: add + IL_000e: conv.u1 + IL_000f: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::set_ByteProperty(uint8) + IL_0014: ret + } // end of method CompoundAssignmentTest::IncrementInstancePropertyByte + .method public hidebysig instance int32 PreIncrementStaticField() cil managed { @@ -823,6 +1119,47 @@ IL_000c: ret } // end of method CompoundAssignmentTest::IncrementStaticField + .method public hidebysig instance int32 + PreIncrementStaticFieldShort() cil managed + { + // Code size 15 (0xf) + .maxstack 8 + IL_0000: ldsfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::StaticShortField + IL_0005: ldc.i4.1 + IL_0006: add + IL_0007: conv.i2 + IL_0008: dup + IL_0009: stsfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::StaticShortField + IL_000e: ret + } // end of method CompoundAssignmentTest::PreIncrementStaticFieldShort + + .method public hidebysig instance int32 + PostIncrementStaticFieldShort() cil managed + { + // Code size 15 (0xf) + .maxstack 8 + IL_0000: ldsfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::StaticShortField + IL_0005: dup + IL_0006: ldc.i4.1 + IL_0007: add + IL_0008: conv.i2 + IL_0009: stsfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::StaticShortField + IL_000e: ret + } // end of method CompoundAssignmentTest::PostIncrementStaticFieldShort + + .method public hidebysig instance void + IncrementStaticFieldShort() cil managed + { + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldsfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::StaticShortField + IL_0005: ldc.i4.1 + IL_0006: add + IL_0007: conv.i2 + IL_0008: stsfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::StaticShortField + IL_000d: ret + } // end of method CompoundAssignmentTest::IncrementStaticFieldShort + .method public hidebysig instance int32 PreIncrementStaticProperty() cil managed { @@ -836,6 +1173,19 @@ IL_000d: ret } // end of method CompoundAssignmentTest::PreIncrementStaticProperty + .method public hidebysig instance int32 + PostIncrementStaticProperty() cil managed + { + // Code size 14 (0xe) + .maxstack 8 + IL_0000: call int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::get_StaticProperty() + IL_0005: dup + IL_0006: ldc.i4.1 + IL_0007: add + IL_0008: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::set_StaticProperty(int32) + IL_000d: ret + } // end of method CompoundAssignmentTest::PostIncrementStaticProperty + .method public hidebysig instance void IncrementStaticProperty() cil managed { @@ -848,6 +1198,47 @@ IL_000c: ret } // end of method CompoundAssignmentTest::IncrementStaticProperty + .method public hidebysig instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum + PreIncrementStaticPropertyShort() cil managed + { + // Code size 15 (0xf) + .maxstack 8 + IL_0000: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::get_StaticShortProperty() + IL_0005: ldc.i4.1 + IL_0006: add + IL_0007: conv.i2 + IL_0008: dup + IL_0009: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::set_StaticShortProperty(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum) + IL_000e: ret + } // end of method CompoundAssignmentTest::PreIncrementStaticPropertyShort + + .method public hidebysig instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum + PostIncrementStaticPropertyShort() cil managed + { + // Code size 15 (0xf) + .maxstack 8 + IL_0000: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::get_StaticShortProperty() + IL_0005: dup + IL_0006: ldc.i4.1 + IL_0007: add + IL_0008: conv.i2 + IL_0009: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::set_StaticShortProperty(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum) + IL_000e: ret + } // end of method CompoundAssignmentTest::PostIncrementStaticPropertyShort + + .method public hidebysig instance void + IncrementStaticPropertyShort() cil managed + { + // Code size 14 (0xe) + .maxstack 8 + IL_0000: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::get_StaticShortProperty() + IL_0005: ldc.i4.1 + IL_0006: add + IL_0007: conv.i2 + IL_0008: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::set_StaticShortProperty(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum) + IL_000d: ret + } // end of method CompoundAssignmentTest::IncrementStaticPropertyShort + .method private hidebysig static class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/Item GetItem(object obj) cil managed { @@ -886,6 +1277,12 @@ .get int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::get_StaticProperty() .set void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::set_StaticProperty(int32) } // end of property CompoundAssignmentTest::StaticProperty + .property valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum + StaticShortProperty() + { + .get valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::get_StaticShortProperty() + .set void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::set_StaticShortProperty(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum) + } // end of property CompoundAssignmentTest::StaticShortProperty } // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.opt.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.opt.roslyn.il index 36f83b082..feb9ee854 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.opt.roslyn.il +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.opt.roslyn.il @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.18020 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -25,14 +25,14 @@ .ver 0:0:0:0 } .module CompoundAssignmentTest.dll -// MVID: {6E5749EE-F4C5-4B86-96FC-F4A665551BA6} +// MVID: {7FF443A1-4D5C-4B6C-ABE8-2BE60079524D} .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: 0x028A0000 +// Image base: 0x02DC0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -51,6 +51,16 @@ .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MyEnum Four = int32(0x00000004) } // end of class MyEnum + .class auto ansi sealed nested public ShortEnum + extends [mscorlib]System.Enum + { + .field public specialname rtspecialname int16 value__ + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum None = int16(0x0000) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum One = int16(0x0001) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum Two = int16(0x0002) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum Four = int16(0x0004) + } // end of class ShortEnum + .class sequential ansi sealed nested private beforefieldinit StructContainer extends [mscorlib]System.ValueType { @@ -63,8 +73,11 @@ { .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. .field public int32 Field + .field public int16 ShortField .field private int32 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private uint8 'k__BackingField' + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .method public hidebysig specialname instance int32 get_Property() cil managed { @@ -88,6 +101,29 @@ IL_0007: ret } // end of method MutableClass::set_Property + .method public hidebysig specialname + instance uint8 get_ByteProperty() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld uint8 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::'k__BackingField' + IL_0006: ret + } // end of method MutableClass::get_ByteProperty + + .method public hidebysig specialname + instance void set_ByteProperty(uint8 'value') cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld uint8 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::'k__BackingField' + IL_0007: ret + } // end of method MutableClass::set_ByteProperty + .method public hidebysig specialname instance uint32 get_Item(string name) cil managed { @@ -121,6 +157,11 @@ .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_Property() .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::set_Property(int32) } // end of property MutableClass::Property + .property instance uint8 ByteProperty() + { + .get instance uint8 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_ByteProperty() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::set_ByteProperty(uint8) + } // end of property MutableClass::ByteProperty .property instance uint32 Item(string) { .get instance uint32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_Item(string) @@ -150,8 +191,11 @@ .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/StructContainer field1 .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MyEnum enumField .field public static int32 StaticField + .field public static int16 StaticShortField .field private static int32 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .field private static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum 'k__BackingField' + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .method public hidebysig specialname static int32 get_StaticProperty() cil managed { @@ -173,6 +217,28 @@ IL_0006: ret } // end of method CompoundAssignmentTest::set_StaticProperty + .method public hidebysig specialname static + valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum + get_StaticShortProperty() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::'k__BackingField' + IL_0005: ret + } // end of method CompoundAssignmentTest::get_StaticShortProperty + + .method public hidebysig specialname static + void set_StaticShortProperty(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum 'value') cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: stsfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::'k__BackingField' + IL_0006: ret + } // end of method CompoundAssignmentTest::set_StaticShortProperty + .method private hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass M() cil managed { @@ -688,6 +754,68 @@ IL_000c: ret } // end of method CompoundAssignmentTest::IncrementArrayElement + .method public hidebysig instance int32 + PreIncrementShortArrayElement(int16[] 'array', + int32 pos) cil managed + { + // Code size 17 (0x11) + .maxstack 3 + .locals init (int16 V_0) + IL_0000: ldarg.1 + IL_0001: ldarg.2 + IL_0002: ldelema [mscorlib]System.Int16 + IL_0007: dup + IL_0008: ldind.i2 + IL_0009: ldc.i4.1 + IL_000a: sub + IL_000b: conv.i2 + IL_000c: stloc.0 + IL_000d: ldloc.0 + IL_000e: stind.i2 + IL_000f: ldloc.0 + IL_0010: ret + } // end of method CompoundAssignmentTest::PreIncrementShortArrayElement + + .method public hidebysig instance int32 + PostIncrementShortArrayElement(int16[] 'array', + int32 pos) cil managed + { + // Code size 17 (0x11) + .maxstack 3 + .locals init (int16 V_0) + IL_0000: ldarg.1 + IL_0001: ldarg.2 + IL_0002: ldelema [mscorlib]System.Int16 + IL_0007: dup + IL_0008: ldind.i2 + IL_0009: stloc.0 + IL_000a: ldloc.0 + IL_000b: ldc.i4.1 + IL_000c: add + IL_000d: conv.i2 + IL_000e: stind.i2 + IL_000f: ldloc.0 + IL_0010: ret + } // end of method CompoundAssignmentTest::PostIncrementShortArrayElement + + .method public hidebysig instance void + IncrementShortArrayElement(int16[] 'array', + int32 pos) cil managed + { + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: ldarg.2 + IL_0002: ldelema [mscorlib]System.Int16 + IL_0007: dup + IL_0008: ldind.i2 + IL_0009: ldc.i4.1 + IL_000a: add + IL_000b: conv.i2 + IL_000c: stind.i2 + IL_000d: ret + } // end of method CompoundAssignmentTest::IncrementShortArrayElement + .method public hidebysig instance int32 PreIncrementInstanceField() cil managed { @@ -707,6 +835,25 @@ IL_0016: ret } // end of method CompoundAssignmentTest::PreIncrementInstanceField + .method public hidebysig instance int32 + PostIncrementInstanceField() cil managed + { + // Code size 23 (0x17) + .maxstack 3 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0006: dup + IL_0007: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::Field + IL_000c: stloc.0 + IL_000d: ldloc.0 + IL_000e: ldc.i4.1 + IL_000f: add + IL_0010: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::Field + IL_0015: ldloc.0 + IL_0016: ret + } // end of method CompoundAssignmentTest::PostIncrementInstanceField + .method public hidebysig instance void IncrementInstanceField() cil managed { @@ -740,6 +887,24 @@ IL_0011: ret } // end of method CompoundAssignmentTest::PreIncrementInstanceField2 + .method public hidebysig instance int32 + PostIncrementInstanceField2(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass m) cil managed + { + // Code size 18 (0x12) + .maxstack 3 + .locals init (int32 V_0) + IL_0000: ldarg.1 + IL_0001: dup + IL_0002: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::Field + IL_0007: stloc.0 + IL_0008: ldloc.0 + IL_0009: ldc.i4.1 + IL_000a: add + IL_000b: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::Field + IL_0010: ldloc.0 + IL_0011: ret + } // end of method CompoundAssignmentTest::PostIncrementInstanceField2 + .method public hidebysig instance void IncrementInstanceField2(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass m) cil managed { @@ -754,6 +919,62 @@ IL_000e: ret } // end of method CompoundAssignmentTest::IncrementInstanceField2 + .method public hidebysig instance int32 + PreIncrementInstanceFieldShort() cil managed + { + // Code size 24 (0x18) + .maxstack 3 + .locals init (int16 V_0) + IL_0000: ldarg.0 + IL_0001: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0006: dup + IL_0007: ldfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::ShortField + IL_000c: ldc.i4.1 + IL_000d: add + IL_000e: conv.i2 + IL_000f: stloc.0 + IL_0010: ldloc.0 + IL_0011: stfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::ShortField + IL_0016: ldloc.0 + IL_0017: ret + } // end of method CompoundAssignmentTest::PreIncrementInstanceFieldShort + + .method public hidebysig instance int32 + PostIncrementInstanceFieldShort() cil managed + { + // Code size 24 (0x18) + .maxstack 3 + .locals init (int16 V_0) + IL_0000: ldarg.0 + IL_0001: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0006: dup + IL_0007: ldfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::ShortField + IL_000c: stloc.0 + IL_000d: ldloc.0 + IL_000e: ldc.i4.1 + IL_000f: add + IL_0010: conv.i2 + IL_0011: stfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::ShortField + IL_0016: ldloc.0 + IL_0017: ret + } // end of method CompoundAssignmentTest::PostIncrementInstanceFieldShort + + .method public hidebysig instance void + IncrementInstanceFieldShort() cil managed + { + // Code size 21 (0x15) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0006: dup + IL_0007: ldfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::ShortField + IL_000c: ldc.i4.1 + IL_000d: add + IL_000e: conv.i2 + IL_000f: stfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::ShortField + IL_0014: ret + } // end of method CompoundAssignmentTest::IncrementInstanceFieldShort + .method public hidebysig instance int32 PreIncrementInstanceProperty() cil managed { @@ -773,6 +994,25 @@ IL_0016: ret } // end of method CompoundAssignmentTest::PreIncrementInstanceProperty + .method public hidebysig instance int32 + PostIncrementInstanceProperty() cil managed + { + // Code size 23 (0x17) + .maxstack 3 + .locals init (int32 V_0) + IL_0000: ldarg.0 + IL_0001: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0006: dup + IL_0007: callvirt instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_Property() + IL_000c: stloc.0 + IL_000d: ldloc.0 + IL_000e: ldc.i4.1 + IL_000f: add + IL_0010: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::set_Property(int32) + IL_0015: ldloc.0 + IL_0016: ret + } // end of method CompoundAssignmentTest::PostIncrementInstanceProperty + .method public hidebysig instance void IncrementInstanceProperty() cil managed { @@ -791,6 +1031,65 @@ IL_0015: ret } // end of method CompoundAssignmentTest::IncrementInstanceProperty + .method public hidebysig instance int32 + PreIncrementInstancePropertyByte() cil managed + { + // Code size 24 (0x18) + .maxstack 3 + .locals init (uint8 V_0) + IL_0000: ldarg.0 + IL_0001: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0006: dup + IL_0007: callvirt instance uint8 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_ByteProperty() + IL_000c: ldc.i4.1 + IL_000d: add + IL_000e: conv.u1 + IL_000f: stloc.0 + IL_0010: ldloc.0 + IL_0011: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::set_ByteProperty(uint8) + IL_0016: ldloc.0 + IL_0017: ret + } // end of method CompoundAssignmentTest::PreIncrementInstancePropertyByte + + .method public hidebysig instance int32 + PostIncrementInstancePropertyByte() cil managed + { + // Code size 24 (0x18) + .maxstack 3 + .locals init (uint8 V_0) + IL_0000: ldarg.0 + IL_0001: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0006: dup + IL_0007: callvirt instance uint8 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_ByteProperty() + IL_000c: stloc.0 + IL_000d: ldloc.0 + IL_000e: ldc.i4.1 + IL_000f: add + IL_0010: conv.u1 + IL_0011: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::set_ByteProperty(uint8) + IL_0016: ldloc.0 + IL_0017: ret + } // end of method CompoundAssignmentTest::PostIncrementInstancePropertyByte + + .method public hidebysig instance void + IncrementInstancePropertyByte() cil managed + { + // Code size 23 (0x17) + .maxstack 3 + .locals init (uint8 V_0) + IL_0000: ldarg.0 + IL_0001: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0006: dup + IL_0007: callvirt instance uint8 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_ByteProperty() + IL_000c: stloc.0 + IL_000d: ldloc.0 + IL_000e: ldc.i4.1 + IL_000f: add + IL_0010: conv.u1 + IL_0011: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::set_ByteProperty(uint8) + IL_0016: ret + } // end of method CompoundAssignmentTest::IncrementInstancePropertyByte + .method public hidebysig instance int32 PreIncrementStaticField() cil managed { @@ -829,6 +1128,47 @@ IL_000c: ret } // end of method CompoundAssignmentTest::IncrementStaticField + .method public hidebysig instance int32 + PreIncrementStaticFieldShort() cil managed + { + // Code size 15 (0xf) + .maxstack 8 + IL_0000: ldsfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::StaticShortField + IL_0005: ldc.i4.1 + IL_0006: add + IL_0007: conv.i2 + IL_0008: dup + IL_0009: stsfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::StaticShortField + IL_000e: ret + } // end of method CompoundAssignmentTest::PreIncrementStaticFieldShort + + .method public hidebysig instance int32 + PostIncrementStaticFieldShort() cil managed + { + // Code size 15 (0xf) + .maxstack 8 + IL_0000: ldsfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::StaticShortField + IL_0005: dup + IL_0006: ldc.i4.1 + IL_0007: add + IL_0008: conv.i2 + IL_0009: stsfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::StaticShortField + IL_000e: ret + } // end of method CompoundAssignmentTest::PostIncrementStaticFieldShort + + .method public hidebysig instance void + IncrementStaticFieldShort() cil managed + { + // Code size 14 (0xe) + .maxstack 8 + IL_0000: ldsfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::StaticShortField + IL_0005: ldc.i4.1 + IL_0006: add + IL_0007: conv.i2 + IL_0008: stsfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::StaticShortField + IL_000d: ret + } // end of method CompoundAssignmentTest::IncrementStaticFieldShort + .method public hidebysig instance int32 PreIncrementStaticProperty() cil managed { @@ -842,6 +1182,19 @@ IL_000d: ret } // end of method CompoundAssignmentTest::PreIncrementStaticProperty + .method public hidebysig instance int32 + PostIncrementStaticProperty() cil managed + { + // Code size 14 (0xe) + .maxstack 8 + IL_0000: call int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::get_StaticProperty() + IL_0005: dup + IL_0006: ldc.i4.1 + IL_0007: add + IL_0008: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::set_StaticProperty(int32) + IL_000d: ret + } // end of method CompoundAssignmentTest::PostIncrementStaticProperty + .method public hidebysig instance void IncrementStaticProperty() cil managed { @@ -854,6 +1207,47 @@ IL_000c: ret } // end of method CompoundAssignmentTest::IncrementStaticProperty + .method public hidebysig instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum + PreIncrementStaticPropertyShort() cil managed + { + // Code size 15 (0xf) + .maxstack 8 + IL_0000: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::get_StaticShortProperty() + IL_0005: ldc.i4.1 + IL_0006: add + IL_0007: conv.i2 + IL_0008: dup + IL_0009: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::set_StaticShortProperty(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum) + IL_000e: ret + } // end of method CompoundAssignmentTest::PreIncrementStaticPropertyShort + + .method public hidebysig instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum + PostIncrementStaticPropertyShort() cil managed + { + // Code size 15 (0xf) + .maxstack 8 + IL_0000: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::get_StaticShortProperty() + IL_0005: dup + IL_0006: ldc.i4.1 + IL_0007: add + IL_0008: conv.i2 + IL_0009: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::set_StaticShortProperty(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum) + IL_000e: ret + } // end of method CompoundAssignmentTest::PostIncrementStaticPropertyShort + + .method public hidebysig instance void + IncrementStaticPropertyShort() cil managed + { + // Code size 14 (0xe) + .maxstack 8 + IL_0000: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::get_StaticShortProperty() + IL_0005: ldc.i4.1 + IL_0006: add + IL_0007: conv.i2 + IL_0008: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::set_StaticShortProperty(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum) + IL_000d: ret + } // end of method CompoundAssignmentTest::IncrementStaticPropertyShort + .method private hidebysig static class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/Item GetItem(object obj) cil managed { @@ -889,6 +1283,12 @@ .get int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::get_StaticProperty() .set void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::set_StaticProperty(int32) } // end of property CompoundAssignmentTest::StaticProperty + .property valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum + StaticShortProperty() + { + .get valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::get_StaticShortProperty() + .set void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::set_StaticShortProperty(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum) + } // end of property CompoundAssignmentTest::StaticShortProperty } // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.roslyn.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.roslyn.il index 1404a451f..1e7a12bce 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.roslyn.il +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/CompoundAssignmentTest.roslyn.il @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.18020 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -25,14 +25,14 @@ .ver 0:0:0:0 } .module CompoundAssignmentTest.dll -// MVID: {391C1968-5381-4AC7-9C19-7B5F6ED36AF8} +// MVID: {514BA798-3837-4D3D-8485-D675114840C6} .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: 0x003D0000 +// Image base: 0x01590000 // =============== CLASS MEMBERS DECLARATION =================== @@ -51,6 +51,16 @@ .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MyEnum Four = int32(0x00000004) } // end of class MyEnum + .class auto ansi sealed nested public ShortEnum + extends [mscorlib]System.Enum + { + .field public specialname rtspecialname int16 value__ + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum None = int16(0x0000) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum One = int16(0x0001) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum Two = int16(0x0002) + .field public static literal valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum Four = int16(0x0004) + } // end of class ShortEnum + .class sequential ansi sealed nested private beforefieldinit StructContainer extends [mscorlib]System.ValueType { @@ -63,9 +73,13 @@ { .custom instance void [mscorlib]System.Reflection.DefaultMemberAttribute::.ctor(string) = ( 01 00 04 49 74 65 6D 00 00 ) // ...Item.. .field public int32 Field + .field public int16 ShortField .field private int32 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field private uint8 'k__BackingField' + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .method public hidebysig specialname instance int32 get_Property() cil managed { @@ -89,6 +103,29 @@ IL_0007: ret } // end of method MutableClass::set_Property + .method public hidebysig specialname + instance uint8 get_ByteProperty() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldfld uint8 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::'k__BackingField' + IL_0006: ret + } // end of method MutableClass::get_ByteProperty + + .method public hidebysig specialname + instance void set_ByteProperty(uint8 'value') cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 8 (0x8) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: ldarg.1 + IL_0002: stfld uint8 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::'k__BackingField' + IL_0007: ret + } // end of method MutableClass::set_ByteProperty + .method public hidebysig specialname instance uint32 get_Item(string name) cil managed { @@ -130,6 +167,11 @@ .get instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_Property() .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::set_Property(int32) } // end of property MutableClass::Property + .property instance uint8 ByteProperty() + { + .get instance uint8 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_ByteProperty() + .set instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::set_ByteProperty(uint8) + } // end of property MutableClass::ByteProperty .property instance uint32 Item(string) { .get instance uint32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_Item(string) @@ -160,9 +202,13 @@ .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/StructContainer field1 .field private valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MyEnum enumField .field public static int32 StaticField + .field public static int16 StaticShortField .field private static int32 'k__BackingField' .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) + .field private static valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum 'k__BackingField' + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + .custom instance void [mscorlib]System.Diagnostics.DebuggerBrowsableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggerBrowsableState) = ( 01 00 00 00 00 00 00 00 ) .method public hidebysig specialname static int32 get_StaticProperty() cil managed { @@ -184,6 +230,28 @@ IL_0006: ret } // end of method CompoundAssignmentTest::set_StaticProperty + .method public hidebysig specialname static + valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum + get_StaticShortProperty() cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 6 (0x6) + .maxstack 8 + IL_0000: ldsfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::'k__BackingField' + IL_0005: ret + } // end of method CompoundAssignmentTest::get_StaticShortProperty + + .method public hidebysig specialname static + void set_StaticShortProperty(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum 'value') cil managed + { + .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 ) + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.0 + IL_0001: stsfld valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::'k__BackingField' + IL_0006: ret + } // end of method CompoundAssignmentTest::set_StaticShortProperty + .method private hidebysig instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass M() cil managed { @@ -804,6 +872,81 @@ IL_000d: ret } // end of method CompoundAssignmentTest::IncrementArrayElement + .method public hidebysig instance int32 + PreIncrementShortArrayElement(int16[] 'array', + int32 pos) cil managed + { + // Code size 22 (0x16) + .maxstack 3 + .locals init (int16 V_0, + int32 V_1) + IL_0000: nop + IL_0001: ldarg.1 + IL_0002: ldarg.2 + IL_0003: ldelema [mscorlib]System.Int16 + IL_0008: dup + IL_0009: ldind.i2 + IL_000a: ldc.i4.1 + IL_000b: sub + IL_000c: conv.i2 + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: stind.i2 + IL_0010: ldloc.0 + IL_0011: stloc.1 + IL_0012: br.s IL_0014 + + IL_0014: ldloc.1 + IL_0015: ret + } // end of method CompoundAssignmentTest::PreIncrementShortArrayElement + + .method public hidebysig instance int32 + PostIncrementShortArrayElement(int16[] 'array', + int32 pos) cil managed + { + // Code size 22 (0x16) + .maxstack 3 + .locals init (int16 V_0, + int32 V_1) + IL_0000: nop + IL_0001: ldarg.1 + IL_0002: ldarg.2 + IL_0003: ldelema [mscorlib]System.Int16 + IL_0008: dup + IL_0009: ldind.i2 + IL_000a: stloc.0 + IL_000b: ldloc.0 + IL_000c: ldc.i4.1 + IL_000d: add + IL_000e: conv.i2 + IL_000f: stind.i2 + IL_0010: ldloc.0 + IL_0011: stloc.1 + IL_0012: br.s IL_0014 + + IL_0014: ldloc.1 + IL_0015: ret + } // end of method CompoundAssignmentTest::PostIncrementShortArrayElement + + .method public hidebysig instance void + IncrementShortArrayElement(int16[] 'array', + int32 pos) cil managed + { + // Code size 15 (0xf) + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.1 + IL_0002: ldarg.2 + IL_0003: ldelema [mscorlib]System.Int16 + IL_0008: dup + IL_0009: ldind.i2 + IL_000a: ldc.i4.1 + IL_000b: add + IL_000c: conv.i2 + IL_000d: stind.i2 + IL_000e: ret + } // end of method CompoundAssignmentTest::IncrementShortArrayElement + .method public hidebysig instance int32 PreIncrementInstanceField() cil managed { @@ -829,6 +972,31 @@ IL_001b: ret } // end of method CompoundAssignmentTest::PreIncrementInstanceField + .method public hidebysig instance int32 + PostIncrementInstanceField() cil managed + { + // Code size 28 (0x1c) + .maxstack 3 + .locals init (int32 V_0, + int32 V_1) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0007: dup + IL_0008: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::Field + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: ldc.i4.1 + IL_0010: add + IL_0011: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::Field + IL_0016: ldloc.0 + IL_0017: stloc.1 + IL_0018: br.s IL_001a + + IL_001a: ldloc.1 + IL_001b: ret + } // end of method CompoundAssignmentTest::PostIncrementInstanceField + .method public hidebysig instance void IncrementInstanceField() cil managed { @@ -869,6 +1037,30 @@ IL_0016: ret } // end of method CompoundAssignmentTest::PreIncrementInstanceField2 + .method public hidebysig instance int32 + PostIncrementInstanceField2(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass m) cil managed + { + // Code size 23 (0x17) + .maxstack 3 + .locals init (int32 V_0, + int32 V_1) + IL_0000: nop + IL_0001: ldarg.1 + IL_0002: dup + IL_0003: ldfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::Field + IL_0008: stloc.0 + IL_0009: ldloc.0 + IL_000a: ldc.i4.1 + IL_000b: add + IL_000c: stfld int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::Field + IL_0011: ldloc.0 + IL_0012: stloc.1 + IL_0013: br.s IL_0015 + + IL_0015: ldloc.1 + IL_0016: ret + } // end of method CompoundAssignmentTest::PostIncrementInstanceField2 + .method public hidebysig instance void IncrementInstanceField2(class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass m) cil managed { @@ -884,6 +1076,75 @@ IL_000f: ret } // end of method CompoundAssignmentTest::IncrementInstanceField2 + .method public hidebysig instance int32 + PreIncrementInstanceFieldShort() cil managed + { + // Code size 29 (0x1d) + .maxstack 3 + .locals init (int16 V_0, + int32 V_1) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0007: dup + IL_0008: ldfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::ShortField + IL_000d: ldc.i4.1 + IL_000e: add + IL_000f: conv.i2 + IL_0010: stloc.0 + IL_0011: ldloc.0 + IL_0012: stfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::ShortField + IL_0017: ldloc.0 + IL_0018: stloc.1 + IL_0019: br.s IL_001b + + IL_001b: ldloc.1 + IL_001c: ret + } // end of method CompoundAssignmentTest::PreIncrementInstanceFieldShort + + .method public hidebysig instance int32 + PostIncrementInstanceFieldShort() cil managed + { + // Code size 29 (0x1d) + .maxstack 3 + .locals init (int16 V_0, + int32 V_1) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0007: dup + IL_0008: ldfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::ShortField + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: ldc.i4.1 + IL_0010: add + IL_0011: conv.i2 + IL_0012: stfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::ShortField + IL_0017: ldloc.0 + IL_0018: stloc.1 + IL_0019: br.s IL_001b + + IL_001b: ldloc.1 + IL_001c: ret + } // end of method CompoundAssignmentTest::PostIncrementInstanceFieldShort + + .method public hidebysig instance void + IncrementInstanceFieldShort() cil managed + { + // Code size 22 (0x16) + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0007: dup + IL_0008: ldfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::ShortField + IL_000d: ldc.i4.1 + IL_000e: add + IL_000f: conv.i2 + IL_0010: stfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::ShortField + IL_0015: ret + } // end of method CompoundAssignmentTest::IncrementInstanceFieldShort + .method public hidebysig instance int32 PreIncrementInstanceProperty() cil managed { @@ -910,6 +1171,32 @@ IL_001c: ret } // end of method CompoundAssignmentTest::PreIncrementInstanceProperty + .method public hidebysig instance int32 + PostIncrementInstanceProperty() cil managed + { + // Code size 29 (0x1d) + .maxstack 3 + .locals init (int32 V_0, + int32 V_1) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0007: dup + IL_0008: callvirt instance int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_Property() + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: ldc.i4.1 + IL_0010: add + IL_0011: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::set_Property(int32) + IL_0016: nop + IL_0017: ldloc.0 + IL_0018: stloc.1 + IL_0019: br.s IL_001b + + IL_001b: ldloc.1 + IL_001c: ret + } // end of method CompoundAssignmentTest::PostIncrementInstanceProperty + .method public hidebysig instance void IncrementInstanceProperty() cil managed { @@ -930,6 +1217,81 @@ IL_0017: ret } // end of method CompoundAssignmentTest::IncrementInstanceProperty + .method public hidebysig instance int32 + PreIncrementInstancePropertyByte() cil managed + { + // Code size 30 (0x1e) + .maxstack 3 + .locals init (uint8 V_0, + int32 V_1) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0007: dup + IL_0008: callvirt instance uint8 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_ByteProperty() + IL_000d: ldc.i4.1 + IL_000e: add + IL_000f: conv.u1 + IL_0010: stloc.0 + IL_0011: ldloc.0 + IL_0012: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::set_ByteProperty(uint8) + IL_0017: nop + IL_0018: ldloc.0 + IL_0019: stloc.1 + IL_001a: br.s IL_001c + + IL_001c: ldloc.1 + IL_001d: ret + } // end of method CompoundAssignmentTest::PreIncrementInstancePropertyByte + + .method public hidebysig instance int32 + PostIncrementInstancePropertyByte() cil managed + { + // Code size 30 (0x1e) + .maxstack 3 + .locals init (uint8 V_0, + int32 V_1) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0007: dup + IL_0008: callvirt instance uint8 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_ByteProperty() + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: ldc.i4.1 + IL_0010: add + IL_0011: conv.u1 + IL_0012: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::set_ByteProperty(uint8) + IL_0017: nop + IL_0018: ldloc.0 + IL_0019: stloc.1 + IL_001a: br.s IL_001c + + IL_001c: ldloc.1 + IL_001d: ret + } // end of method CompoundAssignmentTest::PostIncrementInstancePropertyByte + + .method public hidebysig instance void + IncrementInstancePropertyByte() cil managed + { + // Code size 25 (0x19) + .maxstack 3 + .locals init (uint8 V_0) + IL_0000: nop + IL_0001: ldarg.0 + IL_0002: call instance class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::M() + IL_0007: dup + IL_0008: callvirt instance uint8 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::get_ByteProperty() + IL_000d: stloc.0 + IL_000e: ldloc.0 + IL_000f: ldc.i4.1 + IL_0010: add + IL_0011: conv.u1 + IL_0012: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/MutableClass::set_ByteProperty(uint8) + IL_0017: nop + IL_0018: ret + } // end of method CompoundAssignmentTest::IncrementInstancePropertyByte + .method public hidebysig instance int32 PreIncrementStaticField() cil managed { @@ -981,6 +1343,60 @@ IL_000d: ret } // end of method CompoundAssignmentTest::IncrementStaticField + .method public hidebysig instance int32 + PreIncrementStaticFieldShort() cil managed + { + // Code size 20 (0x14) + .maxstack 2 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldsfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::StaticShortField + IL_0006: ldc.i4.1 + IL_0007: add + IL_0008: conv.i2 + IL_0009: dup + IL_000a: stsfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::StaticShortField + IL_000f: stloc.0 + IL_0010: br.s IL_0012 + + IL_0012: ldloc.0 + IL_0013: ret + } // end of method CompoundAssignmentTest::PreIncrementStaticFieldShort + + .method public hidebysig instance int32 + PostIncrementStaticFieldShort() cil managed + { + // Code size 20 (0x14) + .maxstack 3 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: ldsfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::StaticShortField + IL_0006: dup + IL_0007: ldc.i4.1 + IL_0008: add + IL_0009: conv.i2 + IL_000a: stsfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::StaticShortField + IL_000f: stloc.0 + IL_0010: br.s IL_0012 + + IL_0012: ldloc.0 + IL_0013: ret + } // end of method CompoundAssignmentTest::PostIncrementStaticFieldShort + + .method public hidebysig instance void + IncrementStaticFieldShort() cil managed + { + // Code size 15 (0xf) + .maxstack 8 + IL_0000: nop + IL_0001: ldsfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::StaticShortField + IL_0006: ldc.i4.1 + IL_0007: add + IL_0008: conv.i2 + IL_0009: stsfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::StaticShortField + IL_000e: ret + } // end of method CompoundAssignmentTest::IncrementStaticFieldShort + .method public hidebysig instance int32 PreIncrementStaticProperty() cil managed { @@ -1001,6 +1417,26 @@ IL_0013: ret } // end of method CompoundAssignmentTest::PreIncrementStaticProperty + .method public hidebysig instance int32 + PostIncrementStaticProperty() cil managed + { + // Code size 20 (0x14) + .maxstack 3 + .locals init (int32 V_0) + IL_0000: nop + IL_0001: call int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::get_StaticProperty() + IL_0006: dup + IL_0007: ldc.i4.1 + IL_0008: add + IL_0009: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::set_StaticProperty(int32) + IL_000e: nop + IL_000f: stloc.0 + IL_0010: br.s IL_0012 + + IL_0012: ldloc.0 + IL_0013: ret + } // end of method CompoundAssignmentTest::PostIncrementStaticProperty + .method public hidebysig instance void IncrementStaticProperty() cil managed { @@ -1015,6 +1451,63 @@ IL_000e: ret } // end of method CompoundAssignmentTest::IncrementStaticProperty + .method public hidebysig instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum + PreIncrementStaticPropertyShort() cil managed + { + // Code size 21 (0x15) + .maxstack 2 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum V_0) + IL_0000: nop + IL_0001: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::get_StaticShortProperty() + IL_0006: ldc.i4.1 + IL_0007: add + IL_0008: conv.i2 + IL_0009: dup + IL_000a: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::set_StaticShortProperty(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum) + IL_000f: nop + IL_0010: stloc.0 + IL_0011: br.s IL_0013 + + IL_0013: ldloc.0 + IL_0014: ret + } // end of method CompoundAssignmentTest::PreIncrementStaticPropertyShort + + .method public hidebysig instance valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum + PostIncrementStaticPropertyShort() cil managed + { + // Code size 21 (0x15) + .maxstack 3 + .locals init (valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum V_0) + IL_0000: nop + IL_0001: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::get_StaticShortProperty() + IL_0006: dup + IL_0007: ldc.i4.1 + IL_0008: add + IL_0009: conv.i2 + IL_000a: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::set_StaticShortProperty(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum) + IL_000f: nop + IL_0010: stloc.0 + IL_0011: br.s IL_0013 + + IL_0013: ldloc.0 + IL_0014: ret + } // end of method CompoundAssignmentTest::PostIncrementStaticPropertyShort + + .method public hidebysig instance void + IncrementStaticPropertyShort() cil managed + { + // Code size 16 (0x10) + .maxstack 8 + IL_0000: nop + IL_0001: call valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::get_StaticShortProperty() + IL_0006: ldc.i4.1 + IL_0007: add + IL_0008: conv.i2 + IL_0009: call void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::set_StaticShortProperty(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum) + IL_000e: nop + IL_000f: ret + } // end of method CompoundAssignmentTest::IncrementStaticPropertyShort + .method private hidebysig static class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/Item GetItem(object obj) cil managed { @@ -1061,6 +1554,12 @@ .get int32 ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::get_StaticProperty() .set void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::set_StaticProperty(int32) } // end of property CompoundAssignmentTest::StaticProperty + .property valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum + StaticShortProperty() + { + .get valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::get_StaticShortProperty() + .set void ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest::set_StaticShortProperty(valuetype ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest/ShortEnum) + } // end of property CompoundAssignmentTest::StaticShortProperty } // end of class ICSharpCode.Decompiler.Tests.TestCases.Pretty.CompoundAssignmentTest diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InlineAssignmentTest.cs b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InlineAssignmentTest.cs index 98426bca0..cc0887987 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InlineAssignmentTest.cs +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InlineAssignmentTest.cs @@ -17,6 +17,7 @@ // DEALINGS IN THE SOFTWARE. using System; +using System.IO; namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty { @@ -25,7 +26,8 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty private int field1; private static InlineAssignmentTest field2; private int[] field3; - + private short field4; + public void SimpleInlineWithLocals() { int value; @@ -41,24 +43,30 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty Console.WriteLine(this.field1 = 5); Console.WriteLine(InlineAssignmentTest.field2 = new InlineAssignmentTest()); } - + public void SimpleInlineWithFields2() { Console.WriteLine(this.field1 = 5); Console.WriteLine(this.field1); Console.WriteLine(InlineAssignmentTest.field2 = new InlineAssignmentTest()); Console.WriteLine(InlineAssignmentTest.field2); + this.UseShort(this.field4 = 6); + Console.WriteLine(this.field4); } - -// public void ReadLoop1(TextReader r) -// { -// string V_0; -// while ((V_0 = r.ReadLine()) != null) -// { -// Console.WriteLine(V_0); -// } -// } - + + public void UseShort(short s) + { + Console.WriteLine(s); + } + + public void ReadLoop1(TextReader r) + { + string value; + while ((value = r.ReadLine()) != null) { + Console.WriteLine(value); + } + } + public void AccessArray(int[] a) { int num; diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InlineAssignmentTest.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InlineAssignmentTest.il index e0920cdba..ec2d0ea7e 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InlineAssignmentTest.il +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InlineAssignmentTest.il @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.17929 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -10,7 +10,7 @@ .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. .ver 4:0:0:0 } -.assembly xh5er5kd +.assembly uq03kalt { .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 @@ -20,15 +20,15 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 } -.module xh5er5kd.dll -// MVID: {9DBFA28B-BEE8-4796-A203-E73267B1357D} +.module uq03kalt.dll +// MVID: {D636DE2E-D2CD-4EDF-B87B-0B0985C6C0B8} .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: 0x023E0000 +// Image base: 0x018D0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -39,6 +39,7 @@ .field private int32 field1 .field private static class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InlineAssignmentTest field2 .field private int32[] field3 + .field private int16 field4 .method public hidebysig instance void SimpleInlineWithLocals() cil managed { @@ -92,9 +93,10 @@ .method public hidebysig instance void SimpleInlineWithFields2() cil managed { - // Code size 58 (0x3a) - .maxstack 3 - .locals init (int32 V_0) + // Code size 87 (0x57) + .maxstack 4 + .locals init (int32 V_0, + int16 V_1) IL_0000: nop IL_0001: ldarg.0 IL_0002: ldc.i4.5 @@ -116,9 +118,64 @@ IL_002e: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InlineAssignmentTest ICSharpCode.Decompiler.Tests.TestCases.Pretty.InlineAssignmentTest::field2 IL_0033: call void [mscorlib]System.Console::WriteLine(object) IL_0038: nop - IL_0039: ret + IL_0039: ldarg.0 + IL_003a: ldarg.0 + IL_003b: ldc.i4.6 + IL_003c: dup + IL_003d: stloc.1 + IL_003e: stfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InlineAssignmentTest::field4 + IL_0043: ldloc.1 + IL_0044: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InlineAssignmentTest::UseShort(int16) + IL_0049: nop + IL_004a: ldarg.0 + IL_004b: ldfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InlineAssignmentTest::field4 + IL_0050: call void [mscorlib]System.Console::WriteLine(int32) + IL_0055: nop + IL_0056: ret } // end of method InlineAssignmentTest::SimpleInlineWithFields2 + .method public hidebysig instance void + UseShort(int16 s) cil managed + { + // Code size 9 (0x9) + .maxstack 8 + IL_0000: nop + IL_0001: ldarg.1 + IL_0002: call void [mscorlib]System.Console::WriteLine(int32) + IL_0007: nop + IL_0008: ret + } // end of method InlineAssignmentTest::UseShort + + .method public hidebysig instance void + ReadLoop1(class [mscorlib]System.IO.TextReader r) cil managed + { + // Code size 31 (0x1f) + .maxstack 2 + .locals init (string V_0, + bool V_1) + IL_0000: nop + IL_0001: br.s IL_000c + + IL_0003: nop + IL_0004: ldloc.0 + IL_0005: call void [mscorlib]System.Console::WriteLine(string) + IL_000a: nop + IL_000b: nop + IL_000c: ldarg.1 + IL_000d: callvirt instance string [mscorlib]System.IO.TextReader::ReadLine() + IL_0012: dup + IL_0013: stloc.0 + IL_0014: ldnull + IL_0015: ceq + IL_0017: ldc.i4.0 + IL_0018: ceq + IL_001a: stloc.1 + IL_001b: ldloc.1 + IL_001c: brtrue.s IL_0003 + + IL_001e: ret + } // end of method InlineAssignmentTest::ReadLoop1 + .method public hidebysig instance void AccessArray(int32[] a) cil managed { @@ -300,4 +357,4 @@ // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file ../../Tests/TestCases/Pretty\InlineAssignmentTest.res +// WARNING: Created Win32 resource file ../../../TestCases/Pretty\InlineAssignmentTest.res diff --git a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InlineAssignmentTest.opt.il b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InlineAssignmentTest.opt.il index da60ad226..f98d18c87 100644 --- a/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InlineAssignmentTest.opt.il +++ b/ICSharpCode.Decompiler.Tests/TestCases/Pretty/InlineAssignmentTest.opt.il @@ -1,5 +1,5 @@ -// Microsoft (R) .NET Framework IL Disassembler. Version 4.0.30319.17929 +// Microsoft (R) .NET Framework IL Disassembler. Version 4.6.1055.0 // Copyright (c) Microsoft Corporation. All rights reserved. @@ -10,7 +10,7 @@ .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. .ver 4:0:0:0 } -.assembly b1jpssom +.assembly zztqnmi4 { .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 @@ -20,15 +20,15 @@ .hash algorithm 0x00008004 .ver 0:0:0:0 } -.module b1jpssom.dll -// MVID: {7C6502B0-8536-4BED-9395-765EB2F77653} +.module zztqnmi4.dll +// MVID: {038F2DF5-AE7B-4B0A-B846-AC254CE46038} .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: 0x02B00000 +// Image base: 0x006A0000 // =============== CLASS MEMBERS DECLARATION =================== @@ -39,6 +39,7 @@ .field private int32 field1 .field private static class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InlineAssignmentTest field2 .field private int32[] field3 + .field private int16 field4 .method public hidebysig instance void SimpleInlineWithLocals() cil managed { @@ -84,9 +85,10 @@ .method public hidebysig instance void SimpleInlineWithFields2() cil managed { - // Code size 53 (0x35) - .maxstack 3 - .locals init (int32 V_0) + // Code size 80 (0x50) + .maxstack 4 + .locals init (int32 V_0, + int16 V_1) IL_0000: ldarg.0 IL_0001: ldc.i4.5 IL_0002: dup @@ -103,9 +105,49 @@ IL_0025: call void [mscorlib]System.Console::WriteLine(object) IL_002a: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InlineAssignmentTest ICSharpCode.Decompiler.Tests.TestCases.Pretty.InlineAssignmentTest::field2 IL_002f: call void [mscorlib]System.Console::WriteLine(object) - IL_0034: ret + IL_0034: ldarg.0 + IL_0035: ldarg.0 + IL_0036: ldc.i4.6 + IL_0037: dup + IL_0038: stloc.1 + IL_0039: stfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InlineAssignmentTest::field4 + IL_003e: ldloc.1 + IL_003f: call instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InlineAssignmentTest::UseShort(int16) + IL_0044: ldarg.0 + IL_0045: ldfld int16 ICSharpCode.Decompiler.Tests.TestCases.Pretty.InlineAssignmentTest::field4 + IL_004a: call void [mscorlib]System.Console::WriteLine(int32) + IL_004f: ret } // end of method InlineAssignmentTest::SimpleInlineWithFields2 + .method public hidebysig instance void + UseShort(int16 s) cil managed + { + // Code size 7 (0x7) + .maxstack 8 + IL_0000: ldarg.1 + IL_0001: call void [mscorlib]System.Console::WriteLine(int32) + IL_0006: ret + } // end of method InlineAssignmentTest::UseShort + + .method public hidebysig instance void + ReadLoop1(class [mscorlib]System.IO.TextReader r) cil managed + { + // Code size 19 (0x13) + .maxstack 2 + .locals init (string V_0) + IL_0000: br.s IL_0008 + + IL_0002: ldloc.0 + IL_0003: call void [mscorlib]System.Console::WriteLine(string) + IL_0008: ldarg.1 + IL_0009: callvirt instance string [mscorlib]System.IO.TextReader::ReadLine() + IL_000e: dup + IL_000f: stloc.0 + IL_0010: brtrue.s IL_0002 + + IL_0012: ret + } // end of method InlineAssignmentTest::ReadLoop1 + .method public hidebysig instance void AccessArray(int32[] a) cil managed { @@ -247,4 +289,4 @@ // ============================================================= // *********** DISASSEMBLY COMPLETE *********************** -// WARNING: Created Win32 resource file ../../Tests/TestCases/Pretty\InlineAssignmentTest.opt.res +// WARNING: Created Win32 resource file ../../../TestCases/Pretty\InlineAssignmentTest.opt.res