liftdestructors
This module implements lifting for type-bound operations (=sink
, =
, =destroy
, =deepCopy
).
Imports
- modulegraphs, lineinfos, idents, ast, renderer, semdata, sighashes, lowerings, options, types, msgs, magicsys, trees
Procs
proc produceDestructorForDiscriminator(g: ModuleGraph; typ: PType; field: PSym; info: TLineInfo): PSym {...}{. raises: [Exception, ValueError, IOError, ERecoverableError], tags: [RootEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
- Source Edit
proc createTypeBoundOps(g: ModuleGraph; c: PContext; orig: PType; info: TLineInfo) {...}{. raises: [Exception, ValueError, IOError, ERecoverableError], tags: [RootEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}
- In the semantic pass this is called in strategic places to ensure we lift assignment, destructors and moves properly. The later 'injectdestructors' pass depends on it. Source Edit
Templates
© 2006–2021 Andreas Rumpf
Licensed under the MIT License.
https://nim-lang.org/docs/compiler/liftdestructors.html