Dot not consider Sys::init as an entry point
authorJean Privat <jean@pryen.org>
Fri, 14 Nov 2008 09:56:30 +0000 (04:56 -0500)
committerJean Privat <jean@pryen.org>
Fri, 14 Nov 2008 09:56:30 +0000 (04:56 -0500)
src/compiling/compiling_global.nit

index 5ae0cb0..f51aede 100644 (file)
@@ -474,15 +474,14 @@ redef class MMSrcModule
                        print("No main")
                else
                        var sys = class_by_name(sysname).get_type
-                       var main = sys.select_method(once "init".to_symbol)
-                       if main == null then
-                               main = sys.select_method(once "main".to_symbol)
-                       end
-                       if main == null then
+                       # var initm = sys.select_method(once "init".to_symbol)
+                       var mainm = sys.select_method(once "main".to_symbol)
+                       if mainm == null then
                                print("No main")
                        else
+                               #v.add_instr("G_sys = NEW_{initm.cname}();")
                                v.add_instr("G_sys = NEW_Sys();")
-                               v.add_instr("{main.cname}(G_sys);")
+                               v.add_instr("{mainm.cname}(G_sys);")
                        end
                end
                v.add_instr("return 0;")