cgen

    Dark Mode
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!)

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