compiler/vm/vmbackend

  Source   Edit

The code generation orchestrator for the VM backend. It takes the semantically analysed AST of the whole program as input and produces a.nimbc executable file for it.

Generating the actual code for procedures and statements is delegated to vmgen, with the orchestrator assembling the bytecode fragments and additional data into the final executable.

Procs

proc generateCode(g: ModuleGraph; mlist: sink ModuleList) {....raises: [KeyError,
    Exception, ERecoverableError, ValueError, IOError,
    ResultErrorRef[system.void], OSError],
    tags: [ReadDirEffect, RootEffect, WriteIOEffect, WriteDirEffect].}
The backend's entry point. Orchestrates code generation and linking. If all went well, the resulting binary is written to the project's output file   Source   Edit