fixed the rodfiles tests

This commit is contained in:
Zahary Karadjov 2012-07-20 00:35:05 +03:00
commit 371619c43a
5 changed files with 39 additions and 36 deletions

View file

@ -942,9 +942,9 @@ proc genInitCode(m: BModule) =
app(prc, genSectionStart(cpsStmts))
app(prc, m.preInitProc.s(cpsStmts))
app(prc, m.initProc.s(cpsStmts))
app(prc, genSectionEnd(cpsStmts))
if optStackTrace in m.initProc.options and not m.PreventStackTrace:
app(prc, deinitFrame(m.initProc))
app(prc, genSectionEnd(cpsStmts))
app(prc, deinitGCFrame(m.initProc))
appf(prc, "}$N$N")

View file

@ -407,7 +407,7 @@ proc decodeSym(r: PRodReader, info: TLineInfo): PSym =
if r.s[r.pos] == '%':
inc(r.pos)
result.position = decodeVInt(r.s, r.pos)
elif result.kind notin routineKinds:
elif result.kind notin routineKinds + {skModule}:
result.position = 0
# this may have been misused as reader index! But we still
# need it for routines as the body is loaded lazily.