@@ -481,17 +481,17 @@ proc rawNewObj(typ: PNimType, size: int, gch: var GcHeap): pointer =
481481{.pop .} # .stackTrace off
482482{.pop .} # .profiler off
483483
484- proc newObjNoInit (typ: PNimType , size: int ): pointer {.compilerRtl .} =
484+ proc newObjNoInit (typ: PNimType , size: int ): pointer {.compilerRtl , raises : [] .} =
485485 result = rawNewObj (typ, size, gch)
486486 when defined (memProfiler): nimProfile (size)
487487
488- proc newObj (typ: PNimType , size: int ): pointer {.compilerRtl , noinline .} =
488+ proc newObj (typ: PNimType , size: int ): pointer {.compilerRtl , noinline , raises : [] .} =
489489 result = rawNewObj (typ, size, gch)
490490 zeroMem (result , size)
491491 when defined (memProfiler): nimProfile (size)
492492
493493{.push overflowChecks : on .}
494- proc newSeq (typ: PNimType , len: int ): pointer {.compilerRtl .} =
494+ proc newSeq (typ: PNimType , len: int ): pointer {.compilerRtl , raises : [] .} =
495495 # `newObj` already uses locks, so no need for them here.
496496 let size = align (GenericSeqSize , typ.base.align) + len * typ.base.size
497497 result = newObj (typ, size)
@@ -500,7 +500,7 @@ proc newSeq(typ: PNimType, len: int): pointer {.compilerRtl.} =
500500 when defined (memProfiler): nimProfile (size)
501501{.pop .}
502502
503- proc newObjRC1 (typ: PNimType , size: int ): pointer {.compilerRtl , noinline .} =
503+ proc newObjRC1 (typ: PNimType , size: int ): pointer {.compilerRtl , noinline , raises : [] .} =
504504 # generates a new object and sets its reference counter to 1
505505 incTypeSize typ, size
506506 sysAssert (allocInv (gch.region), " newObjRC1 begin" )
@@ -528,7 +528,7 @@ proc newObjRC1(typ: PNimType, size: int): pointer {.compilerRtl, noinline.} =
528528 when defined (memProfiler): nimProfile (size)
529529
530530{.push overflowChecks : on .}
531- proc newSeqRC1 (typ: PNimType , len: int ): pointer {.compilerRtl .} =
531+ proc newSeqRC1 (typ: PNimType , len: int ): pointer {.compilerRtl , raises : [] .} =
532532 let size = align (GenericSeqSize , typ.base.align) + len * typ.base.size
533533 result = newObjRC1 (typ, size)
534534 cast [PGenericSeq ](result ).len = len
@@ -670,7 +670,7 @@ proc doOperation(p: pointer, op: WalkOp) =
670670 add (gch.tempStack, c)
671671 # of waDebug: debugGraph(c)
672672
673- proc nimGCvisit (d: pointer , op: int ) {.compilerRtl .} =
673+ proc nimGCvisit (d: pointer , op: int ) {.compilerRtl , raises : [] .} =
674674 doOperation (d, WalkOp (op))
675675
676676proc collectZCT (gch: var GcHeap ): bool {.benign , raises : [].}
0 commit comments