From 6c73f9d3fdc0249485ffc1e3314f1ed2750b60d0 Mon Sep 17 00:00:00 2001 From: Ginger Bill Date: Sun, 20 Aug 2017 18:28:21 +0100 Subject: Global variable dependency initialization ordering Fuck graph theory --- src/ssa.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ssa.cpp') diff --git a/src/ssa.cpp b/src/ssa.cpp index 5862cca20..25afef118 100644 --- a/src/ssa.cpp +++ b/src/ssa.cpp @@ -159,7 +159,7 @@ struct ssaModule { gbAllocator tmp_allocator; gbArena tmp_arena; - Map min_dep_map; // Key: Entity * + PtrSet min_dep_map; Map values; // Key: Entity * // List of registers for the specific architecture Array registers; @@ -2464,7 +2464,7 @@ bool ssa_generate(Parser *parser, CheckerInfo *info) { continue; } - if (map_get(&m.min_dep_map, hash_pointer(e)) == nullptr) { + if (!ptr_set_exists(&m.min_dep_map, e)) { // NOTE(bill): Nothing depends upon it so doesn't need to be built continue; } -- cgit v1.2.3