The Lambda Lab
/
projects
/
forth.jl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Used invokelatest to work around world age issue.
[forth.jl.git]
/
src
/
forth.jl
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]