emacs-diffs
[Top][All Lists]
Advanced

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

feature/native-comp d893952 4/5: Fix missing float handling into `comp-c


From: Andrea Corallo
Subject: feature/native-comp d893952 4/5: Fix missing float handling into `comp-cstr-set-cmp-range'
Date: Sat, 26 Dec 2020 14:52:48 -0500 (EST)

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

    Fix missing float handling into `comp-cstr-set-cmp-range'
    
        * lisp/emacs-lisp/comp-cstr.el (comp-cstr-set-cmp-range): Add
        float handling.
        * test/src/comp-tests.el (comp-tests-type-spec-tests): Update results.
---
 lisp/emacs-lisp/comp-cstr.el |  2 +-
 test/src/comp-tests.el       | 26 +++++++++++++-------------
 2 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/lisp/emacs-lisp/comp-cstr.el b/lisp/emacs-lisp/comp-cstr.el
index 9d0c671..1927207 100644
--- a/lisp/emacs-lisp/comp-cstr.el
+++ b/lisp/emacs-lisp/comp-cstr.el
@@ -366,7 +366,7 @@ Return them as multiple value."
   "Support range comparison functions."
   (with-comp-cstr-accessors
     (if ext-range
-        (setf (typeset dst) ()
+        (setf (typeset dst) (and (typeset old-dst) '(float))
               (valset dst) ()
               (range dst) (if (range old-dst)
                               (comp-range-intersection (range old-dst)
diff --git a/test/src/comp-tests.el b/test/src/comp-tests.el
index e1c1359..446c306 100644
--- a/test/src/comp-tests.el
+++ b/test/src/comp-tests.el
@@ -953,84 +953,84 @@ Return a list of results."
       ((defun comp-tests-ret-type-spec-f (x)
          (when (> x 3)
            x))
-       (or null (integer 4 *)))
+       (or null float (integer 4 *)))
 
       ;; 23
       ((defun comp-tests-ret-type-spec-f (x)
          (when (>= x 3)
            x))
-       (or null (integer 3 *)))
+       (or null float (integer 3 *)))
 
       ;; 24
       ((defun comp-tests-ret-type-spec-f (x)
          (when (< x 3)
            x))
-       (or null (integer * 2)))
+       (or null float (integer * 2)))
 
       ;; 25
       ((defun comp-tests-ret-type-spec-f (x)
          (when (<= x 3)
            x))
-       (or null (integer * 3)))
+       (or null float (integer * 3)))
 
       ;; 26
       ((defun comp-tests-ret-type-spec-f (x)
          (when (> 3 x)
            x))
-       (or null (integer * 2)))
+       (or null float (integer * 2)))
 
       ;; 27
       ((defun comp-tests-ret-type-spec-f (x)
          (when (>= 3 x)
            x))
-       (or null (integer * 3)))
+       (or null float (integer * 3)))
 
       ;; 28
       ((defun comp-tests-ret-type-spec-f (x)
          (when (< 3 x)
            x))
-       (or null (integer 4 *)))
+       (or null float (integer 4 *)))
 
       ;; 29
       ((defun comp-tests-ret-type-spec-f (x)
          (when (<= 3 x)
            x))
-       (or null (integer 3 *)))
+       (or null float (integer 3 *)))
 
       ;; 30
       ((defun comp-tests-ret-type-spec-f (x)
          (let ((y 3))
           (when (> x y)
             x)))
-       (or null (integer 4 *)))
+       (or null float (integer 4 *)))
 
       ;; 31
       ((defun comp-tests-ret-type-spec-f (x)
          (let ((y 3))
           (when (> y x)
             x)))
-       (or null (integer * 2)))
+       (or null float (integer * 2)))
 
       ;; 32
       ((defun comp-tests-ret-type-spec-f (x)
          (when (and (> x 3)
                    (< x 10))
           x))
-       (or null (integer 4 9)))
+       (or null float (integer 4 9)))
 
       ;; 33
       ((defun comp-tests-ret-type-spec-f (x)
          (when (or (> x 3)
                    (< x 10))
           x))
-       (or null integer))
+       (or null float integer))
 
       ;; 34
       ((defun comp-tests-ret-type-spec-f (x)
          (when (or (< x 3)
                    (> x 10))
           x))
-       (or null (integer * 2) (integer 11 *)))
+       (or null float (integer * 2) (integer 11 *)))
 
       ;; 35 No float range support.
       ((defun comp-tests-ret-type-spec-f (x)



reply via email to

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