diff options
| author | gingerBill <bill@gingerbill.org> | 2017-12-04 22:01:51 +0000 |
|---|---|---|
| committer | gingerBill <bill@gingerbill.org> | 2017-12-04 22:01:51 +0000 |
| commit | f0de99405982e8e2e2a121fccf81e32e4c221e8c (patch) | |
| tree | 07a78ee9d1e7803772c42bd0a04fa9624152c0e5 /src | |
| parent | ebb2a9812ced9c3f53085a57843f42b95086ae87 (diff) | |
Make core library use procedure groupings rather than normal overloading
Diffstat (limited to 'src')
| -rw-r--r-- | src/check_expr.cpp | 5 | ||||
| -rw-r--r-- | src/checker.cpp | 2 | ||||
| -rw-r--r-- | src/main.cpp | 3 |
3 files changed, 6 insertions, 4 deletions
diff --git a/src/check_expr.cpp b/src/check_expr.cpp index 21a4f7cfe..1c4c33747 100644 --- a/src/check_expr.cpp +++ b/src/check_expr.cpp @@ -4459,8 +4459,9 @@ CallArgumentData check_call_arguments(Checker *c, Operand *operand, Type *proc_t } if (operand->mode == Addressing_Overload) { - GB_ASSERT(operand->overload_entities != nullptr && - operand->overload_count > 0); + // GB_ASSERT_MSG(operand->overload_entities != nullptr && + // operand->overload_count > 0, + // "%p %td", operand->overload_entities, operand->overload_count); isize overload_count = operand->overload_count; Entity ** procs = operand->overload_entities; ValidIndexAndScore *valids = gb_alloc_array(heap_allocator(), ValidIndexAndScore, overload_count); diff --git a/src/checker.cpp b/src/checker.cpp index 78afab4ad..7c9f20135 100644 --- a/src/checker.cpp +++ b/src/checker.cpp @@ -780,7 +780,7 @@ Entity *scope_insert_entity(Scope *s, Entity *entity) { HashKey key = hash_string(name); Entity **found = map_get(&s->elements, key); -#if 1 +#ifndef DISABLE_PROCEDURE_OVERLOADING // IMPORTANT NOTE(bill): Procedure overloading code Entity *prev = nullptr; if (found) { diff --git a/src/main.cpp b/src/main.cpp index d3124528c..7f24a7d4d 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -1,7 +1,8 @@ #define ALLOW_ARRAY_PROGRAMMING - +// #define DISABLE_PROCEDURE_OVERLOADING // #define NO_ARRAY_BOUNDS_CHECK + #include "common.cpp" #include "timings.cpp" #include "build_settings.cpp" |