IC: final implementation steps (#16801)

* removed dead code
* we need even more laziness for the generic caches
* make it bootstrap on older Nims
* wrote more deserialization code
* IC: replay required methods information
This commit is contained in:
Andreas Rumpf 2021-01-25 20:52:26 +01:00 • committed by GitHub
commit 25745ad195
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 259 additions and 105 deletions

View file

@ -1814,7 +1814,7 @@ proc hasObjParam(s: PSym): bool =
proc finishMethod(c: PContext, s: PSym) =
if hasObjParam(s):
methodDef(c.graph, c.idgen, s, false)
methodDef(c.graph, c.idgen, s)
proc semMethodPrototype(c: PContext; s: PSym; n: PNode) =
if isGenericRoutine(s):
@ -1839,7 +1839,7 @@ proc semMethodPrototype(c: PContext; s: PSym; n: PNode) =
# no sense either.
# and result[bodyPos].kind != nkEmpty:
if hasObjParam(s):
methodDef(c.graph, c.idgen, s, fromCache=false)
methodDef(c.graph, c.idgen, s)
else:
localError(c.config, n.info, "'method' needs a parameter that has an object type")