From a5ef086fc33cfbfce7b03bad291efa28acf739b2 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Wed, 28 Oct 2015 20:18:20 -0700 Subject: Implementing sys:abscond-from operator. * eval.c (sys_abscond_from_s): New symbol variable. (op_abscond_from): New static function. (do_expand): Handle abscond-from like return-from. (eval_init): Initialize sys_abscond_from_s and register sys:abscond-from operator. * share/txr/stdlib/yield.tl (yield-from): Use sys:abscond-from instead of return-from, to avoid tearing down the continuation's resources that it may need when restarted. * txr.1: Documented sys:abscond-from and added a mention to the Delimited Continuations introduction. * unwind.c (uw_abscond_to_exit_point): New static function. (uw_block_abscond): New function. * unwind.h (uw_block_abscond): Declared. --- unwind.h | 1 + 1 file changed, 1 insertion(+) (limited to 'unwind.h') diff --git a/unwind.h b/unwind.h index a9b456ae..bcf8d185 100644 --- a/unwind.h +++ b/unwind.h @@ -102,6 +102,7 @@ INLINE val uw_block_return(val tag, val result) { return uw_block_return_proto(tag, result, nil); } +val uw_block_abscond(val tag, val result); void uw_push_catch(uw_frame_t *, val matches); void uw_push_handler(uw_frame_t *, val matches, val fun); noreturn val uw_throw(val sym, val exception); -- cgit v1.2.3