diff options
author | Araq <rumpf_a@web.de> | 2010-10-21 00:12:14 +0200 |
---|---|---|
committer | Araq <rumpf_a@web.de> | 2010-10-21 00:12:14 +0200 |
commit | 765366c1f377fbd9507e942385170b546d9d34d0 (patch) | |
tree | bffec904c5b980aa7b9c0961cda18d5dd30638ae /lib/system | |
parent | 53cd61546dc798fc0f08baf0813f579a90d7e766 (diff) | |
download | Nim-765366c1f377fbd9507e942385170b546d9d34d0.tar.gz |
version 0.8.10
Diffstat (limited to 'lib/system')
-rwxr-xr-x | lib/system/gc.nim | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/system/gc.nim b/lib/system/gc.nim index c0461d89d..aca3705cd 100755 --- a/lib/system/gc.nim +++ b/lib/system/gc.nim @@ -185,7 +185,7 @@ template gcTrace(cell, state: expr): stmt = # forward declarations: proc collectCT(gch: var TGcHeap) -proc IsOnStack(p: pointer): bool {.noinline.} +proc IsOnStack*(p: pointer): bool {.noinline.} proc forAllChildren(cell: PCell, op: TWalkOp) proc doOperation(p: pointer, op: TWalkOp) proc forAllChildrenAux(dest: Pointer, mt: PNimType, op: TWalkOp) @@ -223,6 +223,7 @@ proc decRef(c: PCell) {.inline.} = if c.refcount <% rcIncrement: writeCell("broken cell", c) assert(c.refcount >=% rcIncrement) + #if c.refcount <% rcIncrement: quit("leck mich") if atomicDec(c.refcount, rcIncrement) <% rcIncrement: rtlAddZCT(c) elif canBeCycleRoot(c): @@ -523,7 +524,7 @@ when defined(sparc): # For SPARC architecture. var b = cast[TAddress](stackBottom) var a = cast[TAddress](addr(stackTop)) var x = cast[TAddress](p) - result = x >=% a and x <=% b + result = a <=% x and x <=% b proc markStackAndRegisters(gch: var TGcHeap) {.noinline, cdecl.} = when defined(sparcv9): @@ -553,7 +554,7 @@ elif stackIncreases: var a = cast[TAddress](stackBottom) var b = cast[TAddress](addr(stackTop)) var x = cast[TAddress](p) - result = x >=% a and x <=% b + result = a <=% x and x <=% b var jmpbufSize {.importc: "sizeof(jmp_buf)", nodecl.}: int @@ -580,7 +581,7 @@ else: var b = cast[TAddress](stackBottom) var a = cast[TAddress](addr(stackTop)) var x = cast[TAddress](p) - result = x >=% a and x <=% b + result = a <=% x and x <=% b proc markStackAndRegisters(gch: var TGcHeap) {.noinline, cdecl.} = # We use a jmp_buf buffer that is in the C stack. |