diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2013-12-02 06:45:25 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2013-12-02 06:45:25 -0800 |
commit | 20aea3056274d54e32247061cbe3f0ebb71e9992 (patch) | |
tree | ebd47042b748a50b482875b2870b0d79b6f466f4 | |
parent | 980a1c1d78d838bbc13e90053ba90e02671878ae (diff) | |
download | txr-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.
-rw-r--r-- | ChangeLog | 14 | ||||
-rw-r--r-- | debug.c | 2 | ||||
-rw-r--r-- | match.c | 6 |
3 files changed, 18 insertions, 4 deletions
@@ -1,3 +1,17 @@ +2013-12-02 Kaz Kylheku <kaz@kylheku.com> + + 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. + 2013-12-01 Kaz Kylheku <kaz@kylheku.com> Steps toward fixing an issue: lazy list readahead. @@ -92,6 +92,8 @@ val debug(val form, val bindings, val data, val line, val pos, val base) val loc = source_loc(form); cons_bind (lineno, file, loc); + data = if2(consp(data), car(data)); + if (!step_mode && !memqual(loc, breakpoints) && (debug_depth > next_depth)) { @@ -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); |