# compiler/passes

Dark Mode

- Index

Search:
Group by:
Source Edit

This module implements the passes functionality. A pass must implement the `TPass` interface.

# Imports

options, ast, llstream, msgs, idents, syntaxes, modulegraphs, reorder, lineinfos, pathutils, packages

# Types

    TPassData = tuple[input: PNode, closeOutput: PNode]

  Source Edit

# Procs

    proc clearPasses(g: ModuleGraph) {....raises: [], tags: [].}

  Source Edit

    proc makePass(open: TPassOpen = nil; process: TPassProcess = nil;
                  close: TPassClose = nil; isFrontend = false): TPass {....raises: [],
        tags: [].}

  Source Edit

    proc moduleHasChanged(graph: ModuleGraph; module: PSym): bool {.inline,
        ...raises: [], tags: [].}

  Source Edit

    proc processModule(graph: ModuleGraph; module: PSym; idgen: IdGenerator;
                       stream: PLLStream): bool {.discardable, ...raises: [Exception,
        ValueError, KeyError, IOError, ERecoverableError, OSError], tags: [
        RootEffect, ReadDirEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect,
        WriteDirEffect].}

  Source Edit

    proc registerPass(g: ModuleGraph; p: TPass) {.
        ...raises: [Exception, ValueError, KeyError, IOError, ERecoverableError], tags: [
        RootEffect, ReadDirEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}

  Source Edit

    proc skipCodegen(config: ConfigRef; n: PNode): bool {.inline, ...raises: [],
        tags: [].}

  Source Edit