This commit is contained in:
Araq 2015-07-18 17:48:01 +02:00
commit 6b00160938

View file

@ -853,14 +853,14 @@ proc genMainProc(m: BModule) =
# functions, which might otherwise merge their stack frames. # functions, which might otherwise merge their stack frames.
PreMainBody = PreMainBody =
"void PreMainInner() {$N" & "void PreMainInner() {$N" &
"\tsystemInit();$N" & "\tsystemInit000();$N" &
"$1" & "$1" &
"$2" & "$2" &
"$3" & "$3" &
"}$N$N" & "}$N$N" &
"void PreMain() {$N" & "void PreMain() {$N" &
"\tvoid (*volatile inner)();$N" & "\tvoid (*volatile inner)();$N" &
"\tsystemDatInit();$N" & "\tsystemDatInit000();$N" &
"\tinner = PreMainInner;$N" & "\tinner = PreMainInner;$N" &
"$4$5" & "$4$5" &
"\t(*inner)();$N" & "\t(*inner)();$N" &
@ -974,8 +974,8 @@ proc getSomeInitName(m: PSym, suffix: string): Rope =
result.add m.name.s result.add m.name.s
result.add suffix result.add suffix
proc getInitName(m: PSym): Rope = getSomeInitName(m, "Init") proc getInitName(m: PSym): Rope = getSomeInitName(m, "Init000")
proc getDatInitName(m: PSym): Rope = getSomeInitName(m, "DatInit") proc getDatInitName(m: PSym): Rope = getSomeInitName(m, "DatInit000")
proc registerModuleToMain(m: PSym) = proc registerModuleToMain(m: PSym) =
var var