From: David Kastrup <dak@gnu.org> Date: Sat, 18 Aug 2012 08:13:52 +0000 (+0200) Subject: Only complain once about any undead object X-Git-Tag: release/2.17.0-1~30 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=2ea3798f3473a7dd02b85ac311aa9b8de4938c3c;p=lilypond.git Only complain once about any undead object --- diff --git a/scm/lily.scm b/scm/lily.scm index 5a6b5f388d..070ba758d2 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -597,6 +597,10 @@ messages into errors.") (define gc-protect-stat-count 0) +;; Undead objects that should be ignored after the first time round +(define gc-zombies + (make-weak-key-hash-table 0)) + (define-public (dump-live-object-stats outfile) (for-each (lambda (x) (format outfile "~a: ~a\n" (car x) (cdr x))) @@ -645,7 +649,10 @@ messages into errors.") (ly:set-option 'debug-gc-assert-parsed-dead #f) (for-each (lambda (x) - (ly:programming-error "Parsed object should be dead: ~a" x)) + (if (not (hashq-ref gc-zombies x)) + (begin + (ly:programming-error "Parsed object should be dead: ~a" x) + (hashq-set! gc-zombies x #t)))) (ly:parsed-undead-list!)) (set! stats (gc-live-object-stats)) (ly:progress "Dumping live object statistics.\n")