[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
feature/native-comp 1fb249f 2/8: * lisp/emacs-lisp/comp-cstr.el (comp-cs
From: |
Andrea Corallo |
Subject: |
feature/native-comp 1fb249f 2/8: * lisp/emacs-lisp/comp-cstr.el (comp-cstr-union-no-range): Cosmetic. |
Date: |
Sat, 5 Dec 2020 17:07:32 -0500 (EST) |
branch: feature/native-comp
commit 1fb249f6db1ae87ee3ddd221ab9c8d152951efe7
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>
* lisp/emacs-lisp/comp-cstr.el (comp-cstr-union-no-range): Cosmetic.
---
lisp/emacs-lisp/comp-cstr.el | 40 ++++++++++++++++++++--------------------
1 file changed, 20 insertions(+), 20 deletions(-)
diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el
index dcf835b..6397bcc 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.
- feature/native-comp updated (eb8d155 -> 09ec39e), Andrea Corallo, 2020/12/05
- feature/native-comp 9b85ae6 1/8: Initial constraint negation support, Andrea Corallo, 2020/12/05
- feature/native-comp 7c1d90a 3/8: Initial support for union of negated constraints, Andrea Corallo, 2020/12/05
- feature/native-comp 726e40f 5/8: Fix union of homogeneously negated input constraints, Andrea Corallo, 2020/12/05
- feature/native-comp f923de6 6/8: * Fix `comp-cstr-to-type-spec', Andrea Corallo, 2020/12/05
- feature/native-comp 09ec39e 8/8: * Memoize `comp-cstr-union-1', Andrea Corallo, 2020/12/05
- feature/native-comp 1fb249f 2/8: * lisp/emacs-lisp/comp-cstr.el (comp-cstr-union-no-range): Cosmetic.,
Andrea Corallo <=
- feature/native-comp cbbdb4e 4/8: * Add `with-comp-cstr-accessors' macro., Andrea Corallo, 2020/12/05
- feature/native-comp 2eb41ec 7/8: More improvements to `comp-cstr-union-1' for mixed positive/negative cases, Andrea Corallo, 2020/12/05