aboutsummaryrefslogtreecommitdiff
path: root/src/check_decl.cpp
diff options
context:
space:
mode:
authorgingerBill <bill@gingerbill.org>2023-01-04 13:52:38 +0000
committergingerBill <bill@gingerbill.org>2023-01-04 13:52:38 +0000
commitd4e18109da5fa051d689be84a6ecf1e77348c74e (patch)
treed2c359f5ddb40b8d82d913d7763a4944e4587a01 /src/check_decl.cpp
parentd06a0e7093c3f06a474a040385f1b9dfdfce29ad (diff)
Move walking of dependencies for procedures to just before calculating the min dep set
Diffstat (limited to 'src/check_decl.cpp')
-rw-r--r--src/check_decl.cpp31
1 files changed, 0 insertions, 31 deletions
diff --git a/src/check_decl.cpp b/src/check_decl.cpp
index 72c69b5dc..07b547feb 100644
--- a/src/check_decl.cpp
+++ b/src/check_decl.cpp
@@ -1576,36 +1576,5 @@ gb_internal bool check_proc_body(CheckerContext *ctx_, Token token, DeclInfo *de
check_scope_usage(ctx->checker, ctx->scope);
- if (decl->parent != nullptr) {
- Scope *ps = decl->parent->scope;
- if (ps->flags & (ScopeFlag_File & ScopeFlag_Pkg & ScopeFlag_Global)) {
- return true;
- } else {
- // NOTE(bill): Add the dependencies from the procedure literal (lambda)
- // But only at the procedure level
-
- rw_mutex_shared_lock(&decl->deps_mutex);
- rw_mutex_lock(&decl->parent->deps_mutex);
-
- for (Entity *e : decl->deps) {
- ptr_set_add(&decl->parent->deps, e);
- }
-
- rw_mutex_unlock(&decl->parent->deps_mutex);
- rw_mutex_shared_unlock(&decl->deps_mutex);
-
-
- rw_mutex_shared_lock(&decl->type_info_deps_mutex);
- rw_mutex_lock(&decl->parent->type_info_deps_mutex);
-
- for (Type *t : decl->type_info_deps) {
- ptr_set_add(&decl->parent->type_info_deps, t);
- }
-
- rw_mutex_unlock(&decl->parent->type_info_deps_mutex);
- rw_mutex_shared_unlock(&decl->type_info_deps_mutex);
- }
- }
-
return true;
}