aboutsummaryrefslogtreecommitdiff
path: root/src/check_expr.cpp
diff options
context:
space:
mode:
authorgingerBill <gingerBill@users.noreply.github.com>2025-09-19 11:01:41 +0100
committergingerBill <gingerBill@users.noreply.github.com>2025-09-19 11:01:41 +0100
commit6ce889f4ebf10d44fc6c1e5fba794e412dfcf183 (patch)
tree89845f7684f36fd690ed6f90b4e0f7b875f06604 /src/check_expr.cpp
parent5f76d6ce15d6518f327b89ab111a6a90a832d81d (diff)
`Entity *` to `std::atomic<Entity *>` to remove the need for a PtrMap+Mutex
Diffstat (limited to 'src/check_expr.cpp')
-rw-r--r--src/check_expr.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp
index d2505c047..d863d6cf6 100644
--- a/src/check_expr.cpp
+++ b/src/check_expr.cpp
@@ -608,7 +608,7 @@ gb_internal bool find_or_generate_polymorphic_procedure(CheckerContext *old_c, E
entity->flags |= EntityFlag_Disabled;
}
- d->entity = entity;
+ d->entity.store(entity);
AstFile *file = nullptr;
{
@@ -8335,9 +8335,10 @@ gb_internal ExprKind check_call_expr(CheckerContext *c, Operand *operand, Ast *c
if (c->curr_proc_decl == nullptr) {
error(call, "Calling a '#force_inline' procedure that enables target features is not allowed at file scope");
} else {
- GB_ASSERT(c->curr_proc_decl->entity);
- GB_ASSERT(c->curr_proc_decl->entity->type->kind == Type_Proc);
- String scope_features = c->curr_proc_decl->entity->type->Proc.enable_target_feature;
+ Entity *e = c->curr_proc_decl->entity.load();
+ GB_ASSERT(e);
+ GB_ASSERT(e->type->kind == Type_Proc);
+ String scope_features = e->type->Proc.enable_target_feature;
if (!check_target_feature_is_superset_of(scope_features, pt->Proc.enable_target_feature, &invalid)) {
ERROR_BLOCK();
error(call, "Inlined procedure enables target feature '%.*s', this requires the calling procedure to at least enable the same feature", LIT(invalid));