From ec6574a511c2ba1ed842d91f3aa5a97c6b8a656d Mon Sep 17 00:00:00 2001 From: araq Date: Sun, 8 Feb 2026 00:50:10 +0100 Subject: [PATCH] progress --- compiler/liftdestructors.nim | 4 ++-- compiler/sempass2.nim | 2 +- compiler/semstmts.nim | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/compiler/liftdestructors.nim b/compiler/liftdestructors.nim index 3d4467991a..7133587249 100644 --- a/compiler/liftdestructors.nim +++ b/compiler/liftdestructors.nim @@ -992,7 +992,7 @@ proc fillBody(c: var TLiftCtx; t: PType; body, x, y: PNode) = tyPtr, tyUncheckedArray, tyVar, tyLent: defaultOp(c, t, body, x, y) of tyRef: - if c.g.config.selectedGC in {gcArc, gcOrc, gcAtomicArc}: + if c.g.config.selectedGC in {gcArc, gcOrc, gcYrc, gcAtomicArc}: atomicRefOp(c, t, body, x, y) elif (optOwnedRefs in c.g.config.globalOptions and optRefCheck in c.g.config.options): @@ -1001,7 +1001,7 @@ proc fillBody(c: var TLiftCtx; t: PType; body, x, y: PNode) = defaultOp(c, t, body, x, y) of tyProc: if t.callConv == ccClosure: - if c.g.config.selectedGC in {gcArc, gcOrc, gcAtomicArc}: + if c.g.config.selectedGC in {gcArc, gcOrc, gcYrc, gcAtomicArc}: atomicClosureOp(c, t, body, x, y) else: closureOp(c, t, body, x, y) diff --git a/compiler/sempass2.nim b/compiler/sempass2.nim index 02ec23fc3e..c206b7f075 100644 --- a/compiler/sempass2.nim +++ b/compiler/sempass2.nim @@ -1756,7 +1756,7 @@ proc trackProc*(c: PContext; s: PSym, body: PNode) = let param = params[i].sym let typ = param.typ if isSinkTypeForParam(typ) or - (t.config.selectedGC in {gcArc, gcOrc, gcAtomicArc} and + (t.config.selectedGC in {gcArc, gcOrc, gcYrc, gcAtomicArc} and (isClosure(typ.skipTypes(abstractInst)) or param.id in t.escapingParams)): createTypeBoundOps(t, typ, param.info) if isOutParam(typ) and param.id notin t.init and s.magic == mNone: diff --git a/compiler/semstmts.nim b/compiler/semstmts.nim index 4ca9302d8d..7e07143837 100644 --- a/compiler/semstmts.nim +++ b/compiler/semstmts.nim @@ -2175,7 +2175,7 @@ proc bindTypeHook(c: PContext; s: PSym; n: PNode; op: TTypeAttachedOp) = template notRefc: bool = # fixes refc with non-var destructor; cancel warnings (#23156) c.config.backend == backendJs or - c.config.selectedGC in {gcArc, gcAtomicArc, gcOrc} + c.config.selectedGC in {gcArc, gcAtomicArc, gcOrc, gcYrc} let cond = case op of attachedWasMoved: t.len == 2 and t.returnType == nil and t.firstParamType.kind == tyVar