# liftdestructors

Dark Mode

- Index

Search:
Group by:

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

    template liftTypeBoundOps(c: PContext; typ: PType; info: TLineInfo)

  Source Edit