mirror of
https://github.com/beefytech/Beef.git
synced 2025-06-10 12:32:20 +02:00
Minor optimizations
This commit is contained in:
parent
0c955e5c66
commit
3736281ff7
4 changed files with 25 additions and 13 deletions
|
@ -125,7 +125,7 @@ void BfCodeGenDirectoryData::Write()
|
|||
if (!DirectoryExists(directory))
|
||||
{
|
||||
// Someone else (or the user) cleared this directory
|
||||
DoBfLog(2, "BfCodeGen cleared cache because '%s' was removed\n", directory.c_str());
|
||||
BfLogX(2, "BfCodeGen cleared cache because '%s' was removed\n", directory.c_str());
|
||||
mFileMap.Clear();
|
||||
return;
|
||||
}
|
||||
|
@ -312,7 +312,7 @@ void BfCodeGenThread::RunLoop()
|
|||
Val128 hash;
|
||||
Val128 orderedHash;
|
||||
|
||||
DoBfLog(2, "BfCodeGen handle %s\n", request->mOutFileName.c_str());
|
||||
BfLogX(2, "BfCodeGen handle %s\n", request->mOutFileName.c_str());
|
||||
|
||||
bool isLibWrite = (request->mOptions.mOptLevel == BfOptLevel_OgPlus) && (request->mOptions.mWriteToLib) && (!request->mOptions.mIsHotCompile);
|
||||
|
||||
|
@ -391,7 +391,7 @@ void BfCodeGenThread::RunLoop()
|
|||
hashCtx.Mixin(request->mOptions.mHash);
|
||||
beIRCodeGen->Hash(hashCtx);
|
||||
auto newOrderedHash = hashCtx.Finish128();
|
||||
DoBfLog(2, "Ordered hash for %s New:%s Old:%s\n", cacheFileName.c_str(), newOrderedHash.ToString().c_str(), orderedHash.ToString().c_str());
|
||||
BfLogX(2, "Ordered hash for %s New:%s Old:%s\n", cacheFileName.c_str(), newOrderedHash.ToString().c_str(), orderedHash.ToString().c_str());
|
||||
hasCacheMatch = newOrderedHash == orderedHash;
|
||||
|
||||
errorMsg = beIRCodeGen->mErrorMsg;
|
||||
|
@ -442,7 +442,7 @@ void BfCodeGenThread::RunLoop()
|
|||
beIRCodeGen->Process();
|
||||
errorMsg = beIRCodeGen->mErrorMsg;
|
||||
|
||||
DoBfLog(2, "Generating obj %s\n", request->mOutFileName.c_str());
|
||||
BfLogX(2, "Generating obj %s\n", request->mOutFileName.c_str());
|
||||
|
||||
BeCOFFObject coffObject;
|
||||
coffObject.mWriteToLib = request->mOptions.mWriteToLib;
|
||||
|
|
|
@ -1861,6 +1861,13 @@ public:
|
|||
#define BfLog(fmt, ...) {} // Nothing
|
||||
#endif
|
||||
|
||||
#ifdef BF_WANTS_LOG
|
||||
#define BfLogX(logIdx, fmt, ...) DoBfLog(logIdx, fmt, ##__VA_ARGS__)
|
||||
#else
|
||||
#define BfLogX(logIdx, fmt, ...) {} // Nothing
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef BF_WANTS_LOG_SYS
|
||||
#define BfLogSys(sys, fmt, ...) DoBfLog((sys)->mIsResolveOnly ? 1 : 2, fmt, ##__VA_ARGS__)
|
||||
#define BfLogSysM(fmt, ...) DoBfLog(mSystem->mIsResolveOnly ? 1 : 2, fmt, ##__VA_ARGS__)
|
||||
|
|
|
@ -9574,7 +9574,7 @@ CeContext* CeMachine::AllocContext()
|
|||
mCurEmitContext = NULL;
|
||||
mExecuteId++;
|
||||
ceContext->mStackSize = BF_CE_DEFAULT_STACK_SIZE;
|
||||
ceContext->mMemory.Resize(ceContext->mStackSize);
|
||||
ceContext->mMemory.ResizeRaw(ceContext->mStackSize);
|
||||
ceContext->mExecuteId = mExecuteId;
|
||||
ceContext->mCurHandleId = 0;
|
||||
return ceContext;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue