Just retry again with lb_generate_missing_procedures

This commit is contained in:
gingerBill
2025-10-29 16:14:55 +00:00
committed by Jeroen van Rijn
parent d38602e788
commit 36d63b14b5

View File

@@ -2553,6 +2553,8 @@ gb_internal WORKER_TASK_PROC(lb_generate_missing_procedures_to_check_worker_proc
}
gb_internal void lb_generate_missing_procedures(lbGenerator *gen, bool do_threading) {
isize retry_count = 0;
retry:;
if (do_threading) {
for (auto const &entry : gen->modules) {
lbModule *m = entry.value;
@@ -2570,6 +2572,14 @@ gb_internal void lb_generate_missing_procedures(lbGenerator *gen, bool do_thread
for (auto const &entry : gen->modules) {
lbModule *m = entry.value;
if (m->missing_procedures_to_check.count != 0) {
if (retry_count > gen->modules.count) {
GB_ASSERT(m->missing_procedures_to_check.count == 0);
}
retry_count += 1;
goto retry;
}
GB_ASSERT(m->missing_procedures_to_check.count == 0);
GB_ASSERT(m->procedures_to_generate.count == 0);
}