compiler/backend/cgirgen

  Source   Edit

Implements the translation from the MIR to the CgNode IR. All code reaching the code generation phase passes through here.

Note: The tb prefix that's still used in some places is an abbreviation of "translate back"
Note: The CgNode IR is slated for removal, with the MIR intended to take its place as the code-generator input.

Procs

proc generateIR(graph: ModuleGraph; idgen: IdGenerator; env: var MirEnv;
                owner: PSym; body: sink MirBody): Body {.
    ...raises: [Exception, ERecoverableError, KeyError],
    tags: [RootEffect, ReadDirEffect].}
Generates the CgNode IR corresponding to the input MIR body, using idgen to provide new IDs when creating symbols.   Source   Edit