[caas] first version that actually works (still has a lot of logical memory leaks on recompilation)

This commit is contained in:
Zahary Karadjov 2012-11-20 16:48:32 +02:00
commit f9bd8cc985
9 changed files with 259 additions and 62 deletions

View file

@ -141,3 +141,9 @@ proc newProc*(prc: PSym, module: BModule): BProc =
newSeq(result.blocks, 1)
result.nestedTryStmts = @[]
iterator cgenModules*: var BModule =
for i in 0..high(gModules):
# some modules (like stdin) may exist only in memory.
# they won't have a cgen BModule for them and we must skip them.
if gModules[i] != nil: yield gModules[i]