IC: backend: remember produced type information (#17440)

This commit is contained in:
Andreas Rumpf 2021-03-23 08:52:00 +01:00 • committed by GitHub
commit d6a16020fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 93 additions and 42 deletions

View file

@ -1229,17 +1229,10 @@ proc newSym*(symKind: TSymKind, name: PIdent, id: ItemId, owner: PSym,
result = PSym(name: name, kind: symKind, flags: {}, info: info, itemId: id,
options: options, owner: owner, offset: defaultOffset)
when false:
if id.item > 2141:
let s = getStackTrace()
const words = ["createTypeBoundOps",
"initOperators",
"generateInstance",
"semIdentDef", "addLocalDecl"]
for w in words:
if w in s:
x.inc w
return
x.inc "<no category>"
if id.module == 48 and id.item == 39:
writeStackTrace()
echo "kind ", symKind, " ", name.s
if owner != nil: echo owner.name.s
proc astdef*(s: PSym): PNode =
# get only the definition (initializer) portion of the ast