mirror of
https://github.com/Ed94/Odin.git
synced 2026-06-25 23:14:59 -07:00
Remove dead code
This commit is contained in:
@@ -1343,7 +1343,3 @@ void check_proc_body(CheckerContext *ctx_, Token token, DeclInfo *decl, Type *ty
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
+1
-15
@@ -4089,20 +4089,7 @@ void check_import_entities(Checker *c) {
|
||||
auto path = find_import_path(c, pkg, pkg, &visited);
|
||||
defer (array_free(&path));
|
||||
|
||||
// TODO(bill): This needs better TokenPos finding
|
||||
auto const fn = [](ImportPathItem item) -> String {
|
||||
return item.pkg->name;
|
||||
};
|
||||
|
||||
#if 1
|
||||
if (path.count == 1) {
|
||||
// TODO(bill): Should this be allowed or disabled?
|
||||
#if 0
|
||||
ImportPathItem item = path[0];
|
||||
String filename = fn(item);
|
||||
error(item.decl, "Self importation of '%.*s'", LIT(filename));
|
||||
#endif
|
||||
} else if (path.count > 0) {
|
||||
if (path.count > 1) {
|
||||
ImportPathItem item = path[path.count-1];
|
||||
String pkg_name = item.pkg->name;
|
||||
error(item.decl, "Cyclic importation of '%.*s'", LIT(pkg_name));
|
||||
@@ -4113,7 +4100,6 @@ void check_import_entities(Checker *c) {
|
||||
}
|
||||
error(item.decl, "'%.*s'", LIT(pkg_name));
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
for_array(i, n->pred.entries) {
|
||||
|
||||
+4
-1
@@ -295,7 +295,10 @@ struct CheckerInfo {
|
||||
// NOTE(bill): If the semantic checker (check_proc_body) is to ever to be multithreaded,
|
||||
// these variables will be of contention
|
||||
|
||||
BlockingMutex deps_mutex; // NOT recursive & Only used in `check_proc_body`
|
||||
// NOT recursive & Only used at the end of `check_proc_body`
|
||||
// This is a possible source of contention but probably not
|
||||
// too much of a problem in practice
|
||||
BlockingMutex deps_mutex;
|
||||
|
||||
gbMutex gen_procs_mutex; // Possibly recursive
|
||||
gbMutex gen_types_mutex; // Possibly recursive
|
||||
|
||||
Reference in New Issue
Block a user