remove more global variables in the Nim compiler

This commit is contained in:
Andreas Rumpf 2018-05-27 11:10:56 +02:00
commit 669a564492
77 changed files with 679 additions and 679 deletions

View file

@ -56,7 +56,7 @@
# To cache them they are inserted in a `cache` array.
import
platform, hashes
hashes
type
FormatStr* = string # later we may change it to CString for better
@ -70,8 +70,6 @@ type
length*: int
data*: string # != nil if a leaf
RopeSeq* = seq[Rope]
proc len*(a: Rope): int =
## the rope's length
if a == nil: result = 0
@ -93,7 +91,7 @@ proc freezeMutableRope*(r: Rope) {.inline.} =
r.length = r.data.len
var
cache: array[0..2048*2 - 1, Rope]
cache: array[0..2048*2 - 1, Rope] # XXX Global here!
proc resetRopeCache* =
for i in low(cache)..high(cache):