Browse Source

Fix #1377: Fix IndexOutOfRangeException in TransformArrayInitializers

pull/1405/head
Siegfried Pammer 7 years ago
parent
commit
859872ba8c
  1. 29
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.cs
  2. 60
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.il
  3. 55
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.opt.il
  4. 144
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.opt.roslyn.il
  5. 156
      ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.roslyn.il
  6. 4
      ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs

29
ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.cs

@ -1117,6 +1117,25 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests @@ -1117,6 +1117,25 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests
X(Y(), array);
}
public static byte[] ReverseInitializer(int i)
{
#if ROSLYN && OPT
byte[] obj = new byte[4];
obj[3] = (byte)i;
obj[2] = (byte)(i >> 8);
obj[1] = (byte)(i >> 16);
obj[0] = (byte)(i >> 24);
return obj;
#else
byte[] array = new byte[4];
array[3] = (byte)i;
array[2] = (byte)(i >> 8);
array[1] = (byte)(i >> 16);
array[0] = (byte)(i >> 24);
return array;
#endif
}
public static void Issue953_MissingNullableSpecifierForArrayInitializer()
{
NoOp(new Guid?[1] {
@ -1133,9 +1152,9 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests @@ -1133,9 +1152,9 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests
}
});
}
#endregion
#endregion
#region Object initializers
#region Object initializers
public C Test1()
{
C c = new C();
@ -1448,9 +1467,9 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests @@ -1448,9 +1467,9 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests
return null;
}
#endregion
#endregion
#region Collection initializer
#region Collection initializer
public static void ExtensionMethodInCollectionInitializer()
{
@ -1617,6 +1636,6 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests @@ -1617,6 +1636,6 @@ namespace ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests
});
}
#endif
#endregion
#endregion
}
}

60
ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.il

@ -2306,6 +2306,51 @@ @@ -2306,6 +2306,51 @@
IL_001c: ret
} // end of method TestCases::IndicesInWrongOrder
.method public hidebysig static uint8[]
ReverseInitializer(int32 i) cil managed
{
// Code size 42 (0x2a)
.maxstack 4
.locals init (uint8[] V_0,
uint8[] V_1)
IL_0000: nop
IL_0001: ldc.i4.4
IL_0002: newarr [mscorlib]System.Byte
IL_0007: stloc.0
IL_0008: ldloc.0
IL_0009: ldc.i4.3
IL_000a: ldarg.0
IL_000b: conv.u1
IL_000c: stelem.i1
IL_000d: ldloc.0
IL_000e: ldc.i4.2
IL_000f: ldarg.0
IL_0010: ldc.i4.8
IL_0011: shr
IL_0012: conv.u1
IL_0013: stelem.i1
IL_0014: ldloc.0
IL_0015: ldc.i4.1
IL_0016: ldarg.0
IL_0017: ldc.i4.s 16
IL_0019: shr
IL_001a: conv.u1
IL_001b: stelem.i1
IL_001c: ldloc.0
IL_001d: ldc.i4.0
IL_001e: ldarg.0
IL_001f: ldc.i4.s 24
IL_0021: shr
IL_0022: conv.u1
IL_0023: stelem.i1
IL_0024: ldloc.0
IL_0025: stloc.1
IL_0026: br.s IL_0028
IL_0028: ldloc.1
IL_0029: ret
} // end of method TestCases::ReverseInitializer
.method public hidebysig static void Issue953_MissingNullableSpecifierForArrayInitializer() cil managed
{
// Code size 38 (0x26)
@ -3125,7 +3170,7 @@ @@ -3125,7 +3170,7 @@
IL_0001: ldc.i4.4
IL_0002: newarr [mscorlib]System.Byte
IL_0007: dup
IL_0008: ldtoken field int32 '<PrivateImplementationDetails>'::'$$method0x6000040-1'
IL_0008: ldtoken field int32 '<PrivateImplementationDetails>'::'$$method0x6000041-1'
IL_000d: call void [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray(class [mscorlib]System.Array,
valuetype [mscorlib]System.RuntimeFieldHandle)
IL_0012: stloc.0
@ -4390,7 +4435,7 @@ @@ -4390,7 +4435,7 @@
IL_0787: newobj instance void int32[0...,0...]::.ctor(int32,
int32)
IL_078c: dup
IL_078d: ldtoken field valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=36' '<PrivateImplementationDetails>'::'$$method0x600008f-1'
IL_078d: ldtoken field valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=36' '<PrivateImplementationDetails>'::'$$method0x6000090-1'
IL_0792: call void [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray(class [mscorlib]System.Array,
valuetype [mscorlib]System.RuntimeFieldHandle)
IL_0797: stsfld int32[0...,0...] ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Issue1336_rg2
@ -4494,8 +4539,8 @@ @@ -4494,8 +4539,8 @@
.field static assembly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=64' '$$method0x600001e-4' at I_000029A8
.field static assembly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=72' '$$method0x600001f-1' at I_00002A58
.field static assembly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=72' '$$method0x600001f-2' at I_00002AA0
.field static assembly int32 '$$method0x6000040-1' at I_000032E0
.field static assembly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=36' '$$method0x600008f-1' at I_000035C8
.field static assembly int32 '$$method0x6000041-1' at I_00003318
.field static assembly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=36' '$$method0x6000090-1' at I_00003600
} // end of class '<PrivateImplementationDetails>'
@ -4603,11 +4648,10 @@ @@ -4603,11 +4648,10 @@
1D 00 00 00 1F 00 00 00 20 00 00 00 21 00 00 00 // ........ ...!...
22 00 00 00 23 00 00 00 24 00 00 00 25 00 00 00 // "...#...$...%...
26 00 00 00 27 00 00 00) // &...'...
.data cil I_00002AE8 = int8[24]
.data cil I_000032E0 = bytearray (
.data cil I_00003318 = bytearray (
00 01 02 FF)
.data cil I_000032E4 = int8[4]
.data cil I_000035C8 = bytearray (
.data cil I_0000331C = int8[228]
.data cil I_00003600 = bytearray (
01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00
01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00
01 00 00 00)

55
ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.opt.il

@ -2063,6 +2063,45 @@ @@ -2063,6 +2063,45 @@
IL_001a: ret
} // end of method TestCases::IndicesInWrongOrder
.method public hidebysig static uint8[]
ReverseInitializer(int32 i) cil managed
{
// Code size 37 (0x25)
.maxstack 4
.locals init (uint8[] V_0)
IL_0000: ldc.i4.4
IL_0001: newarr [mscorlib]System.Byte
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: ldc.i4.3
IL_0009: ldarg.0
IL_000a: conv.u1
IL_000b: stelem.i1
IL_000c: ldloc.0
IL_000d: ldc.i4.2
IL_000e: ldarg.0
IL_000f: ldc.i4.8
IL_0010: shr
IL_0011: conv.u1
IL_0012: stelem.i1
IL_0013: ldloc.0
IL_0014: ldc.i4.1
IL_0015: ldarg.0
IL_0016: ldc.i4.s 16
IL_0018: shr
IL_0019: conv.u1
IL_001a: stelem.i1
IL_001b: ldloc.0
IL_001c: ldc.i4.0
IL_001d: ldarg.0
IL_001e: ldc.i4.s 24
IL_0020: shr
IL_0021: conv.u1
IL_0022: stelem.i1
IL_0023: ldloc.0
IL_0024: ret
} // end of method TestCases::ReverseInitializer
.method public hidebysig static void Issue953_MissingNullableSpecifierForArrayInitializer() cil managed
{
// Code size 36 (0x24)
@ -2741,7 +2780,7 @@ @@ -2741,7 +2780,7 @@
IL_0000: ldc.i4.4
IL_0001: newarr [mscorlib]System.Byte
IL_0006: dup
IL_0007: ldtoken field int32 '<PrivateImplementationDetails>'::'$$method0x6000040-1'
IL_0007: ldtoken field int32 '<PrivateImplementationDetails>'::'$$method0x6000041-1'
IL_000c: call void [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray(class [mscorlib]System.Array,
valuetype [mscorlib]System.RuntimeFieldHandle)
IL_0011: ret
@ -3952,7 +3991,7 @@ @@ -3952,7 +3991,7 @@
IL_07df: newobj instance void int32[0...,0...]::.ctor(int32,
int32)
IL_07e4: dup
IL_07e5: ldtoken field valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=36' '<PrivateImplementationDetails>'::'$$method0x600008f-1'
IL_07e5: ldtoken field valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=36' '<PrivateImplementationDetails>'::'$$method0x6000090-1'
IL_07ea: call void [mscorlib]System.Runtime.CompilerServices.RuntimeHelpers::InitializeArray(class [mscorlib]System.Array,
valuetype [mscorlib]System.RuntimeFieldHandle)
IL_07ef: stsfld int32[0...,0...] ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Issue1336_rg2
@ -4056,8 +4095,8 @@ @@ -4056,8 +4095,8 @@
.field static assembly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=64' '$$method0x600001e-4' at I_00002938
.field static assembly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=72' '$$method0x600001f-1' at I_000029E8
.field static assembly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=72' '$$method0x600001f-2' at I_00002A30
.field static assembly int32 '$$method0x6000040-1' at I_000031D0
.field static assembly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=36' '$$method0x600008f-1' at I_00003470
.field static assembly int32 '$$method0x6000041-1' at I_00003200
.field static assembly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=36' '$$method0x6000090-1' at I_000034A0
} // end of class '<PrivateImplementationDetails>'
@ -4163,11 +4202,11 @@ @@ -4163,11 +4202,11 @@
1D 00 00 00 1F 00 00 00 20 00 00 00 21 00 00 00 // ........ ...!...
22 00 00 00 23 00 00 00 24 00 00 00 25 00 00 00 // "...#...$...%...
26 00 00 00 27 00 00 00) // &...'...
.data cil I_00002A78 = int8[8]
.data cil I_000031D0 = bytearray (
.data cil I_00002A78 = int8[392]
.data cil I_00003200 = bytearray (
00 01 02 FF)
.data cil I_000031D4 = int8[12]
.data cil I_00003470 = bytearray (
.data cil I_00003204 = int8[28]
.data cil I_000034A0 = bytearray (
01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00
01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00
01 00 00 00)

144
ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.opt.roslyn.il

@ -1188,8 +1188,8 @@ @@ -1188,8 +1188,8 @@
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public static initonly class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c' '<>9'
.field public static class [mscorlib]System.EventHandler '<>9__61_0'
.field public static class [mscorlib]System.Func`2<class [mscorlib]System.Globalization.NumberFormatInfo,bool> '<>9__75_0'
.field public static class [mscorlib]System.EventHandler '<>9__62_0'
.field public static class [mscorlib]System.Func`2<class [mscorlib]System.Globalization.NumberFormatInfo,bool> '<>9__76_0'
.method private hidebysig specialname rtspecialname static
void .cctor() cil managed
{
@ -1211,17 +1211,17 @@ @@ -1211,17 +1211,17 @@
} // end of method '<>c'::.ctor
.method assembly hidebysig instance void
'<NotAnObjectInitializerWithEvent>b__61_0'(object '<p0>',
'<NotAnObjectInitializerWithEvent>b__62_0'(object '<p0>',
class [mscorlib]System.EventArgs '<p1>') cil managed
{
// Code size 6 (0x6)
.maxstack 8
IL_0000: call void [mscorlib]System.Console::WriteLine()
IL_0005: ret
} // end of method '<>c'::'<NotAnObjectInitializerWithEvent>b__61_0'
} // end of method '<>c'::'<NotAnObjectInitializerWithEvent>b__62_0'
.method assembly hidebysig instance bool
'<Issue270_NestedInitialisers>b__75_0'(class [mscorlib]System.Globalization.NumberFormatInfo format) cil managed
'<Issue270_NestedInitialisers>b__76_0'(class [mscorlib]System.Globalization.NumberFormatInfo format) cil managed
{
// Code size 17 (0x11)
.maxstack 8
@ -1231,7 +1231,7 @@ @@ -1231,7 +1231,7 @@
IL_000b: call bool [mscorlib]System.String::op_Equality(string,
string)
IL_0010: ret
} // end of method '<>c'::'<Issue270_NestedInitialisers>b__75_0'
} // end of method '<>c'::'<Issue270_NestedInitialisers>b__76_0'
} // end of class '<>c'
@ -2060,6 +2060,42 @@ @@ -2060,6 +2060,42 @@
IL_001a: ret
} // end of method TestCases::IndicesInWrongOrder
.method public hidebysig static uint8[]
ReverseInitializer(int32 i) cil managed
{
// Code size 35 (0x23)
.maxstack 8
IL_0000: ldc.i4.4
IL_0001: newarr [mscorlib]System.Byte
IL_0006: dup
IL_0007: ldc.i4.3
IL_0008: ldarg.0
IL_0009: conv.u1
IL_000a: stelem.i1
IL_000b: dup
IL_000c: ldc.i4.2
IL_000d: ldarg.0
IL_000e: ldc.i4.8
IL_000f: shr
IL_0010: conv.u1
IL_0011: stelem.i1
IL_0012: dup
IL_0013: ldc.i4.1
IL_0014: ldarg.0
IL_0015: ldc.i4.s 16
IL_0017: shr
IL_0018: conv.u1
IL_0019: stelem.i1
IL_001a: dup
IL_001b: ldc.i4.0
IL_001c: ldarg.0
IL_001d: ldc.i4.s 24
IL_001f: shr
IL_0020: conv.u1
IL_0021: stelem.i1
IL_0022: ret
} // end of method TestCases::ReverseInitializer
.method public hidebysig static void Issue953_MissingNullableSpecifierForArrayInitializer() cil managed
{
// Code size 29 (0x1d)
@ -2238,18 +2274,18 @@ @@ -2238,18 +2274,18 @@
IL_0000: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor()
IL_0005: stloc.0
IL_0006: ldloc.0
IL_0007: ldsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9__61_0'
IL_0007: ldsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9__62_0'
IL_000c: dup
IL_000d: brtrue.s IL_0026
IL_000f: pop
IL_0010: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9'
IL_0015: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<NotAnObjectInitializerWithEvent>b__61_0'(object,
IL_0015: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<NotAnObjectInitializerWithEvent>b__62_0'(object,
class [mscorlib]System.EventArgs)
IL_001b: newobj instance void [mscorlib]System.EventHandler::.ctor(object,
native int)
IL_0020: dup
IL_0021: stsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9__61_0'
IL_0021: stsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9__62_0'
IL_0026: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::add_TestEvent(class [mscorlib]System.EventHandler)
IL_002b: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y()
IL_0030: ldloc.0
@ -2586,17 +2622,17 @@ @@ -2586,17 +2622,17 @@
IL_0033: callvirt instance void [mscorlib]System.Globalization.CultureInfo::set_DateTimeFormat(class [mscorlib]System.Globalization.DateTimeFormatInfo)
IL_0038: dup
IL_0039: ldloc.0
IL_003a: ldsfld class [mscorlib]System.Func`2<class [mscorlib]System.Globalization.NumberFormatInfo,bool> ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9__75_0'
IL_003a: ldsfld class [mscorlib]System.Func`2<class [mscorlib]System.Globalization.NumberFormatInfo,bool> ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9__76_0'
IL_003f: dup
IL_0040: brtrue.s IL_0059
IL_0042: pop
IL_0043: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9'
IL_0048: ldftn instance bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<Issue270_NestedInitialisers>b__75_0'(class [mscorlib]System.Globalization.NumberFormatInfo)
IL_0048: ldftn instance bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<Issue270_NestedInitialisers>b__76_0'(class [mscorlib]System.Globalization.NumberFormatInfo)
IL_004e: newobj instance void class [mscorlib]System.Func`2<class [mscorlib]System.Globalization.NumberFormatInfo,bool>::.ctor(object,
native int)
IL_0053: dup
IL_0054: stsfld class [mscorlib]System.Func`2<class [mscorlib]System.Globalization.NumberFormatInfo,bool> ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9__75_0'
IL_0054: stsfld class [mscorlib]System.Func`2<class [mscorlib]System.Globalization.NumberFormatInfo,bool> ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9__76_0'
IL_0059: call class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0> [System.Core]System.Linq.Enumerable::Where<class [mscorlib]System.Globalization.NumberFormatInfo>(class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0>,
class [mscorlib]System.Func`2<!!0,bool>)
IL_005e: call !!0 [System.Core]System.Linq.Enumerable::First<class [mscorlib]System.Globalization.NumberFormatInfo>(class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0>)
@ -4010,67 +4046,67 @@ @@ -4010,67 +4046,67 @@
.size 256
} // end of class '__StaticArrayInitTypeSize=256'
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=72' '1535117EC92E41D4A6B7CA00F965357B05B5DC35' at I_00006BF4
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=10' '20E3FF489634E18F3F7EB292AD504DBAE9519293' at I_00006C3C
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=72' '39E94835525CF7B71CD4595742EF462642FBF1B2' at I_00006C4C
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=10' '56D9EEC8EF899644C40B9BE9D886DF2367A5D078' at I_00006C94
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=12' '735E5A21849E86F68D220F06163E8C5C6376B9C9' at I_00006CA4
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=64' '7C39B7B06DD624A17F875AB8E9651554BE6E74D2' at I_00006CB4
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=40' '8D903ECAD8D9D75B3183B23AF79F6D2E607369E3' at I_00006CF4
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=80' '9B1F6E56D755443CC39C1969CE38FD41FD4EF4B7' at I_00006D1C
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=256' A1EA7DC3FE43B3A54F5B729A92B92AF54181A3EB at I_00006D6C
.field static assembly initonly int64 A6296CAC471BE2954899600137940479D8073C7C at I_00006E6C
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=36' B62E59D20E3D69F06A6D9BD5E3C518FF7093EDAB at I_00006E74
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=40' B9583930B842DBCEF0D7B8E57D4D3F1E8055C39E at I_00006E9C
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=24' C4E70AB31EF6C8908F896CAD1C6BC75F7FA65E27 at I_00006EC4
.field static assembly initonly int32 C62C27924F4C967F5EDDB1850C091D54C7A2AB58 at I_00006EDC
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=48' DC7043B0114737ACE19A23DD755893795FD48A23 at I_00006EE4
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=64' DCF557B883E6FE0AEC05B7F0290F0EF47D0AC2E3 at I_00006F14
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=40' E0D2592373A0C161E56E266306CD8405CD719D19 at I_00006F54
.field static assembly initonly int64 EB0715DBB235F3F696F2C404F5839C6650640898 at I_00006F7C
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=40' F514FF55B79BCAA2CEC9B56C062D976E45F89AB7 at I_00006F84
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=24' FBCB49C1A244C1B5781AA1DB02C5A11F68908526 at I_00006FAC
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=72' '1535117EC92E41D4A6B7CA00F965357B05B5DC35' at I_00006C44
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=10' '20E3FF489634E18F3F7EB292AD504DBAE9519293' at I_00006C8C
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=72' '39E94835525CF7B71CD4595742EF462642FBF1B2' at I_00006C9C
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=10' '56D9EEC8EF899644C40B9BE9D886DF2367A5D078' at I_00006CE4
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=12' '735E5A21849E86F68D220F06163E8C5C6376B9C9' at I_00006CF4
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=64' '7C39B7B06DD624A17F875AB8E9651554BE6E74D2' at I_00006D04
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=40' '8D903ECAD8D9D75B3183B23AF79F6D2E607369E3' at I_00006D44
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=80' '9B1F6E56D755443CC39C1969CE38FD41FD4EF4B7' at I_00006D6C
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=256' A1EA7DC3FE43B3A54F5B729A92B92AF54181A3EB at I_00006DBC
.field static assembly initonly int64 A6296CAC471BE2954899600137940479D8073C7C at I_00006EBC
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=36' B62E59D20E3D69F06A6D9BD5E3C518FF7093EDAB at I_00006EC4
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=40' B9583930B842DBCEF0D7B8E57D4D3F1E8055C39E at I_00006EEC
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=24' C4E70AB31EF6C8908F896CAD1C6BC75F7FA65E27 at I_00006F14
.field static assembly initonly int32 C62C27924F4C967F5EDDB1850C091D54C7A2AB58 at I_00006F2C
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=48' DC7043B0114737ACE19A23DD755893795FD48A23 at I_00006F34
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=64' DCF557B883E6FE0AEC05B7F0290F0EF47D0AC2E3 at I_00006F64
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=40' E0D2592373A0C161E56E266306CD8405CD719D19 at I_00006FA4
.field static assembly initonly int64 EB0715DBB235F3F696F2C404F5839C6650640898 at I_00006FCC
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=40' F514FF55B79BCAA2CEC9B56C062D976E45F89AB7 at I_00006FD4
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=24' FBCB49C1A244C1B5781AA1DB02C5A11F68908526 at I_00006FFC
} // end of class '<PrivateImplementationDetails>'
// =============================================================
.data cil I_00006BF4 = bytearray (
.data cil I_00006C44 = bytearray (
01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00
05 00 00 00 06 00 00 00 07 00 00 00 08 00 00 00
09 00 00 00 0B 00 00 00 0C 00 00 00 0D 00 00 00
0E 00 00 00 0F 00 00 00 10 00 00 00 11 00 00 00
12 00 00 00 13 00 00 00)
.data cil I_00006C3C = bytearray (
.data cil I_00006C8C = bytearray (
01 02 03 04 05 06 07 08 FE FF)
.data cil I_00006C46 = int8[2]
.data cil I_00006C4C = bytearray (
.data cil I_00006C96 = int8[2]
.data cil I_00006C9C = bytearray (
15 00 00 00 16 00 00 00 17 00 00 00 18 00 00 00
19 00 00 00 1A 00 00 00 1B 00 00 00 1C 00 00 00
1D 00 00 00 1F 00 00 00 20 00 00 00 21 00 00 00 // ........ ...!...
22 00 00 00 23 00 00 00 24 00 00 00 25 00 00 00 // "...#...$...%...
26 00 00 00 27 00 00 00) // &...'...
.data cil I_00006C94 = bytearray (
.data cil I_00006CE4 = bytearray (
00 80 FF FF 00 00 01 00 FF 7F)
.data cil I_00006C9E = int8[2]
.data cil I_00006CA4 = bytearray (
.data cil I_00006CEE = int8[2]
.data cil I_00006CF4 = bytearray (
00 00 01 00 FF 7F 00 80 FE FF FF FF)
.data cil I_00006CB4 = bytearray (
.data cil I_00006D04 = bytearray (
00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00)
.data cil I_00006CF4 = bytearray (
.data cil I_00006D44 = bytearray (
01 00 0C BB 7D 6E 9C BA FF FF FF FF FF FF FF FF // ....}n..........
00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00
FF FF F3 44 82 91 63 45) // ...D..cE
.data cil I_00006D1C = bytearray (
.data cil I_00006D6C = bytearray (
01 00 00 00 00 00 00 00 00 94 35 77 00 00 00 00 // ..........5w....
00 5E D0 B2 00 00 00 00 04 00 00 00 00 00 00 00 // .^..............
05 00 00 00 00 00 00 00 06 00 00 00 00 00 00 00
07 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00
FF FF F3 44 82 91 63 45 FF FF E7 89 04 23 C7 8A) // ...D..cE.....#..
.data cil I_00006D6C = bytearray (
.data cil I_00006DBC = bytearray (
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
@ -4087,41 +4123,41 @@ @@ -4087,41 +4123,41 @@
00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00)
.data cil I_00006E6C = bytearray (
.data cil I_00006EBC = bytearray (
80 81 00 01 02 03 04 7F)
.data cil I_00006E74 = bytearray (
.data cil I_00006EC4 = bytearray (
01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00
01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00
01 00 00 00)
.data cil I_00006E9C = bytearray (
.data cil I_00006EEC = bytearray (
01 00 00 00 00 94 35 77 00 5E D0 B2 04 00 00 00 // ......5w.^......
05 00 00 00 06 00 00 00 07 00 00 00 08 00 00 00
09 00 00 00 0A 00 00 00)
.data cil I_00006EC4 = bytearray (
.data cil I_00006F14 = bytearray (
01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00
05 00 00 00 06 00 00 00)
.data cil I_00006EDC = bytearray (
.data cil I_00006F2C = bytearray (
00 01 02 FF)
.data cil I_00006EE4 = bytearray (
.data cil I_00006F34 = bytearray (
00 00 00 00 00 00 F8 BF 00 00 00 00 00 00 00 00
00 00 00 00 00 00 F8 3F 00 00 00 00 00 00 F0 FF // .......?........
00 00 00 00 00 00 F0 7F 00 00 00 00 00 00 F8 FF)
.data cil I_00006F14 = bytearray (
.data cil I_00006F64 = bytearray (
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00)
.data cil I_00006F54 = bytearray (
.data cil I_00006FA4 = bytearray (
01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00
05 00 00 00 06 00 00 00 07 00 00 00 08 00 00 00
09 00 00 00 0A 00 00 00)
.data cil I_00006F7C = bytearray (
.data cil I_00006FCC = bytearray (
01 00 01 00 00 00 01 01)
.data cil I_00006F84 = bytearray (
.data cil I_00006FD4 = bytearray (
01 00 00 00 FE FF FF FF 00 94 35 77 04 00 00 00 // ..........5w....
05 00 00 00 FA FF FF FF 07 00 00 00 08 00 00 00
09 00 00 00 0A 00 00 00)
.data cil I_00006FAC = bytearray (
.data cil I_00006FFC = bytearray (
00 00 C0 BF 00 00 00 00 00 00 C0 3F 00 00 80 FF // ...........?....
00 00 80 7F 00 00 C0 FF)
// *********** DISASSEMBLY COMPLETE ***********************

156
ICSharpCode.Decompiler.Tests/TestCases/Pretty/InitializerTests.roslyn.il

@ -1257,8 +1257,8 @@ @@ -1257,8 +1257,8 @@
{
.custom instance void [mscorlib]System.Runtime.CompilerServices.CompilerGeneratedAttribute::.ctor() = ( 01 00 00 00 )
.field public static initonly class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c' '<>9'
.field public static class [mscorlib]System.EventHandler '<>9__61_0'
.field public static class [mscorlib]System.Func`2<class [mscorlib]System.Globalization.NumberFormatInfo,bool> '<>9__75_0'
.field public static class [mscorlib]System.EventHandler '<>9__62_0'
.field public static class [mscorlib]System.Func`2<class [mscorlib]System.Globalization.NumberFormatInfo,bool> '<>9__76_0'
.method private hidebysig specialname rtspecialname static
void .cctor() cil managed
{
@ -1281,7 +1281,7 @@ @@ -1281,7 +1281,7 @@
} // end of method '<>c'::.ctor
.method assembly hidebysig instance void
'<NotAnObjectInitializerWithEvent>b__61_0'(object '<p0>',
'<NotAnObjectInitializerWithEvent>b__62_0'(object '<p0>',
class [mscorlib]System.EventArgs '<p1>') cil managed
{
// Code size 8 (0x8)
@ -1290,10 +1290,10 @@ @@ -1290,10 +1290,10 @@
IL_0001: call void [mscorlib]System.Console::WriteLine()
IL_0006: nop
IL_0007: ret
} // end of method '<>c'::'<NotAnObjectInitializerWithEvent>b__61_0'
} // end of method '<>c'::'<NotAnObjectInitializerWithEvent>b__62_0'
.method assembly hidebysig instance bool
'<Issue270_NestedInitialisers>b__75_0'(class [mscorlib]System.Globalization.NumberFormatInfo format) cil managed
'<Issue270_NestedInitialisers>b__76_0'(class [mscorlib]System.Globalization.NumberFormatInfo format) cil managed
{
// Code size 17 (0x11)
.maxstack 8
@ -1303,7 +1303,7 @@ @@ -1303,7 +1303,7 @@
IL_000b: call bool [mscorlib]System.String::op_Equality(string,
string)
IL_0010: ret
} // end of method '<>c'::'<Issue270_NestedInitialisers>b__75_0'
} // end of method '<>c'::'<Issue270_NestedInitialisers>b__76_0'
} // end of class '<>c'
@ -2223,6 +2223,51 @@ @@ -2223,6 +2223,51 @@
IL_001c: ret
} // end of method TestCases::IndicesInWrongOrder
.method public hidebysig static uint8[]
ReverseInitializer(int32 i) cil managed
{
// Code size 42 (0x2a)
.maxstack 4
.locals init (uint8[] V_0,
uint8[] V_1)
IL_0000: nop
IL_0001: ldc.i4.4
IL_0002: newarr [mscorlib]System.Byte
IL_0007: stloc.0
IL_0008: ldloc.0
IL_0009: ldc.i4.3
IL_000a: ldarg.0
IL_000b: conv.u1
IL_000c: stelem.i1
IL_000d: ldloc.0
IL_000e: ldc.i4.2
IL_000f: ldarg.0
IL_0010: ldc.i4.8
IL_0011: shr
IL_0012: conv.u1
IL_0013: stelem.i1
IL_0014: ldloc.0
IL_0015: ldc.i4.1
IL_0016: ldarg.0
IL_0017: ldc.i4.s 16
IL_0019: shr
IL_001a: conv.u1
IL_001b: stelem.i1
IL_001c: ldloc.0
IL_001d: ldc.i4.0
IL_001e: ldarg.0
IL_001f: ldc.i4.s 24
IL_0021: shr
IL_0022: conv.u1
IL_0023: stelem.i1
IL_0024: ldloc.0
IL_0025: stloc.1
IL_0026: br.s IL_0028
IL_0028: ldloc.1
IL_0029: ret
} // end of method TestCases::ReverseInitializer
.method public hidebysig static void Issue953_MissingNullableSpecifierForArrayInitializer() cil managed
{
// Code size 31 (0x1f)
@ -2463,18 +2508,18 @@ @@ -2463,18 +2508,18 @@
IL_0001: newobj instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::.ctor()
IL_0006: stloc.0
IL_0007: ldloc.0
IL_0008: ldsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9__61_0'
IL_0008: ldsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9__62_0'
IL_000d: dup
IL_000e: brtrue.s IL_0027
IL_0010: pop
IL_0011: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9'
IL_0016: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<NotAnObjectInitializerWithEvent>b__61_0'(object,
IL_0016: ldftn instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<NotAnObjectInitializerWithEvent>b__62_0'(object,
class [mscorlib]System.EventArgs)
IL_001c: newobj instance void [mscorlib]System.EventHandler::.ctor(object,
native int)
IL_0021: dup
IL_0022: stsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9__61_0'
IL_0022: stsfld class [mscorlib]System.EventHandler ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9__62_0'
IL_0027: callvirt instance void ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/Data::add_TestEvent(class [mscorlib]System.EventHandler)
IL_002c: nop
IL_002d: call object ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases::Y()
@ -2874,17 +2919,17 @@ @@ -2874,17 +2919,17 @@
IL_003b: nop
IL_003c: dup
IL_003d: ldloc.0
IL_003e: ldsfld class [mscorlib]System.Func`2<class [mscorlib]System.Globalization.NumberFormatInfo,bool> ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9__75_0'
IL_003e: ldsfld class [mscorlib]System.Func`2<class [mscorlib]System.Globalization.NumberFormatInfo,bool> ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9__76_0'
IL_0043: dup
IL_0044: brtrue.s IL_005d
IL_0046: pop
IL_0047: ldsfld class ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c' ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9'
IL_004c: ldftn instance bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<Issue270_NestedInitialisers>b__75_0'(class [mscorlib]System.Globalization.NumberFormatInfo)
IL_004c: ldftn instance bool ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<Issue270_NestedInitialisers>b__76_0'(class [mscorlib]System.Globalization.NumberFormatInfo)
IL_0052: newobj instance void class [mscorlib]System.Func`2<class [mscorlib]System.Globalization.NumberFormatInfo,bool>::.ctor(object,
native int)
IL_0057: dup
IL_0058: stsfld class [mscorlib]System.Func`2<class [mscorlib]System.Globalization.NumberFormatInfo,bool> ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9__75_0'
IL_0058: stsfld class [mscorlib]System.Func`2<class [mscorlib]System.Globalization.NumberFormatInfo,bool> ICSharpCode.Decompiler.Tests.TestCases.Pretty.InitializerTests.TestCases/'<>c'::'<>9__76_0'
IL_005d: call class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0> [System.Core]System.Linq.Enumerable::Where<class [mscorlib]System.Globalization.NumberFormatInfo>(class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0>,
class [mscorlib]System.Func`2<!!0,bool>)
IL_0062: call !!0 [System.Core]System.Linq.Enumerable::First<class [mscorlib]System.Globalization.NumberFormatInfo>(class [mscorlib]System.Collections.Generic.IEnumerable`1<!!0>)
@ -4441,68 +4486,67 @@ @@ -4441,68 +4486,67 @@
.size 256
} // end of class '__StaticArrayInitTypeSize=256'
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=72' '1535117EC92E41D4A6B7CA00F965357B05B5DC35' at I_00006FD8
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=10' '20E3FF489634E18F3F7EB292AD504DBAE9519293' at I_00007020
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=72' '39E94835525CF7B71CD4595742EF462642FBF1B2' at I_00007030
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=10' '56D9EEC8EF899644C40B9BE9D886DF2367A5D078' at I_00007078
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=12' '735E5A21849E86F68D220F06163E8C5C6376B9C9' at I_00007088
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=64' '7C39B7B06DD624A17F875AB8E9651554BE6E74D2' at I_00007098
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=40' '8D903ECAD8D9D75B3183B23AF79F6D2E607369E3' at I_000070D8
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=80' '9B1F6E56D755443CC39C1969CE38FD41FD4EF4B7' at I_00007100
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=256' A1EA7DC3FE43B3A54F5B729A92B92AF54181A3EB at I_00007150
.field static assembly initonly int64 A6296CAC471BE2954899600137940479D8073C7C at I_00007250
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=36' B62E59D20E3D69F06A6D9BD5E3C518FF7093EDAB at I_00007258
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=40' B9583930B842DBCEF0D7B8E57D4D3F1E8055C39E at I_00007280
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=24' C4E70AB31EF6C8908F896CAD1C6BC75F7FA65E27 at I_000072A8
.field static assembly initonly int32 C62C27924F4C967F5EDDB1850C091D54C7A2AB58 at I_000072C0
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=48' DC7043B0114737ACE19A23DD755893795FD48A23 at I_000072C8
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=64' DCF557B883E6FE0AEC05B7F0290F0EF47D0AC2E3 at I_000072F8
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=40' E0D2592373A0C161E56E266306CD8405CD719D19 at I_00007338
.field static assembly initonly int64 EB0715DBB235F3F696F2C404F5839C6650640898 at I_00007360
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=40' F514FF55B79BCAA2CEC9B56C062D976E45F89AB7 at I_00007368
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=24' FBCB49C1A244C1B5781AA1DB02C5A11F68908526 at I_00007390
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=72' '1535117EC92E41D4A6B7CA00F965357B05B5DC35' at I_00007044
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=10' '20E3FF489634E18F3F7EB292AD504DBAE9519293' at I_0000708C
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=72' '39E94835525CF7B71CD4595742EF462642FBF1B2' at I_0000709C
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=10' '56D9EEC8EF899644C40B9BE9D886DF2367A5D078' at I_000070E4
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=12' '735E5A21849E86F68D220F06163E8C5C6376B9C9' at I_000070F4
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=64' '7C39B7B06DD624A17F875AB8E9651554BE6E74D2' at I_00007104
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=40' '8D903ECAD8D9D75B3183B23AF79F6D2E607369E3' at I_00007144
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=80' '9B1F6E56D755443CC39C1969CE38FD41FD4EF4B7' at I_0000716C
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=256' A1EA7DC3FE43B3A54F5B729A92B92AF54181A3EB at I_000071BC
.field static assembly initonly int64 A6296CAC471BE2954899600137940479D8073C7C at I_000072BC
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=36' B62E59D20E3D69F06A6D9BD5E3C518FF7093EDAB at I_000072C4
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=40' B9583930B842DBCEF0D7B8E57D4D3F1E8055C39E at I_000072EC
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=24' C4E70AB31EF6C8908F896CAD1C6BC75F7FA65E27 at I_00007314
.field static assembly initonly int32 C62C27924F4C967F5EDDB1850C091D54C7A2AB58 at I_0000732C
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=48' DC7043B0114737ACE19A23DD755893795FD48A23 at I_00007334
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=64' DCF557B883E6FE0AEC05B7F0290F0EF47D0AC2E3 at I_00007364
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=40' E0D2592373A0C161E56E266306CD8405CD719D19 at I_000073A4
.field static assembly initonly int64 EB0715DBB235F3F696F2C404F5839C6650640898 at I_000073CC
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=40' F514FF55B79BCAA2CEC9B56C062D976E45F89AB7 at I_000073D4
.field static assembly initonly valuetype '<PrivateImplementationDetails>'/'__StaticArrayInitTypeSize=24' FBCB49C1A244C1B5781AA1DB02C5A11F68908526 at I_000073FC
} // end of class '<PrivateImplementationDetails>'
// =============================================================
.data cil I_00006FD8 = bytearray (
.data cil I_00007044 = bytearray (
01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00
05 00 00 00 06 00 00 00 07 00 00 00 08 00 00 00
09 00 00 00 0B 00 00 00 0C 00 00 00 0D 00 00 00
0E 00 00 00 0F 00 00 00 10 00 00 00 11 00 00 00
12 00 00 00 13 00 00 00)
.data cil I_00007020 = bytearray (
.data cil I_0000708C = bytearray (
01 02 03 04 05 06 07 08 FE FF)
.data cil I_0000702A = int8[6]
.data cil I_00007030 = bytearray (
.data cil I_00007096 = int8[2]
.data cil I_0000709C = bytearray (
15 00 00 00 16 00 00 00 17 00 00 00 18 00 00 00
19 00 00 00 1A 00 00 00 1B 00 00 00 1C 00 00 00
1D 00 00 00 1F 00 00 00 20 00 00 00 21 00 00 00 // ........ ...!...
22 00 00 00 23 00 00 00 24 00 00 00 25 00 00 00 // "...#...$...%...
26 00 00 00 27 00 00 00) // &...'...
.data cil I_00007078 = bytearray (
.data cil I_000070E4 = bytearray (
00 80 FF FF 00 00 01 00 FF 7F)
.data cil I_00007082 = int8[6]
.data cil I_00007088 = bytearray (
.data cil I_000070EE = int8[2]
.data cil I_000070F4 = bytearray (
00 00 01 00 FF 7F 00 80 FE FF FF FF)
.data cil I_00007094 = int8[4]
.data cil I_00007098 = bytearray (
.data cil I_00007104 = bytearray (
00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00)
.data cil I_000070D8 = bytearray (
.data cil I_00007144 = bytearray (
01 00 0C BB 7D 6E 9C BA FF FF FF FF FF FF FF FF // ....}n..........
00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00
FF FF F3 44 82 91 63 45) // ...D..cE
.data cil I_00007100 = bytearray (
.data cil I_0000716C = bytearray (
01 00 00 00 00 00 00 00 00 94 35 77 00 00 00 00 // ..........5w....
00 5E D0 B2 00 00 00 00 04 00 00 00 00 00 00 00 // .^..............
05 00 00 00 00 00 00 00 06 00 00 00 00 00 00 00
07 00 00 00 00 00 00 00 08 00 00 00 00 00 00 00
FF FF F3 44 82 91 63 45 FF FF E7 89 04 23 C7 8A) // ...D..cE.....#..
.data cil I_00007150 = bytearray (
.data cil I_000071BC = bytearray (
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
@ -4519,43 +4563,41 @@ @@ -4519,43 +4563,41 @@
00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 01 00 00 00 00 00 00 00)
.data cil I_00007250 = bytearray (
.data cil I_000072BC = bytearray (
80 81 00 01 02 03 04 7F)
.data cil I_00007258 = bytearray (
.data cil I_000072C4 = bytearray (
01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00
01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00
01 00 00 00)
.data cil I_0000727C = int8[4]
.data cil I_00007280 = bytearray (
.data cil I_000072EC = bytearray (
01 00 00 00 00 94 35 77 00 5E D0 B2 04 00 00 00 // ......5w.^......
05 00 00 00 06 00 00 00 07 00 00 00 08 00 00 00
09 00 00 00 0A 00 00 00)
.data cil I_000072A8 = bytearray (
.data cil I_00007314 = bytearray (
01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00
05 00 00 00 06 00 00 00)
.data cil I_000072C0 = bytearray (
.data cil I_0000732C = bytearray (
00 01 02 FF)
.data cil I_000072C4 = int8[4]
.data cil I_000072C8 = bytearray (
.data cil I_00007334 = bytearray (
00 00 00 00 00 00 F8 BF 00 00 00 00 00 00 00 00
00 00 00 00 00 00 F8 3F 00 00 00 00 00 00 F0 FF // .......?........
00 00 00 00 00 00 F0 7F 00 00 00 00 00 00 F8 FF)
.data cil I_000072F8 = bytearray (
.data cil I_00007364 = bytearray (
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
01 00 00 00 01 00 00 00 01 00 00 00 01 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00)
.data cil I_00007338 = bytearray (
.data cil I_000073A4 = bytearray (
01 00 00 00 02 00 00 00 03 00 00 00 04 00 00 00
05 00 00 00 06 00 00 00 07 00 00 00 08 00 00 00
09 00 00 00 0A 00 00 00)
.data cil I_00007360 = bytearray (
.data cil I_000073CC = bytearray (
01 00 01 00 00 00 01 01)
.data cil I_00007368 = bytearray (
.data cil I_000073D4 = bytearray (
01 00 00 00 FE FF FF FF 00 94 35 77 04 00 00 00 // ..........5w....
05 00 00 00 FA FF FF FF 07 00 00 00 08 00 00 00
09 00 00 00 0A 00 00 00)
.data cil I_00007390 = bytearray (
.data cil I_000073FC = bytearray (
00 00 C0 BF 00 00 00 00 00 00 C0 3F 00 00 80 FF // ...........?....
00 00 80 7F 00 00 C0 FF)
// *********** DISASSEMBLY COMPLETE ***********************

4
ICSharpCode.Decompiler/IL/Transforms/TransformArrayInitializers.cs

@ -357,6 +357,8 @@ namespace ICSharpCode.Decompiler.IL.Transforms @@ -357,6 +357,8 @@ namespace ICSharpCode.Decompiler.IL.Transforms
if (indices.Count != arrayLength.Length)
break;
bool exact;
if (j >= values.Length)
break;
do {
var nextIndices = CalculateNextIndices(indices, out exact);
if (nextIndices == null)
@ -368,7 +370,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms @@ -368,7 +370,7 @@ namespace ICSharpCode.Decompiler.IL.Transforms
values[j] = (nextIndices, null);
}
j++;
} while (!exact);
} while (j < values.Length && !exact);
}
if (i < block.Instructions.Count) {
if (block.Instructions[i].MatchStObj(out ILInstruction target, out ILInstruction value, out IType type)) {

Loading…
Cancel
Save