mirror of
https://github.com/xomboverlord/ldc.git
synced 2026-01-20 14:53:14 +01:00
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:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user