guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] 01/03: Fix intmap-intersect edge case


From: Andy Wingo
Subject: [Guile-commits] 01/03: Fix intmap-intersect edge case
Date: Tue, 18 Jun 2019 15:51:56 -0400 (EDT)

wingo pushed a commit to branch master
in repository guile.

commit ba94bcafea44e4bfd400f908e3de88617cd01f4a
Author: Andy Wingo <address@hidden>
Date:   Tue Jun 11 12:56:23 2019 +0200

    Fix intmap-intersect edge case
    
    * module/language/cps/intmap.scm (intmap-intersect): If intersection of
      same-level intmaps is empty, return empty intmap.
---
 module/language/cps/intmap.scm | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/module/language/cps/intmap.scm b/module/language/cps/intmap.scm
index 8995d62..4ac5d76 100644
--- a/module/language/cps/intmap.scm
+++ b/module/language/cps/intmap.scm
@@ -1,5 +1,5 @@
 ;;; Functional name maps
-;;; Copyright (C) 2014, 2015, 2017 Free Software Foundation, Inc.
+;;; Copyright (C) 2014-2017,2019 Free Software Foundation, Inc.
 ;;;
 ;;; This library is free software: you can redistribute it and/or modify
 ;;; it under the terms of the GNU Lesser General Public License as
@@ -717,6 +717,7 @@ already, and always calls the meet procedure."
        ;; At this point, A and B cover the same range.
        (let ((root (intersect a-shift a-root b-root)))
          (cond
+          ((absent? root) empty-intmap)
           ((eq? root a-root) a)
           ((eq? root b-root) b)
           (else (make-intmap/prune a-min a-shift root)))))))))



reply via email to

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