improvements to get code size down for programs that don't use GC

This commit is contained in:
Araq 2011-06-26 20:17:19 +02:00
commit e25384db89
18 changed files with 642 additions and 181 deletions

View file

@ -52,15 +52,10 @@ const
IntShift = 5 + ord(sizeof(int) == 8) # 5 or 6, depending on int width
IntMask = 1 shl IntShift - 1
var
gOutOfMem: ref EOutOfMemory
proc raiseOutOfMem() {.noreturn.} =
if gOutOfMem == nil:
echo("out of memory; cannot even throw an exception")
quit(1)
gOutOfMem.msg = "out of memory"
raise gOutOfMem
proc raiseOutOfMem() {.noinline.} =
if outOfMemHook != nil: outOfMemHook()
echo("out of memory")
quit(1)
when defined(boehmgc):
when defined(windows):