mirror of
https://github.com/Ed94/Odin.git
synced 2026-07-01 17:51:48 -07:00
Make core library use procedure groupings rather than normal overloading
This commit is contained in:
+3
-2
@@ -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
@@ -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
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user