X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=scheme.forth.jl.git;a=blobdiff_plain;f=src%2Fscheme.4th;h=9d646677e32ac788581914cb3201462bb417f51f;hp=36a8106236fb9e4910a51d4cc0d11ea09de439d7;hb=f1f104259426dc77ec46ae1ac3bda65fcc19a034;hpb=effe46c25202697eecbecb427828f466a710c8bc diff --git a/src/scheme.4th b/src/scheme.4th index 36a8106..9d64667 100644 --- a/src/scheme.4th +++ b/src/scheme.4th @@ -551,11 +551,16 @@ global-env obj! 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 + + true boolean-type ; : continuation->pstack-list @@ -627,6 +632,10 @@ global-env obj! 2swap + false boolean-type \ Add flag signifying continuation restore + + 2swap + restore-return-stack ;