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

Delta Between Two Patch Sets: scm/lily.scm

Issue 5626052: Gets vertical skylines from grob stencils (Closed)
Left Patch Set: Siginicant speed-ups. Created 13 years ago
Right Patch Set: Run astyle on c++ files Created 12 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Left: Side by side diff | Download
Right: Side by side diff | Download
LEFTRIGHT
1 ;;;; This file is part of LilyPond, the GNU music typesetter. 1 ;;;; This file is part of LilyPond, the GNU music typesetter.
2 ;;;; 2 ;;;;
3 ;;;; Copyright (C) 1998--2012 Jan Nieuwenhuizen <janneke@gnu.org> 3 ;;;; Copyright (C) 1998--2012 Jan Nieuwenhuizen <janneke@gnu.org>
4 ;;;; Han-Wen Nienhuys <hanwen@xs4all.nl> 4 ;;;; Han-Wen Nienhuys <hanwen@xs4all.nl>
5 ;;;; 5 ;;;;
6 ;;;; LilyPond is free software: you can redistribute it and/or modify 6 ;;;; LilyPond is free software: you can redistribute it and/or modify
7 ;;;; it under the terms of the GNU General Public License as published by 7 ;;;; it under the terms of the GNU General Public License as published by
8 ;;;; the Free Software Foundation, either version 3 of the License, or 8 ;;;; the Free Software Foundation, either version 3 of the License, or
9 ;;;; (at your option) any later version. 9 ;;;; (at your option) any later version.
10 ;;;; 10 ;;;;
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after
400 "define-context-properties.scm" 400 "define-context-properties.scm"
401 "translation-functions.scm" 401 "translation-functions.scm"
402 "script.scm" 402 "script.scm"
403 "midi.scm" 403 "midi.scm"
404 "layout-beam.scm" 404 "layout-beam.scm"
405 "parser-clef.scm" 405 "parser-clef.scm"
406 "layout-slur.scm" 406 "layout-slur.scm"
407 "font.scm" 407 "font.scm"
408 "encoding.scm" 408 "encoding.scm"
409 409
410 "bar-line.scm"
410 "flag-styles.scm" 411 "flag-styles.scm"
411 "fret-diagrams.scm" 412 "fret-diagrams.scm"
412 "tablature.scm" 413 "tablature.scm"
413 "harp-pedals.scm" 414 "harp-pedals.scm"
414 "define-woodwind-diagrams.scm" 415 "define-woodwind-diagrams.scm"
415 "display-woodwind-diagrams.scm" 416 "display-woodwind-diagrams.scm"
416 "predefined-fretboards.scm" 417 "predefined-fretboards.scm"
417 "define-grob-properties.scm" 418 "define-grob-properties.scm"
418 "define-grobs.scm" 419 "define-grobs.scm"
419 "define-grob-interfaces.scm" 420 "define-grob-interfaces.scm"
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after
588 589
589 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 590 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
590 ;; debug memory leaks 591 ;; debug memory leaks
591 592
592 (define gc-dumping 593 (define gc-dumping
593 #f) 594 #f)
594 595
595 (define gc-protect-stat-count 596 (define gc-protect-stat-count
596 0) 597 0)
597 598
599 ;; Undead objects that should be ignored after the first time round
600 (define gc-zombies
601 (make-weak-key-hash-table 0))
602
598 (define-public (dump-live-object-stats outfile) 603 (define-public (dump-live-object-stats outfile)
599 (for-each (lambda (x) 604 (for-each (lambda (x)
600 (format outfile "~a: ~a\n" (car x) (cdr x))) 605 (format outfile "~a: ~a\n" (car x) (cdr x)))
601 (sort (gc-live-object-stats) 606 (sort (gc-live-object-stats)
602 (lambda (x y) 607 (lambda (x y)
603 (string<? (car x) (car y)))))) 608 (string<? (car x) (car y))))))
604 609
605 (define-public (dump-gc-protects) 610 (define-public (dump-gc-protects)
606 (set! gc-protect-stat-count (1+ gc-protect-stat-count)) 611 (set! gc-protect-stat-count (1+ gc-protect-stat-count))
607 (let* ((protects (sort (hash-table->alist (ly:protects)) 612 (let* ((protects (sort (hash-table->alist (ly:protects))
(...skipping 26 matching lines...) Expand all
634 (if (defined? 'gc-live-object-stats) 639 (if (defined? 'gc-live-object-stats)
635 (let* ((stats #f)) 640 (let* ((stats #f))
636 (ly:progress "Live object statistics: GC'ing\n") 641 (ly:progress "Live object statistics: GC'ing\n")
637 (ly:reset-all-fonts) 642 (ly:reset-all-fonts)
638 (gc) 643 (gc)
639 (gc) 644 (gc)
640 (ly:progress "Asserting dead objects\n") 645 (ly:progress "Asserting dead objects\n")
641 (ly:set-option 'debug-gc-assert-parsed-dead #t) 646 (ly:set-option 'debug-gc-assert-parsed-dead #t)
642 (gc) 647 (gc)
643 (ly:set-option 'debug-gc-assert-parsed-dead #f) 648 (ly:set-option 'debug-gc-assert-parsed-dead #f)
649 (for-each
650 (lambda (x)
651 (if (not (hashq-ref gc-zombies x))
652 (begin
653 (ly:programming-error "Parsed object should be dead: ~a" x)
654 (hashq-set! gc-zombies x #t))))
655 (ly:parsed-undead-list!))
644 (set! stats (gc-live-object-stats)) 656 (set! stats (gc-live-object-stats))
645 (ly:progress "Dumping live object statistics.\n") 657 (ly:progress "Dumping live object statistics.\n")
646 (dump-live-object-stats outfile))) 658 (dump-live-object-stats outfile)))
647 (newline outfile) 659 (newline outfile)
648 (let* ((stats (gc-stats))) 660 (let* ((stats (gc-stats)))
649 (for-each (lambda (sym) 661 (for-each (lambda (sym)
650 (format outfile "~a ~a ~a\n" 662 (format outfile "~a ~a ~a\n"
651 gc-protect-stat-count 663 gc-protect-stat-count
652 sym 664 sym
653 (assoc-get sym stats "?"))) 665 (assoc-get sym stats "?")))
(...skipping 170 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 (dump-profile x start-measurements (profile-measurements))) 836 (dump-profile x start-measurements (profile-measurements)))
825 (if (ly:get-option 'trace-memory-frequency) 837 (if (ly:get-option 'trace-memory-frequency)
826 (begin (mtrace:stop-trace) 838 (begin (mtrace:stop-trace)
827 (mtrace:dump-results base))) 839 (mtrace:dump-results base)))
828 (for-each (lambda (s) 840 (for-each (lambda (s)
829 (ly:set-option (car s) (cdr s))) 841 (ly:set-option (car s) (cdr s)))
830 all-settings) 842 all-settings)
831 (ly:set-option 'debug-gc-assert-parsed-dead #t) 843 (ly:set-option 'debug-gc-assert-parsed-dead #t)
832 (gc) 844 (gc)
833 (ly:set-option 'debug-gc-assert-parsed-dead #f) 845 (ly:set-option 'debug-gc-assert-parsed-dead #f)
846 (for-each
847 (lambda (x)
848 (ly:programming-error "Parsed object should be dead: ~a" x))
849 (ly:parsed-undead-list!))
834 (if (ly:get-option 'debug-gc) 850 (if (ly:get-option 'debug-gc)
835 (dump-gc-protects) 851 (dump-gc-protects)
836 (ly:reset-all-fonts)) 852 (ly:reset-all-fonts))
837 (flush-all-ports))) 853 (flush-all-ports)))
838 files) 854 files)
839 855
840 ;; Ensure a notice re failed files is written to aggregate logfile. 856 ;; Ensure a notice re failed files is written to aggregate logfile.
841 (if ping-log 857 (if ping-log
842 (format ping-log "Failed files: ~a\n" failed)) 858 (format ping-log "Failed files: ~a\n" failed))
843 (if (ly:get-option 'dump-profile) 859 (if (ly:get-option 'dump-profile)
844 (dump-profile "lily-run-total" '(0 0) (profile-measurements))) 860 (dump-profile "lily-run-total" '(0 0) (profile-measurements)))
845 failed)) 861 failed))
862
863 (define-public lilypond-declarations '())
846 864
847 (define (lilypond-file handler file-name) 865 (define (lilypond-file handler file-name)
848 (catch 'ly-file-failed 866 (catch 'ly-file-failed
849 (lambda () (ly:parse-file file-name)) 867 (lambda () (ly:parse-file file-name))
850 (lambda (x . args) (handler x file-name)))) 868 (lambda (x . args) (handler x file-name))))
851 869
852 (use-modules (scm editor)) 870 (use-modules (scm editor))
853 871
854 (define-public (gui-main files) 872 (define-public (gui-main files)
855 (if (null? files) 873 (if (null? files)
(...skipping 17 matching lines...) Expand all
873 (ly:exit 0 #f))))) 891 (ly:exit 0 #f)))))
874 892
875 (define (gui-no-files-handler) 893 (define (gui-no-files-handler)
876 (let* ((ly (string-append (ly:effective-prefix) "/ly/")) 894 (let* ((ly (string-append (ly:effective-prefix) "/ly/"))
877 ;; FIXME: soft-code, localize 895 ;; FIXME: soft-code, localize
878 (welcome-ly (string-append ly "Welcome_to_LilyPond.ly")) 896 (welcome-ly (string-append ly "Welcome_to_LilyPond.ly"))
879 (cmd (get-editor-command welcome-ly 0 0 0))) 897 (cmd (get-editor-command welcome-ly 0 0 0)))
880 (ly:message (_ "Invoking `~a'...\n") cmd) 898 (ly:message (_ "Invoking `~a'...\n") cmd)
881 (system cmd) 899 (system cmd)
882 (ly:exit 1 #f))) 900 (ly:exit 1 #f)))
LEFTRIGHT

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