diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2015-10-25 20:48:39 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2015-10-25 20:48:39 -0700 |
commit | 596f3633c74f5dbd90768355e389ffadfbf2e89f (patch) | |
tree | ff52b9d41fb9988eb5e4301a312a777ce76e690b /genvim.txr | |
parent | bde25e195a88a78c12d3cdac820bcfdc8a01bbca (diff) | |
download | txr-596f3633c74f5dbd90768355e389ffadfbf2e89f.tar.gz txr-596f3633c74f5dbd90768355e389ffadfbf2e89f.tar.bz2 txr-596f3633c74f5dbd90768355e389ffadfbf2e89f.zip |
TXR gets delimited continuations.
* unwind.c (sys_cont_s): New symbol variable.
(uw_pop_block): New function, supporting uw_block_end macro.
Special logic is needed for popping blocks now, because a
block can be a captured stub at the top of a continuation,
which must not be popped in the
regular manner.
(struct cont): New struct type.
(cont_destroy, cont_mark): New static functions.
(cont_ops): New static structure.
(revive_cont, capture_cont): New static functions.
(uw_capture_cont): New functions.
(uw_init): Initialize sys_cont_s.
Register sys:capture-cont intrinsic.
* unwind.h (enum uw_frtype): New enum member
UW_CAPTURED_BLOCK. When a block is captured as a stub copy of
the prompt block of a delimited continuation, its type is
changed from UW_BLOCK to this new type. This does two things:
it makes the block invisible to block-related code that does
nothing with continuations (code that looks for UW_BLOCK
and ignores anything else). Secondly, there is some special
handling related to UW_CAPTURED_BLOCK frames.
(uw_pop_block, uw_capture_cont): Declared.
(uw_block_begin): New local pointer uw_rslt introduced
which helps communicate the result variable over to the
uw_block_end macro (so we don't have to add a variable
argument to the latter).
(uw_block_end): Use uw_pop_block instead of uw_pop_frame.
* txr.1: Documented delimited continuations.
Diffstat (limited to 'genvim.txr')
0 files changed, 0 insertions, 0 deletions