7c7257efc0656fc8e371f838d9e03a1aea86e376
[ghc-hetmet.git] / ghc / compiler / ilxGen / Entry.ilx
1 .assembly test { }
2 // ENTRYPOINT
3 .class MainMain { 
4    .method public static void Main(class [mscorlib]System.String[]) {
5        .entrypoint
6            ldstr "LOG: *** loading main value"   call void [mscorlib]System.Console::WriteLine(class [mscorlib]System.String)
7       ldsfld thunk<(func ( /* unit skipped */ ) --> class [ilx std]PrelBase_Z0T)> class Main::'Main_main'
8
9            ldstr "LOG: *** evaluating main value"
10            call void [mscorlib]System.Console::WriteLine(class [mscorlib]System.String) 
11       callfunc () --> (func ( /* unit skipped */ ) --> class [ilx std]PrelBase_Z0T)
12            ldstr "LOG: *** calling main value"
13            call void [mscorlib]System.Console::WriteLine(class [mscorlib]System.String) 
14       // ldunit
15       callfunc ( /* unit skipped */ ) --> class [ilx std]PrelBase_Z0T
16
17       pop
18
19
20 // HACK HACK HACK
21 // Call the "finalizers" for stdin, stdout and stderr, because COM+ doesn't 
22 // guarantee that finalizers will be run. WE DON'T GUARANTEE TO RUN ANY
23 // OTHER FINALIZERS...
24
25       ldstr "LOG: ***calling critical finalizers manually in main()"
26            call void [mscorlib]System.Console::WriteLine(class [mscorlib]System.String)
27
28 ldsfld thunk<(func (thunk<class [ilx std]PrelIOBase_MVar<class [ilx std]PrelIOBase_Handlezuzu>>) --> (func (/* unit skipped */) --> class [ilx std]PrelBase_Z0T))>  [ilx std]'PrelHandle'::'PrelHandle_stdHandleFinalizzer'
29 ldsfld thunk<class [ilx std]PrelIOBase_MVar<class [ilx std]PrelIOBase_Handle__>>  [ilx std]'PrelHandle'::'PrelHandle_stdin'
30       callfunc () (thunk<class [ilx std]PrelIOBase_MVar<class [ilx std]PrelIOBase_Handle__>>) --> (func ( /* unit skipped */ ) -->  class [ilx std]PrelBase_Z0T)
31       callfunc ( /* unit skipped */ ) --> class [ilx std]PrelBase_Z0T
32       pop
33
34 ldsfld thunk<(func (thunk<class [ilx std]PrelIOBase_MVar<class [ilx std]PrelIOBase_Handlezuzu>>) --> (func (/* unit skipped */) --> class [ilx std]PrelBase_Z0T))>  [ilx std]'PrelHandle'::'PrelHandle_stdHandleFinalizzer'
35 ldsfld thunk<class [ilx std]PrelIOBase_MVar<class [ilx std]PrelIOBase_Handle__>>  [ilx std]'PrelHandle'::'PrelHandle_stdout'
36       callfunc () (thunk<class [ilx std]PrelIOBase_MVar<class [ilx std]PrelIOBase_Handle__>>) --> (func ( /* unit skipped */ ) -->  class [ilx std]PrelBase_Z0T)
37       callfunc ( /* unit skipped */ ) --> class [ilx std]PrelBase_Z0T
38       pop
39
40 ldsfld thunk<(func (thunk<class [ilx std]PrelIOBase_MVar<class [ilx std]PrelIOBase_Handlezuzu>>) --> (func (/* unit skipped */) --> class [ilx std]PrelBase_Z0T))>  [ilx std]'PrelHandle'::'PrelHandle_stdHandleFinalizzer'
41 ldsfld thunk<class [ilx std]PrelIOBase_MVar<class [ilx std]PrelIOBase_Handle__>>  [ilx std]'PrelHandle'::'PrelHandle_stderr'
42       callfunc () (thunk<class [ilx std]PrelIOBase_MVar<class [ilx std]PrelIOBase_Handle__>>) --> (func ( /* unit skipped */ ) -->  class [ilx std]PrelBase_Z0T)
43       callfunc ( /* unit skipped */ ) --> class [ilx std]PrelBase_Z0T
44       pop
45
46       ldstr "LOG: exit main()\n"
47            call void [mscorlib]System.Console::WriteLine(class [mscorlib]System.String)
48       ret
49    }
50 }
51