mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-08 19:48:20 +02:00
Handle methodGenericArg dep for IsSpecializedByAutoCompleteMethod
This commit is contained in:
parent
ae8ea6281d
commit
c04d240210
2 changed files with 26 additions and 22 deletions
|
@ -2991,6 +2991,8 @@ void BfMethodMatcher::TryDevirtualizeCall(BfTypedValue target, BfTypedValue* ori
|
|||
while (checkTypeInst != NULL)
|
||||
{
|
||||
mModule->PopulateType(checkTypeInst, BfPopulateType_DataAndMethods);
|
||||
if (checkTypeInst->mDefineState >= BfTypeDefineState_DefinedAndMethodsSlotted)
|
||||
{
|
||||
for (auto&& iface : checkTypeInst->mInterfaces)
|
||||
{
|
||||
//TODO: Why did we have this check? This caused Dictionary to not be able to devirtualize
|
||||
|
@ -3020,6 +3022,7 @@ void BfMethodMatcher::TryDevirtualizeCall(BfTypedValue target, BfTypedValue* ori
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (bestIFaceEntry != NULL)
|
||||
break;
|
||||
|
|
|
@ -3597,7 +3597,8 @@ void BfModule::AddDependency(BfType* usedType, BfType* userType, BfDependencyMap
|
|||
|
||||
if (usedType->IsSpecializedByAutoCompleteMethod())
|
||||
{
|
||||
if ((flags & (BfDependencyMap::DependencyFlag_TypeGenericArg | BfDependencyMap::DependencyFlag_OuterType | BfDependencyMap::DependencyFlag_DerivedFrom)) == 0)
|
||||
if ((flags & (BfDependencyMap::DependencyFlag_TypeGenericArg | BfDependencyMap::DependencyFlag_MethodGenericArg |
|
||||
BfDependencyMap::DependencyFlag_OuterType | BfDependencyMap::DependencyFlag_DerivedFrom)) == 0)
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue