Created
May 29, 2014 15:59
-
-
Save jonpryor/d308c05f6779f6290bf6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Test { | |
public static void Main () | |
{ | |
} | |
static void A () | |
{ | |
int[] value = {1}; | |
} | |
static void B () | |
{ | |
int[] value = new int[1]; | |
value [0] = 1; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.assembly extern mscorlib | |
{ | |
.ver 4:0:0:0 | |
.publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. | |
} | |
.assembly 'array' | |
{ | |
.custom instance void class [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::'.ctor'() = ( | |
01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx | |
63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. | |
.hash algorithm 0x00008004 | |
.ver 0:0:0:0 | |
} | |
.module array.exe // GUID = {F625C86A-9333-4CA3-B6A3-9C626DD329F7} | |
.class private auto ansi beforefieldinit Test | |
extends [mscorlib]System.Object | |
{ | |
// method line 1 | |
.method public hidebysig specialname rtspecialname | |
instance default void '.ctor' () cil managed | |
{ | |
// Method begins at RVA 0x2050 | |
// Code size 7 (0x7) | |
.maxstack 8 | |
IL_0000: ldarg.0 | |
IL_0001: call instance void object::'.ctor'() | |
IL_0006: ret | |
} // end of method Test::.ctor | |
// method line 2 | |
.method public static hidebysig | |
default void Main () cil managed | |
{ | |
// Method begins at RVA 0x2058 | |
.entrypoint | |
// Code size 1 (0x1) | |
.maxstack 8 | |
IL_0000: ret | |
} // end of method Test::Main | |
// method line 3 | |
.method private static hidebysig | |
default void A () cil managed | |
{ | |
// Method begins at RVA 0x205c | |
// Code size 12 (0xc) | |
.maxstack 4 | |
.locals init ( | |
int32[] V_0) | |
IL_0000: ldc.i4.1 | |
IL_0001: newarr [mscorlib]System.Int32 | |
IL_0006: dup | |
IL_0007: ldc.i4.0 | |
IL_0008: ldc.i4.1 | |
IL_0009: stelem.i4 | |
IL_000a: stloc.0 | |
IL_000b: ret | |
} // end of method Test::A | |
// method line 4 | |
.method private static hidebysig | |
default void B () cil managed | |
{ | |
// Method begins at RVA 0x2074 | |
// Code size 12 (0xc) | |
.maxstack 3 | |
.locals init ( | |
int32[] V_0) | |
IL_0000: ldc.i4.1 | |
IL_0001: newarr [mscorlib]System.Int32 | |
IL_0006: stloc.0 | |
IL_0007: ldloc.0 | |
IL_0008: ldc.i4.0 | |
IL_0009: ldc.i4.1 | |
IL_000a: stelem.i4 | |
IL_000b: ret | |
} // end of method Test::B | |
} // end of class Test | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment