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-621-g8dcabf6


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, master, updated. v2.1.0-621-g8dcabf6
Date: Tue, 28 Jan 2014 21:30:23 +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=8dcabf600386e1a4e7dbfd1d41f312f0c3e2179c

The branch, master has been updated
       via  8dcabf600386e1a4e7dbfd1d41f312f0c3e2179c (commit)
       via  024a60e374b9b8b65e9696115d8913bfdfce390d (commit)
       via  ae4d761f7ab0c02081a4edfb70b4199bfa077025 (commit)
      from  02c624fc09079491660317977a5f202ecc2b1fc8 (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 8dcabf600386e1a4e7dbfd1d41f312f0c3e2179c
Author: Andy Wingo <address@hidden>
Date:   Tue Jan 28 22:28:08 2014 +0100

    Minor for-each speedup
    
    * module/ice-9/boot-9.scm (for-each): Minor speedup by unrolling
      tortoise/hare loop.

commit 024a60e374b9b8b65e9696115d8913bfdfce390d
Author: Andy Wingo <address@hidden>
Date:   Tue Jan 28 21:56:54 2014 +0100

    Unnecessary VM_HANDLE_INTERRUPTS elision
    
    * libguile/vm-engine.c: Remove VM_HANDLE_INTERRUPTS before entering a
      subr or foreign call.  The bytecode stub will have already done so
      when entering the stub, and the return sequence handles doing so
      before returning.

commit ae4d761f7ab0c02081a4edfb70b4199bfa077025
Author: Andy Wingo <address@hidden>
Date:   Tue Jan 28 21:31:17 2014 +0100

    Fix tracing
    
    * module/system/vm/trace.scm (print-return): Remove frame argument.
      (trace-calls-to-procedure, trace-calls-in-procedure): Adapt callers.
    * module/system/vm/traps.scm (trap-in-procedure, trap-frame-finish):
      (trap-calls-to-procedure): Since the pop continuation hook is now
      called after the continuation is popped, we need to check the right
      frame.  Fixes tail-calls in the trace root, and probably other things.

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

Summary of changes:
 libguile/vm-engine.c       |    4 +---
 module/ice-9/boot-9.scm    |   21 ++++++++++-----------
 module/system/vm/trace.scm |    8 ++++----
 module/system/vm/traps.scm |   10 +++++-----
 4 files changed, 20 insertions(+), 23 deletions(-)

diff --git a/libguile/vm-engine.c b/libguile/vm-engine.c
index 6f82ece..0caad8a 100644
--- a/libguile/vm-engine.c
+++ b/libguile/vm-engine.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, 
Inc.
+/* Copyright (C) 2001, 2009, 2010, 2011, 2012, 2013, 2014 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
@@ -734,7 +734,6 @@ VM_NAME (scm_i_thread *current_thread, struct scm_vm *vp,
       pointer = SCM_PROGRAM_FREE_VARIABLE_REF (LOCAL_REF (0), ptr_idx);
       subr = SCM_POINTER_VALUE (pointer);
 
-      VM_HANDLE_INTERRUPTS;
       SYNC_IP ();
 
       switch (FRAME_LOCALS_COUNT_FROM (1))
@@ -805,7 +804,6 @@ VM_NAME (scm_i_thread *current_thread, struct scm_vm *vp,
       pointer = SCM_PROGRAM_FREE_VARIABLE_REF (closure, ptr_idx);
 
       SYNC_IP ();
-      VM_HANDLE_INTERRUPTS;
 
       // FIXME: separate args
       ret = scm_i_foreign_call (scm_cons (cif, pointer), LOCAL_ADDRESS (1));
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm
index cac058c..91728a6 100644
--- a/module/ice-9/boot-9.scm
+++ b/module/ice-9/boot-9.scm
@@ -840,23 +840,22 @@ information is unavailable."
 (define for-each
   (case-lambda
     ((f l)
-     (let for-each1 ((hare l) (tortoise l) (move? #f))
+     (let for-each1 ((hare l) (tortoise l))
        (if (pair? hare)
-           (if move?
-               (if (eq? tortoise hare)
-                   (scm-error 'wrong-type-arg "for-each" "Circular list: ~S"
-                              (list l) #f)
+           (begin
+             (f (car hare))
+             (let ((hare (cdr hare)))
+               (if (pair? hare)
                    (begin
+                     (when (eq? tortoise hare)
+                       (scm-error 'wrong-type-arg "for-each" "Circular list: 
~S"
+                                  (list l) #f))
                      (f (car hare))
-                     (for-each1 (cdr hare) (cdr tortoise) #f)))
-               (begin
-                 (f (car hare))
-                 (for-each1 (cdr hare) tortoise #t)))
-           
+                     (for-each1 (cdr hare) (cdr tortoise))))))
            (if (not (null? hare))
                (scm-error 'wrong-type-arg "for-each" "Not a list: ~S"
                           (list l) #f)))))
-    
+
     ((f l1 l2)
      (let for-each2 ((h1 l1) (h2 l2) (t1 l1) (t2 l2) (move? #f))
        (cond
diff --git a/module/system/vm/trace.scm b/module/system/vm/trace.scm
index 30acba4..77191b7 100644
--- a/module/system/vm/trace.scm
+++ b/module/system/vm/trace.scm
@@ -1,6 +1,6 @@
 ;;; Guile VM tracer
 
-;; Copyright (C) 2001, 2009, 2010, 2012, 2013 Free Software Foundation, Inc.
+;; Copyright (C) 2001, 2009, 2010, 2012, 2013, 2014 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
@@ -48,7 +48,7 @@
             width
             (frame-call-representation frame))))
 
-(define* (print-return frame depth width prefix max-indent values)
+(define (print-return depth width prefix max-indent values)
   (let ((prefix (build-prefix prefix depth "|  " "~d< "max-indent)))
     (case (length values)
       ((0)
@@ -73,7 +73,7 @@
   (define (apply-handler frame depth)
     (print-application frame depth width prefix max-indent))
   (define (return-handler frame depth . values)
-    (print-return frame depth width prefix max-indent values))
+    (print-return depth width prefix max-indent values))
   (trap-calls-to-procedure proc apply-handler return-handler))
 
 (define* (trace-calls-in-procedure proc #:key (width 80)
@@ -82,7 +82,7 @@
   (define (apply-handler frame depth)
     (print-application frame depth width prefix max-indent))
   (define (return-handler frame depth . values)
-    (print-return frame depth width prefix max-indent values))
+    (print-return depth width prefix max-indent values))
   (trap-calls-in-dynamic-extent proc apply-handler return-handler))
 
 (define* (trace-instructions-in-procedure proc #:key (width 80)
diff --git a/module/system/vm/traps.scm b/module/system/vm/traps.scm
index 114647e..77823e1 100644
--- a/module/system/vm/traps.scm
+++ b/module/system/vm/traps.scm
@@ -1,6 +1,6 @@
 ;;; Traps: stepping, breakpoints, and such.
 
-;; Copyright (C)  2010, 2012, 2013 Free Software Foundation, Inc.
+;; Copyright (C)  2010, 2012, 2013, 2014 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
@@ -193,8 +193,8 @@
     (define (pop-cont-hook frame . values)
       (if in-proc?
           (exit-proc frame))
-      (if (our-frame? (frame-previous frame))
-          (enter-proc (frame-previous frame))))
+      (if (our-frame? frame)
+          (enter-proc frame)))
 
     (define (abort-hook frame . values)
       (if in-proc?
@@ -403,7 +403,7 @@
   (arg-check abort-handler procedure?)
   (let ((fp (frame-address frame)))
     (define (pop-cont-hook frame . values)
-      (if (and fp (eq? (frame-address frame) fp))
+      (if (and fp (< (frame-address frame) fp))
           (begin
             (set! fp #f)
             (apply return-handler frame values))))
@@ -548,7 +548,7 @@
 
         (apply-handler frame depth)
 
-        (if (not (eq? (frame-address frame) last-fp))
+        (if (not (eqv? (frame-address frame) last-fp))
             (let ((finish-trap #f))
               (define (frame-finished frame)
                 (finish-trap frame) ;; disables the trap.


hooks/post-receive
-- 
GNU Guile



reply via email to

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