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

Method ProcessWorkList

IDEHelper/Compiler/BfContext.cpp:352–879  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

350}
351
352bool BfContext::ProcessWorkList(bool onlyReifiedTypes, bool onlyReifiedMethods)
353{
354 bool didAnyWork = false;
355
356 while (!mCompiler->mCanceling)
357 {
358 BfParser* resolveParser = NULL;
359 if ((mCompiler->mResolvePassData != NULL) && (!mCompiler->mResolvePassData->mParsers.IsEmpty()))
360 resolveParser = mCompiler->mResolvePassData->mParsers[0];
361
362 bool didWork = false;
363
364 //for (auto itr = mReifyModuleWorkList.begin(); itr != mReifyModuleWorkList.end(); )
365 for (int workIdx = 0; workIdx < mReifyModuleWorkList.size(); workIdx++)
366 {
367 BP_ZONE("PWL_ReifyModule");
368 if (IsCancellingAndYield())
369 break;
370
371 BfModule* module = mReifyModuleWorkList[workIdx];
372 if (module == NULL)
373 {
374 workIdx = mReifyModuleWorkList.RemoveAt(workIdx);
375 continue;
376 }
377
378 if (!module->mIsReified)
379 module->ReifyModule();
380
381 workIdx = mReifyModuleWorkList.RemoveAt(workIdx);
382
383 didWork = true;
384 }
385
386 // Do this before mPopulateTypeWorkList so we can populate any types that need rebuilding
387 // in the mPopulateTypeWorkList loop next - this is required for mFinishedModuleWorkList handling
388 for (int workIdx = 0; workIdx < (int)mMidCompileWorkList.size(); workIdx++)
389 {
390 //BP_ZONE("PWL_PopulateType");
391 if (IsCancellingAndYield())
392 break;
393
394 auto workItemRef = mMidCompileWorkList[workIdx];
395 if (workItemRef == NULL)
396 {
397 workIdx = mMidCompileWorkList.RemoveAt(workIdx);
398 continue;
399 }
400
401 BfType* type = workItemRef->mType;
402 String reason = workItemRef->mReason;
403
404 if ((onlyReifiedTypes) && (!type->IsReified()))
405 {
406 continue;
407 }
408
409 auto typeInst = type->ToTypeInstance();

Callers 3

ProcessPurgatoryMethod · 0.80
DoWorkLoopMethod · 0.80
DoCompileMethod · 0.80

Calls 15

ReifyModuleMethod · 0.80
HasSourceMethod · 0.80
GetLatestMethod · 0.80
IsDeletingMethod · 0.80
UpdateCompletionMethod · 0.80
CheckErrorAttributesMethod · 0.80
GetDefinitionMethod · 0.80
GetLastSourceMethod · 0.80
SetModuleMethod · 0.80
WantsFinishModuleMethod · 0.80
ClearModuleDataMethod · 0.80
PrepareForIRWritingMethod · 0.80

Tested by

no test coverage detected