aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2025-09-19 16:44:57 +0100
committergingerBill <gingerBill@users.noreply.github.com>2025-09-19 16:44:57 +0100
commitf36ade8c640b78c7c2343d3d2bed54a224ef3deb (patch)
tree021756c028936572693828e5ca66d854c38df1d1
parent9b8771b475a2e0a75205408b2615f69d65a329bd (diff)
Remove extra checks
-rw-r--r--src/llvm_backend_general.cpp15
1 files changed, 2 insertions, 13 deletions
diff --git a/src/llvm_backend_general.cpp b/src/llvm_backend_general.cpp
index 02f67b1b8..4b2e01c40 100644
--- a/src/llvm_backend_general.cpp
+++ b/src/llvm_backend_general.cpp
@@ -3082,12 +3082,9 @@ gb_internal lbValue lb_find_procedure_value_from_entity(lbModule *m, Entity *e)
if (found == nullptr) {
// THIS IS THE RACE CONDITION
lbProcedure *missing_proc_in_other_module = lb_create_procedure(other_module, e, false);
- if (!missing_proc_in_other_module->is_done.load(std::memory_order_relaxed)) {
- mpsc_enqueue(&other_module->missing_procedures_to_check, missing_proc_in_other_module);
- }
+ mpsc_enqueue(&other_module->missing_procedures_to_check, missing_proc_in_other_module);
}
} else {
- GB_PANIC("missing procedure: %.*s", LIT(missing_proc->name));
mpsc_enqueue(&m->missing_procedures_to_check, missing_proc);
}
@@ -3133,15 +3130,9 @@ gb_internal lbValue lb_generate_anonymous_proc_lit(lbModule *m, String const &pr
token.string = name;
Entity *e = alloc_entity_procedure(nullptr, token, type, pl->tags);
e->file = expr->file();
-
-#if 0
- e->pkg = e->file->pkg;
e->scope = e->file->scope;
- lbModule *target_module = lb_module_of_entity(gen, e, m);
-#else
lbModule *target_module = m;
-#endif
GB_ASSERT(target_module != nullptr);
// NOTE(bill): this is to prevent a race condition since these procedure literals can be created anywhere at any time
@@ -3160,9 +3151,7 @@ gb_internal lbValue lb_generate_anonymous_proc_lit(lbModule *m, String const &pr
rw_mutex_shared_unlock(&target_module->values_mutex);
if (found == nullptr) {
lbProcedure *missing_proc_in_target_module = lb_create_procedure(target_module, e, false);
- if (!missing_proc_in_target_module->is_done.load(std::memory_order_relaxed)) {
- mpsc_enqueue(&target_module->missing_procedures_to_check, missing_proc_in_target_module);
- }
+ mpsc_enqueue(&target_module->missing_procedures_to_check, missing_proc_in_target_module);
}
lbProcedure *p = lb_create_procedure(m, e, true);