From aac3ab7edd4bdc311c352a6fe15628552de7d0e9 Mon Sep 17 00:00:00 2001 From: Mike Solomon Date: Thu, 24 Nov 2011 10:30:44 +0100 Subject: [PATCH] Defines some undefined grob properties, grob objects, and music properties. Undefined properties as well as properties without interfaces may cause memory leaks in LilyPond. While this issue has to be investigated further, defining these properties makes the code easier to read and may lead to less memory leaks, which may in turn speed up batch processing of .ly files (like the regtests). --- lily/dot-column.cc | 1 + lily/grob.cc | 1 + lily/semi-tie-column.cc | 1 + lily/stem.cc | 1 + lily/tie-column.cc | 1 + scm/define-grob-properties.scm | 8 ++++++++ scm/define-music-properties.scm | 10 ++++++++++ 7 files changed, 23 insertions(+) diff --git a/lily/dot-column.cc b/lily/dot-column.cc index 320f0e4051..c0c2986b08 100644 --- a/lily/dot-column.cc +++ b/lily/dot-column.cc @@ -230,5 +230,6 @@ ADD_INTERFACE (Dot_column, "dots " "positioning-done " "direction " + "note-collision " ); diff --git a/lily/grob.cc b/lily/grob.cc index 13dd9c7b39..567bd0015f 100644 --- a/lily/grob.cc +++ b/lily/grob.cc @@ -786,6 +786,7 @@ ADD_INTERFACE (Grob, "extra-X-extent " "extra-Y-extent " "extra-offset " + "forced-spacing " "interfaces " "layer " "meta " diff --git a/lily/semi-tie-column.cc b/lily/semi-tie-column.cc index c2910d5cd1..b1008bb934 100644 --- a/lily/semi-tie-column.cc +++ b/lily/semi-tie-column.cc @@ -37,6 +37,7 @@ ADD_INTERFACE (Semi_tie_column, "positioning-done " "head-direction " "tie-configuration " + "ties " ); /* diff --git a/lily/stem.cc b/lily/stem.cc index c217d0de15..7ef1b93842 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -1095,6 +1095,7 @@ ADD_INTERFACE (Stem, "length " "length-fraction " "max-beam-connect " + "melody-spanner " "neutral-direction " "no-stem-extend " "note-heads " diff --git a/lily/tie-column.cc b/lily/tie-column.cc index c73694d334..3f0957d1cd 100644 --- a/lily/tie-column.cc +++ b/lily/tie-column.cc @@ -122,5 +122,6 @@ ADD_INTERFACE (Tie_column, /* properties */ "positioning-done " "tie-configuration " + "ties " ); diff --git a/scm/define-grob-properties.scm b/scm/define-grob-properties.scm index e71848e422..0c6527af21 100644 --- a/scm/define-grob-properties.scm +++ b/scm/define-grob-properties.scm @@ -303,6 +303,8 @@ larger. Fractional values are allowed.") (force-hshift ,number? "This specifies a manual shift for notes in collisions. The unit is the note head width of the first voice note. This is used by @rinternals{note-collision-interface}.") + (forced-spacing ,number? "Spacing forced between grobs, used in +various ligature engravers.") (fraction ,fraction? "Numerator and denominator of a time signature object.") (french-beaming ,boolean? "Use French beaming style for this @@ -1057,6 +1059,8 @@ empty in a particular staff, then that staff is erased.") (left-neighbor ,ly:grob? "The right-most column that has a spacing-wish for this column.") + (melody-spanner ,ly:grob? "The @code{MelodyItem} object for a stem.") + (normal-stems ,ly:grob-array? "An array of visible stems.") (note-columns ,ly:grob-array? "An array of @code{NoteColumn} grobs.") (note-head ,ly:grob? "A single note head.") @@ -1099,6 +1103,7 @@ results, use @code{LEFT} and @code{RIGHT}.") (stems ,ly:grob-array? "An array of stem objects.") (tie ,ly:grob? "A pointer to a @code{Tie} object.") + (ties ,ly:grob-array? "A grob array of @code{Tie} objects.") (tremolo-flag ,ly:grob? "The tremolo object on a stem.") (tuplet-number ,ly:grob? "The number for a bracket.") (tuplets ,ly:grob-array? "An array of smaller tuplet brackets.") @@ -1143,6 +1148,9 @@ entries @code{name} and @code{interfaces}.") (minimum-distances ,list? "A list of rods that have the format @code{(@var{obj} . @var{dist})}.") + (note-collision ,ly:grob? "The @code{NoteCollision} object of a +dot column.") + (positioning-done ,boolean? "Used to signal that a positioning element did its job. This ensures that a positioning is only done once.") (pure-Y-extent ,number-pair? "The estimated height of a system.") diff --git a/scm/define-music-properties.scm b/scm/define-music-properties.scm index a6b910c7db..8911239473 100644 --- a/scm/define-music-properties.scm +++ b/scm/define-music-properties.scm @@ -60,8 +60,10 @@ TODO: Use SpanEvents?") cautionary accidental.") (change-to-id ,string? "Name of the context to change to.") (change-to-type ,symbol? "Type of the context to change to.") + (class ,symbol? "The class name of an event class.") (compress-procedure ,procedure? "Compress this music expression. Arg@tie{}1: the music, arg@tie{}2: factor.") + (context ,ly:context? "The context to which an event is sent.") (context-id ,string? "Name of context.") (context-type ,symbol? "Type of context.") (create-new ,boolean? "Create a fresh context.") @@ -84,6 +86,7 @@ simultaneous music, or the alternatives of repeated music.") a sequential iterator. Takes a single music parameter.") (error-found ,boolean? "If true, a parsing error was found in this expression.") + (events ,list? "A list of events contained in this event.") (figure ,integer? "A bass figure.") (footnote-text ,markup? "Text to appear in a footnote.") @@ -96,6 +99,7 @@ always be printed on this note.") property, e.g., @code{(beamed-lengths details)}.") (grob-value ,scheme? "The value of the grob property to set.") + (id ,symbol? "The ID of an event.") (input-tag ,scheme? "Arbitrary marker to relate input and output.") (inversion ,boolean? "If set, this chord note is inverted.") (iterator-ctor ,procedure? "Function to construct a @@ -111,6 +115,9 @@ This property can only be defined as initializer in whether to allow, forbid or force a line break.") (metronome-count ,number-or-pair? "How many beats in a minute?") + (moment ,ly:moment? "The moment at which an event happens.") + (music-cause ,ly:music? "The music object that is the cause of +an event.") (name ,symbol? "Name of this music object.") (no-continuation ,boolean? "If set, disallow continuation lines.") @@ -119,6 +126,8 @@ whether to allow, forbid or force a line break.") (octavation ,integer? "This pitch was octavated by how many octaves? For chord inversions, this is negative.") (once ,boolean? "Apply this operation only during one time step?") + (ops ,scheme? "The operations to apply during the creation of a +context.") (origin ,ly:input-location? "Where was this piece of music defined?") (original-chord ,ly:music? "Original chord of a repeated chord. Used by repeated chords in \\relative mode, to determine the first note octave") @@ -146,6 +155,7 @@ on some grob property.") It must take a single argument, being the context.") (property-operations ,list? "Do these operations for instantiating the context.") + (property-path ,symbol? "The path of a property.") (quoted-context-id ,string? "The ID of the context to direct quotes to, e.g., @code{cue}.") -- 2.39.2