| 350 | } |
| 351 | |
| 352 | bool 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(); |
no test coverage detected