# transf

Theme:

- Index

Search:
Group by:
Source Edit

# Imports

options, ast, astalgo, trees, msgs, idents, renderer, types, semfold, magicsys, cgmeth, lowerings, liftlocals, modulegraphs, lineinfos, closureiters, lambdalifting

# Types

    TransformFlag = enum
      useCache, keepOpenArrayConversions, force

  Source Edit

    TransformFlags = set[TransformFlag]

  Source Edit

# Procs

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

  Merges adjacent constant expressions of the children of the `&` call into a single constant expression. It also inlines constant expressions which are not complex. Source Edit

    proc transformBody(g: ModuleGraph; idgen: IdGenerator; prc: PSym;
                       flags: TransformFlags): PNode {....raises: [KeyError,
        ValueError, OSError, Exception, IOError, ERecoverableError], tags: [
        ReadDirEffect, RootEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect,
        TimeEffect], forbids: [].}

  Source Edit

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

  Source Edit

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

  Source Edit