mirror of
https://gitlab.com/embeddable-common-lisp/ecl.git
synced 2026-02-04 22:50:39 -08:00
CONSTANT-EXPRESSION-P now checks whether the 1-form is pure before checking the arguments.
This commit is contained in:
parent
67c76f0ad4
commit
faa39d2f50
1 changed files with 4 additions and 4 deletions
|
|
@ -17,12 +17,12 @@
|
|||
(defun constant-expression-p (form &optional (env *cmp-env*))
|
||||
(or (constantp form env)
|
||||
(and (consp form)
|
||||
(loop for c in (rest form)
|
||||
always (constant-expression-p c env))
|
||||
(let ((head (car form)))
|
||||
(let ((head (car form)))
|
||||
(or (member head '(IF OR AND NULL NOT PROGN))
|
||||
(and (get-sysprop head 'pure)
|
||||
(inline-possible head)))))))
|
||||
(inline-possible head))))
|
||||
(loop for c in (rest form)
|
||||
always (constant-expression-p c env)))))
|
||||
|
||||
(defun extract-constant-value (form &optional failure (env *cmp-env*))
|
||||
(if (constant-expression-p form env)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue