mirror of
https://github.com/nim-lang/Nim.git
synced 2025-12-31 18:32:11 +00:00
30 lines
983 B
Nim
30 lines
983 B
Nim
#
|
|
#
|
|
# The Nim Compiler
|
|
# (c) Copyright 2017 Andreas Rumpf
|
|
#
|
|
# See the file "copying.txt", included in this
|
|
# distribution, for details about the copyright.
|
|
#
|
|
|
|
## This module implements the canonalization for the various caching mechanisms.
|
|
|
|
import ast, idgen, lineinfos, msgs, incremental, modulegraphs, pathutils
|
|
|
|
when not nimIncremental:
|
|
template setupModuleCache*(g: ModuleGraph) = discard
|
|
template storeNode*(g: ModuleGraph; module: PSym; n: PNode) = discard
|
|
template loadNode*(g: ModuleGraph; module: PSym): PNode = newNode(nkStmtList)
|
|
|
|
template getModuleId*(g: ModuleGraph; fileIdx: FileIndex; fullpath: AbsoluteFile): int = getID()
|
|
|
|
template addModuleDep*(g: ModuleGraph; module, fileIdx: FileIndex; isIncludeFile: bool) = 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!
|