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:
6162399
)
debugging compilation
author
Tim Vaughan
<tgvaughan@gmail.com>
Sat, 7 May 2016 05:33:27 +0000
(17:33 +1200)
committer
Tim Vaughan
<tgvaughan@gmail.com>
Sat, 7 May 2016 05:33:27 +0000
(17:33 +1200)
src/forth.jl
patch
|
blob
|
history
diff --git
a/src/forth.jl
b/src/forth.jl
index
90cf1cf
..
940e6f3
100644
(file)
--- a/
src/forth.jl
+++ b/
src/forth.jl
@@
-820,29
+820,30
@@
INTERPRET = defWord("INTERPRET",
DUP, FETCH, ZE, ZBRANCH, 3,
DROP, EXIT, # Exit if TIB is exhausted
DUP, FETCH, ZE, ZBRANCH, 3,
DROP, EXIT, # Exit if TIB is exhausted
- STATE_CFA, FETCH, ZBRANCH,
28
,
+ STATE_CFA, FETCH, ZBRANCH,
32
,
# Compiling
# Compiling
- DUP, FIND,
ZBRANCH, 17
,
+ DUP, FIND,
QDUP, ZBRANCH, 19
,
# Found word.
# Found word.
+ SWAP, DROP,
DUP, TOCFA, SWAP, INCR, FETCH, LIT, F_IMMED, AND, ZBRANCH, 4,
# Immediate: Execute!
DUP, TOCFA, SWAP, INCR, FETCH, LIT, F_IMMED, AND, ZBRANCH, 4,
# Immediate: Execute!
- EXECUTE, BRANCH, -3
0
,
+ EXECUTE, BRANCH, -3
3
,
# Not immediate: Compile!
# Not immediate: Compile!
- COMMA, BRANCH, -3
3
,
+ COMMA, BRANCH, -3
6
,
# No word found, parse number
# No word found, parse number
- BTICK, LIT, COMMA,
NUMBER, COMMA, BRANCH, -40
,
+ BTICK, LIT, COMMA,
TRACE, NUMBER, COMMA, BRANCH, -44
,
# Interpreting
DUP, FIND, QDUP, ZBRANCH, 7,
# Found word. Execute!
# Interpreting
DUP, FIND, QDUP, ZBRANCH, 7,
# Found word. Execute!
- SWAP, DROP, TOCFA, EXECUTE, BRANCH, -5
1
,
+ SWAP, DROP, TOCFA, EXECUTE, BRANCH, -5
5
,
# No word found, parse number and leave on stack
# No word found, parse number and leave on stack
- NUMBER, BRANCH, -5
4
,
+ NUMBER, BRANCH, -5
8
,
EXIT]
)
EXIT]
)