diff options
author | Andreas Rumpf <rumpf_a@web.de> | 2019-03-04 10:54:38 +0100 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2019-03-04 15:41:07 +0100 |
commit | 75f8e136e153f9679abebcc4d77f359c371c6736 (patch) | |
tree | d4f4d85f7b4097bc30fba60ded452f845aa78cf3 /compiler | |
parent | 4700018d7ecd17882664ddf072f8e6cdebe438b5 (diff) | |
download | Nim-75f8e136e153f9679abebcc4d77f359c371c6736.tar.gz |
ccgexprs.nim: less confusing code layout
Diffstat (limited to 'compiler')
-rw-r--r-- | compiler/ccgexprs.nim | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/compiler/ccgexprs.nim b/compiler/ccgexprs.nim index a40c60e6d..99b658d46 100644 --- a/compiler/ccgexprs.nim +++ b/compiler/ccgexprs.nim @@ -1723,11 +1723,16 @@ proc genSetOp(p: BProc, e: PNode, d: var TLoc, op: TMagic) = const lookupOpr: array[mLeSet..mSymDiffSet, string] = [ "for ($1 = 0; $1 < $2; $1++) { $n" & - " $3 = (($4[$1] & ~ $5[$1]) == 0);$n" & - " if (!$3) break;}$n", "for ($1 = 0; $1 < $2; $1++) { $n" & - " $3 = (($4[$1] & ~ $5[$1]) == 0);$n" & " if (!$3) break;}$n" & - "if ($3) $3 = (#nimCmpMem($4, $5, $2) != 0);$n", - "&", "|", "& ~", "^"] + " $3 = (($4[$1] & ~ $5[$1]) == 0);$n" & + " if (!$3) break;}$n", + "for ($1 = 0; $1 < $2; $1++) { $n" & + " $3 = (($4[$1] & ~ $5[$1]) == 0);$n" & + " if (!$3) break;}$n" & + "if ($3) $3 = (#nimCmpMem($4, $5, $2) != 0);$n", + "&", + "|", + "& ~", + "^"] var a, b, i: TLoc var setType = skipTypes(e.sons[1].typ, abstractVar) var size = int(getSize(p.config, setType)) |