tiny C backend for a much faster REPL

This commit is contained in:
Andreas Rumpf 2010-04-02 19:34:57 +02:00
commit f530bbd631
12 changed files with 208 additions and 53 deletions

View file

@ -67,10 +67,12 @@ const
type
TFormatStr* = string # later we may change it to CString for better
# performance of the code generator (assignments copy the format strings
# performance of the code generator (assignments
# copy the format strings
# though it is not necessary)
PRope* = ref TRope
TRope*{.acyclic.} = object of TObject # the empty rope is represented by nil to safe space
TRope*{.acyclic.} = object of TObject # the empty rope is represented
# by nil to safe space
left*, right*: PRope
length*: int
data*: string # != nil if a leaf
@ -405,4 +407,4 @@ proc writeRopeIfNotEqual(r: PRope, filename: string): bool =
else:
result = false
new(N) # init dummy node for splay algorithm
new(N) # init dummy node for splay algorithm