Make core library use procedure groupings rather than normal overloading

This commit is contained in:
gingerBill
2017-12-04 22:01:51 +00:00
parent ebb2a9812c
commit f0de994059
16 changed files with 423 additions and 375 deletions
+3 -2
View File
@@ -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);
+1 -1
View File
@@ -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) {
+2 -1
View File
@@ -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"