bugfixes; field discriminant checks; linearScanEnd, unroll, shallow pragmas

This commit is contained in:
Araq 2011-03-23 01:09:52 +01:00
commit 5b789f2da8
45 changed files with 2342 additions and 243 deletions

5
tests/gc/gcleak.nim Normal file → Executable file
View file

@ -5,7 +5,10 @@ type
proc MakeObj(): TTestObj =
result.x = "Hello"
while true:
for i in 1 .. 100_000_000:
var obj = MakeObj()
if getOccupiedMem() > 300_000: quit("still a leak!")
# echo GC_getstatistics()
echo "no leak: ", getOccupiedMem()

9
tests/gc/gcleak2.nim Normal file → Executable file
View file

@ -7,14 +7,13 @@ proc MakeObj(): TTestObj =
result.x = "Hello"
result.s = @[1,2,3]
#while true:
# var obj = MakeObj()
# echo GC_getstatistics()
proc inProc() =
while true:
for i in 1 .. 100_000_000:
var obj: TTestObj
obj = MakeObj()
if getOccupiedMem() > 300_000: quit("still a leak!")
inProc()
echo "no leak: ", getOccupiedMem()