introduced 'benign' pragma
This commit is contained in:
parent
2dba3acfa9
commit
a639824e5e
14 changed files with 125 additions and 117 deletions
|
|
@ -32,11 +32,11 @@ type
|
|||
# local
|
||||
waMarkPrecise # fast precise marking
|
||||
|
||||
TFinalizer {.compilerproc.} = proc (self: pointer) {.nimcall, gcsafe.}
|
||||
TFinalizer {.compilerproc.} = proc (self: pointer) {.nimcall, benign.}
|
||||
# A ref type can have a finalizer that is called before the object's
|
||||
# storage is freed.
|
||||
|
||||
TGlobalMarkerProc = proc () {.nimcall, gcsafe.}
|
||||
TGlobalMarkerProc = proc () {.nimcall, benign.}
|
||||
|
||||
TGcStat = object
|
||||
collections: int # number of performed full collections
|
||||
|
|
@ -116,11 +116,11 @@ when BitsPerPage mod (sizeof(int)*8) != 0:
|
|||
{.error: "(BitsPerPage mod BitsPerUnit) should be zero!".}
|
||||
|
||||
# forward declarations:
|
||||
proc collectCT(gch: var TGcHeap) {.gcsafe.}
|
||||
proc isOnStack*(p: pointer): bool {.noinline, gcsafe.}
|
||||
proc forAllChildren(cell: PCell, op: TWalkOp) {.gcsafe.}
|
||||
proc doOperation(p: pointer, op: TWalkOp) {.gcsafe.}
|
||||
proc forAllChildrenAux(dest: pointer, mt: PNimType, op: TWalkOp) {.gcsafe.}
|
||||
proc collectCT(gch: var TGcHeap) {.benign.}
|
||||
proc isOnStack*(p: pointer): bool {.noinline, benign.}
|
||||
proc forAllChildren(cell: PCell, op: TWalkOp) {.benign.}
|
||||
proc doOperation(p: pointer, op: TWalkOp) {.benign.}
|
||||
proc forAllChildrenAux(dest: pointer, mt: PNimType, op: TWalkOp) {.benign.}
|
||||
# we need the prototype here for debugging purposes
|
||||
|
||||
proc prepareDealloc(cell: PCell) =
|
||||
|
|
@ -168,7 +168,7 @@ proc initGC() =
|
|||
Init(gch.allocated)
|
||||
init(gch.marked)
|
||||
|
||||
proc forAllSlotsAux(dest: pointer, n: ptr TNimNode, op: TWalkOp) {.gcsafe.} =
|
||||
proc forAllSlotsAux(dest: pointer, n: ptr TNimNode, op: TWalkOp) {.benign.} =
|
||||
var d = cast[ByteAddress](dest)
|
||||
case n.kind
|
||||
of nkSlot: forAllChildrenAux(cast[pointer](d +% n.offset), n.typ, op)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue