Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(151)

Unified Diff: scm/lily.scm

Issue 579330043: Do not run GC after processing every file. (Closed)
Patch Set: guile2 Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: scm/lily.scm
diff --git a/scm/lily.scm b/scm/lily.scm
index d35e60295344b97040b47e98595cd9f3bb3ffd18..2e34f01253b0f6c67a4f07c697a5663e202411c3 100644
--- a/scm/lily.scm
+++ b/scm/lily.scm
@@ -1039,7 +1039,7 @@ PIDs or the number of the process."
(do-measurements (ly:get-option 'dump-profile))
(handler (lambda (key failed-file)
(set! failed (append (list failed-file) failed)))))
- (gc)
+ (if (not (guile-v2)) (gc))
(for-each
(lambda (x)
(let* ((start-measurements (if do-measurements
@@ -1059,16 +1059,22 @@ PIDs or the number of the process."
(for-each (lambda (s)
(ly:set-option (car s) (cdr s)))
all-settings)
- (ly:set-option 'debug-gc-assert-parsed-dead #t)
- (gc)
- (ly:set-option 'debug-gc-assert-parsed-dead #f)
- (for-each
- (lambda (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!))
+
+ ;; check that we're not holding on to objects. Doesn't work
+ ;; in GUILE 2.x
+ (if (not (guile-v2))
+ (begin
+ (ly:set-option 'debug-gc-assert-parsed-dead #t)
+ (gc)
+ (ly:set-option 'debug-gc-assert-parsed-dead #f))
+ (for-each
+ (lambda (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!)))
+
(if (ly:get-option 'debug-gc)
(dump-gc-protects)
(ly:reset-all-fonts))
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b