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

@ -26,7 +26,7 @@ proc opSlurp*(file: string, info: TLineInfo, module: PSym; conf: ConfigRef): str
proc atomicTypeX(cache: IdentCache; name: string; m: TMagic; t: PType; info: TLineInfo;
idgen: IdGenerator): PNode =
let sym = newSym(skType, getIdent(cache, name), nextId(idgen), t.owner, info)
let sym = newSym(skType, getIdent(cache, name), nextSymId(idgen), t.owner, info)
sym.magic = m
sym.typ = t
result = newSymNode(sym)
@ -47,7 +47,7 @@ proc mapTypeToBracketX(cache: IdentCache; name: string; m: TMagic; t: PType; inf
for i in 0..<t.len:
if t[i] == nil:
let void = atomicTypeX(cache, "void", mVoid, t, info, idgen)
void.typ = newType(tyVoid, nextId(idgen), t.owner)
void.typ = newType(tyVoid, nextTypeId(idgen), t.owner)
result.add void
else:
result.add mapTypeToAstX(cache, t[i], info, idgen, inst)