MCPcopy Create free account
hub / github.com/beefytech/Beef / CheckCache

Method CheckCache

IDEHelper/Compiler/BfCodeGen.cpp:183–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181}
182
183bool BfCodeGenDirectoryData::CheckCache(const StringImpl& fileName, Val128 hash, Val128* outOrderedHash, bool disallowObjectWrite)
184{
185 if (!mVerified)
186 Verify();
187
188 BfCodeGenFileData* fileData = NULL;
189
190 if (!mFileMap.TryAdd(fileName, NULL, &fileData))
191 {
192 if ((fileData->mLastWasObjectWrite) && (disallowObjectWrite))
193 return false;
194 if (outOrderedHash != NULL)
195 *outOrderedHash = fileData->mIROrderedHash;
196 if (fileData->mIRHash == hash)
197 return true;
198 fileData->mIRHash = hash;
199 return false;
200 }
201
202 fileData->mLastWasObjectWrite = false;
203 fileData->mIRHash = hash;
204 return false;
205}
206
207void BfCodeGenDirectoryData::SetHash(const StringImpl& fileName, Val128 hash, Val128 orderedHash, bool isObjectWrite)
208{

Callers 1

RunLoopMethod · 0.80

Calls 1

TryAddMethod · 0.45

Tested by

no test coverage detected