diff --git a/codon/compiler/jit.cpp b/codon/compiler/jit.cpp index fce6d8e5..6e082d8e 100644 --- a/codon/compiler/jit.cpp +++ b/codon/compiler/jit.cpp @@ -140,7 +140,10 @@ llvm::Expected JIT::exec(const std::string &code) { auto *cache = compiler->getCache(); auto typechecked = ast::TypecheckVisitor::apply(cache, simplified); std::vector globalNames; + for (auto &g : cache->globals) { + if (!g.second) globalNames.push_back(g.first); + } // add newly realized functions std::vector v; std::vector frs;