.assembly test { } // ENTRYPOINT .class MainMain { .method public static void Main(class [mscorlib]System.String[]) { .entrypoint ldstr "LOG: loading main value\n" call void [mscorlib]System.Console::WriteLine(class [mscorlib]System.String) ldsfld (func (unit) --> class [ilx std]'()') class Main::'Main_main' ldstr "LOG: evaluating main value\n" call void [mscorlib]System.Console::WriteLine(class [mscorlib]System.String) callfunc () --> (func (unit) --> class [ilx std]PrelBase_Z0T) ldstr "LOG: calling main value\n" call void [mscorlib]System.Console::WriteLine(class [mscorlib]System.String) ldunit callfunc (void) --> class [ilx std]PrelBase_Z0T pop // HACK HACK HACK // Call the "finalizers" for stdin, stdout and stderr, because COM+ doesn't // guarantee that finalizers will be run. WE DON'T GUARANTEE TO RUN ANY // OTHER FINALIZERS... ldstr "LOG: calling critical finalizers manually in main()\n" call void [mscorlib]System.Console::WriteLine(class [mscorlib]System.String) ldsfld (func (thunk>) --> (func (unit) --> class [ilx std]PrelBase_Z0T)) [ilx std]'PrelHandle'::'PrelHandle_stdHandleFinalizzer' ldsfld thunk> [ilx std]'PrelHandle'::'PrelHandle_stdin' callfunc (thunk>) --> (func (unit) --> class [ilx std]PrelBase_Z0T) callfunc () --> (func (unit) --> class [ilx std]PrelBase_Z0T) ldunit callfunc (void) --> class [ilx std]PrelBase_Z0T pop ldsfld (func (thunk>) --> (func (unit) --> class [ilx std]PrelBase_Z0T)) [ilx std]'PrelHandle'::'PrelHandle_stdHandleFinalizzer' ldsfld thunk> [ilx std]'PrelHandle'::'PrelHandle_stdout' callfunc (thunk>) --> (func (unit) --> class [ilx std]PrelBase_Z0T) callfunc () --> (func (unit) --> class [ilx std]PrelBase_Z0T) ldunit callfunc (void) --> class [ilx std]PrelBase_Z0T pop ldsfld (func (thunk>) --> (func (unit) --> class [ilx std]PrelBase_Z0T)) [ilx std]'PrelHandle'::'PrelHandle_stdHandleFinalizzer' ldsfld thunk> [ilx std]'PrelHandle'::'PrelHandle_stderr' callfunc (thunk>) --> (func (unit) --> class [ilx std]PrelBase_Z0T) callfunc () --> (func (unit) --> class [ilx std]PrelBase_Z0T) ldunit callfunc (void) --> class [ilx std]PrelBase_Z0T pop ldstr "LOG: exit main()\n" call void [mscorlib]System.Console::WriteLine(class [mscorlib]System.String) ret } }