big steps torwards an efficient, simple IC implementation (#16543)

* reworked ID handling
* the packed AST now has its own ID mechanism
* basic serialization code works
* extract rodfiles to its own module
* rodfiles: store and compare configs
* rodfiles: store dependencies
* store config at the end
* precise dependency tracking
* dependency tracking for rodfiles
* completed loading of PSym, PType, etc
* removed dead code
* bugfix: do not realloc seqs when taking addr into an element
* make IC opt-in for now
* makes tcompilerapi green again
* final cleanups

Co-authored-by: Andy Davidoff <github@andy.disruptek.com>
This commit is contained in:
Andreas Rumpf 2021-01-02 07:30:39 +01:00 • committed by GitHub
commit 73a8b950cb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
57 changed files with 1429 additions and 1717 deletions

View file

@ -11,7 +11,7 @@
import
ast, astalgo, magicsys, msgs, options,
idents, lexer, passes, syntaxes, llstream, modulegraphs, rod,
idents, lexer, passes, syntaxes, llstream, modulegraphs,
lineinfos, pathutils, tables
proc resetSystemArtifacts*(g: ModuleGraph) =
@ -93,8 +93,10 @@ proc compileModule*(graph: ModuleGraph; fileIdx: FileIndex; flags: TSymFlags): P
discard processModule(graph, result, idGeneratorFromModule(result), s)
if result == nil:
let filename = AbsoluteFile toFullPath(graph.config, fileIdx)
result = loadModuleSym(graph, fileIdx, filename)
if result == nil:
when false:
# XXX entry point for module loading from the rod file
result = loadModuleSym(graph, fileIdx, filename)
when true:
result = newModule(graph, fileIdx)
result.flags.incl flags
registerModule(graph, result)