refactoring: move DB model to incremental.nim
This commit is contained in:
parent
688c54d8f1
commit
ddc6cec69e
10 changed files with 410 additions and 163 deletions
|
|
@ -9,18 +9,21 @@
|
|||
|
||||
## This module implements the canonalization for the various caching mechanisms.
|
||||
|
||||
import ast, idgen, lineinfos, msgs
|
||||
import ast, idgen, lineinfos, msgs, incremental, modulegraphs
|
||||
|
||||
when not defined(nimSymbolfiles):
|
||||
template setupModuleCache* = discard
|
||||
template storeNode*(module: PSym; n: PNode) = discard
|
||||
template loadNode*(module: PSym; index: var int): PNode = PNode(nil)
|
||||
when not nimIncremental:
|
||||
template setupModuleCache*(g: ModuleGraph) = discard
|
||||
template storeNode*(g: ModuleGraph; module: PSym; n: PNode) = discard
|
||||
template loadNode*(g: ModuleGraph; module: PSym; index: var int): PNode = PNode(nil)
|
||||
|
||||
template getModuleId*(fileIdx: FileIndex; fullpath: string): int = getID()
|
||||
template getModuleId*(g: ModuleGraph; fileIdx: FileIndex; fullpath: string): int = getID()
|
||||
|
||||
template addModuleDep*(module, fileIdx: FileIndex; isIncludeFile: bool) = discard
|
||||
template addModuleDep*(g: ModuleGraph; module, fileIdx: FileIndex; isIncludeFile: bool) = discard
|
||||
|
||||
template storeRemaining*(module: PSym) = discard
|
||||
template storeRemaining*(g: ModuleGraph; module: PSym) = discard
|
||||
|
||||
else:
|
||||
include rodimpl
|
||||
|
||||
# idea for testing all this logic: *Always* load the AST from the DB, whether
|
||||
# we already have it in RAM or not!
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue