Continue work on custom SSA; Fix double declaration in when statements

This commit is contained in:
Ginger Bill
2017-04-21 17:56:29 +01:00
parent 4d0afc55c3
commit 91ed51ff5c
10 changed files with 557 additions and 272 deletions
+6 -2
View File
@@ -11,7 +11,8 @@ typedef enum StmtFlag {
Stmt_BreakAllowed = 1<<0,
Stmt_ContinueAllowed = 1<<1,
Stmt_FallthroughAllowed = 1<<2,
Stmt_GiveAllowed = 1<<3,
Stmt_CheckScopeDecls = 1<<5,
} StmtFlag;
typedef struct BuiltinProc {
@@ -550,6 +551,10 @@ Entity *scope_lookup_entity(Scope *s, String name) {
Entity *scope_insert_entity(Scope *s, Entity *entity) {
String name = entity->token.string;
if (str_eq(name, str_lit("output"))) {
gb_printf_err("Here! %.*s\n", LIT(name));
}
HashKey key = hash_string(name);
Entity **found = map_entity_get(&s->elements, key);
@@ -1292,7 +1297,6 @@ void check_procedure_overloading(Checker *c, Entity *e) {
continue;
}
String name = p->token.string;
GB_ASSERT(p->kind == Entity_Procedure);