platform.nim doesn't use globals anymore; prepare msgs.nim for not using globals

This commit is contained in:
Andreas Rumpf 2018-05-18 15:18:00 +02:00
commit a4e2b0c153
35 changed files with 536 additions and 676 deletions

View file

@ -27,9 +27,9 @@ proc getPragmaStmt*(n: PNode, w: TSpecialWord): PNode =
proc stmtsContainPragma*(n: PNode, w: TSpecialWord): bool =
result = getPragmaStmt(n, w) != nil
proc hashString*(s: string): BiggestInt =
proc hashString*(conf: ConfigRef; s: string): BiggestInt =
# has to be the same algorithm as system.hashString!
if CPU[targetCPU].bit == 64:
if CPU[conf.target.targetCPU].bit == 64:
# we have to use the same bitwidth
# as the target CPU
var b = 0'i64