☰

# injectdestructors

Theme:

- Index

Search:
Group by:
Source Edit

Injects destructor calls into Nim code as well as an optimizer that optimizes copies to moves. This is implemented as an AST to AST transformation so that every backend benefits from it.See doc/destructors.rst for a spec of the implemented rewrite rules

# Imports

ast, astalgo, msgs, renderer, magicsys, types, idents, options, lowerings, modulegraphs, lineinfos, parampatterns, sighashes, liftdestructors, optimizer, varpartitions, aliasanalysis, dfa, wordrecg, trees

# Procs

    proc injectDestructorCalls(g: ModuleGraph; idgen: IdGenerator; owner: PSym;
                               n: PNode): PNode {....raises: [Exception, ValueError,
        OSError, KeyError, IOError, ERecoverableError], tags: [RootEffect,
        ReadDirEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect], forbids: [].}

  Source Edit

    proc sameLocation(a, b: PNode): bool {....raises: [], tags: [], forbids: [].}

  Source Edit