Fix globals in JIT

pull/78/head
Ibrahim Numanagić 2022-09-29 19:32:55 -07:00
parent 010fa3b347
commit 7655e09e83
1 changed files with 1 additions and 1 deletions

View File

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