mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-14 14:24:10 +02:00
Improved emit marker when specialized type has no emission
This commit is contained in:
parent
5083f5d64e
commit
e852ba49bb
1 changed files with 20 additions and 23 deletions
|
@ -9782,29 +9782,26 @@ BF_EXPORT const char* BF_CALLTYPE BfCompiler_GetCollapseRegions(BfCompiler* bfCo
|
||||||
|
|
||||||
if (typeHashSet.Contains(typeInst->mTypeDef->GetLatest()))
|
if (typeHashSet.Contains(typeInst->mTypeDef->GetLatest()))
|
||||||
{
|
{
|
||||||
if (typeInst->IsSpecializedType())
|
if (typeInst->mCeTypeInfo == NULL)
|
||||||
|
continue;
|
||||||
|
|
||||||
|
for (auto& kv : typeInst->mCeTypeInfo->mEmitSourceMap)
|
||||||
{
|
{
|
||||||
if (typeInst->mCeTypeInfo == NULL)
|
int partialIdx = (int)(kv.mKey >> 32);
|
||||||
continue;
|
int charIdx = (int)(kv.mKey & 0xFFFFFFFF);
|
||||||
|
|
||||||
for (auto& kv : typeInst->mCeTypeInfo->mEmitSourceMap)
|
auto typeDef = typeInst->mTypeDef;
|
||||||
{
|
if (partialIdx > 0)
|
||||||
int partialIdx = (int)(kv.mKey >> 32);
|
typeDef = typeDef->mPartials[partialIdx];
|
||||||
int charIdx = (int)(kv.mKey & 0xFFFFFFFF);
|
|
||||||
|
|
||||||
auto typeDef = typeInst->mTypeDef;
|
auto emitParser = typeInst->mTypeDef->GetLastSource()->ToParser();
|
||||||
if (partialIdx > 0)
|
|
||||||
typeDef = typeDef->mPartials[partialIdx];
|
|
||||||
|
|
||||||
auto emitParser = typeInst->mTypeDef->GetLastSource()->ToParser();
|
Dictionary<int, _EmitSource>* map = NULL;
|
||||||
|
emitLocMap.TryAdd(typeDef->GetLatest(), NULL, &map);
|
||||||
Dictionary<int, _EmitSource>* map = NULL;
|
_EmitSource emitSource;
|
||||||
emitLocMap.TryAdd(typeDef->GetLatest(), NULL, &map);
|
emitSource.mEmitParser = emitParser;
|
||||||
_EmitSource emitSource;
|
emitSource.mIsPrimary = false;
|
||||||
emitSource.mEmitParser = emitParser;
|
(*map)[charIdx] = emitSource;
|
||||||
emitSource.mIsPrimary = false;
|
|
||||||
(*map)[charIdx] = emitSource;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue