summaryrefslogtreecommitdiffstats
path: root/tl.vim
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2018-03-28 06:51:37 -0700
committerKaz Kylheku <kaz@kylheku.com>2018-03-28 06:51:37 -0700
commitff3da7279363941f489e210983141f55bf2c9079 (patch)
tree633ef4a73fb6c252660d04576e708bb6593f6e17 /tl.vim
parent37e839a7431520914a008c5df741e5267c16dcca (diff)
downloadtxr-ff3da7279363941f489e210983141f55bf2c9079.tar.gz
txr-ff3da7279363941f489e210983141f55bf2c9079.tar.bz2
txr-ff3da7279363941f489e210983141f55bf2c9079.zip
compiler: special case if + eq combo.
We use the ifq instruction for compiling (if (eq x y) ...) and (if (neq x y ...) rather than emitting a call to eq or neq. * share/txr/stdlib/compiler.tl (%test-funs-pos%, %test-funs-neg%, %test-funs%, %test-inv%): New global %variables. (comp-if): Recognize when test expression is one of the tests in %test-funs% and transform into (sys:ift ...) syntax. Also, minor unrelated change here: (if test) optimized away to nil if test is a constant expression. (compiler comp-ift): New method. (compiler comp-fun-form): Recognize sys:ift in operator position; hand off to comp-ift.
Diffstat (limited to 'tl.vim')
0 files changed, 0 insertions, 0 deletions