Less ropes (#10979)

* convert ropecg to a macro
* fewer intermediate ropes
This commit is contained in:
Arne Döring 2019-04-11 09:48:10 +02:00 • committed by Andreas Rumpf
commit 1da98b1636
7 changed files with 451 additions and 349 deletions

View file

@ -21,7 +21,7 @@ proc accessThreadLocalVar(p: BProc, s: PSym) =
incl p.module.flags, usesThreadVars
addf(p.procSec(cpsLocals), "\tNimThreadVars* NimTV_;$n", [])
add(p.procSec(cpsInit),
ropecg(p.module, "\tNimTV_ = (NimThreadVars*) #GetThreadLocalVars();$n"))
ropecg(p.module, "\tNimTV_ = (NimThreadVars*) #GetThreadLocalVars();$n", []))
proc declareThreadVar(m: BModule, s: PSym, isExtern: bool) =
if emulatedThreadVars(m.config):