make the Nim compiler compile as C++

This commit is contained in:
Araq
2016-12-10 02:27:41 +01:00
parent e07f0170e3
commit 4d22cff8ea

View File

@@ -211,7 +211,8 @@ proc possibleAliases(w: var W; result: var seq[ptr TSym]) =
while todo < result.len:
let x = result[todo]
inc todo
for a in mitems(w.assignments):
for i in 0..<len(w.assignments):
let a = addr(w.assignments[i])
#if a.srcHasSym(x):
# # y = f(..., x, ...)
# for i in 0 ..< a.destNoTc: addNoDup a.dest[i]
@@ -238,7 +239,8 @@ proc markWriteOrEscape(w: var W) =
## A write then looks like ``p[] = x``.
## An escape looks like ``p[] = q`` or more generally
## like ``p[] = f(q)`` where ``f`` can forward ``q``.
for a in mitems(w.assignments):
for i in 0..<len(w.assignments):
let a = addr(w.assignments[i])
if a.destInfo != {}:
possibleAliases(w, a.dest)