diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2022-10-27 06:52:35 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2022-10-27 06:52:35 -0700 |
commit | 71d97e5ba88f57a2c9dd6d07365f41a3d786ab9f (patch) | |
tree | 21866d88439722fed85814082873401b486e1206 /tests/012/parse.tl | |
parent | e35e627e24bb2336769245d33930c3e42fc89d51 (diff) | |
download | txr-71d97e5ba88f57a2c9dd6d07365f41a3d786ab9f.tar.gz txr-71d97e5ba88f57a2c9dd6d07365f41a3d786ab9f.tar.bz2 txr-71d97e5ba88f57a2c9dd6d07365f41a3d786ab9f.zip |
compiler: optimizations in catch.
* stdlib/compiler.tl (comp-catch): Under an optimization level
of at least 1, if no symbols are being caught, or if the
try expression is a safe constant expression, then just
compile the try expression. Furthermore, if there is only one
exception symbol being caught, and a catch clause is for a
subtype of that symbol, we eliminate the run-time
exception-subtype-p test. This will always be true if the catch
macros are being used, because the list of symbols is derived
from the clauses. Lastly, if there is only one exception symbol
being caught, any clause which doesn't match that symbol is
now eliminated as dead code. That shouldn't happen unless
the sys:catch operator is used directly.
Diffstat (limited to 'tests/012/parse.tl')
0 files changed, 0 insertions, 0 deletions