summaryrefslogtreecommitdiffstats
path: root/match.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2013-12-02 06:45:25 -0800
committerKaz Kylheku <kaz@kylheku.com>2013-12-02 06:45:25 -0800
commit20aea3056274d54e32247061cbe3f0ebb71e9992 (patch)
treeebd47042b748a50b482875b2870b0d79b6f466f4 /match.c
parent980a1c1d78d838bbc13e90053ba90e02671878ae (diff)
downloadtxr-20aea3056274d54e32247061cbe3f0ebb71e9992.tar.gz
txr-20aea3056274d54e32247061cbe3f0ebb71e9992.tar.bz2
txr-20aea3056274d54e32247061cbe3f0ebb71e9992.zip
debug_check calls are the culprit triggering lookahead
in lazy lists. Changing the semantics of the data argument so that it can just be the list. * debug.c (debug): If data is a cons, then replace it with the first item. * match.c (match_files): Pass c.data to debug_check, rather than the value of if2(consp(c.data), car(c.data)) which accesses car(c.data) whether or not we are debugging. (match_fun): Likewise.
Diffstat (limited to 'match.c')
-rw-r--r--match.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/match.c b/match.c
index 746a622c..81107598 100644
--- a/match.c
+++ b/match.c
@@ -3700,8 +3700,7 @@ 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, nil);
+ debug_check(first_spec, c.bindings, c.data, c.data_lineno, nil, nil);
if (consp(first_spec) && !rest(specline)) {
val sym = first(first_spec);
@@ -3809,8 +3808,7 @@ val match_fun(val name, val args, val input, val files)
debug_enter;
- debug_check(call, c.bindings, if2(consp(c.data), car(c.data)),
- c.data_lineno, nil, nil);
+ debug_check(call, c.bindings, c.data, c.data_lineno, nil, nil);
ret = v_fun(&c);