// Microsoft (R) .NET Framework IL Disassembler. Version 3.5.30729.1 // Metadata version: v4.0.30319 .assembly extern mscorlib { .publickeytoken = (B7 7A 5C 56 19 34 E0 89 ) // .z\V.4.. .ver 4:0:0:0 } .assembly '1' { // --- Следующий настраиваемый атрибут добавлен автоматически, не следует отменять преобразование в комментарий ------- // .custom instance void [mscorlib]System.Diagnostics.DebuggableAttribute::.ctor(valuetype [mscorlib]System.Diagnostics.DebuggableAttribute/DebuggingModes) = ( 01 00 07 01 00 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.CompilationRelaxationsAttribute::.ctor(int32) = ( 01 00 08 00 00 00 00 00 ) .custom instance void [mscorlib]System.Runtime.CompilerServices.RuntimeCompatibilityAttribute::.ctor() = ( 01 00 01 00 54 02 16 57 72 61 70 4E 6F 6E 45 78 // ....T..WrapNonEx 63 65 70 74 69 6F 6E 54 68 72 6F 77 73 01 ) // ceptionThrows. .hash algorithm 0x00008004 .ver 0:0:0:0 } .module '1.exe' // MVID: {B3ADB7AA-DDA7-4379-BA84-91E70EE26835} .imagebase 0x00400000 .file alignment 0x00000200 .stackreserve 0x00100000 .subsystem 0x0003 // WINDOWS_CUI .corflags 0x00000001 // ILONLY // Image base: 0x001C0000 // =============== CLASS MEMBERS DECLARATION =================== .class public auto ansi beforefieldinit A.A extends [mscorlib]System.Object { .field private static int32 a .method public hidebysig instance void test() cil managed { // Размер кода: 13 (0xd) .maxstack 8 .language '{3F5162F8-07C6-11D3-9053-00C04FA302A1}', '{994B45C4-E6E9-11D2-903F-00C04FA302A1}', '{5A869D0B-6611-11D3-BD2A-0000F80849BD}' // Source File 'l:\Лекции\3 Курс\Теория компиляторов\Samples\MSIL2\copy\1.cs' //000008: public void test() { IL_0000: nop //000009: Console.WriteLine(a); IL_0001: ldsfld int32 A.A::a IL_0006: call void [mscorlib]System.Console::WriteLine(int32) IL_000b: nop //000010: } IL_000c: ret } // end of method A::test .method public hidebysig static void Main() cil managed { .entrypoint // Размер кода: 52 (0x34) .maxstack 2 .locals init ([0] bool CS$4$0000) //000011: //000012: public static void Main() { IL_0000: nop //000013: (new A()).test(); IL_0001: newobj instance void A.A::.ctor() IL_0006: call instance void A.A::test() IL_000b: nop //000014: //000015: if (a > 0) IL_000c: ldsfld int32 A.A::a IL_0011: ldc.i4.0 IL_0012: cgt IL_0014: ldc.i4.0 IL_0015: ceq IL_0017: stloc.0 IL_0018: ldloc.0 IL_0019: brtrue.s IL_0028 //000016: Console.WriteLine("A > 0"); IL_001b: ldstr "A > 0" IL_0020: call void [mscorlib]System.Console::WriteLine(string) IL_0025: nop IL_0026: br.s IL_0033 //000017: else //000018: Console.WriteLine("A <= 0"); IL_0028: ldstr "A <= 0" IL_002d: call void [mscorlib]System.Console::WriteLine(string) IL_0032: nop //000019: } IL_0033: ret } // end of method A::Main .method public hidebysig specialname rtspecialname instance void .ctor() cil managed { // Размер кода: 7 (0x7) .maxstack 8 IL_0000: ldarg.0 IL_0001: call instance void [mscorlib]System.Object::.ctor() IL_0006: ret } // end of method A::.ctor .method private hidebysig specialname rtspecialname static void .cctor() cil managed { // Размер кода: 8 (0x8) .maxstack 8 //000006: private static int a = 100; IL_0000: ldc.i4.s 100 IL_0002: stsfld int32 A.A::a IL_0007: ret } // end of method A::.cctor } // end of class A.A // ============================================================= // *********** ДИЗАССЕМБЛИРОВАНИЕ ЗАВЕРШЕНО *********************** // ВНИМАНИЕ: создан файл ресурсов Win32 1.ilasm.res