diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-02-22 09:03:49 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-02-22 09:03:49 -0800 |
commit | 0a716217822fc2e74500ce935f5d4276c6a29eaf (patch) | |
tree | 4185052bce47ca38a59277212bbf7b658ce1f5dc /strudel.h | |
parent | 54c3c4929abf062717f36712cd20dc4873c8d04c (diff) | |
download | txr-0a716217822fc2e74500ce935f5d4276c6a29eaf.tar.gz txr-0a716217822fc2e74500ce935f5d4276c6a29eaf.tar.bz2 txr-0a716217822fc2e74500ce935f5d4276c6a29eaf.zip |
txr: bugfix: give @(call) same semantics as direct call.
The @(call) directive is buggy in the following ways, which
cause an indirect call to behave differently from a direct call.
It creates a new context, and so if the opening of a data
source is deferred into the indirectly called function, that
data source is lost when the indirect call terminates.
Furthermore, if a data source is already established, there
is no progress through the data: two consecutive @(call ...)
directives operate on the same data.
It also fails to implement vertical to horizontal fallback; if
a function is not vertically defined, the directive fails.
* match.c (v_call): Rewrite the core logic in the following
way: we rewrite the indirect @(call) syntax into direct call
syntax, substitute that into c->spec, and then just
call v_fun.
* tests/008/call-2.expected: New file.
* tests/008/call-2.txr: New file. Test fails before this commit
because both calls are matching against the same "A" element
of the list.
Diffstat (limited to 'strudel.h')
0 files changed, 0 insertions, 0 deletions