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

Improvements to emit markers on emits only in specialized types

This commit is contained in:
Brian Fiete 2022-05-02 07:48:29 -07:00
parent 01112c54fe
commit 5271f5e2fd
14 changed files with 342 additions and 68 deletions

View file

@ -7199,16 +7199,13 @@ bool BfCompiler::DoCompile(const StringImpl& outputDirectory)
bool didWork = false;
UpdateDependencyMap(mOptions.mCompileOnDemandKind != BfCompileOnDemandKind_ResolveUnused, didWork);
if (mOptions.mCompileOnDemandKind != BfCompileOnDemandKind_AlwaysInclude)
// If UpdateDependencyMap caused methods to be reified, then we need to run PopulateReified again-
// because those methods may be virtual and we need to reify overrides (for example).
// We use the DoWorkLoop result to determine if there were actually any changes from UpdateDependencyMap
if (didWork)
{
// If UpdateDependencyMap caused methods to be reified, then we need to run PopulateReified again-
// because those methods may be virtual and we need to reify overrides (for example).
// We use the DoWorkLoop result to determine if there were actually any changes from UpdateDependencyMap
if (didWork)
{
PopulateReified();
}
PopulateReified();
}
}
@ -9814,6 +9811,8 @@ BF_EXPORT const char* BF_CALLTYPE BfCompiler_GetCollapseRegions(BfCompiler* bfCo
};
Dictionary<BfTypeDef*, Dictionary<int, _EmitSource>> emitLocMap;
bool mayHaveMissedEmits = false;
for (auto type : bfCompiler->mContext->mResolvedTypes)
{
auto typeInst = type->ToTypeInstance();
@ -9825,6 +9824,12 @@ BF_EXPORT const char* BF_CALLTYPE BfCompiler_GetCollapseRegions(BfCompiler* bfCo
if (typeInst->mCeTypeInfo == NULL)
continue;
if ((typeInst->mCeTypeInfo->mMayHaveUniqueEmitLocations) && (!mayHaveMissedEmits))
{
outString += "~\n";
mayHaveMissedEmits = true;
}
for (auto& kv : typeInst->mCeTypeInfo->mEmitSourceMap)
{
int partialIdx = (int)(kv.mKey >> 32);