summaryrefslogtreecommitdiffstats
path: root/lisplib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-03-23 07:33:01 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-03-23 07:33:01 -0700
commite04e3677661a1ddb8dda4ea64bbb83c68c4724ba (patch)
tree752a109b39f46dc0f951fcc542a4959620998a3c /lisplib.c
parent89257e70fba9b57de6c80f00280decf49b73cd76 (diff)
downloadtxr-e04e3677661a1ddb8dda4ea64bbb83c68c4724ba.tar.gz
txr-e04e3677661a1ddb8dda4ea64bbb83c68c4724ba.tar.bz2
txr-e04e3677661a1ddb8dda4ea64bbb83c68c4724ba.zip
compiler: optimizations in cond and if.
We optimize based on test being constant expressions. * share/txr/stdlib/compiler.tl (compiler comp-cond): Whenever a test is a constant null, we need not evaluate the forms in that case; the entire case basically disappears so we compile it to nil. We also need not consider any cases after the first case whose test is a constant true. (compiler comp-if): Optimize all situations when the test is constant.
Diffstat (limited to 'lisplib.c')
0 files changed, 0 insertions, 0 deletions