* fixes #12642

* update important packages; refs #18804

* fixes #18805; refs #18806

* fixes a regression

* Update testament/categories.nim

Co-authored-by: flywind <xzsflywind@gmail.com>

* progress

* progress

Co-authored-by: flywind <xzsflywind@gmail.com>
This commit is contained in:
Andreas Rumpf 2021-09-06 17:43:03 +02:00 • committed by GitHub
commit 34a53e8049
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 36 additions and 7 deletions

View file

@ -369,6 +369,7 @@ proc genParams(p: BProc, ri: PNode, typ: PType): Rope =
if ri[i].skipTrivialIndirections.kind == nkSym:
needTmp[i - 1] = potentialAlias(ri[i], potentialWrites)
else:
#if not ri[i].typ.isCompileTimeOnly:
var potentialReads: seq[PNode]
getPotentialReads(ri[i], potentialReads)
for n in potentialReads:

View file

@ -174,6 +174,12 @@ proc commonType*(c: PContext; x, y: PType): PType =
result = b #.skipIntLit
elif a.kind in IntegralTypes and a.n != nil:
result = a #.skipIntLit
elif a.kind == tyProc and b.kind == tyProc:
if a.callConv == ccClosure and b.callConv != ccClosure:
result = x
elif compatibleEffects(a, b) != efCompat or
(b.flags * {tfNoSideEffect, tfGcSafe}) < (a.flags * {tfNoSideEffect, tfGcSafe}):
result = y
else:
var k = tyNone
if a.kind in {tyRef, tyPtr}:

View file

@ -1023,8 +1023,9 @@ proc transform(c: PTransf, n: PNode): PNode =
result[0] = transform(c, n[0])
# Skip the second son since it only contains an unsemanticized copy of the
# variable type used by docgen
result[1] = n[1]
result[2] = transform(c, n[2])
let last = n.len-1
for i in 1..<last: result[i] = n[i]
result[last] = transform(c, n[last])
# XXX comment handling really sucks:
if importantComments(c.graph.config):
result.comment = n.comment