- (and (legal-fun-name-p name)
- (eq :function (info :function :kind name))
- (let ((info (info :function :info name)))
- (and info (ir1-attributep (fun-info-attributes info)
- foldable)))
- (and (every (lambda (arg)
- (%constantp arg environment envp))
- (cdr form))
- ;; Even though the function may be marked as foldable
- ;; the call may still signal an error -- eg: (CAR 1).
- (handler-case
- (progn
- (constant-function-call-value form environment envp)
- t)
- (error () nil))))))
+ (if (and (legal-fun-name-p name)
+ (eq :function (info :function :kind name))
+ (let ((info (info :function :info name)))
+ (and info (ir1-attributep (fun-info-attributes info)
+ foldable)))
+ (and (every (lambda (arg)
+ (%constantp arg environment envp))
+ (cdr form))))
+ ;; Even though the function may be marked as foldable
+ ;; the call may still signal an error -- eg: (CAR 1).
+ (handler-case
+ (values t (constant-function-call-value form environment envp))
+ (error ()
+ (values nil nil)))
+ (values nil nil))))