- started moving stuff out of PClassActor into meta data.
This reinstates the old FActorInfo as part of the meta data a class can have so that the class descriptor itself can be freed from any data not directly relevant for managing the class's type information.
This commit is contained in:
parent
6a3ddaa8fa
commit
311ce2362a
8 changed files with 106 additions and 25 deletions
|
|
@ -1112,6 +1112,7 @@ ZCC_ExprTypeRef *ZCCCompiler::NodeFromSymbolType(PSymbolType *sym, ZCC_Expressio
|
|||
// builds the internal structure of all classes and structs
|
||||
//
|
||||
//==========================================================================
|
||||
void AddActorInfo(PClass *cls);
|
||||
|
||||
void ZCCCompiler::CompileAllFields()
|
||||
{
|
||||
|
|
@ -1156,6 +1157,7 @@ void ZCCCompiler::CompileAllFields()
|
|||
for (unsigned i = 0; i < Classes.Size(); i++)
|
||||
{
|
||||
auto type = Classes[i]->Type();
|
||||
|
||||
if (type->Size == TentativeClass)
|
||||
{
|
||||
if (type->ParentClass->Size == TentativeClass)
|
||||
|
|
@ -1169,7 +1171,12 @@ void ZCCCompiler::CompileAllFields()
|
|||
type->Size = Classes[i]->Type()->ParentClass->Size;
|
||||
}
|
||||
}
|
||||
if (Classes[i]->Type()->ParentClass)
|
||||
if (type->TypeName == NAME_Actor)
|
||||
{
|
||||
assert(type->MetaSize == 0);
|
||||
AddActorInfo(type); // AActor needs the actor info manually added to its meta data before adding any scripted fields.
|
||||
}
|
||||
else if (Classes[i]->Type()->ParentClass)
|
||||
type->MetaSize = Classes[i]->Type()->ParentClass->MetaSize;
|
||||
else
|
||||
type->MetaSize = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue