- Make the autosegs read-only.
- Derive PClass from dobject.cpp. This has one major ramification: Since the PClass is not allocated until runtime, you cannot initialize any static/global data structures with pointers to PClasses using RUNTIME_CLASS. Attempting to do so will just initialize with a NULL pointer. Instead, you can initialize using the address of the pointer returned by RUNTIME_CLASS and dereference that. By the time you have an opportunity to dereference it, it will no longer be NULL. - Sync CmakeLists.txt. - Random fixes for problems GCC spotted. SVN r1852 (scripting)
This commit is contained in:
parent
92766165f5
commit
1eb7912bd8
35 changed files with 258 additions and 207 deletions
|
|
@ -147,6 +147,7 @@ int Pause = DEFAULT_GCPAUSE;
|
|||
int StepMul = DEFAULT_GCMUL;
|
||||
int StepCount;
|
||||
size_t Dept;
|
||||
bool FinalGC;
|
||||
|
||||
// PRIVATE DATA DEFINITIONS ------------------------------------------------
|
||||
|
||||
|
|
@ -239,8 +240,8 @@ static DObject **SweepList(DObject **p, size_t count, size_t *finalize_count)
|
|||
// be in a thinker list, then I need to add write barriers for every time a
|
||||
// thinker pointer is changed. This seems easier and perfectly reasonable, since
|
||||
// a live thinker that isn't on a thinker list isn't much of a thinker.
|
||||
assert(!curr->IsKindOf(RUNTIME_CLASS(DThinker)) || (curr->ObjectFlags & OF_Sentinel));
|
||||
assert(!curr->IsKindOf(RUNTIME_CLASS(DInterpolation)));
|
||||
assert(FinalGC || !curr->IsKindOf(RUNTIME_CLASS(DThinker)) || (curr->ObjectFlags & OF_Sentinel));
|
||||
assert(FinalGC || !curr->IsKindOf(RUNTIME_CLASS(DInterpolation)));
|
||||
curr->Destroy();
|
||||
}
|
||||
curr->ObjectFlags |= OF_Cleanup;
|
||||
|
|
@ -327,14 +328,10 @@ static void MarkRoot()
|
|||
SectorMarker->SecNum = 0;
|
||||
}
|
||||
Mark(SectorMarker);
|
||||
// Mark symbol tables
|
||||
// Mark classes
|
||||
for (unsigned j = 0; j < PClass::m_Types.Size(); ++j)
|
||||
{
|
||||
PClass *cls = PClass::m_Types[j];
|
||||
if (cls != NULL)
|
||||
{
|
||||
cls->Symbols.MarkSymbols();
|
||||
}
|
||||
Mark(PClass::m_Types[j]);
|
||||
}
|
||||
// Mark bot stuff.
|
||||
Mark(bglobal.firstthing);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue