summaryrefslogtreecommitdiffstats
path: root/tests/008/repeat.txr
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2023-10-22 12:09:17 -0700
committerKaz Kylheku <kaz@kylheku.com>2023-10-22 12:09:17 -0700
commita76f849126fd2cd1c541e8383f777b3b485ddf9e (patch)
tree38c42344e88848b4f42ffc537b0428c469f8f74d /tests/008/repeat.txr
parent9159f2fbbd4d57df6d13717acbc758a97cd97c41 (diff)
downloadtxr-a76f849126fd2cd1c541e8383f777b3b485ddf9e.tar.gz
txr-a76f849126fd2cd1c541e8383f777b3b485ddf9e.tar.bz2
txr-a76f849126fd2cd1c541e8383f777b3b485ddf9e.zip
match: translate some match-case forms into casequal.
The motivation here is that casequal brings in some optimizations not done by match-case, like hashed lookup and jump tables. * stdlib/match.tl (non-triv-pat-t): Move temporary definition higher in file since it is needed earlier in the bootsrapping. (match-case-to-casequal): New function. (match-case): Try converting clauses to casequal with new function. If that returns something, use that as the expansion, otherwise perform the normal expansion. * txr.1: Documentation revised. Existing text is wrong which says that the clauses of a caseq, caseql or casequal are always evaluated sequentially. Furthermore, now that match-case and match-ecase can be transformed to casequal, they also don't necessarily evaluate sequentially. We spell out the conditions under which they may translate.
Diffstat (limited to 'tests/008/repeat.txr')
0 files changed, 0 insertions, 0 deletions