summaryrefslogtreecommitdiffstats
path: root/tests/012/parse.tl
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2022-10-27 06:52:35 -0700
committerKaz Kylheku <kaz@kylheku.com>2022-10-27 06:52:35 -0700
commit71d97e5ba88f57a2c9dd6d07365f41a3d786ab9f (patch)
tree21866d88439722fed85814082873401b486e1206 /tests/012/parse.tl
parente35e627e24bb2336769245d33930c3e42fc89d51 (diff)
downloadtxr-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