mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 11:38:21 +02:00
Fixed HotTypeVersion base type dependency
This commit is contained in:
parent
9062662ffb
commit
2f6484894e
1 changed files with 27 additions and 24 deletions
|
@ -4489,9 +4489,9 @@ void BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
|
|||
return;
|
||||
}
|
||||
|
||||
if ((mCompiler->mOptions.mAllowHotSwapping) &&
|
||||
(typeInstance->mDefineState < BfTypeDefineState_HasInterfaces_Direct) &&
|
||||
(typeInstance->mDefineState != BfTypeDefineState_ResolvingBaseType))
|
||||
if (mCompiler->mOptions.mAllowHotSwapping)
|
||||
{
|
||||
if (typeInstance->mDefineState < BfTypeDefineState_HasInterfaces_Direct)
|
||||
{
|
||||
if (typeInstance->mHotTypeData == NULL)
|
||||
{
|
||||
|
@ -4507,15 +4507,6 @@ void BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
|
|||
|
||||
BfHotTypeVersion* hotTypeVersion = new BfHotTypeVersion();
|
||||
hotTypeVersion->mTypeId = typeInstance->mTypeId;
|
||||
if (typeInstance->mBaseType != NULL)
|
||||
{
|
||||
if (typeInstance->mBaseType->mHotTypeData != NULL)
|
||||
hotTypeVersion->mBaseType = typeInstance->mBaseType->mHotTypeData->GetLatestVersion();
|
||||
else
|
||||
{
|
||||
AssertErrorState();
|
||||
}
|
||||
}
|
||||
hotTypeVersion->mDeclHotCompileIdx = mCompiler->mOptions.mHotCompileIdx;
|
||||
if (mCompiler->IsHotCompile())
|
||||
hotTypeVersion->mCommittedHotCompileIdx = -1;
|
||||
|
@ -4527,6 +4518,18 @@ void BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
|
|||
BfLogSysM("BfHotTypeVersion %p created for type %p\n", hotTypeVersion, typeInstance);
|
||||
}
|
||||
|
||||
auto hotTypeVersion = typeInstance->mHotTypeData->mTypeVersions.back();
|
||||
if (typeInstance->mBaseType != NULL)
|
||||
{
|
||||
if (typeInstance->mBaseType->mHotTypeData != NULL)
|
||||
hotTypeVersion->mBaseType = typeInstance->mBaseType->mHotTypeData->GetLatestVersion();
|
||||
else if (populateType >= BfPopulateType_Interfaces_All)
|
||||
{
|
||||
AssertErrorState();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BF_ASSERT(!typeInstance->mNeedsMethodProcessing);
|
||||
if (typeInstance->mDefineState < BfTypeDefineState_HasInterfaces_Direct)
|
||||
typeInstance->mDefineState = BfTypeDefineState_HasInterfaces_Direct;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue