Parser JIT support [wip]

pull/6/head
Ibrahim Numanagić 2021-10-23 18:04:10 -07:00
parent 9e6e911f6b
commit f17c8d953c
1 changed files with 6 additions and 2 deletions

View File

@ -208,8 +208,12 @@ int jitLoop(const std::string &argv0) {
for (auto &g : cache->globals)
if (!g.second)
globalNames.push_back(g.first);
auto func = ast::TranslateVisitor::apply(cache, typechecked);
// add newly realized functions
vector<ast::StmtPtr> v;
for (auto &p : cache->pendingRealizations)
v.push_back(cache->functions[p.first].ast);
v.push_back(typechecked);
auto func = ast::TranslateVisitor::apply(cache, make_shared<ast::SuiteStmt>(v));
cache->jitCell++;
vector<ir::Var *> globalVars;