This commit is contained in:
Araq 2015-06-18 15:05:44 +02:00
commit 17cace280c
6 changed files with 127 additions and 19 deletions

View file

@ -831,12 +831,7 @@ proc genMagic(c: PCtx; n: PNode; dest: var TDest; m: TMagic) =
c.freeTemp(tmp)
of mSwap:
unused(n, dest)
var
d1 = c.genx(n.sons[1])
d2 = c.genx(n.sons[2])
c.gABC(n, opcSwap, d1, d2)
c.genAsgnPatch(n.sons[1], d1)
c.genAsgnPatch(n.sons[2], d2)
c.gen(lowerSwap(n, if c.prc == nil: c.module else: c.prc.sym))
of mIsNil: genUnaryABC(c, n, dest, opcIsNil)
of mCopyStr:
if dest < 0: dest = c.getTemp(n.typ)