guile-commits
[Top][All Lists]
Advanced

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

[Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.2-86-g1e2b49


From: Ludovic Courtès
Subject: [Guile-commits] GNU Guile branch, stable-2.0, updated. v2.0.2-86-g1e2b492
Date: Sun, 18 Sep 2011 19:44:00 +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=1e2b4920cac71e6750673a84642db97c404092a7

The branch, stable-2.0 has been updated
       via  1e2b4920cac71e6750673a84642db97c404092a7 (commit)
      from  2b0b09fed4e446712dde60781ed09a6100e833f3 (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 1e2b4920cac71e6750673a84642db97c404092a7
Author: Ludovic Courtès <address@hidden>
Date:   Sun Sep 18 21:41:25 2011 +0200

    Arrange so that stack-cleaning loops in GC tests are not optimized out.
    
    * test-suite/tests/gc.test (stack-cleanup): New procedure.
      ("Unused modules are removed"): Use it.
    
    * test-suite/tests/threads.test (stack-cleanup): Likewise.
      ("mutex with owner not retained (bug #27450)"): Use it.

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

Summary of changes:
 test-suite/tests/gc.test      |   14 ++++++++++----
 test-suite/tests/threads.test |   11 ++++++++---
 2 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/test-suite/tests/gc.test b/test-suite/tests/gc.test
index 9aa12be..57643e8 100644
--- a/test-suite/tests/gc.test
+++ b/test-suite/tests/gc.test
@@ -1,5 +1,6 @@
 ;;;; gc.test --- test guile's garbage collection    -*- scheme -*-
-;;;; Copyright (C) 2000, 2001, 2004, 2006, 2007, 2008, 2009 Free Software 
Foundation, Inc.
+;;;; Copyright (C) 2000, 2001, 2004, 2006, 2007, 2008, 2009,
+;;;;   2011 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
@@ -46,6 +47,13 @@
 ;;; 
 ;;;
 
+(define (stack-cleanup depth)
+  ;; Clean up stack space for DEPTH words.  This is defined here so that
+  ;; `peval' doesn't inline it.
+  (let cleanup ((i depth))
+    (and (> i 0)
+         (begin (cleanup (1- i)) i))))
+
 (with-test-prefix "gc"
 
   (pass-if "after-gc-hook gets called"
@@ -65,9 +73,7 @@
       (for-each (lambda (x) (guard (make-module))) (iota total))
 
       ;; Avoid false references to the modules on the stack.
-      (let cleanup ((i 20))
-        (and (> i 0)
-             (begin (cleanup (1- i)) i)))
+      (stack-cleanup 20)
 
       (gc)
       (gc) ;; twice: have to kill the weak vectors.
diff --git a/test-suite/tests/threads.test b/test-suite/tests/threads.test
index db002f2..85a7c38 100644
--- a/test-suite/tests/threads.test
+++ b/test-suite/tests/threads.test
@@ -36,6 +36,13 @@
     (equal? '(a b c) '(a b c))
     a))
 
+(define (stack-cleanup depth)
+  ;; Clean up stack space for DEPTH words.  This is defined here so that
+  ;; `peval' doesn't inline it.
+  (let cleanup ((i depth))
+    (and (> i 0)
+         (begin (cleanup (1- i)) i))))
+
 (if (provided? 'threads)
     (begin
 
@@ -403,9 +410,7 @@
             (g (let ((m (make-mutex))) (lock-mutex m) m))
 
             ;; Avoid false references to M on the stack.
-            (let cleanup ((i 20))
-              (and (> i 0)
-                   (begin (cleanup (1- i)) i)))
+            (stack-cleanup 20)
 
             (gc) (gc)
             (let ((m (g)))


hooks/post-receive
-- 
GNU Guile



reply via email to

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