ARC: ported the GC tests over to --gc:arc
This commit is contained in:
parent
879801c639
commit
72237e2bcf
14 changed files with 79 additions and 29 deletions
|
|
@ -60,6 +60,7 @@ proc lowerTupleUnpacking*(g: ModuleGraph; n: PNode; owner: PSym): PNode =
|
|||
var temp = newSym(skTemp, getIdent(g.cache, genPrefix), owner, value.info, g.config.options)
|
||||
temp.typ = skipTypes(value.typ, abstractInst)
|
||||
incl(temp.flags, sfFromGeneric)
|
||||
incl(temp.flags, sfCursor)
|
||||
|
||||
var v = newNodeI(nkVarSection, value.info)
|
||||
let tempAsNode = newSymNode(temp)
|
||||
|
|
|
|||
|
|
@ -759,6 +759,7 @@ proc track(tracked: PEffects, n: PNode) =
|
|||
# check required for 'nim check':
|
||||
if n[1].typ.len > 0:
|
||||
createTypeBoundOps(tracked, n[1].typ.lastSon, n.info)
|
||||
createTypeBoundOps(tracked, n[1].typ, n.info)
|
||||
for i in 0 ..< safeLen(n):
|
||||
track(tracked, n.sons[i])
|
||||
of nkDotExpr:
|
||||
|
|
|
|||
|
|
@ -886,6 +886,10 @@ proc semAnyRef(c: PContext; n: PNode; kind: TTypeKind; prev: PType): PType =
|
|||
t.flags.incl tfHasOwned
|
||||
t.rawAddSonNoPropagationOfTypeFlags result
|
||||
result = t
|
||||
#if result.kind == tyRef and c.config.selectedGC == gcDestructors:
|
||||
# result.flags.incl tfHasAsgn
|
||||
# XXX Something like this is a good idea but it should be done
|
||||
# in sempass2!
|
||||
|
||||
proc findEnforcedStaticType(t: PType): PType =
|
||||
# This handles types such as `static[T] and Foo`,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue