AST to NIF bridge.
Types
DecodeContext = object
- Source Edit
ParsedSymName = object name*: string module*: string count*: int
- Source Edit
Procs
proc createDecodeContext(config: ConfigRef; cache: IdentCache): DecodeContext {. ...raises: [], tags: [], forbids: [].}
- Supposed to be a global variable Source Edit
proc loadNifModule(c: var DecodeContext; f: FileIndex; interf, interfHidden: var TStrTable; logOps: var seq[LogEntry]; loadFullAst: bool = false): PNode {. ...raises: [Exception, OSError, ValueError, KeyError, IOError], tags: [ RootEffect, ReadEnvEffect, ReadIOEffect, ReadDirEffect, WriteIOEffect], forbids: [].}
- Source Edit
proc loadSym(c: var DecodeContext; s: PSym) {. ...raises: [Exception, OSError, KeyError, ValueError, IOError], tags: [ RootEffect, WriteIOEffect, ReadEnvEffect, ReadIOEffect, ReadDirEffect], forbids: [].}
- Source Edit
proc loadType(c: var DecodeContext; t: PType) {. ...raises: [Exception, OSError, KeyError, ValueError, IOError], tags: [ RootEffect, WriteIOEffect, ReadEnvEffect, ReadIOEffect, ReadDirEffect], forbids: [].}
- Source Edit
proc parseSymName(s: string): ParsedSymName {....raises: [], tags: [], forbids: [].}
- Source Edit
proc resolveHookSym(c: var DecodeContext; symId: nifstreams.SymId): PSym {. ...raises: [OSError, ValueError, KeyError], tags: [ReadEnvEffect, ReadIOEffect, ReadDirEffect], forbids: [].}
- Resolves a hook SymId to PSym. Hook symbols are often private (generated =destroy, =wasMoved, etc.) Source Edit
proc toClassSymId(config: ConfigRef; typeId: ItemId): nifstreams.SymId {. ...raises: [Exception, OSError], tags: [RootEffect], forbids: [].}
- Converts a type ItemId to its SymId for the class index. Source Edit
proc toConverterIndexEntry(config: ConfigRef; converterSym: PSym): ( nifstreams.SymId, nifstreams.SymId) {....raises: [Exception, OSError], tags: [RootEffect], forbids: [].}
- Converts a converter symbol to an index entry (destType, converterSym). Returns the destination type's SymId and the converter's SymId. Source Edit
proc toMethodIndexEntry(config: ConfigRef; methodSym: PSym; signature: string): MethodIndexEntry {. ...raises: [Exception, OSError], tags: [RootEffect], forbids: [].}
- Converts a method symbol to a MethodIndexEntry. Source Edit
proc toNifFilename(conf: ConfigRef; f: FileIndex): string {. ...raises: [Exception, OSError], tags: [RootEffect, ReadEnvEffect, ReadIOEffect], forbids: [].}
- Source Edit
proc toNifIndexFilename(conf: ConfigRef; f: FileIndex): string {. ...raises: [Exception, OSError], tags: [RootEffect, ReadEnvEffect, ReadIOEffect], forbids: [].}
- Source Edit
proc tryResolveCompilerProc(c: var DecodeContext; name: string; moduleFileIdx: FileIndex): PSym {. ...raises: [Exception, OSError, ValueError, KeyError], tags: [RootEffect, ReadEnvEffect, ReadIOEffect, ReadDirEffect], forbids: [].}
- Tries to resolve a compiler proc from a module by checking the NIF index. Returns nil if the symbol doesn't exist. Source Edit
proc writeNifModule(config: ConfigRef; thisModule: int32; n: PNode; opsLog: seq[LogEntry]; replayActions: seq[PNode] = @[]) {. ...raises: [KeyError, Exception, OSError, IOError, ValueError], tags: [ RootEffect, ReadEnvEffect, ReadIOEffect, WriteDirEffect, ReadDirEffect, WriteIOEffect], forbids: [].}
- Source Edit