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:
parent
010fa3b347
commit
7655e09e83
@ -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 =
|
bool isGlobal =
|
||||||
(ctx->cache->isJit && ctx->isGlobal() && getStaticGeneric(type.get()) != 0) ||
|
(ctx->cache->isJit && ctx->isGlobal() && getStaticGeneric(type.get()) == 0) ||
|
||||||
(canonical == VAR_ARGV);
|
(canonical == VAR_ARGV);
|
||||||
if (isGlobal && !getStaticGeneric(type.get()))
|
if (isGlobal && !getStaticGeneric(type.get()))
|
||||||
ctx->cache->addGlobal(canonical);
|
ctx->cache->addGlobal(canonical);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user