fixes a critical =trace generation bug (see test case) (#14140)
This commit is contained in:
parent
2f1aad0264
commit
065a6af2de
3 changed files with 22 additions and 2 deletions
|
|
@ -253,9 +253,13 @@ proc newOpCall(op: PSym; x: PNode): PNode =
|
|||
proc newDeepCopyCall(op: PSym; x, y: PNode): PNode =
|
||||
result = newAsgnStmt(x, newOpCall(op, y))
|
||||
|
||||
proc usesBuiltinArc(t: PType): bool =
|
||||
proc wrap(t: PType): bool {.nimcall.} = ast.isGCedMem(t)
|
||||
result = types.searchTypeFor(t, wrap)
|
||||
|
||||
proc useNoGc(c: TLiftCtx; t: PType): bool {.inline.} =
|
||||
result = optSeqDestructors in c.g.config.globalOptions and
|
||||
({tfHasGCedMem, tfHasOwned} * t.flags != {} or t.isGCedMem)
|
||||
({tfHasGCedMem, tfHasOwned} * t.flags != {} or usesBuiltinArc(t))
|
||||
|
||||
proc requiresDestructor(c: TLiftCtx; t: PType): bool {.inline.} =
|
||||
result = optSeqDestructors in c.g.config.globalOptions and
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue