1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Refactored always-include

This commit is contained in:
Brian Fiete 2021-01-30 08:08:30 -08:00
parent c0ae4bb8f7
commit d11348a4e4
7 changed files with 276 additions and 174 deletions

View file

@ -1688,6 +1688,19 @@ void BfIRBuilder::ClearConstData()
BF_ASSERT(mStream.GetSize() == 0);
}
void BfIRBuilder::ClearNonConstData()
{
mMethodTypeMap.Clear();
mFunctionMap.Clear();
mTypeMap.Clear();
mConstMemMap.Clear();
mDITemporaryTypes.Clear();
mSavedDebugLocs.Clear();
mDeferredDbgTypeDefs.Clear();
mActiveFunction = BfIRFunction();
mInsertBlock = BfIRValue();
}
void BfIRBuilder::Start(const StringImpl& moduleName, int ptrSize, bool isOptimized)
{
mHasStarted = true;
@ -4789,7 +4802,7 @@ BfIRFunctionType BfIRBuilder::MapMethod(BfMethodInstance* methodInstance)
bool useCache = (!mModule->mIsSpecialModule) && (methodInstance->mMethodDef->mIdx >= 0);
if (useCache)
{
{
BfIRFunctionType* funcType = NULL;
if (mMethodTypeMap.TryGetValue(methodInstance, &funcType))
return *funcType;