* fix #14294 * fix orc as well Co-authored-by: cooldome <ariabushenko@bk.ru>
This commit is contained in:
parent
03c146cd93
commit
fee71d466c
2 changed files with 31 additions and 2 deletions
|
|
@ -448,7 +448,8 @@ proc useSeqOrStrOp(c: var TLiftCtx; t: PType; body, x, y: PNode) =
|
|||
|
||||
case c.kind
|
||||
of attachedAsgn, attachedDeepCopy:
|
||||
doAssert t.assignment != nil
|
||||
if t.assignment == nil:
|
||||
return # protect from recursion
|
||||
body.add newHookCall(c.g, t.assignment, x, y)
|
||||
of attachedSink:
|
||||
# we always inline the move for better performance:
|
||||
|
|
@ -465,8 +466,12 @@ proc useSeqOrStrOp(c: var TLiftCtx; t: PType; body, x, y: PNode) =
|
|||
doAssert t.destructor != nil
|
||||
body.add destructorCall(c, t.destructor, x)
|
||||
of attachedTrace:
|
||||
if t.attachedOps[c.kind] == nil:
|
||||
return # protect from recursion
|
||||
body.add newHookCall(c.g, t.attachedOps[c.kind], x, y)
|
||||
of attachedDispose:
|
||||
if t.attachedOps[c.kind] == nil:
|
||||
return # protect from recursion
|
||||
body.add newHookCall(c.g, t.attachedOps[c.kind], x, nil)
|
||||
|
||||
proc fillStrOp(c: var TLiftCtx; t: PType; body, x, y: PNode) =
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue