Skip to content

Commit

Permalink
don't zero out in a move in the VM
Browse files Browse the repository at this point in the history
  • Loading branch information
Clyybber committed Mar 12, 2021
1 parent 4545995 commit 2b16d73
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions compiler/vmgen.nim
Original file line number Diff line number Diff line change
Expand Up @@ -1354,9 +1354,10 @@ proc genMagic(c: PCtx; n: PNode; dest: var TDest; m: TMagic) =
if dest < 0: dest = c.getTemp(arg.typ)
gABC(c, arg, whichAsgnOpc(arg, requiresCopy=false), dest, a)
# XXX use ldNullOpcode() here?
c.gABx(n, opcLdNull, a, c.genType(arg.typ))
c.gABx(n, opcNodeToReg, a, a)
c.genAsgnPatch(arg, a)
# Don't zero out the arg for now #17199
# c.gABx(n, opcLdNull, a, c.genType(arg.typ))
# c.gABx(n, opcNodeToReg, a, a)
# c.genAsgnPatch(arg, a)
c.freeTemp(a)
of mNodeId:
c.genUnaryABC(n, dest, opcNodeId)
Expand Down

0 comments on commit 2b16d73

Please sign in to comment.