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 | e9e0ecdaea431aed31b8940bf8359f52ae5d3f6c (patch) | |
tree | 744729df8820fde6ebf30b1d0767e2224cc9d218 /share | |
parent | e1d9261a6c0cacf922c7d189603bbd4bf0ba3017 (diff) | |
download | txr-e9e0ecdaea431aed31b8940bf8359f52ae5d3f6c.tar.gz txr-e9e0ecdaea431aed31b8940bf8359f52ae5d3f6c.tar.bz2 txr-e9e0ecdaea431aed31b8940bf8359f52ae5d3f6c.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.
Diffstat (limited to 'share')
-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] |