removed flawed thread analysis pass

This commit is contained in:
Araq 2014-04-20 14:00:04 +02:00
commit be6474af63
17 changed files with 23 additions and 476 deletions

View file

@ -1311,6 +1311,10 @@ proc skipTypes*(t: PType, kinds: TTypeKinds): PType =
result = t
while result.kind in kinds: result = lastSon(result)
proc isGCedMem*(t: PType): bool {.inline.} =
result = t.kind in {tyString, tyRef, tySequence} or
t.kind == tyProc and t.callConv == ccClosure
proc propagateToOwner*(owner, elem: PType) =
const HaveTheirOwnEmpty = {tySequence, tySet}
owner.flags = owner.flags + (elem.flags * {tfHasShared, tfHasMeta})
@ -1331,9 +1335,7 @@ proc propagateToOwner*(owner, elem: PType) =
owner.flags.incl tfHasMeta
if owner.kind != tyProc:
if elem.kind in {tyString, tyRef, tySequence} or
elem.kind == tyProc and elem.callConv == ccClosure or
tfHasGCedMem in elem.flags:
if elem.isGCedMem or tfHasGCedMem in elem.flags:
owner.flags.incl tfHasGCedMem
proc rawAddSon*(father, son: PType) =