rod.nim 1.0 KB

1234567891011121314151617181920212223242526272829303132
  1. #
  2. #
  3. # The Nim Compiler
  4. # (c) Copyright 2017 Andreas Rumpf
  5. #
  6. # See the file "copying.txt", included in this
  7. # distribution, for details about the copyright.
  8. #
  9. ## This module implements the canonalization for the various caching mechanisms.
  10. import ast, lineinfos, incremental, modulegraphs, pathutils
  11. when not nimIncremental:
  12. template setupModuleCache*(g: ModuleGraph) = discard
  13. template storeNode*(g: ModuleGraph; module: PSym; n: PNode) = discard
  14. template loadNode*(g: ModuleGraph; module: PSym): PNode = newNode(nkStmtList)
  15. proc loadModuleSym*(g: ModuleGraph; fileIdx: FileIndex; fullpath: AbsoluteFile): (PSym) {.inline.} = nil
  16. template addModuleDep*(g: ModuleGraph; module, fileIdx: FileIndex; isIncludeFile: bool) = discard
  17. template storeRemaining*(g: ModuleGraph; module: PSym) = discard
  18. template registerModule*(g: ModuleGraph; module: PSym) = discard
  19. else:
  20. include rodimpl
  21. # idea for testing all this logic: *Always* load the AST from the DB, whether
  22. # we already have it in RAM or not!