X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?a=blobdiff_plain;f=src%2Fscheme-primitives.4th;h=dbb68bc63aa56f57386a9b9d7c96eadcd4558cff;hb=c775ab2562b213ac96fe1803d4e7001a73e874a8;hp=a9b47413b7143ab70f5d22213d746a9959e33f1d;hpb=f1f104259426dc77ec46ae1ac3bda65fcc19a034;p=scheme.forth.jl.git diff --git a/src/scheme-primitives.4th b/src/scheme-primitives.4th index a9b4741..dbb68bc 100644 --- a/src/scheme-primitives.4th +++ b/src/scheme-primitives.4th @@ -610,6 +610,14 @@ defer display :noname ( proc -- result ) make-continuation + ( Note that we get to this point either when + make-continuation is originally called or when + restore-continuation is called. Since we don't + want to call proc again following a restore, + we use the boolean values placed on the parameter + stack by make-continuation and restore-continuation + to detect which call got us here and act accordingly. ) + drop if nil cons 2swap apply @@ -617,8 +625,6 @@ defer display 2swap 2drop then - trace - ; 1 make-fa-primitive call-with-current-continuation \ }}}