diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-11-12 15:05:36 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-12 15:05:36 +0100 |
commit | dfb020b174b6f3489294d9ec096de3cf9d6b5944 (patch) | |
tree | 30a5ef1faaa611c5de2d092d03c5cb12df0741b5 /compiler/pragmas.nim | |
parent | 7e689873e203620c3a14f1697129cd0e3fd548e4 (diff) | |
download | Nim-dfb020b174b6f3489294d9ec096de3cf9d6b5944.tar.gz |
.cursor implementation (#12637)
* cursors: first implementation * added currently failing test * .cursor works for doubly linked lists * make -d:useMalloc work again * added code to nil out refs in a destructor * it's now called --gc:arc * renderer.nim: render nkBreakState properly * make simple closure iterators work without leaking
Diffstat (limited to 'compiler/pragmas.nim')
-rw-r--r-- | compiler/pragmas.nim | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/compiler/pragmas.nim b/compiler/pragmas.nim index b1eecc50e..205ed4309 100644 --- a/compiler/pragmas.nim +++ b/compiler/pragmas.nim @@ -62,11 +62,11 @@ const wInheritable, wGensym, wInject, wRequiresInit, wUnchecked, wUnion, wPacked, wBorrow, wGcSafe, wPartial, wExplain, wPackage} fieldPragmas* = declPragmas + { - wGuard, wBitsize} - {wExportNims, wNodecl} # why exclude these? + wGuard, wBitsize, wCursor} - {wExportNims, wNodecl} # why exclude these? varPragmas* = declPragmas + {wVolatile, wRegister, wThreadVar, wMagic, wHeader, wCompilerProc, wCore, wDynlib, wNoInit, wCompileTime, wGlobal, - wGensym, wInject, wCodegenDecl, wGuard, wGoto} + wGensym, wInject, wCodegenDecl, wGuard, wGoto, wCursor} constPragmas* = declPragmas + {wHeader, wMagic, wGensym, wInject, wIntDefine, wStrDefine, wBoolDefine, wCompilerProc, wCore} @@ -833,6 +833,9 @@ proc singlePragma(c: PContext, sym: PSym, n: PNode, i: var int, of wVolatile: noVal(c, it) incl(sym.flags, sfVolatile) + of wCursor: + noVal(c, it) + incl(sym.flags, sfCursor) of wRegister: noVal(c, it) incl(sym.flags, sfRegister) |