mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Fixed method slotting when method is already in work list
This commit is contained in:
parent
37c4074c44
commit
7e03ce86bc
1 changed files with 76 additions and 64 deletions
|
@ -5636,18 +5636,24 @@ void BfModule::DoTypeInstanceMethodProcessing(BfTypeInstance* typeInstance)
|
|||
if ((pass == 1) != (methodDef->mIsOverride))
|
||||
continue;
|
||||
|
||||
bool doGetMethodInstance = true;
|
||||
|
||||
auto methodInstanceGroup = &typeInstance->mMethodInstanceGroups[methodDef->mIdx];
|
||||
|
||||
if ((methodInstanceGroup->mOnDemandKind != BfMethodOnDemandKind_AlwaysInclude) &&
|
||||
(methodInstanceGroup->mOnDemandKind != BfMethodOnDemandKind_Decl_AwaitingDecl))
|
||||
{
|
||||
BfLogSysM("Skipping GetMethodInstance on MethodDef: %p OnDemandKind: %d\n", methodDef, methodInstanceGroup->mOnDemandKind);
|
||||
continue;
|
||||
doGetMethodInstance = false;
|
||||
}
|
||||
|
||||
if (methodDef->mMethodType == BfMethodType_Init)
|
||||
continue;
|
||||
doGetMethodInstance = false;
|
||||
|
||||
BfMethodInstance* methodInstance = NULL;
|
||||
|
||||
if (doGetMethodInstance)
|
||||
{
|
||||
int prevWorklistSize = (int)mContext->mMethodWorkList.size();
|
||||
|
||||
auto flags = ((methodDef->mGenericParams.size() != 0) || (typeInstance->IsUnspecializedType())) ? BfGetMethodInstanceFlag_UnspecializedPass : BfGetMethodInstanceFlag_None;
|
||||
|
@ -5657,7 +5663,7 @@ void BfModule::DoTypeInstanceMethodProcessing(BfTypeInstance* typeInstance)
|
|||
|
||||
auto moduleMethodInstance = GetMethodInstance(typeInstance, methodDef, BfTypeVector(), flags);
|
||||
|
||||
auto methodInstance = moduleMethodInstance.mMethodInstance;
|
||||
methodInstance = moduleMethodInstance.mMethodInstance;
|
||||
if (methodInstance == NULL)
|
||||
{
|
||||
BF_ASSERT(typeInstance->IsGenericTypeInstance() && (typeInstance->mTypeDef->mIsCombinedPartial));
|
||||
|
@ -5729,7 +5735,13 @@ void BfModule::DoTypeInstanceMethodProcessing(BfTypeInstance* typeInstance)
|
|||
BF_ASSERT(methodInstanceGroup->mOnDemandKind != BfMethodOnDemandKind_Decl_AwaitingReference);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
methodInstance = methodInstanceGroup->mDefault;
|
||||
if (methodInstance == NULL)
|
||||
continue;
|
||||
}
|
||||
|
||||
bool methodUsedVirtually = false;
|
||||
if (typeInstance->IsInterface())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue