The Lambda Lab
/
projects
/
scheme.forth.jl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9094335
)
Added tail-call optimization.
author
Tim Vaughan
<tgvaughan@gmail.com>
Fri, 22 Jul 2016 08:24:41 +0000
(20:24 +1200)
committer
Tim Vaughan
<tgvaughan@gmail.com>
Fri, 22 Jul 2016 08:24:41 +0000
(20:24 +1200)
defer-is.4th
patch
|
blob
|
history
scheme.4th
patch
|
blob
|
history
diff --git
a/defer-is.4th
b/defer-is.4th
index
1b171b6
..
3949d0c
100644
(file)
--- a/
defer-is.4th
+++ b/
defer-is.4th
@@
-40,3
+40,5
@@
hide abort-defer
: goto ( cfa -- )
R> drop execute ;
+: goto-prime ( cfa -- )
+ R> R> 2drop execute ;
diff --git
a/scheme.4th
b/scheme.4th
index
cecacff
..
893b20b
100644
(file)
--- a/
scheme.4th
+++ b/
scheme.4th
@@
-981,7
+981,8
@@
defer eval
2drop ( env body )
car 2swap ( exp env )
- eval \ TODO: tail call optimization
+ ['] eval goto-prime \ Tail call optimization
+ \ eval \ No tail call optimization
endof
bold fg red ." Object not applicable. Aboring." reset-term cr