bugfix: emulated thread vars used in combination with the mark & sweep GC

resulted in invalid code generation
This commit is contained in:
Zahary Karadjov 2013-05-25 19:38:41 +03:00
commit 420789c278
3 changed files with 11 additions and 4 deletions

View file

@ -12,10 +12,10 @@
# included from cgen.nim
proc emulatedThreadVars(): bool {.inline.} =
proc emulatedThreadVars(): bool =
result = {optThreads, optTlsEmulation} <= gGlobalOptions
proc AccessThreadLocalVar(p: BProc, s: PSym) =
proc accessThreadLocalVar(p: BProc, s: PSym) =
if emulatedThreadVars() and not p.ThreadVarAccessed:
p.ThreadVarAccessed = true
p.module.usesThreadVars = true