remove dead code elimination option (#7669)
This commit is contained in:
parent
a8b70c5500
commit
72dfe176f5
57 changed files with 67 additions and 122 deletions
|
|
@ -2264,7 +2264,7 @@ proc expr(p: BProc, n: PNode, d: var TLoc) =
|
|||
of nkEmpty: discard
|
||||
of nkWhileStmt: genWhileStmt(p, n)
|
||||
of nkVarSection, nkLetSection: genVarStmt(p, n)
|
||||
of nkConstSection: genConstStmt(p, n)
|
||||
of nkConstSection: discard # consts generated lazily on use
|
||||
of nkForStmt: internalError(n.info, "for statement not eliminated")
|
||||
of nkCaseStmt: genCase(p, n, d)
|
||||
of nkReturnStmt: genReturnStmt(p, n)
|
||||
|
|
@ -2315,8 +2315,7 @@ proc expr(p: BProc, n: PNode, d: var TLoc) =
|
|||
# are not transformed correctly. We work around this issue (#411) here
|
||||
# by ensuring it's no inner proc (owner is a module):
|
||||
if prc.skipGenericOwner.kind == skModule and sfCompileTime notin prc.flags:
|
||||
if (not emitLazily(prc)) or
|
||||
({sfExportc, sfCompilerProc} * prc.flags == {sfExportc}) or
|
||||
if ({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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue