mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 04:22:20 +02:00
Fixed dependency adding of interfaces
This commit is contained in:
parent
c101eb19dd
commit
c8055f0a38
3 changed files with 9 additions and 33 deletions
|
@ -1428,12 +1428,6 @@ void BfContext::DeleteType(BfType* type, bool deferDepRebuilds)
|
|||
BfTypeInstance* typeInst = type->ToTypeInstance();
|
||||
if (typeInst != NULL)
|
||||
{
|
||||
// if (typeInst->mTypeDef->IsGlobalsContainer())
|
||||
// {
|
||||
// bool worked = mSystem->mGlobalsMap.Remove(typeInst->mTypeDef->mNamespace);
|
||||
// BF_ASSERT(worked);
|
||||
// }
|
||||
|
||||
if (mCompiler->mHotState != NULL)
|
||||
{
|
||||
if ((typeInst->mHotTypeData != NULL) && (typeInst->mHotTypeData->mPendingDataChange))
|
||||
|
@ -1540,11 +1534,6 @@ void BfContext::DeleteType(BfType* type, bool deferDepRebuilds)
|
|||
mFailTypes.Add(dependentTypeInst);
|
||||
else
|
||||
{
|
||||
// BfTypeProcessRequest* typeProcessRequest = mPopulateTypeWorkList.Alloc();
|
||||
// typeProcessRequest->mType = dependentType;
|
||||
// typeProcessRequest->mRebuildType = true;
|
||||
// mCompiler->mStats.mTypesQueued++;
|
||||
// mCompiler->UpdateCompletion();
|
||||
rebuildTypeQueue.Add(dependentType);
|
||||
}
|
||||
}
|
||||
|
@ -2109,7 +2098,9 @@ void BfContext::VerifyTypeLookups(BfTypeInstance* typeInst)
|
|||
BfTypeDef* ambiguousTypeDef = NULL;
|
||||
BfTypeDef* result = mSystem->FindTypeDef(lookupEntry.mName, lookupEntry.mNumGenericParams, useTypeDef->mProject, useTypeDef->mNamespaceSearch, &ambiguousTypeDef);
|
||||
if (result != lookupEntryPair.mValue.mTypeDef)
|
||||
{
|
||||
isDirty = true;
|
||||
}
|
||||
else
|
||||
lookupEntry.mAtomUpdateIdx = atomUpdateIdx;
|
||||
}
|
||||
|
|
|
@ -89,10 +89,6 @@ void BfDefBuilder::Process(BfPassInstance* passInstance, BfSource* bfSource, boo
|
|||
mSystem->mNeedsTypesHandledByCompiler = true;
|
||||
|
||||
mPassInstance = passInstance;
|
||||
/*if (parser->mCursorIdx == -1)
|
||||
{
|
||||
//gDefBuilderPerfManager.StartRecording();
|
||||
}*/
|
||||
|
||||
bool isAutocomplete = false;
|
||||
if ((mResolvePassData != NULL) && (mResolvePassData->mAutoComplete != NULL))
|
||||
|
@ -106,12 +102,6 @@ void BfDefBuilder::Process(BfPassInstance* passInstance, BfSource* bfSource, boo
|
|||
|
||||
mFullRefresh = fullRefresh;
|
||||
|
||||
// for (auto typeDef : mSystem->mTypeDefs)
|
||||
// {
|
||||
// if ((!typeDef->mIsCombinedPartial) && (typeDef->GetLastSource() == bfSource->mPrevRevision))
|
||||
// typeDef->mDefState = BfTypeDef::DefState_AwaitingNewVersion;
|
||||
// }
|
||||
|
||||
if (bfSource->mPrevRevision != NULL)
|
||||
{
|
||||
for (auto typeDef : bfSource->mPrevRevision->mTypeDefs)
|
||||
|
@ -217,7 +207,6 @@ void BfDefBuilder::ParseGenericParams(BfGenericParamsDeclaration* genericParamsD
|
|||
}
|
||||
|
||||
auto genericParamDef = new BfGenericParamDef();
|
||||
//genericParamDef->mOwner = mCurActualTypeDef;
|
||||
genericParamDef->mName = name;
|
||||
genericParamDef->mNameNodes.Add(genericParamNode);
|
||||
genericParamDef->mGenericParamFlags = BfGenericParamFlag_None;
|
||||
|
@ -1508,11 +1497,6 @@ void BfDefBuilder::Visit(BfTypeDeclaration* typeDeclaration)
|
|||
{
|
||||
BfTypeDef* prevDef = NULL;
|
||||
|
||||
// auto checkTypeDef = mSystem->mTypeDefs.Find(fullName);
|
||||
// while (checkTypeDef != NULL)
|
||||
|
||||
|
||||
|
||||
auto itr = mSystem->mTypeDefs.TryGet(fullName);
|
||||
while (itr)
|
||||
{
|
||||
|
|
|
@ -2177,6 +2177,8 @@ bool BfModule::DoPopulateType(BfType* resolvedTypeRef, BfPopulateType populateTy
|
|||
typeInterfaceInst.mIsRedeclared = false;
|
||||
typeInstance->mInterfaces.push_back(typeInterfaceInst);
|
||||
|
||||
AddDependency(checkInterface, typeInstance, BfDependencyMap::DependencyFlag_ImplementsInterface);
|
||||
|
||||
// Interfaces can list other interfaces in their declaration, so pull those in too
|
||||
for (auto depIFace : checkInterface->mInterfaces)
|
||||
{
|
||||
|
@ -3501,10 +3503,9 @@ void BfModule::DoTypeInstanceMethodProcessing(BfTypeInstance* typeInstance)
|
|||
auto checkTypeInstance = typeInstance;
|
||||
while (checkTypeInstance != NULL)
|
||||
{
|
||||
// These may have been already added
|
||||
for (auto&& interfaceEntry : checkTypeInstance->mInterfaces)
|
||||
{
|
||||
AddDependency(interfaceEntry.mInterfaceType, typeInstance, BfDependencyMap::DependencyFlag_ImplementsInterface);
|
||||
}
|
||||
checkTypeInstance = checkTypeInstance->GetImplBaseType();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue