Pass a local declaration's dependencies to those it is in once checked, remove the dependency tree update, find the global initialization order in the background, and stop linking every polymorphic call's scope into its declaration's

This commit is contained in:
gingerBill committed 2026-10-05 13:20:26 +01:00
1 parent c500e68445
commit ba13344c1f
4 files changed
+62 -123

No files matched your search

+4 -5
View File
@@ -671,8 +671,10 @@ gb_internal bool find_or_generate_polymorphic_procedure(CheckerContext *old_c, E
CheckerContext nctx = *old_c;
Scope *scope = create_scope(info, base_entity->scope);
scope->flags |= ScopeFlag_Proc;
Scope *scope = create_scope(info, nullptr);
scope->parent = base_entity->scope;
scope->flags |= ScopeFlag_Proc | (base_entity->scope->flags & ScopeFlag_ContextDefined);
nctx.scope = scope;
nctx.allow_polymorphic_types = true;
nctx.polymorphic_scope = scope;
@@ -13261,9 +13263,6 @@ gb_internal ExprKind check_expr_base_internal(CheckerContext *c, Operand *o, Ast
pl->decl = decl;
check_procedure_later(ctx.checker, ctx.file, empty_token, decl, type, pl->body, pl->tags);
mutex_lock(&ctx.checker->nested_proc_lits_mutex);
array_add(&ctx.checker->nested_proc_lits, decl);
mutex_unlock(&ctx.checker->nested_proc_lits_mutex);
}
check_close_scope(&ctx);