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

Method Hash

IDEHelper/Backend/BeIRCodeGen.cpp:247–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

245}
246
247void BeIRCodeGen::Hash(BeHashContext& hashCtx)
248{
249// if (mBeModule->mModuleName == "IDE_IDEApp")
250// {
251// hashCtx.mDbgViz = true;
252// NOP;
253// }
254
255 hashCtx.Mixin(mPtrSize);
256 hashCtx.Mixin(mIsOptimized);
257 if (mBeModule != NULL)
258 mBeModule->Hash(hashCtx);
259
260 Array<BeStructType*> structHashList;
261
262 for (auto beType : mBeContext->mTypes)
263 {
264 if (!beType->IsStruct())
265 continue;
266 auto beStructType = (BeStructType*)beType;
267 if (beStructType->mHashId != -1)
268 continue;
269 structHashList.Add(beStructType);
270 }
271
272 structHashList.Sort([](BeStructType* lhs, BeStructType* rhs)
273 {
274 return lhs->mName < rhs->mName;
275 });
276
277 for (auto beStructType : structHashList)
278 {
279 beStructType->HashReference(hashCtx);
280 }
281}
282
283bool BeIRCodeGen::IsModuleEmpty()
284{

Callers

nothing calls this directly

Calls 5

HashReferenceMethod · 0.80
MixinMethod · 0.45
IsStructMethod · 0.45
AddMethod · 0.45
SortMethod · 0.45

Tested by

no test coverage detected