|
6 | 6 | # distribution, for details about the copyright. |
7 | 7 | # |
8 | 8 |
|
| 9 | +{.push raises: [], gcsafe.} |
| 10 | + |
9 | 11 | # "Stack GC" for embedded devices or ultra performance requirements. |
10 | 12 | import std/private/syslocks |
11 | 13 |
|
|
39 | 41 | # We also support 'finalizers'. |
40 | 42 |
|
41 | 43 | type |
42 | | - Finalizer {.compilerproc.} = proc (self: pointer) {.nimcall, benign.} |
| 44 | + Finalizer {.compilerproc.} = proc (self: pointer) {.nimcall, benign, raises: [], gcsafe.} |
43 | 45 | # A ref type can have a finalizer that is called before the object's |
44 | 46 | # storage is freed. |
45 | 47 |
|
@@ -339,7 +341,7 @@ proc newObjRC1(typ: PNimType, size: int): pointer {.compilerRtl, raises: [].} = |
339 | 341 | proc newSeqRC1(typ: PNimType, len: int): pointer {.compilerRtl, raises: [].} = |
340 | 342 | result = newSeq(typ, len) |
341 | 343 |
|
342 | | -proc growObj(regionUnused: var MemRegion; old: pointer, newsize: int): pointer = |
| 344 | +proc growObj(regionUnused: var MemRegion; old: pointer, newsize: int): pointer {.raises: [].} = |
343 | 345 | let sh = cast[ptr SeqHeader](old -! sizeof(SeqHeader)) |
344 | 346 | let typ = sh.typ |
345 | 347 | result = rawNewSeq(sh.region[], typ, |
@@ -434,3 +436,5 @@ proc nimGC_setStackBottom(theStackBottom: pointer) = discard |
434 | 436 |
|
435 | 437 | proc nimGCref(x: pointer) {.compilerproc.} = discard |
436 | 438 | proc nimGCunref(x: pointer) {.compilerproc.} = discard |
| 439 | + |
| 440 | +{.pop.} |
0 commit comments