diff gen/functions.cpp @ 1508:e1e93343fc11

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.
author Christian Kamm <kamm incasoftware de>
date Sat, 20 Jun 2009 19:11:44 +0200
parents 2292878925f4
children b6b6afc2dfc7
line wrap: on
line diff
--- a/gen/functions.cpp	Tue Jun 16 23:00:27 2009 +0200
+++ b/gen/functions.cpp	Sat Jun 20 19:11:44 2009 +0200
@@ -774,7 +774,10 @@
     }
 
     // output function body
+    irfunction->gen = new FuncGen;
     fd->fbody->toIR(gIR);
+    delete irfunction->gen;
+    irfunction->gen = 0;
 
     // TODO: clean up this mess