- remove all symbols that get linked into the symbol table from the garbage collector.
Symbols are very easy to manage once they are in a symbol table and there's lots of them so this reduces the amount of work the GC needs to do quite considerably. After cleaning out compile-time-only symbols there will still be more than 2000 left, one for each function and one for each member variable of a class or struct. This means more than 2000 object that won't need to tracked constantly by the garbage collector. Note that loose fields which do occur during code generation will be GC'd just as before.
This commit is contained in:
parent
f1b3d60b2f
commit
31223ca180
9 changed files with 61 additions and 113 deletions
|
|
@ -6558,23 +6558,10 @@ FxStackVariable::FxStackVariable(PType *type, int offset, const FScriptPosition
|
|||
|
||||
FxStackVariable::~FxStackVariable()
|
||||
{
|
||||
// Q: Is this good or bad? Needs testing if this is fine or better left to the GC anyway. DObject's destructor is anything but cheap.
|
||||
membervar->ObjectFlags |= OF_YesReallyDelete;
|
||||
delete membervar;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
//==========================================================================
|
||||
|
||||
void FxStackVariable::ReplaceField(PField *newfield)
|
||||
{
|
||||
membervar->ObjectFlags |= OF_YesReallyDelete;
|
||||
delete membervar;
|
||||
membervar = newfield;
|
||||
}
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
//
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue