The Lambda Lab
/
projects
/
scheme.forth.jl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
call/cc seems to be working!
[scheme.forth.jl.git]
/
src
/
scheme.4th
diff --git
a/src/scheme.4th
b/src/scheme.4th
index
36a8106
..
9d64667
100644
(file)
--- a/
src/scheme.4th
+++ b/
src/scheme.4th
@@
-551,11
+551,16
@@
global-env obj!
depth 2- 2/ fixnum-type 2swap cons
;
depth 2- 2/ fixnum-type 2swap cons
;
-: make-continuation
+: make-continuation ( -- continuation true-obj )
+ \ true-obj allows calling code to detect whether
+ \ it is being called immediately following make-continuation
+ \ or by a restore-continuation.
cons-param-stack
cons-return-stack
cons drop continuation-type
cons-param-stack
cons-return-stack
cons drop continuation-type
+
+ true boolean-type
;
: continuation->pstack-list
;
: continuation->pstack-list
@@
-627,6
+632,10
@@
global-env obj!
2swap
2swap
+ false boolean-type \ Add flag signifying continuation restore
+
+ 2swap
+
restore-return-stack
;
restore-return-stack
;