Types
LoadedModule = object status*: ModuleStatus fromDisk*: PackedModule module*: PSym
- Source Edit
ModuleBackendFlag = enum HasDatInitProc, HasModuleInitProc
- Source Edit
ModuleStatus = enum undefined, storing, loading, loaded, outdated, stored
- Source Edit
PackedConfig = object
- Source Edit
PackedDecoder = object config*: ConfigRef cache*: IdentCache
- Source Edit
PackedEncoder = object thisModule*: int32 lastFile*: FileIndex lastLit*: LitId filenames*: Table[FileIndex, LitId] pendingTypes*: seq[PType] pendingSyms*: seq[PSym] typeMarker*: IntSet symMarker*: IntSet config*: ConfigRef
- Source Edit
PackedModule = object includes*: seq[(LitId, string)] toReplay*: PackedTree topLevel*: PackedTree bodies*: PackedTree exports*: seq[(LitId, int32)] hidden*: seq[(LitId, int32)] reexports*: seq[(LitId, PackedItemId)] compilerProcs*: seq[(LitId, int32)] converters*, methods*, trmacros*, pureEnums*: seq[int32] typeInstCache*: seq[(PackedItemId, PackedItemId)] procInstCache*: seq[PackedInstantiation] attachedOps*: seq[(PackedItemId, TTypeAttachedOp, PackedItemId)] methodsPerType*: seq[(PackedItemId, int, PackedItemId)] enumToStringProcs*: seq[(PackedItemId, PackedItemId)] emittedTypeInfo*: seq[string] backendFlags*: set[ModuleBackendFlag] syms*: seq[PackedSym] types*: seq[PackedType] strings*: BiTable[string] numbers*: BiTable[BiggestInt]
- the parts of a PackedEncoder that are part of the .rod file Source Edit
PackedModuleGraph = seq[LoadedModule]
- Source Edit
Procs
proc addCompilerProc(c: var PackedEncoder; m: var PackedModule; s: PSym) {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc addConverter(c: var PackedEncoder; m: var PackedModule; s: PSym) {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc addExported(c: var PackedEncoder; m: var PackedModule; s: PSym) {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc addHidden(c: var PackedEncoder; m: var PackedModule; s: PSym) {....raises: [], tags: [], forbids: [].}
- Source Edit
proc addImportFileDep(c: var PackedEncoder; m: var PackedModule; f: FileIndex) {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc addIncludeFileDep(c: var PackedEncoder; m: var PackedModule; f: FileIndex) {. ...raises: [IOError], tags: [ReadIOEffect], forbids: [].}
- Source Edit
proc addMethod(c: var PackedEncoder; m: var PackedModule; s: PSym) {....raises: [], tags: [], forbids: [].}
- Source Edit
proc addPragmaComputation(c: var PackedEncoder; m: var PackedModule; n: PNode) {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc addPureEnum(c: var PackedEncoder; m: var PackedModule; s: PSym) {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc addReexport(c: var PackedEncoder; m: var PackedModule; s: PSym) {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc addTrmacro(c: var PackedEncoder; m: var PackedModule; s: PSym) {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc debug(tree: PackedTree; m: PackedModule) {....raises: [IOError], tags: [WriteIOEffect], forbids: [].}
- Source Edit
proc idgenFromLoadedModule(m: LoadedModule): IdGenerator {....raises: [], tags: [], forbids: [].}
- Source Edit
proc initEncoder(c: var PackedEncoder; m: var PackedModule; moduleSym: PSym; config: ConfigRef; pc: PackedConfig) {....raises: [IOError], tags: [ReadIOEffect], forbids: [].}
- setup a context for serializing to packed ast Source Edit
proc initPackedDecoder(config: ConfigRef; cache: IdentCache): PackedDecoder {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc initRodIter(it: var RodIter; config: ConfigRef; cache: IdentCache; g: var PackedModuleGraph; module: FileIndex; name: PIdent; importHidden: bool): PSym {....raises: [KeyError, Exception], tags: [ReadDirEffect, RootEffect], forbids: [].}
- Source Edit
proc initRodIterAllSyms(it: var RodIter; config: ConfigRef; cache: IdentCache; g: var PackedModuleGraph; module: FileIndex; importHidden: bool): PSym {. ...raises: [KeyError, Exception], tags: [ReadDirEffect, RootEffect], forbids: [].}
- Source Edit
proc interfaceSymbol(config: ConfigRef; cache: IdentCache; g: var PackedModuleGraph; module: FileIndex; name: PIdent; importHidden: bool): PSym {....raises: [KeyError, Exception], tags: [ReadDirEffect, RootEffect], forbids: [].}
- Source Edit
proc isActive(e: PackedEncoder): bool {....raises: [], tags: [], forbids: [].}
- Source Edit
proc loadNodes(c: var PackedDecoder; g: var PackedModuleGraph; thisModule: int; tree: PackedTree; n: NodePos): PNode {. ...raises: [KeyError, Exception], tags: [ReadDirEffect, RootEffect], forbids: [].}
- Source Edit
proc loadProcBody(config: ConfigRef; cache: IdentCache; g: var PackedModuleGraph; s: PSym): PNode {. ...raises: [KeyError, Exception], tags: [ReadDirEffect, RootEffect], forbids: [].}
- Source Edit
proc loadRodFile(filename: AbsoluteFile; m: var PackedModule; config: ConfigRef; ignoreConfig = false): RodFileError {. ...raises: [IOError, KeyError, Exception], tags: [ReadIOEffect, ReadDirEffect, RootEffect], forbids: [].}
- Source Edit
proc loadSymFromId(config: ConfigRef; cache: IdentCache; g: var PackedModuleGraph; module: int; id: PackedItemId): PSym {. ...raises: [KeyError, Exception], tags: [ReadDirEffect, RootEffect], forbids: [].}
- Source Edit
proc loadTypeFromId(config: ConfigRef; cache: IdentCache; g: var PackedModuleGraph; module: int; id: PackedItemId): PType {. ...raises: [KeyError, Exception], tags: [ReadDirEffect, RootEffect], forbids: [].}
- Source Edit
proc moduleFromRodFile(g: var PackedModuleGraph; conf: ConfigRef; cache: IdentCache; fileIdx: FileIndex; cachedModules: var seq[FileIndex]): PSym {....raises: [ OSError, IOError, Exception, KeyError, ValueError, ERecoverableError], tags: [ ReadEnvEffect, ReadIOEffect, WriteDirEffect, ReadDirEffect, RootEffect, WriteIOEffect], forbids: [].}
- Returns 'nil' if the module needs to be recompiled. Source Edit
proc moduleIndex(c: var PackedDecoder; g: var PackedModuleGraph; thisModule: int; s: PackedItemId): int32 {.inline, ...raises: [KeyError, Exception], tags: [ReadDirEffect, RootEffect], forbids: [].}
- Source Edit
proc nextRodIter(it: var RodIter; g: var PackedModuleGraph): PSym {. ...raises: [KeyError, Exception], tags: [ReadDirEffect, RootEffect], forbids: [].}
- Source Edit
proc rememberStartupConfig(dest: var PackedConfig; config: ConfigRef) {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc rodViewer(rodfile: AbsoluteFile; config: ConfigRef; cache: IdentCache) {. ...raises: [IOError, KeyError, Exception], tags: [ReadIOEffect, ReadDirEffect, RootEffect], forbids: [].}
- Source Edit
proc saveRodFile(filename: AbsoluteFile; encoder: var PackedEncoder; m: var PackedModule) {....raises: [Exception, IOError, OSError], tags: [ RootEffect, WriteIOEffect, WriteDirEffect], forbids: [].}
- Source Edit
proc searchForCompilerproc(m: LoadedModule; name: string): int32 {....raises: [], tags: [], forbids: [].}
- Source Edit
proc simulateLoadedModule(g: var PackedModuleGraph; conf: ConfigRef; cache: IdentCache; moduleSym: PSym; m: PackedModule) {. ...raises: [KeyError, OSError, Exception], tags: [ReadDirEffect, RootEffect], forbids: [].}
- Source Edit
proc storeAttachedProcDef(t: PType; op: TTypeAttachedOp; s: PSym; encoder: var PackedEncoder; m: var PackedModule) {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc storeExpansion(c: var PackedEncoder; m: var PackedModule; info: TLineInfo; s: PSym) {....raises: [], tags: [], forbids: [].}
- Source Edit
proc storeInstantiation(c: var PackedEncoder; m: var PackedModule; s: PSym; i: PInstantiation) {....raises: [], tags: [], forbids: [].}
- Source Edit
proc storeSym(s: PSym; c: var PackedEncoder; m: var PackedModule): PackedItemId {. ...raises: [Exception], tags: [RootEffect], forbids: [].}
- Source Edit
proc storeTypeInst(c: var PackedEncoder; m: var PackedModule; s: PSym; inst: PType) {....raises: [], tags: [], forbids: [].}
- Source Edit
proc toFileIndex(x: LitId; m: PackedModule; config: ConfigRef): FileIndex {. ...raises: [KeyError, Exception], tags: [ReadDirEffect, RootEffect], forbids: [].}
- Source Edit
proc toFileIndexCached(c: var PackedDecoder; g: PackedModuleGraph; thisModule: int; f: LitId): FileIndex {. ...raises: [KeyError, Exception], tags: [ReadDirEffect, RootEffect], forbids: [].}
- Source Edit
proc toPackedGeneratedProcDef(s: PSym; encoder: var PackedEncoder; m: var PackedModule) {....raises: [], tags: [], forbids: [].}
- Generic procs and generated =hook's need explicit top-level entries so that the code generator can work without having to special case these. These entries will also be useful for other tools and are the cleanest design I can come up with. Source Edit
proc toPackedNode(n: PNode; ir: var PackedTree; c: var PackedEncoder; m: var PackedModule) {....raises: [], tags: [], forbids: [].}
- Source Edit
proc toPackedNodeTopLevel(n: PNode; encoder: var PackedEncoder; m: var PackedModule) {....raises: [Exception], tags: [RootEffect], forbids: [].}
- Source Edit
proc toRodFile(conf: ConfigRef; f: AbsoluteFile; ext = RodExt): AbsoluteFile {. ...raises: [OSError, IOError, Exception], tags: [ReadEnvEffect, ReadIOEffect, WriteDirEffect, ReadDirEffect, RootEffect], forbids: [].}
- Source Edit
proc toString(tree: PackedTree; n: NodePos; m: PackedModule): string {. ...raises: [], tags: [], forbids: [].}
- Source Edit
proc toString(tree: PackedTree; n: NodePos; m: PackedModule; nesting: int; result: var string) {....raises: [], tags: [], forbids: [].}
- Source Edit
proc translateId(id: PackedItemId; g: PackedModuleGraph; thisModule: int; config: ConfigRef): ItemId {....raises: [KeyError, Exception], tags: [ReadDirEffect, RootEffect], forbids: [].}
- Source Edit
Iterators
iterator interfaceSymbols(config: ConfigRef; cache: IdentCache; g: var PackedModuleGraph; module: FileIndex; name: PIdent; importHidden: bool): PSym {. ...raises: [KeyError, Exception], tags: [ReadDirEffect, RootEffect], forbids: [].}
- Source Edit