The Lambda Lab
/
projects
/
forth.jl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d320535
)
Used invokelatest to work around world age issue.
author
Tim Vaughan
<tgvaughan@gmail.com>
Thu, 10 Aug 2017 20:18:33 +0000
(22:18 +0200)
committer
Tim Vaughan
<tgvaughan@gmail.com>
Thu, 10 Aug 2017 20:18:33 +0000
(22:18 +0200)
README.md
patch
|
blob
|
history
src/forth.jl
patch
|
blob
|
history
diff --git
a/README.md
b/README.md
index
123f3c4
..
6f30a15
100644
(file)
--- 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")
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
## Usage
diff --git
a/src/forth.jl
b/src/forth.jl
index
947aafb
..
4c81dc3
100644
(file)
--- a/
src/forth.jl
+++ b/
src/forth.jl
@@
-1,6
+1,6
@@
module forth
module forth
-import Base.REPLCompletions
+import Base.REPLCompletions
, Base.invokelatest
# VM mem size
size_mem = 1000000 # 1 mega-int
# 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
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]
end
end
getPrimName(addr::Int64) = primNames[-addr]