1
0
mirror of https://github.com/exaloop/codon.git synced 2025-06-03 15:03:52 +08:00

Fix globals in JIT

This commit is contained in:
Ibrahim Numanagić 2022-09-29 20:57:34 -07:00
parent d5741a27e0
commit 0622bb42e1

View File

@ -154,7 +154,7 @@ StmtPtr SimplifyVisitor::transformAssignment(ExprPtr lhs, ExprPtr rhs, ExprPtr t
} }
// Register all toplevel variables as global in JIT mode // Register all toplevel variables as global in JIT mode
bool isGlobal = (ctx->cache->isJit && val->isGlobal() && !val->isGeneric() == 0) || bool isGlobal = (ctx->cache->isJit && val->isGlobal() && !val->isGeneric()) ||
(canonical == VAR_ARGV); (canonical == VAR_ARGV);
if (isGlobal && !val->isGeneric()) if (isGlobal && !val->isGeneric())
ctx->cache->addGlobal(canonical); ctx->cache->addGlobal(canonical);