From 46f25d0772b9078680c0b8861616f841a80530b6 Mon Sep 17 00:00:00 2001 From: Smooth Operator Date: Wed, 8 Feb 2023 08:16:37 -0500 Subject: [PATCH] use a move for flattened expr temporaries (#290) --- cps/exprs.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cps/exprs.nim b/cps/exprs.nim index 969dd0c5..88f51b23 100644 --- a/cps/exprs.nim +++ b/cps/exprs.nim @@ -268,7 +268,7 @@ macro cpsExprToTmp(tipe, n: typed): untyped = debugAnnotation cpsExprToTmp, n: let # The symbol for our temporary - tmp = genSymVar() + tmp = genSymVar("(expr)") # The rewritten expression body = assignTo(tmp): @@ -288,8 +288,8 @@ macro cpsExprToTmp(tipe, n: typed): untyped = body ) ), - # Then emit our temporary as the new expression - tmp + # Then move our temporary to form the new expression + newCall(bindName"move", tmp) ) macro cpsAsgn(dst, src: typed): untyped =