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

Tightened std type lookup requirements, fixed reified redecl issue

This commit is contained in:
Brian Fiete 2020-08-11 12:14:47 -07:00
parent fbe9a906e4
commit 85b4afcd94
3 changed files with 26 additions and 12 deletions

View file

@ -2188,12 +2188,13 @@ void BfContext::GenerateModuleName_TypeInst(BfTypeInstance* typeInst, String& na
return;
}
for (int genericIdx = startGenericIdx; genericIdx < (int)typeInst->mTypeDef->mGenericParamDefs.size(); genericIdx++)
if (typeInst->mGenericTypeInfo != NULL)
{
auto genericType = (BfTypeInstance*)typeInst;
auto type = genericType->mGenericTypeInfo->mTypeGenericArguments[genericIdx];
GenerateModuleName_Type(type, name);
for (int genericIdx = startGenericIdx; genericIdx < (int)typeInst->mGenericTypeInfo->mTypeGenericArguments.size(); genericIdx++)
{
auto type = typeInst->mGenericTypeInfo->mTypeGenericArguments[genericIdx];
GenerateModuleName_Type(type, name);
}
}
}
@ -2363,6 +2364,11 @@ void BfContext::QueueMethodSpecializations(BfTypeInstance* typeInst, bool checkS
BP_ZONE("BfContext::QueueMethodSpecializations");
if (typeInst->mTypeId == 578)
{
NOP;
}
auto module = typeInst->mModule;
if (module == NULL)
return;
@ -2408,6 +2414,11 @@ void BfContext::QueueMethodSpecializations(BfTypeInstance* typeInst, bool checkS
auto methodDef = methodRef.mTypeInstance->mTypeDef->mMethods[methodRef.mMethodNum];
if (methodDef->mName == "set__Capacity")
{
NOP;
}
auto targetContext = methodRef.mTypeInstance->mContext;
BfMethodSpecializationRequest* specializationRequest = targetContext->mMethodSpecializationWorkList.Alloc();
if (specializedMethodRefInfo.mHasReifiedRef)