Move function codegen data from IrFunction to new FuncGen.

This change reduces memory consumption significantly by releasing the
memory held by the STL containers that are now inside FuncGen.
This commit is contained in:
Christian Kamm 2009-06-20 19:11:44 +02:00
parent 7dbe9baa37
commit 42b3da8ac7
7 changed files with 138 additions and 124 deletions

View file

@ -774,7 +774,10 @@ void DtoDefineFunction(FuncDeclaration* fd)
}
// output function body
irfunction->gen = new FuncGen;
fd->fbody->toIR(gIR);
delete irfunction->gen;
irfunction->gen = 0;
// TODO: clean up this mess