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