compiler/ic/replayer

  Source   Edit

Module that contains code to replay global VM state changes and pragma state like {.compile: "foo.c".}. For IC (= Incremental compilation) support.

Procs

proc replayBackendRoutines(g: ModuleGraph; module: int) {.
    ...raises: [KeyError, Exception], tags: [ReadDirEffect, RootEffect].}
Applies changes to whole-program (ModuleGraph) state the module module has. Only changes relevant to the backend part of the compiler are included here.   Source   Edit
proc replayGenericCacheInformation(g: ModuleGraph; module: int) {.
    ...raises: [KeyError, Exception, ERecoverableError],
    tags: [ReadDirEffect, RootEffect].}
We remember the generic instantiations a module performed in order to to avoid the code bloat that generic code tends to imply. This is cheaper than deduplication of identical generic instantiations. However, deduplication is more powerful and general and I hope to implement it soon too (famous last words).   Source   Edit
proc replayLibs(g: ModuleGraph; module: int) {....raises: [Exception, KeyError],
    tags: [RootEffect, ReadDirEffect].}
Loads the packed library information for module into g.   Source   Edit
proc replayStateChanges(module: PSym; g: ModuleGraph) {....raises: [Exception,
    ERecoverableError, OSError, KeyError, IOError, ValueError, EOFError], tags: [
    RootEffect, ReadEnvEffect, ReadIOEffect, ReadDirEffect, WriteDirEffect,
    WriteIOEffect].}
  Source   Edit