Fix swap in jsgen

This commit is contained in:
def
2014-08-15 19:34:28 +02:00
parent ae681be629
commit 6a7062fb60

View File

@@ -833,8 +833,8 @@ proc genSwap(p: PProc, n: PNode) =
"local $1 = $2; $2 = $3; $3 = $1;$n", [
tmp, a.address, b.address])
tmp = tmp2
appf(p.body, "var $1 = $2; $2 = $3; $3 = $1" |
"local $1 = $2; $2 = $3; $3 = $1", [tmp, a.res, b.res])
appf(p.body, "var $1 = $2; $2 = $3; $3 = $1;" |
"local $1 = $2; $2 = $3; $3 = $1;", [tmp, a.res, b.res])
proc getFieldPosition(f: PNode): int =
case f.kind