From 2de79279a0f7157a41c0f32674ba96f56cb1b02f Mon Sep 17 00:00:00 2001 From: Tim Vaughan Date: Thu, 10 Aug 2017 22:18:33 +0200 Subject: [PATCH] Used invokelatest to work around world age issue. --- README.md | 4 ++-- src/forth.jl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 123f3c4..6f30a15 100644 --- a/README.md +++ b/README.md @@ -26,8 +26,8 @@ install it, you will therefore need to use the following command: julia> Pkg.clone("https://github.com/tgvaughan/forth.jl") -Currently, forth.jl **requires** Julia 0.5. (Incompatabilities between 0.4 and 0.5 -mean that I cannot support both versions.) +Currently, forth.jl **requires** Julia 0.6. (Incompatabilities exist between +0.6 and previous versions of julia, particularly the handling of [world age](https://github.com/JuliaLang/julia/pull/17057).) ## Usage diff --git a/src/forth.jl b/src/forth.jl index 947aafb..4c81dc3 100644 --- a/src/forth.jl +++ b/src/forth.jl @@ -1,6 +1,6 @@ module forth -import Base.REPLCompletions +import Base.REPLCompletions, Base.invokelatest # VM mem size size_mem = 1000000 # 1 mega-int @@ -123,7 +123,7 @@ function callPrim(addr::Int64) if addr >=0 || -addr>length(primitives) error("Attempted to execute non-existent primitive at address $addr.") else - primitives[-addr]() + invokelatest(primitives[-addr]) end end getPrimName(addr::Int64) = primNames[-addr] -- 2.20.1