diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-08-26 06:57:40 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-08-26 06:57:40 -0700 |
commit | 651f19b9c774863156682272cb3bc5f392540096 (patch) | |
tree | 744729df8820fde6ebf30b1d0767e2224cc9d218 | |
parent | 6055b9712b3896861e65d009886ad4d03e5d50d6 (diff) | |
download | txr-651f19b9c774863156682272cb3bc5f392540096.tar.gz txr-651f19b9c774863156682272cb3bc5f392540096.tar.bz2 txr-651f19b9c774863156682272cb3bc5f392540096.zip |
compiler: for: bugfix: dangling label reference.
An infinite for loop in which the test is explicitly given as nil
rather than omitted fails to compile. A minimal repro test
case for this is (compile-toplevel '(for () (nil) ()))).
Spotted this while reading the compiler code.
* share/txr/stdlib/compiler.tl (compiler comp-for): Test the
test-p variable, not test, to determine whether or not to
generate the loop skip label.
-rw-r--r-- | share/txr/stdlib/compiler.tl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/share/txr/stdlib/compiler.tl b/share/txr/stdlib/compiler.tl index 8756dba3..ec76f1dd 100644 --- a/share/txr/stdlib/compiler.tl +++ b/share/txr/stdlib/compiler.tl @@ -1097,7 +1097,7 @@ ,*bfrag.code ,*nfrag.code (jmp ,lback) - ,*(if test + ,*(if test-p ^(,lskip ,*rfrag.code))) [reduce-left uni frags nil .fvars] |