diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2021-01-20 18:59:57 -0800 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2021-01-20 18:59:57 -0800 |
commit | d30af5639c1a3a27452a7cd63c6f91201eac687b (patch) | |
tree | 9923feff7556bb6aa28e43e610d5bfa1c58c975e /tests/006/freeform-3.txr | |
parent | ac1405bd21d70414ea508e60f1542b4a5551f016 (diff) | |
download | txr-d30af5639c1a3a27452a7cd63c6f91201eac687b.tar.gz txr-d30af5639c1a3a27452a7cd63c6f91201eac687b.tar.bz2 txr-d30af5639c1a3a27452a7cd63c6f91201eac687b.zip |
match-case: eliminate useless initial flag test.
* share/txr/stdlib/match.tl (match-case): The first case
should not test the flag variable, the variable is false.
This compiles to a useless if instruction and unreachable code.
I tried writing a peephole rule against that instruction
sequence in an experimental peephole optimizer, but across the
entire code, it only matched in code in compiler.tl arising
out of match-case, so it is better to squash this at the
source. I won't commit the peephole optimizer until it comes
up with something that isn't better fixed elsewhere.
Diffstat (limited to 'tests/006/freeform-3.txr')
0 files changed, 0 insertions, 0 deletions