first steps to C file merge operation for incremental compilation

This commit is contained in:
Araq 2011-10-21 01:06:24 +02:00
commit a6f90d4cdd
8 changed files with 441 additions and 118 deletions

View file

@ -111,6 +111,12 @@ proc newRope(data: string = nil): PRope =
result.length = len(data)
result.data = data
proc newMutableRope*(capacity = 30): PRope =
## creates a new rope that supports direct modifications of the rope's
## 'data' and 'length' fields.
new(result)
result.data = newStringOfCap(capacity)
var
cache: PRope # the root of the cache tree
misses, hits: int