before stack init change

This commit is contained in:
Andreas Rumpf 2010-08-01 14:49:54 +02:00
commit 03724c2952
13 changed files with 93 additions and 57 deletions

View file

@ -715,10 +715,12 @@ proc genStmts(p: BProc, t: PNode) =
of nkProcDef, nkMethodDef, nkConverterDef:
if (t.sons[genericParamsPos] == nil):
prc = t.sons[namePos].sym
if not (optDeadCodeElim in gGlobalOptions) and
not (sfDeadCodeElim in getModule(prc).flags) or
if (optDeadCodeElim notin gGlobalOptions and
sfDeadCodeElim notin getModule(prc).flags) or
({sfExportc, sfCompilerProc} * prc.flags == {sfExportc}) or
(sfExportc in prc.flags and lfExportLib in prc.loc.flags) or
(prc.kind == skMethod):
# we have not only the header:
if (t.sons[codePos] != nil) or (lfDynamicLib in prc.loc.flags):
genProc(p.module, prc)
else: internalError(t.info, "genStmts(" & $t.kind & ')')