Skip to content

Commit

Permalink
use a move for flattened expr temporaries (#290)
Browse files Browse the repository at this point in the history
  • Loading branch information
disruptek authored Feb 8, 2023
1 parent 998ffa5 commit 46f25d0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cps/exprs.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand All @@ -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 =
Expand Down

0 comments on commit 46f25d0

Please sign in to comment.