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.
Imports
-
../ast/ast, ../ast/ast_types, ../ast/lineinfos, ../backend/backends, ../backend/cgir, ../front/msgs, ../front/options, ../sem/modulelowering, ../mir/datatables, ../mir/mirbodies, ../mir/mirenv, ../mir/mirgen, ../mir/mirtrees, ../mir/mirtypes, ../modules/modulegraphs, ../modules/magicsys, ../utils/containers, ../utils/idioms, identpatterns, packed_env, vmaux, vmdef, vmgen, vmlegacy, vmobjects, vmops, vmtypegen, ../ast/reports_backend, ../ast/report_enums
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