mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-16 23:34:10 +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))
|
if ((pass == 1) != (methodDef->mIsOverride))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
|
bool doGetMethodInstance = true;
|
||||||
|
|
||||||
auto methodInstanceGroup = &typeInstance->mMethodInstanceGroups[methodDef->mIdx];
|
auto methodInstanceGroup = &typeInstance->mMethodInstanceGroups[methodDef->mIdx];
|
||||||
|
|
||||||
if ((methodInstanceGroup->mOnDemandKind != BfMethodOnDemandKind_AlwaysInclude) &&
|
if ((methodInstanceGroup->mOnDemandKind != BfMethodOnDemandKind_AlwaysInclude) &&
|
||||||
(methodInstanceGroup->mOnDemandKind != BfMethodOnDemandKind_Decl_AwaitingDecl))
|
(methodInstanceGroup->mOnDemandKind != BfMethodOnDemandKind_Decl_AwaitingDecl))
|
||||||
{
|
{
|
||||||
BfLogSysM("Skipping GetMethodInstance on MethodDef: %p OnDemandKind: %d\n", methodDef, methodInstanceGroup->mOnDemandKind);
|
BfLogSysM("Skipping GetMethodInstance on MethodDef: %p OnDemandKind: %d\n", methodDef, methodInstanceGroup->mOnDemandKind);
|
||||||
continue;
|
doGetMethodInstance = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (methodDef->mMethodType == BfMethodType_Init)
|
if (methodDef->mMethodType == BfMethodType_Init)
|
||||||
continue;
|
doGetMethodInstance = false;
|
||||||
|
|
||||||
|
BfMethodInstance* methodInstance = NULL;
|
||||||
|
|
||||||
|
if (doGetMethodInstance)
|
||||||
|
{
|
||||||
int prevWorklistSize = (int)mContext->mMethodWorkList.size();
|
int prevWorklistSize = (int)mContext->mMethodWorkList.size();
|
||||||
|
|
||||||
auto flags = ((methodDef->mGenericParams.size() != 0) || (typeInstance->IsUnspecializedType())) ? BfGetMethodInstanceFlag_UnspecializedPass : BfGetMethodInstanceFlag_None;
|
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 moduleMethodInstance = GetMethodInstance(typeInstance, methodDef, BfTypeVector(), flags);
|
||||||
|
|
||||||
auto methodInstance = moduleMethodInstance.mMethodInstance;
|
methodInstance = moduleMethodInstance.mMethodInstance;
|
||||||
if (methodInstance == NULL)
|
if (methodInstance == NULL)
|
||||||
{
|
{
|
||||||
BF_ASSERT(typeInstance->IsGenericTypeInstance() && (typeInstance->mTypeDef->mIsCombinedPartial));
|
BF_ASSERT(typeInstance->IsGenericTypeInstance() && (typeInstance->mTypeDef->mIsCombinedPartial));
|
||||||
|
@ -5729,7 +5735,13 @@ void BfModule::DoTypeInstanceMethodProcessing(BfTypeInstance* typeInstance)
|
||||||
BF_ASSERT(methodInstanceGroup->mOnDemandKind != BfMethodOnDemandKind_Decl_AwaitingReference);
|
BF_ASSERT(methodInstanceGroup->mOnDemandKind != BfMethodOnDemandKind_Decl_AwaitingReference);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
methodInstance = methodInstanceGroup->mDefault;
|
||||||
|
if (methodInstance == NULL)
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
bool methodUsedVirtually = false;
|
bool methodUsedVirtually = false;
|
||||||
if (typeInstance->IsInterface())
|
if (typeInstance->IsInterface())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue