summaryrefslogtreecommitdiffstats
path: root/mpi/mpi.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2020-04-20 06:34:57 -0700
committerKaz Kylheku <kaz@kylheku.com>2020-04-20 06:34:57 -0700
commit1d605f0a476e7c5f82a071bc040e93c937f608a3 (patch)
treed974c0a4ffcdcd158b8ab3a5ddf471089b1e70f2 /mpi/mpi.c
parent43cb3c308a20783a6ff7cf398ecf4722256cf0fb (diff)
downloadtxr-1d605f0a476e7c5f82a071bc040e93c937f608a3.tar.gz
txr-1d605f0a476e7c5f82a071bc040e93c937f608a3.tar.bz2
txr-1d605f0a476e7c5f82a071bc040e93c937f608a3.zip
compiler: bugfix: constant test in 2 or 3 arg if.
* share/txr/stdlib/compiler.tl (compiler comp-if): The two and three argument cases assume that if the test is a constant expression, the consequent "then" should be unconditionally taken. The correct behavior is to evaluate the constant, which could yield nil. I checked which library code changes after this fix, and found that a number of (defset ...) forms are generating different, shorter code. This is due to (if ',restpar (if (consp ,restpar) ...)) in defset-expander. The intent there was to eliminate the inner if code entirely if respar is nil (there is no rest parameter); due to this bug, the code elimination didn't happen. The behavior is nevertheless correct because the code does nothing if restpar is nil.
Diffstat (limited to 'mpi/mpi.c')
0 files changed, 0 insertions, 0 deletions