summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--compiler/lambdalifting.nim12
1 files changed, 4 insertions, 8 deletions
diff --git a/compiler/lambdalifting.nim b/compiler/lambdalifting.nim
index 9f1d29ec6..ebd884324 100644
--- a/compiler/lambdalifting.nim
+++ b/compiler/lambdalifting.nim
@@ -261,8 +261,7 @@ proc liftIterSym*(g: ModuleGraph; n: PNode; owner: PSym): PNode =
     result.add(v)
   # add 'new' statement:
   result.add newCall(getSysSym(g, n.info, "internalNew"), env)
-  if g.config.selectedGC in {gcHooks, gcDestructors}:
-    createTypeBoundOpsLL(g, env.typ, n.info)
+  createTypeBoundOpsLL(g, env.typ, n.info)
   result.add makeClosure(g, iter, env, n.info)
 
 proc freshVarForClosureIter*(g: ModuleGraph; s, owner: PSym): PNode =
@@ -613,8 +612,7 @@ proc rawClosureCreation(owner: PSym;
       localError(d.graph.config, env.info, "internal error: cannot create up reference")
   # we are not in the sem'check phase anymore! so pass 'nil' for the PContext
   # and hope for the best:
-  if d.graph.config.selectedGC in {gcHooks, gcDestructors}:
-    createTypeBoundOpsLL(d.graph, env.typ, owner.info)
+  createTypeBoundOpsLL(d.graph, env.typ, owner.info)
 
 proc finishClosureCreation(owner: PSym; d: DetectionPass; c: LiftingPass;
                            info: TLineInfo; res: PNode) =
@@ -642,8 +640,7 @@ proc closureCreationForIter(iter: PNode;
     addVar(vs, vnode)
     result.add(vs)
   result.add(newCall(getSysSym(d.graph, iter.info, "internalNew"), vnode))
-  if d.graph.config.selectedGC in {gcHooks, gcDestructors}:
-    createTypeBoundOpsLL(d.graph, vnode.typ, iter.info)
+  createTypeBoundOpsLL(d.graph, vnode.typ, iter.info)
 
   let upField = lookupInRecord(v.typ.skipTypes({tyOwned, tyRef, tyPtr}).n, getIdent(d.graph.cache, upName))
   if upField != nil:
@@ -928,8 +925,7 @@ proc liftForLoop*(g: ModuleGraph; body: PNode; owner: PSym): PNode =
     result.add(v)
     # add 'new' statement:
     result.add(newCall(getSysSym(g, env.info, "internalNew"), env.newSymNode))
-    if g.config.selectedGC in {gcHooks, gcDestructors}:
-      createTypeBoundOpsLL(g, env.typ, body.info)
+    createTypeBoundOpsLL(g, env.typ, body.info)
 
   elif op.kind == nkStmtListExpr:
     let closure = op.lastSon