1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-10 04:22:20 +02:00

Handled some method slotting reentrancy issues

This commit is contained in:
Brian Fiete 2021-08-02 10:44:39 -07:00
parent 879ac7f989
commit dd37d6c092
6 changed files with 55 additions and 21 deletions

View file

@ -3604,7 +3604,15 @@ void BfIRBuilder::CreateTypeDefinition(BfType* type, bool forceDbgDefine)
// isDefiningModule = true;
if ((isDefiningModule) || (type->IsValueType()))
populateModule->PopulateType(type, BfPopulateType_DataAndMethods);
{
if ((typeInstance != NULL) && (typeInstance->mDefineState == BfTypeDefineState_DefinedAndMethodsSlotting))
{
// Don't re-enter
BfLogSys(mModule->mSystem, "BfIRBuilder::CreateTypeDefinition avoided PopulateType BfPopulateType_DataAndMethods re-entry typeInst: %p\n", typeInstance);
}
else
populateModule->PopulateType(type, BfPopulateType_DataAndMethods);
}
if ((!isDefiningModule) && (!type->IsUnspecializedType()) && (type->IsValueType()) && (mHasDebugInfo))
{