mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-12 07:34:50 +00:00
Move the symbol table from PClass to PStruct.
This commit is contained in:
parent
91207ed3f4
commit
dbaf72772b
2 changed files with 6 additions and 20 deletions
|
@ -864,8 +864,12 @@ IMPLEMENT_CLASS(PStruct)
|
||||||
|
|
||||||
size_t PStruct::PropagateMark()
|
size_t PStruct::PropagateMark()
|
||||||
{
|
{
|
||||||
|
size_t marked;
|
||||||
|
|
||||||
GC::MarkArray(Fields);
|
GC::MarkArray(Fields);
|
||||||
return Fields.Size() * sizeof(void*) + Super::PropagateMark();
|
marked = Fields.Size() * sizeof(void*);
|
||||||
|
marked += Symbols.MarkSymbols();
|
||||||
|
return marked + Super::PropagateMark();
|
||||||
}
|
}
|
||||||
|
|
||||||
/* PPrototype *************************************************************/
|
/* PPrototype *************************************************************/
|
||||||
|
@ -1081,7 +1085,6 @@ PClass::PClass()
|
||||||
|
|
||||||
PClass::~PClass()
|
PClass::~PClass()
|
||||||
{
|
{
|
||||||
Symbols.ReleaseSymbols();
|
|
||||||
if (Defaults != NULL)
|
if (Defaults != NULL)
|
||||||
{
|
{
|
||||||
M_Free(Defaults);
|
M_Free(Defaults);
|
||||||
|
@ -1431,22 +1434,6 @@ const PClass *PClass::NativeClass() const
|
||||||
return cls;
|
return cls;
|
||||||
}
|
}
|
||||||
|
|
||||||
//==========================================================================
|
|
||||||
//
|
|
||||||
// PClass :: PropagateMark
|
|
||||||
//
|
|
||||||
//==========================================================================
|
|
||||||
|
|
||||||
size_t PClass::PropagateMark()
|
|
||||||
{
|
|
||||||
size_t marked;
|
|
||||||
|
|
||||||
// Mark symbols
|
|
||||||
marked = Symbols.MarkSymbols();
|
|
||||||
|
|
||||||
return marked + Super::PropagateMark();
|
|
||||||
}
|
|
||||||
|
|
||||||
/* FTypeTable **************************************************************/
|
/* FTypeTable **************************************************************/
|
||||||
|
|
||||||
//==========================================================================
|
//==========================================================================
|
||||||
|
|
|
@ -408,6 +408,7 @@ class PStruct : public PNamedType
|
||||||
DECLARE_CLASS(PStruct, PNamedType);
|
DECLARE_CLASS(PStruct, PNamedType);
|
||||||
public:
|
public:
|
||||||
TArray<PField *> Fields;
|
TArray<PField *> Fields;
|
||||||
|
PSymbolTable Symbols;
|
||||||
|
|
||||||
size_t PropagateMark();
|
size_t PropagateMark();
|
||||||
};
|
};
|
||||||
|
@ -464,7 +465,6 @@ public:
|
||||||
const size_t *FlatPointers; // object pointers defined by this class and all its superclasses; not initialized by default
|
const size_t *FlatPointers; // object pointers defined by this class and all its superclasses; not initialized by default
|
||||||
BYTE *Defaults;
|
BYTE *Defaults;
|
||||||
bool bRuntimeClass; // class was defined at run-time, not compile-time
|
bool bRuntimeClass; // class was defined at run-time, not compile-time
|
||||||
PSymbolTable Symbols;
|
|
||||||
|
|
||||||
void (*ConstructNative)(void *);
|
void (*ConstructNative)(void *);
|
||||||
|
|
||||||
|
@ -478,7 +478,6 @@ public:
|
||||||
void InitializeActorInfo();
|
void InitializeActorInfo();
|
||||||
void BuildFlatPointers();
|
void BuildFlatPointers();
|
||||||
const PClass *NativeClass() const;
|
const PClass *NativeClass() const;
|
||||||
size_t PropagateMark();
|
|
||||||
|
|
||||||
// Returns true if this type is an ancestor of (or same as) the passed type.
|
// Returns true if this type is an ancestor of (or same as) the passed type.
|
||||||
bool IsAncestorOf(const PClass *ti) const
|
bool IsAncestorOf(const PClass *ti) const
|
||||||
|
|
Loading…
Reference in a new issue