Disable polymorphic overloading in the global scope

TODO: Figure out why it does not work in the global scope
This commit is contained in:
Ginger Bill
2017-07-02 22:08:39 +01:00
parent 96d32680fe
commit bc16b290ba
12 changed files with 276 additions and 222 deletions
+11 -4
View File
@@ -44,8 +44,6 @@ enum BuiltinProcId {
BuiltinProc_compile_assert,
BuiltinProc_copy,
BuiltinProc_swizzle,
BuiltinProc_complex,
@@ -92,8 +90,6 @@ gb_global BuiltinProc builtin_procs[BuiltinProc_COUNT] = {
{STR_LIT("compile_assert"), 1, false, Expr_Expr},
{STR_LIT("copy"), 2, false, Expr_Expr},
{STR_LIT("swizzle"), 1, true, Expr_Expr},
{STR_LIT("complex"), 2, false, Expr_Expr},
@@ -204,6 +200,7 @@ struct ProcedureInfo {
Type * type; // Type_Procedure
AstNode * body; // AstNode_BlockStmt
u64 tags;
bool generated_from_polymorphic;
};
// ExprInfo stores information used for "untyped" expressions
@@ -241,6 +238,16 @@ struct Scope {
};
gb_global Scope *universal_scope = NULL;
void scope_reset(Scope *scope) {
if (scope == NULL) return;
scope->first_child = NULL;
scope->last_child = NULL;
map_clear (&scope->elements);
map_clear (&scope->implicit);
array_clear(&scope->shared);
array_clear(&scope->imported);
}
struct DelayedDecl {