mirror of
https://github.com/odin-lang/Odin.git
synced 2026-06-15 14:53:43 +00:00
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:
@@ -790,10 +790,11 @@ gb_internal bool check_using_stmt_entity(CheckerContext *ctx, AstUsingStmt *us,
|
||||
|
||||
for (auto const &entry : scope->elements) {
|
||||
String name = entry.key;
|
||||
u32 hash = entry.hash;
|
||||
Entity *decl = entry.value;
|
||||
if (!is_entity_exported(decl, true)) continue;
|
||||
|
||||
Entity *found = scope_insert_with_name(ctx->scope, name, decl);
|
||||
Entity *found = scope_insert_with_name(ctx->scope, name, hash, decl);
|
||||
if (found != nullptr) {
|
||||
gbString expr_str = expr_to_string(expr);
|
||||
error(us->token,
|
||||
|
||||
Reference in New Issue
Block a user