emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/native-comp e9f5fad 3/8: * Fix two predicates for missing negati


From: Andrea Corallo
Subject: feature/native-comp e9f5fad 3/8: * Fix two predicates for missing negation handling
Date: Fri, 1 Jan 2021 08:08:12 -0500 (EST)

branch: feature/native-comp
commit e9f5fadb0ecb64148472f846a99a0d7e95daeaee
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>

    * Fix two predicates for missing negation handling
    
        * lisp/emacs-lisp/comp-cstr.el (comp-cstr-empty-p)
        (comp-cstr-null-p): Fix missing negation handling.
---
 lisp/emacs-lisp/comp-cstr.el | 12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el
index c03056e..a53372b 100644
--- a/lisp/emacs-lisp/comp-cstr.el
+++ b/lisp/emacs-lisp/comp-cstr.el
@@ -139,14 +139,16 @@ Integer values are handled in the `range' slot.")
   (with-comp-cstr-accessors
     (and (null (typeset cstr))
          (null (valset cstr))
-         (null (range cstr)))))
+         (null (range cstr))
+         (null (neg cstr)))))
 
-(defsubst comp-cstr-null-p (x)
+(defsubst comp-cstr-null-p (cstr)
   "Return t if CSTR is equivalent to the `null' type specifier, nil otherwise."
   (with-comp-cstr-accessors
-    (and (null (typeset x))
-         (null (range x))
-         (equal (valset x) '(nil)))))
+    (and (null (typeset cstr))
+         (null (range cstr))
+         (null (neg cstr))
+         (equal (valset cstr) '(nil)))))
 
 (defun comp-cstrs-homogeneous (cstrs)
   "Check if constraints CSTRS are all homogeneously negated or non-negated.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]