Skip to content

Commit 29c8c71

Browse files
committed
regions too
1 parent 91a2cd9 commit 29c8c71

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/system/gc_regions.nim

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
# distribution, for details about the copyright.
77
#
88

9+
{.push raises: [], gcsafe.}
10+
911
# "Stack GC" for embedded devices or ultra performance requirements.
1012
import std/private/syslocks
1113

@@ -39,7 +41,7 @@ else:
3941
# We also support 'finalizers'.
4042

4143
type
42-
Finalizer {.compilerproc.} = proc (self: pointer) {.nimcall, benign.}
44+
Finalizer {.compilerproc.} = proc (self: pointer) {.nimcall, benign, raises: [], gcsafe.}
4345
# A ref type can have a finalizer that is called before the object's
4446
# storage is freed.
4547

@@ -339,7 +341,7 @@ proc newObjRC1(typ: PNimType, size: int): pointer {.compilerRtl, raises: [].} =
339341
proc newSeqRC1(typ: PNimType, len: int): pointer {.compilerRtl, raises: [].} =
340342
result = newSeq(typ, len)
341343

342-
proc growObj(regionUnused: var MemRegion; old: pointer, newsize: int): pointer =
344+
proc growObj(regionUnused: var MemRegion; old: pointer, newsize: int): pointer {.raises: [].} =
343345
let sh = cast[ptr SeqHeader](old -! sizeof(SeqHeader))
344346
let typ = sh.typ
345347
result = rawNewSeq(sh.region[], typ,
@@ -434,3 +436,5 @@ proc nimGC_setStackBottom(theStackBottom: pointer) = discard
434436

435437
proc nimGCref(x: pointer) {.compilerproc.} = discard
436438
proc nimGCunref(x: pointer) {.compilerproc.} = discard
439+
440+
{.pop.}

0 commit comments

Comments
 (0)