diff options
author | Andrea Corallo <akrl@sdf.org> | 2020-12-02 22:45:00 +0100 |
---|---|---|
committer | Andrea Corallo <akrl@sdf.org> | 2020-12-05 19:01:03 +0100 |
commit | 1fb249f6db1ae87ee3ddd221ab9c8d152951efe7 (patch) | |
tree | 77126244e1c32a8de8d07274ae916a9157d780c4 /lisp/emacs-lisp/comp-cstr.el | |
parent | 9b85ae6aa5d73649c0a48d5168d4de52ee83ac28 (diff) | |
download | emacs-1fb249f6db1ae87ee3ddd221ab9c8d152951efe7.tar.gz emacs-1fb249f6db1ae87ee3ddd221ab9c8d152951efe7.tar.bz2 emacs-1fb249f6db1ae87ee3ddd221ab9c8d152951efe7.zip |
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-union-no-range): Cosmetic.
Diffstat (limited to 'lisp/emacs-lisp/comp-cstr.el')
-rw-r--r-- | lisp/emacs-lisp/comp-cstr.el | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el index dcf835bb7b1..6397bccdae5 100644 --- a/lisp/emacs-lisp/comp-cstr.el +++ b/lisp/emacs-lisp/comp-cstr.el @@ -256,26 +256,26 @@ Integer values are handled in the `range' slot.") (defun comp-cstr-union-no-range (dst &rest srcs) "As `comp-cstr-union' but escluding the irange component." - (let ((values (mapcar #'comp-cstr-valset srcs))) - - ;; Type propagation. - (setf (comp-cstr-typeset dst) - (apply #'comp-union-typesets (mapcar #'comp-cstr-typeset srcs))) - - ;; Value propagation. - (setf (comp-cstr-valset dst) - (cl-loop - ;; TODO sort. - for v in (cl-remove-duplicates (apply #'append values) - :test #'equal) - ;; We propagate only values those types are not already - ;; into typeset. - when (cl-notany (lambda (x) - (comp-subtype-p (type-of v) x)) - (comp-cstr-typeset dst)) - collect v)) - - dst)) + + ;; Type propagation. + (setf (comp-cstr-typeset dst) + (apply #'comp-union-typesets (mapcar #'comp-cstr-typeset srcs))) + + ;; Value propagation. + (setf (comp-cstr-valset dst) + (cl-loop + with values = (mapcar #'comp-cstr-valset srcs) + ;; TODO sort. + for v in (cl-remove-duplicates (apply #'append values) + :test #'equal) + ;; We propagate only values those types are not already + ;; into typeset. + when (cl-notany (lambda (x) + (comp-subtype-p (type-of v) x)) + (comp-cstr-typeset dst)) + collect v)) + + dst) (defun comp-cstr-union (dst &rest srcs) "Combine SRCS by union set operation setting the result in DST. |