guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, master, updated. v2.1.0-858-g0a44542


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, master, updated. v2.1.0-858-g0a44542
Date: Wed, 02 Apr 2014 07:25:03 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=0a44542fce2f010dcf7e9edefe05187a62d08a05

The branch, master has been updated
       via  0a44542fce2f010dcf7e9edefe05187a62d08a05 (commit)
       via  f082c5f30aeb5b94e3d4791c01bab321716600a3 (commit)
      from  545274a03578b5fa5270c629d704fb9f815517cf (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0a44542fce2f010dcf7e9edefe05187a62d08a05
Author: Andy Wingo <address@hidden>
Date:   Tue Apr 1 20:55:31 2014 +0200

    Fix DFG compute-reachable bug
    
    * module/language/cps/dfg.scm (compute-reachable): Fix embarassing bug
      where we wouldn't actually iterate to fixpoint.  I haven't seen it
      yet, but that's just luck...

commit f082c5f30aeb5b94e3d4791c01bab321716600a3
Author: Andy Wingo <address@hidden>
Date:   Tue Apr 1 20:52:15 2014 +0200

    Optimize two-list srfi-1 map
    
    * module/srfi/srfi-1.scm (map): Optimize the two-list variant.

-----------------------------------------------------------------------

Summary of changes:
 module/language/cps/dfg.scm |    2 +-
 module/srfi/srfi-1.scm      |   17 +++++++++++++++++
 2 files changed, 18 insertions(+), 1 deletions(-)

diff --git a/module/language/cps/dfg.scm b/module/language/cps/dfg.scm
index 4f32fce..c390427 100644
--- a/module/language/cps/dfg.scm
+++ b/module/language/cps/dfg.scm
@@ -231,7 +231,7 @@ for quickest convergence."
         (cond
          ((zero? n)
           (if changed?
-              (lp 0 #f)
+              (lp k-count #f)
               reachable))
          (else
           (let ((n (1- n)))
diff --git a/module/srfi/srfi-1.scm b/module/srfi/srfi-1.scm
index 919d512..5e859d1 100644
--- a/module/srfi/srfi-1.scm
+++ b/module/srfi/srfi-1.scm
@@ -572,6 +572,23 @@ has just one element then that's the return value."
            (map1 (cdr in) (cons (f (car in)) out))
            (reverse! out))))
     
+    ((f l1 l2)
+     (check-arg procedure? f map)
+     (let* ((len1 (length+ l1))
+            (len2 (length+ l2))
+            (len (if (and len1 len2)
+                     (min len1 len2)
+                     (or len1 len2))))
+       (unless len
+         (scm-error 'wrong-type-arg "map"
+                    "Args do not contain a proper (finite) list: ~S"
+                    (list (list l1 l2)) #f))
+       (let map2 ((l1 l1) (l2 l2) (out '()) (len len))
+         (if (zero? len)
+             (reverse! out)
+             (map2 (cdr l1) (cdr l2)
+                   (cons (f (car l1) (car l2)) out) (1- len))))))
+
     ((f l1 . rest)
      (check-arg procedure? f map)
      (let ((len (fold (lambda (ls len)


hooks/post-receive
-- 
GNU Guile



reply via email to

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