Module that contains code to replay global VM state changes and pragma state like {.compile: "foo.c".}. For IC (= Incremental compilation) support.
Procs
proc replayBackendActions(g: ModuleGraph; module: PSym; list: PNode) {....raises: [ OSError, ValueError, IOError, Exception, KeyError, ERecoverableError, EOFError], tags: [ReadEnvEffect, ReadIOEffect, RootEffect, ReadDirEffect, WriteIOEffect, WriteDirEffect], forbids: [].}
- Applies the backend-relevant replay actions (C compile/link directives) found in a NIF-loaded module's top-level statement list. The nifc backend loads modules without going through sem's replayStateChanges, so e.g. math's {.passL: "-lm".} was lost and the final link failed with undefined references. VM cache actions are deliberately NOT replayed here — codegen does not run macros. Source Edit
proc replayStateChanges(module: PSym; g: ModuleGraph; list: PNode) {....raises: [ Exception, ValueError, OSError, KeyError, IOError, ERecoverableError, EOFError], tags: [RootEffect, ReadDirEffect, WriteIOEffect, ReadIOEffect, ReadEnvEffect, WriteDirEffect], forbids: [].}
- list is an nkStmtList of nkReplayAction nodes (macro-cache puts/incs/ adds/incls and a few pragmas) recorded for module. Under the NIF backend a loaded module's ast is never reconstructed, so the caller passes the replay actions it parsed out of the module's NIF directly. Source Edit