X-Git-Url: https://thelambdalab.xyz/gitweb/index.cgi?p=scheme.forth.jl.git;a=blobdiff_plain;f=src%2Fscheme.4th;fp=src%2Fscheme.4th;h=027a1938634e528fd8dadc2bee859d39bfc71c9a;hp=934775080aa276c352d852a1b9b525904bf28442;hb=c775ab2562b213ac96fe1803d4e7001a73e874a8;hpb=b79c6f19d9756f83f10a4653a7661fa33f191588 diff --git a/src/scheme.4th b/src/scheme.4th index 9347750..027a193 100644 --- a/src/scheme.4th +++ b/src/scheme.4th @@ -597,6 +597,8 @@ global-env obj! 2drop ; +( This word restores the return stack to that contained in the +continuation object, and thus NEVER RETURNS. ) : restore-return-stack ( continuation -- ) continuation->rstack-list @@ -618,6 +620,15 @@ global-env obj! 2drop ; +( This word restores the parameter and return stacks +to those in the continuation object. The restoration of the +return stack means that execution continues at the point +described in the continuation object, so this word NEVER RETURNS. + +Note that both obj and a false-obj are added to the parameter +stack before the return stack is restored, so that make-continuation +knows that this execution path is the result of a continuation +restoration rather than the original call to make-continuation. ) : restore-continuation-with-arg ( continuation obj -- ) >R >R \ Store obj on return stack