# cgen

Dark Mode

- Index

Search:
Group by:

This module implements the C code generator.This include file contains the logic to produce constant string and seq literals. The code here is responsible that `const x = ["a", "b"]` works without hidden runtime creation code. The price is that seqs and strings are not purely a library implementation.Generates traversal procs for the C backend.Code specialization instead of the old, incredibly slow 'genericReset' implementation.Thread var support for crappy architectures that lack native support for thread local storage. (Thank you Mac OS X!)

# Imports

ast, astalgo, trees, platform, magicsys, extccomp, options, nversion, nimsets, msgs, bitsets, idents, types, ccgutils, ropes, passes, wordrecg, treetab, cgmeth, rodutils, renderer, cgendata, ccgmerge, aliases, lowerings, ndi, lineinfos, pathutils, transf, enumtostr, injectdestructors, spawn, semparallel, modulegraphs, lineinfos, sighashes, modulegraphs, lowerings, dfa, parampatterns

# Consts

    cgenPass = (myOpen, myProcess, myClose, false)

  Source Edit

# Procs

    proc fillObjectFields(m: BModule; typ: PType) {...}{.
        raises: [Exception, ValueError, IOError, ERecoverableError, KeyError],
        tags: [RootEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect].}

  Source Edit

    proc cgenWriteModules(backend: RootRef; config: ConfigRef) {...}{.raises: [Exception,
        ValueError, IOError, ERecoverableError, KeyError, OSError], tags: [
        RootEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect, TimeEffect,
        WriteDirEffect, ReadDirEffect].}

  Source Edit

# Templates

    template cgDeclFrmt(s: PSym): string

  Source Edit