mirror of
https://github.com/status-im/nim-chronos.git
synced 2025-02-10 10:17:00 +00:00
comments for recent gcsafe pragmas
This commit is contained in:
parent
cc22234dc6
commit
56e007d165
@ -284,6 +284,7 @@ proc asyncSingleProc(prc: NimNode): NimNode {.compileTime.} =
|
|||||||
procBody, nnkIteratorDef)
|
procBody, nnkIteratorDef)
|
||||||
closureIterator.pragma = newNimNode(nnkPragma, lineInfoFrom=prc.body)
|
closureIterator.pragma = newNimNode(nnkPragma, lineInfoFrom=prc.body)
|
||||||
closureIterator.addPragma(newIdentNode("closure"))
|
closureIterator.addPragma(newIdentNode("closure"))
|
||||||
|
# https://github.com/nim-lang/RFCs/issues/435
|
||||||
closureIterator.addPragma(newIdentNode("gcsafe"))
|
closureIterator.addPragma(newIdentNode("gcsafe"))
|
||||||
|
|
||||||
# TODO when push raises is active in a module, the iterator here inherits
|
# TODO when push raises is active in a module, the iterator here inherits
|
||||||
@ -331,6 +332,7 @@ proc asyncSingleProc(prc: NimNode): NimNode {.compileTime.} =
|
|||||||
if prc.kind != nnkLambda: # TODO: Nim bug?
|
if prc.kind != nnkLambda: # TODO: Nim bug?
|
||||||
prc.addPragma(newColonExpr(ident "stackTrace", ident "off"))
|
prc.addPragma(newColonExpr(ident "stackTrace", ident "off"))
|
||||||
|
|
||||||
|
# https://github.com/nim-lang/RFCs/issues/435
|
||||||
prc.addPragma(newIdentNode("gcsafe"))
|
prc.addPragma(newIdentNode("gcsafe"))
|
||||||
result = prc
|
result = prc
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user