diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-02-10 15:32:17 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-02-10 15:32:17 -0800 |
commit | 491d594929405dd79e020f68138a10dc9ac10ae7 (patch) | |
tree | 616d9d8116e7212e2b016bf0977b2872824cc674 /lib.h | |
parent | 39655edfb062034a76c0b880bf810d14d9047baa (diff) | |
download | txr-491d594929405dd79e020f68138a10dc9ac10ae7.tar.gz txr-491d594929405dd79e020f68138a10dc9ac10ae7.tar.bz2 txr-491d594929405dd79e020f68138a10dc9ac10ae7.zip |
Use non-hacky representation for deferrable warnings.
Deferrable warnings now get their own subtype, defr-warning.
The tag is a regular argument: no funny dotted argument list.
* eval.c (eval_defr_warn): Throw new style deferrable warning.
(me_op, no_warn_expand): Catch defr-warning rather than
warning. Use uw_muffle_warning to suppress it.
(gather_free_refs): Parse new representation of deferrable
warning.
(expand_with_free_refs): Catch defr-warning rather than
warning.
* lib.c (defr_warning_s): New symbol variable defined.
(obj_init): Initialize defr_warning_s.
* lib.h (defr_warning_s): Declared.
* share/txr/stdlib/error.tl (compile-defr-warning): Throw
new-style deferrable warning.
* unwind.c (uw_muffle_deferrable_warning): Function removed.
(uw_throw): Bugfix: handle warnings by checking by subtype
rather than exactly for the warning type. Distinguish
deferrable warnings by subtype rather than argument list
shape.
(uw_defer_warning): Take the new style args and reconstruct
the (msg . tag) representation for a deferred warning, so
the other functions don't have to change.
(uw_late_init): Register defr-warning as exception subtype
of warning.
* unwind.h (uw_muffle_deferrable_warning): Decl removed.
* txr.1: Adjusted all documentation touching on the subject
of the representation of deferrable warnings.
Diffstat (limited to 'lib.h')
-rw-r--r-- | lib.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -441,7 +441,8 @@ extern val eof_s, eol_s, assert_s, name_s; extern val error_s, type_error_s, internal_error_s, panic_s; extern val numeric_error_s, range_error_s; extern val query_error_s, file_error_s, process_error_s, syntax_error_s; -extern val system_error_s, timeout_error_s, warning_s, restart_s, continue_s; +extern val timeout_error_s, system_error_s; +extern val warning_s, defr_warning_s, restart_s, continue_s; extern val gensym_counter_s; #define gensym_counter (deref(lookup_var_l(nil, gensym_counter_s))) |