Fix compiler-macro interaction with LOAD-TIME-VALUE and CONSTANTP.

When CONSTANTP is supplied an &environment object from the compiler
macro it can determine forms involving MACROLET to be constant, but
such forms are problematic for LOAD-TIME-VALUE and its null lexical
environment execution requirements.
This commit is contained in:
Stas Boukarev
2016-04-01 12:46:11 +03:00
parent 35c5266061
commit 26aa9b68fb
2 changed files with 39 additions and 29 deletions

View File

@ -364,3 +364,11 @@ characters if there's a match."
(regex-replace-all (create-scanner "\\p{even}") "abcd" "+")
(regex-replace-all (create-scanner "\\p{true}") "abcd" "+")))
'("+b+d" "a+c+" "++++")))
(macrolet ((z () "(a)*b"))
(equalp (multiple-value-list (scan (z) "xaaabd"))
(list 1 5 #(3) #(4))))
(macrolet ((z () "[^b]*b"))
(equalp (multiple-value-list (scan-to-strings (z) "aaabd"))
(list "aaab" #())))