Replace Scope.elements to use a custom hash map ScopeMap

This hash map is robin hood based with a inline slot amount for small scopes
This commit is contained in:
gingerBill
2026-03-16 17:41:58 +00:00
parent 1744f57d01
commit 36d5a19115
10 changed files with 374 additions and 81 deletions

View File

@@ -514,7 +514,7 @@ gb_internal bool find_or_generate_polymorphic_procedure(CheckerContext *old_c, E
// NOTE(bill): Reset scope from the failed procedure type
scope->head_child.store(nullptr, std::memory_order_relaxed);
string_map_clear(&scope->elements);
scope_map_clear(&scope->elements);
ptr_set_clear(&scope->imported);
// LEAK NOTE(bill): Cloning this AST may be leaky but this is not really an issue due to arena-based allocation