summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2012-01-21 10:44:10 -0800
committerKaz Kylheku <kaz@kylheku.com>2012-01-21 10:44:10 -0800
commit66ab83b942d8f0f6a4c27f171b361e08680f5a34 (patch)
treef824c47e5c22f0583ef4ff82072487a53f133201
parentb7bdc308cd6ce4dd4d3dd68c16eec792652f8c39 (diff)
downloadtxr-66ab83b942d8f0f6a4c27f171b361e08680f5a34.tar.gz
txr-66ab83b942d8f0f6a4c27f171b361e08680f5a34.tar.bz2
txr-66ab83b942d8f0f6a4c27f171b361e08680f5a34.zip
* match.c (v_fun): Removing all debugging instrumentation.
(match_files): Moving debug_check out of directive case so it covers all forms handled by loop. All this makes the n command in the debugger work better: not skip over function calls or horizontal material.
-rw-r--r--ChangeLog8
-rw-r--r--match.c19
2 files changed, 15 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index d660916b..c2f93173 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2012-01-21 Kaz Kylheku <kaz@kylheku.com>
+ * match.c (v_fun): Removing all debugging instrumentation.
+ (match_files): Moving debug_check out of directive case so
+ it covers all forms handled by loop. All this makes the n
+ command in the debugger work better: not skip over
+ function calls or horizontal material.
+
+2012-01-21 Kaz Kylheku <kaz@kylheku.com>
+
Improved debugging. Debug nesting depth counter maintained
and used for next/step/finish stepping.
diff --git a/match.c b/match.c
index e8d50118..47591669 100644
--- a/match.c
+++ b/match.c
@@ -3229,8 +3229,6 @@ static val v_eof(match_files_ctx *c)
static val v_fun(match_files_ctx *c)
{
- debug_enter;
-
spec_bind (specline, first_spec, c->spec);
val sym = first(first_spec);
val func = car(uw_get_func(sym));
@@ -3243,8 +3241,6 @@ static val v_fun(match_files_ctx *c)
val piter, aiter;
val bindings_cp = copy_list(c->bindings);
- debug_check(specline, c->bindings, if2(consp(c->data), car(c->data)), c->data_lineno, nil);
-
if (!equal(length_list(args), length_list(params)))
sem_error(specline, lit("function ~a takes ~a argument(s)"),
sym, length_list(params), nao);
@@ -3281,7 +3277,7 @@ static val v_fun(match_files_ctx *c)
if (!result) {
debuglf(specline, lit("function (~s ~s) failed"), sym, args, nao);
- debug_return (nil);
+ return nil;
}
{
@@ -3300,7 +3296,7 @@ static val v_fun(match_files_ctx *c)
debuglf(specline,
lit("binding mismatch on ~a "
"when returning from ~a"), arg, sym, nao);
- debug_return (nil);
+ return nil;
}
}
}
@@ -3321,12 +3317,10 @@ static val v_fun(match_files_ctx *c)
}
}
- debug_return (next_spec_k);
+ return next_spec_k;
}
- debug_return (decline_k);
-
- debug_leave;
+ return decline_k;
}
static val v_do(match_files_ctx *c)
@@ -3396,6 +3390,8 @@ repeat_spec_same_data:
{
spec_bind (specline, first_spec, c.spec);
+ debug_check(first_spec, c.bindings, if2(consp(c.data), car(c.data)), c.data_lineno, nil);
+
if (consp(first_spec) && !rest(specline)) {
val sym = first(first_spec);
val entry = gethash(v_directive_table, sym);
@@ -3404,8 +3400,6 @@ repeat_spec_same_data:
v_match_func vmf = (v_match_func) cptr_get(entry);
val result;
- debug_check(first_spec, c.bindings, if2(consp(c.data), car(c.data)), c.data_lineno, nil);
-
result = vmf(&c);
if (result == next_spec_k) {
@@ -3435,6 +3429,7 @@ repeat_spec_same_data:
if (c.data)
{
val dataline = first(c.data);
+
cons_bind (new_bindings, success,
match_line(ml_all(c.bindings, specline, dataline, zero,
c.data_lineno, first(c.files))));