From 2ea3798f3473a7dd02b85ac311aa9b8de4938c3c Mon Sep 17 00:00:00 2001 From: David Kastrup Date: Sat, 18 Aug 2012 10:13:52 +0200 Subject: [PATCH] Only complain once about any undead object --- scm/lily.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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") -- 2.39.2