]> git.donarmstrong.com Git - lilypond.git/blobdiff - scm/lily.scm
Improvements in vertical skyline approximations (issue 2148).
[lilypond.git] / scm / lily.scm
index 5a6b5f388dd2b52b456e4d1679da61def9d48fa7..35a16019a1e74df912b0166dbf1cf28e71594a19 100644 (file)
@@ -289,7 +289,6 @@ messages into errors.")
 (if (memq (ly:get-option 'backend) music-string-to-path-backends)
     (ly:set-option 'music-strings-to-paths #t))
 
-
 (define-public (ly:load x)
   (let* ((file-name (%search-load-path x)))
     (ly:debug "[~A" file-name)
@@ -597,6 +596,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 +648,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")