summaryrefslogtreecommitdiffstats
path: root/match.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-04-06 13:32:17 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-04-06 13:32:17 -0700
commit61e6eee0f3af7e953fdb50b3d73e51eb32a38a1b (patch)
tree98e927f2b987060649c6d465770553daf3aa9a77 /match.c
parentc5acd13409cca8f95b7a921efc12ad8833713ffe (diff)
downloadtxr-61e6eee0f3af7e953fdb50b3d73e51eb32a38a1b.tar.gz
txr-61e6eee0f3af7e953fdb50b3d73e51eb32a38a1b.tar.bz2
txr-61e6eee0f3af7e953fdb50b3d73e51eb32a38a1b.zip
unwind: rename env frames.
Unwind frames of type ENV exist for the sake of the pattern language. Let's rename them accordingly. * match.c (tleval, tleval_progn, h_fun, tx_subst_vars, v_bind, v_output, v_filter, v_fun): Occurrences of the macros uw_env_begin and uw_env_end are renamed. * unwind.c (uw_env_stack): Renamed to uw_menv_stack. (uw_unwind_to_exit_point, uw_abscond_to_exit_point, uw_find_env, uw_pop_frame, revive_cont): Follow rename of UW_ENV to UW_MENV and uw_env_stack to uw_menv_stack. (uw_push_env): Renamed to uw_push_match_env, and updated to follow renames. * unwind.h (enum uw_frtype, uw_frtype_t): UW_ENV renamed to UW_MENV. (uw_push_env): Renamed to uw_push_match_env. (uw_env_begin, uw_env_end): Renamed to uw_match_env_begin an uw_match_env_end.
Diffstat (limited to 'match.c')
-rw-r--r--match.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/match.c b/match.c
index 30b89041..b20366c5 100644
--- a/match.c
+++ b/match.c
@@ -283,7 +283,7 @@ static val tleval(val spec, val form, val bindings)
{
val ret;
- uw_env_begin;
+ uw_match_env_begin;
if (opt_compat && opt_compat <= 121) {
uw_set_match_context(cons(spec, bindings));
@@ -297,7 +297,7 @@ static val tleval(val spec, val form, val bindings)
set_dyn_env(saved_de);
}
- uw_env_end;
+ uw_match_env_end;
return ret;
}
@@ -306,7 +306,7 @@ static val tleval_progn(val spec, val forms, val bindings)
{
val ret;
- uw_env_begin;
+ uw_match_env_begin;
if (opt_compat && opt_compat <= 121) {
uw_set_match_context(cons(spec, bindings));
@@ -320,7 +320,7 @@ static val tleval_progn(val spec, val forms, val bindings)
set_dyn_env(saved_de);
}
- uw_env_end;
+ uw_match_env_end;
return ret;
}
@@ -1404,7 +1404,7 @@ static val h_fun(match_line_ctx *c)
{
args_decl_list(args, ARGS_MIN, bindings_cp);
uw_block_begin(nil, result);
- uw_env_begin;
+ uw_match_env_begin;
debug_frame(sym, args, ub_p_a_pairs, c->bindings, c->dataline, c->data_lineno, c->pos);
uw_simple_catch_begin;
@@ -1418,7 +1418,7 @@ static val h_fun(match_line_ctx *c)
uw_catch_end;
debug_end;
- uw_env_end;
+ uw_match_env_end;
uw_block_end;
if (!result) {
@@ -1671,7 +1671,7 @@ static val tx_subst_vars(val spec, val bindings, val filter)
{
if (opt_compat && opt_compat <= 128) {
list_collect_decl(out, iter);
- uw_env_begin;
+ uw_match_env_begin;
uw_set_match_context(cons(spec, bindings));
@@ -1737,7 +1737,7 @@ static val tx_subst_vars(val spec, val bindings, val filter)
spec = cdr(spec);
}
- uw_env_end;
+ uw_match_env_end;
return out;
} else {
val saved_de = set_dyn_env(make_env(bindings, nil, nil));
@@ -3644,12 +3644,12 @@ static val v_bind(match_files_ctx *c)
testfun = curry_1234_34(func_n4(filter_equal), lfilt, rfilt);
}
- uw_env_begin;
+ uw_match_env_begin;
uw_set_match_context(cons(c->spec, c->bindings));
c->bindings = dest_bind(specline, c->bindings, pattern, value, testfun);
- uw_env_end;
+ uw_match_env_end;
if (c->bindings == t)
return nil;
@@ -3736,7 +3736,7 @@ static val v_output(match_files_ctx *c)
val stream = nil;
val ret = next_spec_k;
- uw_env_begin;
+ uw_match_env_begin;
val saved_de = set_dyn_env(make_env(c->bindings, nil, nil));
@@ -3862,7 +3862,7 @@ static val v_output(match_files_ctx *c)
out:
set_dyn_env(saved_de);
- uw_env_end;
+ uw_match_env_end;
return ret;
}
@@ -4118,7 +4118,7 @@ static val v_filter(match_files_ctx *c)
if (!filter)
sem_error(specline, lit("~s specifies unknown filter"), filter_spec, nao);
- uw_env_begin;
+ uw_match_env_begin;
uw_set_match_context(cons(c->spec, c->bindings));
for (; vars; vars = cdr(vars)) {
@@ -4127,7 +4127,7 @@ static val v_filter(match_files_ctx *c)
rplacd(existing, filter_string_tree(filter, cdr(existing)));
}
- uw_env_end;
+ uw_match_env_end;
return next_spec_k;
}
@@ -4181,7 +4181,7 @@ static val v_fun(match_files_ctx *c)
{
args_decl_list(args, ARGS_MIN, bindings_cp);
uw_block_begin(nil, result);
- uw_env_begin;
+ uw_match_env_begin;
debug_frame(sym, args, ub_p_a_pairs, c->bindings, if2(consp(c->data), car(c->data)),
c->data_lineno, nil);
@@ -4196,7 +4196,7 @@ static val v_fun(match_files_ctx *c)
uw_catch_end;
debug_end;
- uw_env_end;
+ uw_match_env_end;
uw_block_end;
if (!result) {