From 0a716217822fc2e74500ce935f5d4276c6a29eaf Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 22 Feb 2021 09:03:49 -0800 Subject: 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. --- tests/008/call-2.expected | 0 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 tests/008/call-2.expected (limited to 'tests/008/call-2.expected') diff --git a/tests/008/call-2.expected b/tests/008/call-2.expected new file mode 100644 index 00000000..e69de29b -- cgit v1.2.3