1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-08 19:48:20 +02:00

Fixed chained GCMarkMember

This commit is contained in:
Brian Fiete 2020-10-20 07:30:25 -07:00
parent affd740ff4
commit 49a4536e1e

View file

@ -4902,11 +4902,6 @@ BfIRValue BfModule::CreateTypeData(BfType* type, Dictionary<int, int>& usedStrin
BfMangler::Mangle(typeDataName, mCompiler->GetMangleKind(), type, mContext->mScratchModule);
}
if (typeDataName == "sBfTypeData.?")
{
NOP;
}
int typeCode = BfTypeCode_None;
if (typeInstance != NULL)
@ -21626,6 +21621,11 @@ bool BfModule::SlotVirtualMethod(BfMethodInstance* methodInstance, BfAmbiguityCo
if (mCurTypeInstance->IsUnspecializedTypeVariation())
return false;
if ((mCurTypeInstance->mTypeDef->mName->ToString() == "Zornk") && (methodInstance->mMethodDef->mName == "GCMarkMembers"))
{
NOP;
}
auto _AddVirtualDecl = [&](BfMethodInstance* declMethodInstance)
{
if (!mCompiler->mOptions.mAllowHotSwapping)
@ -21985,6 +21985,16 @@ bool BfModule::SlotVirtualMethod(BfMethodInstance* methodInstance, BfAmbiguityCo
ambiguityContext->Remove(virtualMethodMatchIdx);
}
if ((isBetter) && (methodInstance->GetOwner() == methodOverriden->GetOwner()))
{
if (methodDef->mName == BF_METHODNAME_MARKMEMBERS)
{
// Leave the master GCMarkMember
isBetter = false;
isWorse = true;
}
}
doOverride = isBetter;
}
}