aboutsummaryrefslogtreecommitdiff
path: root/src/checker.cpp
diff options
context:
space:
mode:
authorGinger Bill <bill@gingerbill.org>2017-06-29 11:25:05 +0100
committerGinger Bill <bill@gingerbill.org>2017-06-29 11:25:05 +0100
commitf4879d472360984f2868c406be96a4f3b473bfa4 (patch)
treeca038f5fcfad43b3d1954526b9f69bdfa080d289 /src/checker.cpp
parentfd81c06c35f1cca9153be9f78dc5ecc4ae503d0e (diff)
Update procedure names and extend demo.odin
Diffstat (limited to 'src/checker.cpp')
-rw-r--r--src/checker.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/checker.cpp b/src/checker.cpp
index 875b8d8c6..9319c7ee9 100644
--- a/src/checker.cpp
+++ b/src/checker.cpp
@@ -1218,7 +1218,7 @@ void add_dependency_to_map(Map<Entity *> *map, CheckerInfo *info, Entity *entity
return;
}
if (entity->type != NULL &&
- is_type_gen_proc(entity->type)) {
+ is_type_polymorphic(entity->type)) {
DeclInfo *decl = decl_info_of_entity(info, entity);
if (decl->gen_proc_type == NULL) {
return;
@@ -1248,11 +1248,9 @@ Map<Entity *> generate_minimum_dependency_map(CheckerInfo *info, Entity *start)
for_array(i, info->definitions.entries) {
Entity *e = info->definitions.entries[i].value;
- if (e->scope->is_global) {
- if (!is_type_gen_proc(e->type)) {
- // NOTE(bill): Require runtime stuff
- add_dependency_to_map(&map, info, e);
- }
+ if (e->scope->is_global && !is_type_polymorphic(e->type)) { // TODO(bill): is the check enough?
+ // NOTE(bill): Require runtime stuff
+ add_dependency_to_map(&map, info, e);
} else if (e->kind == Entity_Procedure) {
if ((e->Procedure.tags & ProcTag_export) != 0) {
add_dependency_to_map(&map, info, e);
@@ -2252,7 +2250,7 @@ void check_parsed_files(Checker *c) {
defer (c->context = prev_context);
TypeProc *pt = &pi->type->Proc;
- if (pt->is_generic) {
+ if (pt->is_polymorphic) {
if (pi->decl->gen_proc_type == NULL) {
continue;
}