diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2016-04-11 21:17:30 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2016-04-11 21:17:30 -0700 |
commit | 313f2a76069064fa2262e4aec5526a30c2fba047 (patch) | |
tree | 865239cc78564dbffe92b012c700cb6abcf9e330 | |
parent | 9a830ff3d6d8d7ef575c2b4649cfc281e847e3c7 (diff) | |
download | txr-313f2a76069064fa2262e4aec5526a30c2fba047.tar.gz txr-313f2a76069064fa2262e4aec5526a30c2fba047.tar.bz2 txr-313f2a76069064fa2262e4aec5526a30c2fba047.zip |
Remove frame popping action from uw_continue.
* unwind.c (uw_continue): Don't take the current frame as an
argument and consequently don't pop the current frame. This
function currently has only one use, the uw_catch_end macro.
* unwind.h (uw_continue): Declaration
updated.
(uw_catch_end): Slight code rearrangement: pop the frame
unconditionally before the test for whether uw_continue must
be called.
-rw-r--r-- | unwind.c | 3 | ||||
-rw-r--r-- | unwind.h | 7 |
2 files changed, 4 insertions, 6 deletions
@@ -681,9 +681,8 @@ val uw_register_subtype(val sub, val sup) return sup; } -void uw_continue(uw_frame_t *current, uw_frame_t *cont) +void uw_continue(uw_frame_t *cont) { - uw_pop_frame(current); uw_exit_point = cont; uw_unwind_to_exit_point(); } @@ -122,7 +122,7 @@ noreturn val uw_errorf(val fmt, ...); noreturn val uw_errorfv(val fmt, struct args *args); val uw_register_subtype(val sub, val super); val uw_exception_subtype_p(val sub, val sup); -void uw_continue(uw_frame_t *curr, uw_frame_t *target); +void uw_continue(uw_frame_t *target); void uw_push_guard(uw_frame_t *); void uw_push_debug(uw_frame_t *, val func, struct args *, val ub_p_a_pairs, val env, val data, @@ -217,10 +217,9 @@ noreturn val type_mismatch(val, ...); default: \ abort(); \ } \ - if (uw_catch.ca.cont) \ - uw_continue(&uw_catch, \ - uw_catch.ca.cont); \ uw_pop_frame(&uw_catch); \ + if (uw_catch.ca.cont) \ + uw_continue(uw_catch.ca.cont); \ } while(0) #define internal_error(STR) \ |