From f2c2c5c43858f323e4708f83fd97e0f38017c275 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 24 Jul 2005 01:33:35 +0000 Subject: [PATCH] * lily/context.cc (where_defined): also assign value in where_defined(). * lily/bezier.cc (get_other_coordinate): use curve_coordinate (curve_coordinate): new function * flower/include/parray.hh (binsearch): add lo,hi range to arguments. * lily/simple-spacer.cc (add_columns): only add rods between column i and begin/end if keep-inside-line is set (this repleces allow-outside-line as default) --- ChangeLog | 14 +++++++++++ flower/include/parray.hh | 13 ++++------ lily/accidental-engraver.cc | 14 ++++------- lily/ambitus-engraver.cc | 1 - lily/arpeggio-engraver.cc | 1 - lily/auto-beam-engraver.cc | 1 - lily/axis-group-engraver.cc | 1 - lily/axis-group-interface.cc | 1 - lily/bar-check-iterator.cc | 3 ++- lily/bar-engraver.cc | 1 - lily/bar-number-engraver.cc | 1 - lily/beam-engraver.cc | 2 -- lily/beam-performer.cc | 2 +- lily/bezier.cc | 29 +++++++++++++++++++--- lily/break-align-engraver.cc | 1 - lily/breathing-sign-engraver.cc | 1 - lily/chord-name-engraver.cc | 1 - lily/chord-tremolo-engraver.cc | 1 - lily/clef-engraver.cc | 4 +-- lily/cluster-engraver.cc | 1 - lily/coherent-ligature-engraver.cc | 3 ++- lily/collision-engraver.cc | 1 - lily/completion-note-heads-engraver.cc | 1 - lily/context-property.cc | 14 ++++------- lily/context-scheme.cc | 3 ++- lily/context.cc | 23 +++++++---------- lily/custos-engraver.cc | 2 +- lily/default-bar-line-engraver.cc | 1 - lily/dot-column-engraver.cc | 1 - lily/drum-note-engraver.cc | 1 - lily/drum-note-performer.cc | 2 +- lily/dynamic-engraver.cc | 1 - lily/dynamic-performer.cc | 1 - lily/engraver-group-engraver.cc | 1 - lily/engraver.cc | 1 - lily/extender-engraver.cc | 1 - lily/figured-bass-engraver.cc | 1 - lily/fingering-engraver.cc | 1 - lily/font-size-engraver.cc | 17 ++++++------- lily/forbid-break-engraver.cc | 1 - lily/glissando-engraver.cc | 1 - lily/grace-engraver.cc | 1 - lily/gregorian-ligature-engraver.cc | 3 ++- lily/grid-line-interface.cc | 1 - lily/grid-line-span-engraver.cc | 1 - lily/grid-point-engraver.cc | 4 +-- lily/grob-pq-engraver.cc | 1 - lily/grob-property.cc | 9 +++++-- lily/grob-smob.cc | 3 --- lily/hara-kiri-engraver.cc | 5 ++-- lily/horizontal-bracket-engraver.cc | 5 ++-- lily/hyphen-engraver.cc | 1 - lily/include/bezier.hh | 1 + lily/include/context.hh | 4 +-- lily/include/program-option.hh | 1 + lily/include/translator-group.hh | 2 +- lily/include/translator.hh | 1 + lily/include/translator.icc | 4 +-- lily/instrument-name-engraver.cc | 2 -- lily/key-engraver.cc | 1 - lily/key-performer.cc | 2 +- lily/ledger-line-engraver.cc | 1 - lily/ligature-bracket-engraver.cc | 1 - lily/ligature-engraver.cc | 1 - lily/lyric-engraver.cc | 1 - lily/lyric-performer.cc | 3 ++- lily/mark-engraver.cc | 1 - lily/measure-grouping-engraver.cc | 1 - lily/melisma-translator.cc | 1 - lily/mensural-ligature-engraver.cc | 3 ++- lily/metronome-engraver.cc | 1 - lily/multi-measure-rest-engraver.cc | 1 - lily/music.cc | 3 +-- lily/new-fingering-engraver.cc | 1 - lily/note-head-line-engraver.cc | 1 - lily/note-heads-engraver.cc | 1 - lily/note-name-engraver.cc | 1 - lily/note-performer.cc | 3 ++- lily/ottava-engraver.cc | 1 - lily/output-property-engraver.cc | 1 - lily/paper-column-engraver.cc | 1 - lily/part-combine-engraver.cc | 1 - lily/percent-repeat-engraver.cc | 1 - lily/performer-group-performer.cc | 1 - lily/phrasing-slur-engraver.cc | 1 - lily/piano-pedal-engraver.cc | 1 - lily/piano-pedal-performer.cc | 2 +- lily/pitch-squash-engraver.cc | 1 - lily/pitched-trill-engraver.cc | 1 - lily/program-option.cc | 13 +++++++--- lily/recording-group-engraver.cc | 1 - lily/repeat-acknowledge-engraver.cc | 4 +-- lily/rest-collision-engraver.cc | 1 - lily/rest-engraver.cc | 1 - lily/rhythmic-column-engraver.cc | 1 - lily/score-engraver.cc | 1 - lily/score-performer.cc | 1 - lily/script-column-engraver.cc | 1 - lily/script-engraver.cc | 1 - lily/separating-line-group-engraver.cc | 1 - lily/separation-item.cc | 1 - lily/simple-spacer.cc | 9 +++---- lily/slash-repeat-engraver.cc | 1 - lily/slur-engraver.cc | 1 - lily/slur-performer.cc | 6 +++-- lily/spaceable-grob.cc | 8 +++++- lily/spacing-engraver.cc | 1 - lily/span-arpeggio-engraver.cc | 1 - lily/span-bar-engraver.cc | 1 - lily/span-dynamic-performer.cc | 2 +- lily/staff-collecting-engraver.cc | 1 - lily/staff-performer.cc | 2 +- lily/staff-symbol-engraver.cc | 1 - lily/stanza-number-align-engraver.cc | 1 - lily/stanza-number-engraver.cc | 1 - lily/stem-engraver.cc | 1 - lily/string-number-engraver.cc | 1 - lily/swallow-engraver.cc | 1 - lily/swallow-perf.cc | 1 - lily/system-start-delimiter-engraver.cc | 1 - lily/system.cc | 4 +++ lily/tab-note-heads-engraver.cc | 1 - lily/tab-staff-symbol-engraver.cc | 1 - lily/tempo-performer.cc | 2 +- lily/text-engraver.cc | 1 - lily/text-spanner-engraver.cc | 1 - lily/tie-engraver.cc | 1 - lily/tie-performer.cc | 1 - lily/time-signature-engraver.cc | 1 - lily/time-signature-performer.cc | 2 +- lily/timing-translator.cc | 2 +- lily/translator.cc | 1 - lily/trill-spanner-engraver.cc | 1 - lily/tuplet-engraver.cc | 1 - lily/type-swallow-translator.cc | 5 +--- lily/vaticana-ligature-engraver.cc | 3 ++- lily/vertical-align-engraver.cc | 1 - lily/vertically-spaced-context-engraver.cc | 1 - lily/volta-engraver.cc | 1 - lily/volta-repeat-iterator.cc | 4 +-- scm/define-grob-properties.scm | 2 +- scm/lily.scm | 1 + 142 files changed, 159 insertions(+), 207 deletions(-) diff --git a/ChangeLog b/ChangeLog index 629a49fc86..46d952722d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,17 @@ +2005-07-24 Han-Wen Nienhuys + + * lily/context.cc (where_defined): also assign value in + where_defined(). + + * lily/bezier.cc (get_other_coordinate): use curve_coordinate + (curve_coordinate): new function + + * flower/include/parray.hh (binsearch): add lo,hi range to arguments. + + * lily/simple-spacer.cc (add_columns): only add rods between + column i and begin/end if keep-inside-line is set (this repleces + allow-outside-line as default) + 2005-07-23 Han-Wen Nienhuys * lily/tuplet-engraver.cc (start_translation_timestep): only read diff --git a/flower/include/parray.hh b/flower/include/parray.hh index bc51bda5a0..ee39225855 100644 --- a/flower/include/parray.hh +++ b/flower/include/parray.hh @@ -232,12 +232,10 @@ template int binsearch (Array const &arr, T t, int (*compare) (T const &, T const &)) { - int lo; - int hi; int cmp; int result; - lo = 0; - hi = Array::maxkey; + int lo = 0; + int hi = arr.size (); /* binary search */ do @@ -262,13 +260,12 @@ binsearch (Array const &arr, T t, int (*compare) (T const &, T const &)) template int binsearch_links (Link_array const &arr, T *t, - int (*compare) (T *const &, T *const &), - int lo = 0, int hi = -1) + int (*compare) (T *const &, T *const &)) { int cmp; int result; - if (hi < 0) - hi = arr.size (); + int lo = 0; + int hi = arr.size (); if (hi == 0) return -1; diff --git a/lily/accidental-engraver.cc b/lily/accidental-engraver.cc index be3d1b793c..c8e00a7b25 100644 --- a/lily/accidental-engraver.cc +++ b/lily/accidental-engraver.cc @@ -128,7 +128,9 @@ Accidental_engraver::update_local_key_signature () Context *trans = context ()->get_parent_context (); /* Huh. Don't understand what this is good for. --hwn. */ - while (trans && trans->where_defined (ly_symbol2scm ("localKeySignature"))) + + SCM val; + while (trans && trans->where_defined (ly_symbol2scm ("localKeySignature"), &val)) { trans->set_property ("localKeySignature", ly_deep_copy (last_keysig_)); trans = trans->get_parent_context (); @@ -504,13 +506,10 @@ Accidental_engraver::stop_translation_timestep () int a = pitch->get_alteration (); SCM key = scm_cons (scm_int2num (o), scm_int2num (n)); + SCM localsig = SCM_EOL; while (origin - && origin->where_defined (ly_symbol2scm ("localKeySignature"))) + && origin->where_defined (ly_symbol2scm ("localKeySignature"), &localsig)) { - /* - huh? we set props all the way to the top? - */ - SCM localsig = origin->get_property ("localKeySignature"); bool change = false; if (accidentals_[i].tied_) { @@ -616,9 +615,6 @@ ADD_TRANSLATOR (Accidental_engraver, "Accidental AccidentalSuggestion", "", - - /* acks */ - "", "autoAccidentals " "autoCautionaries " diff --git a/lily/ambitus-engraver.cc b/lily/ambitus-engraver.cc index e2471fc385..ff3b7ea6a5 100644 --- a/lily/ambitus-engraver.cc +++ b/lily/ambitus-engraver.cc @@ -186,6 +186,5 @@ ADD_TRANSLATOR (Ambitus_engraver, /* descr */ "", /* creats*/ "Ambitus AmbitusLine AmbitusNoteHead AmbitusAccidental", /* accepts */ "", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/arpeggio-engraver.cc b/lily/arpeggio-engraver.cc index 0e36185ba1..febbb44e56 100644 --- a/lily/arpeggio-engraver.cc +++ b/lily/arpeggio-engraver.cc @@ -110,6 +110,5 @@ ADD_TRANSLATOR (Arpeggio_engraver, /* descr */ "Generate an Arpeggio symbol", /* creats*/ "Arpeggio", /* accepts */ "arpeggio-event", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/auto-beam-engraver.cc b/lily/auto-beam-engraver.cc index 9559e044cd..8123101852 100644 --- a/lily/auto-beam-engraver.cc +++ b/lily/auto-beam-engraver.cc @@ -435,6 +435,5 @@ ADD_TRANSLATOR (Auto_beam_engraver, "@code{stemRightBeamCount}. ", /* creats*/ "Beam", /* accepts */ "beam-forbid-event", - /* acks */ "", /* reads */ "autoBeaming autoBeamSettings beatLength subdivideBeams", /* write */ ""); diff --git a/lily/axis-group-engraver.cc b/lily/axis-group-engraver.cc index 69b77683b6..42a8ba30be 100644 --- a/lily/axis-group-engraver.cc +++ b/lily/axis-group-engraver.cc @@ -127,6 +127,5 @@ ADD_TRANSLATOR (Axis_group_engraver, /* descr */ "Group all objects created in this context in a VerticalAxisGroup spanner.", /* creats*/ "VerticalAxisGroup", /* accepts */ "", - /* acks */ "", /* reads */ "verticalExtent minimumVerticalExtent extraVerticalExtent", /* write */ ""); diff --git a/lily/axis-group-interface.cc b/lily/axis-group-interface.cc index 24838b9be0..11b00e97c8 100644 --- a/lily/axis-group-interface.cc +++ b/lily/axis-group-interface.cc @@ -34,7 +34,6 @@ Axis_group_interface::add_element (Grob *me, Grob *e) } Pointer_group_interface::add_grob (me, ly_symbol2scm ("elements"), e); - me->add_dependency (e); } bool diff --git a/lily/bar-check-iterator.cc b/lily/bar-check-iterator.cc index bc617a3d11..92a9dc988c 100644 --- a/lily/bar-check-iterator.cc +++ b/lily/bar-check-iterator.cc @@ -53,7 +53,8 @@ Bar_check_iterator::process (Moment m) bool warn = true; if (to_boolean (sync)) { - tr = tr->where_defined (ly_symbol2scm ("measurePosition")); + SCM mp; + tr = tr->where_defined (ly_symbol2scm ("measurePosition"), &mp); Moment zero; tr->set_property ("measurePosition", zero.smobbed_copy ()); } diff --git a/lily/bar-engraver.cc b/lily/bar-engraver.cc index c67ee1a309..3875c05da0 100644 --- a/lily/bar-engraver.cc +++ b/lily/bar-engraver.cc @@ -100,6 +100,5 @@ ADD_TRANSLATOR (Bar_engraver, "@code{whichBar} property. If it has no bar line to create, it will forbid a linebreak at this point", /* creats*/ "BarLine", /* accepts */ "", - /* acks */ "", /* reads */ "whichBar", /* write */ ""); diff --git a/lily/bar-number-engraver.cc b/lily/bar-number-engraver.cc index 66fbe687e4..5a82841290 100644 --- a/lily/bar-number-engraver.cc +++ b/lily/bar-number-engraver.cc @@ -108,6 +108,5 @@ ADD_TRANSLATOR (Bar_number_engraver, /* creats*/ "BarNumber", /* accepts */ "", - /* acks */ "", /* reads */ "currentBarNumber stavesFound barNumberVisibility", /* write */ ""); diff --git a/lily/beam-engraver.cc b/lily/beam-engraver.cc index f1738796ed..40bb7c4feb 100644 --- a/lily/beam-engraver.cc +++ b/lily/beam-engraver.cc @@ -280,7 +280,6 @@ ADD_TRANSLATOR (Beam_engraver, "printed with flags instead of beams.", /* creats*/ "Beam", /* accepts */ "beam-event", - /* acks */ "", /* reads */ "beamMelismaBusy beatLength subdivideBeams", /* write */ ""); @@ -320,7 +319,6 @@ ADD_TRANSLATOR (Grace_beam_engraver, " are at grace points in time. ", /* creats*/ "Beam", /* accepts */ "beam-event", - /* acks */ "stem-interface rest-interface", /* reads */ "beamMelismaBusy beatLength allowBeamBreak subdivideBeams", /* write */ ""); diff --git a/lily/beam-performer.cc b/lily/beam-performer.cc index 861f66f35a..0d51236132 100644 --- a/lily/beam-performer.cc +++ b/lily/beam-performer.cc @@ -90,5 +90,5 @@ Beam_performer::try_music (Music *m) } ADD_TRANSLATOR (Beam_performer, "", "", - "beam-event", "", "", ""); + "beam-event", "", ""); diff --git a/lily/bezier.cc b/lily/bezier.cc index 2efe5c7e07..e701ae9d55 100644 --- a/lily/bezier.cc +++ b/lily/bezier.cc @@ -75,14 +75,37 @@ Bezier::get_other_coordinate (Axis a, Real x) const return 0.0; } - Offset c = curve_point (ts[0]); #ifdef PARANOID + Offset c = curve_point (ts[0]); if (fabs (c[a] - x) > 1e-8) programming_error ("bezier intersection not correct?"); #endif - - return c[other]; + + return curve_coordinate (ts[0], other); +} + +Real +Bezier::curve_coordinate (Real t, Axis a) const +{ + Real tj = 1; + Real one_min_tj[4]; + one_min_tj[0] = 1; + for (int i = 1; i < 4; i++) + { + one_min_tj[i] = one_min_tj[i-1] * (1-t); + } + + Real r = 0.0; + for (int j = 0; j < 4; j++) + { + r += control_[j][a] * binomial_coefficient_3[j] + * tj * one_min_tj[3-j]; + + tj *= t; + } + + return r; } Offset diff --git a/lily/break-align-engraver.cc b/lily/break-align-engraver.cc index 2363fdded0..3d4eab12a5 100644 --- a/lily/break-align-engraver.cc +++ b/lily/break-align-engraver.cc @@ -128,6 +128,5 @@ ADD_TRANSLATOR (Break_align_engraver, "The left edge of the alignment gets a separate group, with a symbol @code{left-edge}. ", /* creats*/ "BreakAlignment BreakAlignGroup LeftEdge", /* accepts */ "", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/breathing-sign-engraver.cc b/lily/breathing-sign-engraver.cc index 372102adf8..fc922cf58a 100644 --- a/lily/breathing-sign-engraver.cc +++ b/lily/breathing-sign-engraver.cc @@ -68,6 +68,5 @@ ADD_TRANSLATOR (Breathing_sign_engraver, /* descr */ "", /* creats*/ "BreathingSign", /* accepts */ "breathing-event", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/chord-name-engraver.cc b/lily/chord-name-engraver.cc index 8256b32aa0..b1206d2851 100644 --- a/lily/chord-name-engraver.cc +++ b/lily/chord-name-engraver.cc @@ -157,7 +157,6 @@ ADD_TRANSLATOR (Chord_name_engraver, "and generate the appropriate chordname.", /* creats*/ "ChordName", /* accepts */ "note-event", - /* acks */ "", /* reads */ "chordChanges chordNameExceptions chordNameFunction " "chordNoteNamer chordRootNamer chordNameExceptions majorSevenSymbol", /* write */ ""); diff --git a/lily/chord-tremolo-engraver.cc b/lily/chord-tremolo-engraver.cc index d4221afd20..0c34395902 100644 --- a/lily/chord-tremolo-engraver.cc +++ b/lily/chord-tremolo-engraver.cc @@ -214,6 +214,5 @@ ADD_TRANSLATOR (Chord_tremolo_engraver, /* descr */ "Generates beams for tremolo repeats.", /* creats*/ "Beam", /* accepts */ "repeated-music", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/clef-engraver.cc b/lily/clef-engraver.cc index 99b92bd5e4..c1afd9e220 100644 --- a/lily/clef-engraver.cc +++ b/lily/clef-engraver.cc @@ -151,7 +151,8 @@ Clef_engraver::inspect_clef_properties () if (to_boolean (force_clef)) { - Context *w = context ()->where_defined (ly_symbol2scm ("forceClef")); + SCM prev; + Context *w = context ()->where_defined (ly_symbol2scm ("forceClef"), &prev); w->set_property ("forceClef", SCM_EOL); } } @@ -187,6 +188,5 @@ ADD_TRANSLATOR (Clef_engraver, /* descr */ "Determine and set reference point for pitches", /* creats*/ "Clef OctavateEight", /* accepts */ "", - /* acks */ "", /* reads */ "clefPosition clefGlyph middleCPosition clefOctavation explicitClefVisibility forceClef", /* write */ ""); diff --git a/lily/cluster-engraver.cc b/lily/cluster-engraver.cc index cbab361ca6..51d262c00e 100644 --- a/lily/cluster-engraver.cc +++ b/lily/cluster-engraver.cc @@ -132,7 +132,6 @@ ADD_TRANSLATOR (Cluster_spanner_engraver, /* descr */ "Engraves a cluster using Spanner notation ", /* creats*/ "ClusterSpanner ClusterSpannerBeacon", /* accepts */ "cluster-note-event busy-playing-event", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/coherent-ligature-engraver.cc b/lily/coherent-ligature-engraver.cc index 160ca72963..f9dfcfe31b 100644 --- a/lily/coherent-ligature-engraver.cc +++ b/lily/coherent-ligature-engraver.cc @@ -219,10 +219,11 @@ Coherent_ligature_engraver::typeset_ligature (Spanner *ligature, #include "translator.icc" +ADD_ACKNOWLEDGER(Coherent_ligature_engraver, note_head); +ADD_ACKNOWLEDGER(Coherent_ligature_engraver, rest); ADD_TRANSLATOR (Coherent_ligature_engraver, /* descr */ "This is an abstract class. Subclasses such as Gregorian_ligature_engraver handle ligatures by glueing special ligature heads together.", /* creats*/ "", /* accepts */ "ligature-event", - /* acks */ "note-head-interface rest-interface", /* reads */ "", /* write */ ""); diff --git a/lily/collision-engraver.cc b/lily/collision-engraver.cc index 4ddf5f6e06..c820e35921 100644 --- a/lily/collision-engraver.cc +++ b/lily/collision-engraver.cc @@ -72,6 +72,5 @@ ADD_TRANSLATOR (Collision_engraver, /* descr */ "Collect NoteColumns, and as soon as there are two or more, put them in a NoteCollision object.", /* creats*/ "NoteCollision", /* accepts */ "", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/completion-note-heads-engraver.cc b/lily/completion-note-heads-engraver.cc index c8a179dedb..4553428417 100644 --- a/lily/completion-note-heads-engraver.cc +++ b/lily/completion-note-heads-engraver.cc @@ -320,6 +320,5 @@ ADD_TRANSLATOR (Completion_heads_engraver, "break long notes and automatically tie them into the next measure.", /* creats*/ "NoteHead Dots Tie", /* accepts */ "busy-playing-event note-event", - /* acks */ "", /* reads */ "middleCPosition measurePosition measureLength", /* write */ ""); diff --git a/lily/context-property.cc b/lily/context-property.cc index 5c0789943e..959d6309f6 100644 --- a/lily/context-property.cc +++ b/lily/context-property.cc @@ -31,12 +31,12 @@ void execute_pushpop_property (Context *trg, SCM prop, SCM eltprop, SCM val) { + SCM prev = SCM_EOL; if (scm_is_symbol (prop) && scm_is_symbol (eltprop)) { if (val != SCM_UNDEFINED) { - SCM prev = SCM_EOL; - Context *where = trg->where_defined (prop); + Context *where = trg->where_defined (prop, &prev); /* Don't mess with MIDI. @@ -50,8 +50,6 @@ execute_pushpop_property (Context *trg, prev = scm_cons (base, base); trg->internal_set_property (prop, prev); } - else - prev = trg->internal_get_property (prop); if (!scm_is_pair (prev)) { @@ -76,9 +74,8 @@ execute_pushpop_property (Context *trg, // warning here. } } - else if (trg->where_defined (prop) == trg) + else if (trg->where_defined (prop, &prev) == trg) { - SCM prev = trg->internal_get_property (prop); SCM prev_alist = scm_car (prev); SCM daddy = scm_cdr (prev); @@ -151,7 +148,8 @@ updated_grob_properties (Context *tg, SCM sym) { assert (scm_is_symbol (sym)); - tg = tg->where_defined (sym); + SCM props; + tg = tg->where_defined (sym, &props); if (!tg) return SCM_EOL; @@ -160,8 +158,6 @@ updated_grob_properties (Context *tg, SCM sym) ? updated_grob_properties (tg->get_parent_context (), sym) : SCM_EOL; - SCM props = tg->internal_get_property (sym); - if (!scm_is_pair (props)) { programming_error ("grob props not a pair?"); diff --git a/lily/context-scheme.cc b/lily/context-scheme.cc index 6ebb4fcac0..c1c82e8d10 100644 --- a/lily/context-scheme.cc +++ b/lily/context-scheme.cc @@ -97,7 +97,8 @@ LY_DEFINE (ly_context_property_where_defined, "ly:context-property-where-defined SCM_ASSERT_TYPE (tr, context, SCM_ARG1, __FUNCTION__, "Context"); SCM_ASSERT_TYPE (scm_is_symbol (name), name, SCM_ARG2, __FUNCTION__, "symbol"); - tr = tr->where_defined (name); + SCM val; + tr = tr->where_defined (name, &val); if (tr) return tr->self_scm (); diff --git a/lily/context.cc b/lily/context.cc index 663c57eeb8..d1b5cd56e0 100644 --- a/lily/context.cc +++ b/lily/context.cc @@ -329,18 +329,16 @@ Context::get_default_interpreter () PROPERTIES */ Context * -Context::where_defined (SCM sym) const +Context::where_defined (SCM sym, SCM *value) const { - if (properties_dict ()->contains (sym)) + if (properties_dict ()->try_retrieve (sym, value)) { return (Context *)this; } - return (daddy_context_) ? daddy_context_->where_defined (sym) : 0; + return (daddy_context_) ? daddy_context_->where_defined (sym, value) : 0; } -//#define PROFILE_PROPERTY_ACCESSES - SCM context_property_lookup_table; LY_DEFINE(ly_context_property_lookup_stats, "ly:context-property-lookup-stats", 0,0,0, (), @@ -357,9 +355,12 @@ LY_DEFINE(ly_context_property_lookup_stats, "ly:context-property-lookup-stats", SCM Context::internal_get_property (SCM sym) const { -#ifdef PROFILE_PROPERTY_ACCESSES - extern void note_property_access (SCM *table, SCM sym); - note_property_access (&context_property_lookup_table, sym); +#ifndef NDEBUG + if (profile_property_accesses) + { + extern void note_property_access (SCM *table, SCM sym); + note_property_access (&context_property_lookup_table, sym); + } #endif SCM val = SCM_EOL; @@ -576,12 +577,6 @@ Context::get_parent_context () const return daddy_context_; } -Translator_group * -Context::implementation () const -{ - return implementation_; -} - void Context::clear_key_disambiguations () { diff --git a/lily/custos-engraver.cc b/lily/custos-engraver.cc index 2bf02392ff..b9649205ac 100644 --- a/lily/custos-engraver.cc +++ b/lily/custos-engraver.cc @@ -67,6 +67,7 @@ Custos_engraver::start_translation_timestep () void Custos_engraver::acknowledge_bar (Grob_info info) { + (void) info; custos_permitted_ = true; } @@ -142,6 +143,5 @@ ADD_TRANSLATOR (Custos_engraver, /* descr */ "", /* creats*/ "Custos", /* accepts */ "", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/default-bar-line-engraver.cc b/lily/default-bar-line-engraver.cc index 54c3543d71..2203faa6d5 100644 --- a/lily/default-bar-line-engraver.cc +++ b/lily/default-bar-line-engraver.cc @@ -34,7 +34,6 @@ ADD_TRANSLATOR (Default_bar_line_engraver, "level as @ref{Timing_translator}. ", /* creats*/ "", /* accepts */ "", - /* acks */ "", /* reads */ "measurePosition automaticBars whichBar barAlways defaultBarType " "measureLength", diff --git a/lily/dot-column-engraver.cc b/lily/dot-column-engraver.cc index b6580204e0..235729c98a 100644 --- a/lily/dot-column-engraver.cc +++ b/lily/dot-column-engraver.cc @@ -80,6 +80,5 @@ ADD_TRANSLATOR (Dot_column_engraver, "If omitted, then dots appear on top of the notes.", /* creats*/ "DotColumn", /* accepts */ "", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/drum-note-engraver.cc b/lily/drum-note-engraver.cc index cf61692baa..479ac9ad0d 100644 --- a/lily/drum-note-engraver.cc +++ b/lily/drum-note-engraver.cc @@ -170,7 +170,6 @@ ADD_TRANSLATOR (Drum_notes_engraver, /* descr */ "Generate noteheads.", /* creats*/ "NoteHead Dots Script", /* accepts */ "note-event busy-playing-event", - /* acks */ "", /* reads */ "drumStyleTable", /* write */ ""); diff --git a/lily/drum-note-performer.cc b/lily/drum-note-performer.cc index 2556a291fa..388f637724 100644 --- a/lily/drum-note-performer.cc +++ b/lily/drum-note-performer.cc @@ -94,4 +94,4 @@ Drum_note_performer::try_music (Music *ev) ADD_TRANSLATOR (Drum_note_performer, "Play drum notes.", "", - "note-event busy-playing-event", "", "", ""); + "note-event busy-playing-event", "", ""); diff --git a/lily/dynamic-engraver.cc b/lily/dynamic-engraver.cc index fc5c2ebefc..c12d437b5a 100644 --- a/lily/dynamic-engraver.cc +++ b/lily/dynamic-engraver.cc @@ -442,6 +442,5 @@ ADD_TRANSLATOR (Dynamic_engraver, /* creats*/ "DynamicLineSpanner DynamicText Hairpin TextSpanner", /* accepts */ "absolute-dynamic-event crescendo-event decrescendo-event", - /* acks */ "note-column-interface script-interface", /* reads */ "", /* write */ ""); diff --git a/lily/dynamic-performer.cc b/lily/dynamic-performer.cc index e39ea70593..7b34e4c898 100644 --- a/lily/dynamic-performer.cc +++ b/lily/dynamic-performer.cc @@ -131,6 +131,5 @@ ADD_TRANSLATOR (Dynamic_performer, /*descr*/ "", /* creats*/ "", /* accepts */ "absolute-dynamic-event", - /* acks */ "", /*reads */"dynamicAbsoluteVolumeFunction midiMaximumVolume midiMinimumVolume midiInstrument instrumentEqualizer", /*writes*/""); diff --git a/lily/engraver-group-engraver.cc b/lily/engraver-group-engraver.cc index 79ff78f90f..9fa8770d35 100644 --- a/lily/engraver-group-engraver.cc +++ b/lily/engraver-group-engraver.cc @@ -134,7 +134,6 @@ ADD_TRANSLATOR_GROUP (Engraver_group_engraver, /* descr */ "A group of engravers taken together", /* creats*/ "", /* accepts */ "", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/engraver.cc b/lily/engraver.cc index a93b202cbc..a8d833874a 100644 --- a/lily/engraver.cc +++ b/lily/engraver.cc @@ -63,7 +63,6 @@ ADD_TRANSLATOR (Engraver, "", "", "", - "", ""); diff --git a/lily/extender-engraver.cc b/lily/extender-engraver.cc index c1ca8d6a92..5dd6776de5 100644 --- a/lily/extender-engraver.cc +++ b/lily/extender-engraver.cc @@ -150,6 +150,5 @@ ADD_TRANSLATOR (Extender_engraver, /* descr */ "Create lyric extenders", /* creats*/ "LyricExtender", /* accepts */ "extender-event", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/figured-bass-engraver.cc b/lily/figured-bass-engraver.cc index daddfaf972..6527363805 100644 --- a/lily/figured-bass-engraver.cc +++ b/lily/figured-bass-engraver.cc @@ -89,6 +89,5 @@ ADD_TRANSLATOR (Figured_bass_engraver, /* descr */ "Make figured bass numbers.", /* creats*/ "BassFigure", /* accepts */ "rest-event bass-figure-event", - /* acks */ "", /* reads */ "bassFigureFormatFunction", /* write */ ""); diff --git a/lily/fingering-engraver.cc b/lily/fingering-engraver.cc index b024f4b7c5..a473cc808f 100644 --- a/lily/fingering-engraver.cc +++ b/lily/fingering-engraver.cc @@ -145,6 +145,5 @@ ADD_TRANSLATOR (Fingering_engraver, /* descr */ "Create fingering-scripts", /* creats*/ "Fingering", /* accepts */ "fingering-event", - /* acks */ "rhythmic-head-interface stem-interface", /* reads */ "", /* write */ ""); diff --git a/lily/font-size-engraver.cc b/lily/font-size-engraver.cc index 3c644b37fc..580afac303 100644 --- a/lily/font-size-engraver.cc +++ b/lily/font-size-engraver.cc @@ -38,15 +38,15 @@ Font_size_engraver::acknowledge_font (Grob_info gi) /* We only want to process a grob once. */ + if (!size) + return ; + if (gi.context () != context ()) - return; - - if (size) - { - Real font_size = size - + robust_scm2double (gi.grob ()->get_property ("font-size"), 0); - gi.grob ()->set_property ("font-size", scm_make_real (font_size)); - } + return ; + + Real font_size = size + + robust_scm2double (gi.grob ()->get_property ("font-size"), 0); + gi.grob ()->set_property ("font-size", scm_make_real (font_size)); } #include "translator.icc" @@ -56,6 +56,5 @@ ADD_TRANSLATOR (Font_size_engraver, /* descr */ "Puts fontSize into font-relative-size grob property.", /* creats*/ "", /* accepts */ "", - /* acks */ "", /* reads */ "fontSize", /* write */ ""); diff --git a/lily/forbid-break-engraver.cc b/lily/forbid-break-engraver.cc index 0ba34fec52..4f75b2be8e 100644 --- a/lily/forbid-break-engraver.cc +++ b/lily/forbid-break-engraver.cc @@ -54,6 +54,5 @@ ADD_TRANSLATOR (Forbid_line_break_engraver, /* descr */ "Forbid line breaks when note heads are still playing at some point.", /* creats*/ "", /* accepts */ "", - /* acks */ "", /* reads */ "busyGrobs", /* write */ ""); diff --git a/lily/glissando-engraver.cc b/lily/glissando-engraver.cc index 16db55ec15..7f4f1823bd 100644 --- a/lily/glissando-engraver.cc +++ b/lily/glissando-engraver.cc @@ -110,6 +110,5 @@ ADD_TRANSLATOR (Glissando_engraver, /* descr */ "Engrave a glissandi", /* creats*/ "Glissando", /* accepts */ "glissando-event", - /* acks */ "", /* reads */ "followVoice", /* write */ ""); diff --git a/lily/grace-engraver.cc b/lily/grace-engraver.cc index 25fe3dedec..57bf0c476d 100644 --- a/lily/grace-engraver.cc +++ b/lily/grace-engraver.cc @@ -111,6 +111,5 @@ ADD_TRANSLATOR (Grace_engraver, /* descr */ "Set font size and other properties for grace notes.", /* creats*/ "", /* accepts */ "", - /* acks */ "", /* reads */ "graceSettings", /* write */ ""); diff --git a/lily/gregorian-ligature-engraver.cc b/lily/gregorian-ligature-engraver.cc index b6f65b9fa8..4958274a2e 100644 --- a/lily/gregorian-ligature-engraver.cc +++ b/lily/gregorian-ligature-engraver.cc @@ -275,10 +275,11 @@ Gregorian_ligature_engraver::stop_translation_timestep () #include "translator.icc" +ADD_ACKNOWLEDGER(Gregorian_ligature_engraver, rest); +ADD_ACKNOWLEDGER(Gregorian_ligature_engraver, note_head); ADD_TRANSLATOR (Gregorian_ligature_engraver, /* descr */ "This is an abstract class. Subclasses such as Vaticana_ligature_engraver handle ligatures by glueing special ligature heads together.", /* creats*/ "", /* accepts */ "ligature-event", - /* acks */ "note-head-interface rest-interface", /* reads */ "", /* write */ ""); diff --git a/lily/grid-line-interface.cc b/lily/grid-line-interface.cc index 087aa2ba9a..7f1bdf47d5 100644 --- a/lily/grid-line-interface.cc +++ b/lily/grid-line-interface.cc @@ -70,7 +70,6 @@ void Grid_line_interface::add_grid_point (Grob *me, Grob *b) { Pointer_group_interface::add_grob (me, ly_symbol2scm ("elements"), b); - me->add_dependency (b); } ADD_INTERFACE (Grid_line_interface, "grid-line-interface", diff --git a/lily/grid-line-span-engraver.cc b/lily/grid-line-span-engraver.cc index 73e81736c3..2044542294 100644 --- a/lily/grid-line-span-engraver.cc +++ b/lily/grid-line-span-engraver.cc @@ -65,6 +65,5 @@ ADD_TRANSLATOR (Grid_line_span_engraver, "line lines, and draws a single span-line across them.", /* creats*/ "GridLine", /* accepts */ "", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/grid-point-engraver.cc b/lily/grid-point-engraver.cc index e28c30fbee..c45ff0d459 100644 --- a/lily/grid-point-engraver.cc +++ b/lily/grid-point-engraver.cc @@ -11,6 +11,8 @@ #include "item.hh" #include "moment.hh" +#include "translator.icc" + class Grid_point_engraver : public Engraver { public: @@ -38,13 +40,11 @@ Grid_point_engraver::Grid_point_engraver () { } -#include "translator.icc" ADD_TRANSLATOR (Grid_point_engraver, /* descr */ "generate grid points.", /* creats*/ "GridPoint", /* accepts */ "", - /* acks */ "", /* reads */ "gridInterval", /* write */ ""); diff --git a/lily/grob-pq-engraver.cc b/lily/grob-pq-engraver.cc index 00ca948cd6..221ba53de9 100644 --- a/lily/grob-pq-engraver.cc +++ b/lily/grob-pq-engraver.cc @@ -141,6 +141,5 @@ ADD_TRANSLATOR (Grob_pq_engraver, /* descr */ "Administrate when certain grobs (eg. note heads) stop playing", /* creats*/ "", /* accepts */ "", - /* acks */ "", /* reads */ "busyGrobs", /* write */ "busyGrobs"); diff --git a/lily/grob-property.cc b/lily/grob-property.cc index 17d643bdfb..faa6579444 100644 --- a/lily/grob-property.cc +++ b/lily/grob-property.cc @@ -15,6 +15,8 @@ #include "item.hh" #include "misc.hh" #include "item.hh" +#include "program-option.hh" + SCM Grob::get_property_alist_chain (SCM def) const @@ -128,8 +130,11 @@ note_property_access (SCM *table, SCM sym) SCM Grob::internal_get_property (SCM sym) const { -#ifdef PROFILE_PROPERTY_ACCESSES - note_property_access (&grob_property_lookup_table, sym); +#ifndef NDEBUG + if (profile_property_accesses) + { + note_property_access (&grob_property_lookup_table, sym); + } #endif SCM s = scm_sloppy_assq (sym, mutable_property_alist_); diff --git a/lily/grob-smob.cc b/lily/grob-smob.cc index 836d42c4c9..e7800e96e2 100644 --- a/lily/grob-smob.cc +++ b/lily/grob-smob.cc @@ -43,9 +43,6 @@ Grob::mark_smob (SCM ses) if (s->original_) scm_gc_mark (s->original_->self_scm ()); - if (s->pscore_) - scm_gc_mark (s->pscore_->self_scm ()); - s->derived_mark (); scm_gc_mark (s->object_alist_); scm_gc_mark (s->interfaces_); diff --git a/lily/hara-kiri-engraver.cc b/lily/hara-kiri-engraver.cc index e73c67ab4b..98f7f36d49 100644 --- a/lily/hara-kiri-engraver.cc +++ b/lily/hara-kiri-engraver.cc @@ -12,6 +12,8 @@ #include "rhythmic-head.hh" #include "spanner.hh" +#include "translator.icc" + class Hara_kiri_engraver : public Axis_group_engraver { protected: @@ -66,14 +68,13 @@ Hara_kiri_engraver::Hara_kiri_engraver () interesting_ = SCM_EOL; } -#include "translator.icc" + ADD_ACKNOWLEDGER(Hara_kiri_engraver, grob); ADD_TRANSLATOR (Hara_kiri_engraver, /* descr */ "Like Axis_group_engraver, but make a hara-kiri spanner, and add " "interesting items (ie. note heads, lyric syllables and normal rests) ", /* creats*/ "RemoveEmptyVerticalGroup", /* accepts */ "", - /* acks */ "grob-interface", /* reads */ "keepAliveInterfaces", /* write */ ""); diff --git a/lily/horizontal-bracket-engraver.cc b/lily/horizontal-bracket-engraver.cc index 0148204f9c..cf611c5d1a 100644 --- a/lily/horizontal-bracket-engraver.cc +++ b/lily/horizontal-bracket-engraver.cc @@ -12,6 +12,8 @@ #include "note-column.hh" #include "pointer-group-interface.hh" +#include "translator.icc" + class Horizontal_bracket_engraver : public Engraver { public: @@ -27,14 +29,13 @@ public: DECLARE_ACKNOWLEDGER(note_column); }; -#include "translator.icc" + ADD_ACKNOWLEDGER(Horizontal_bracket_engraver,note_column); ADD_TRANSLATOR (Horizontal_bracket_engraver, "Create horizontal brackets over notes for musical analysis purposes.", "HorizontalBracket", "note-grouping-event", "", - "", ""); Horizontal_bracket_engraver::Horizontal_bracket_engraver () diff --git a/lily/hyphen-engraver.cc b/lily/hyphen-engraver.cc index e898f03879..750b193734 100644 --- a/lily/hyphen-engraver.cc +++ b/lily/hyphen-engraver.cc @@ -139,6 +139,5 @@ ADD_TRANSLATOR (Hyphen_engraver, /* descr */ "Create lyric hyphens", /* creats*/ "LyricHyphen", /* accepts */ "hyphen-event", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/include/bezier.hh b/lily/include/bezier.hh index eb2199b33b..60d175a976 100644 --- a/lily/include/bezier.hh +++ b/lily/include/bezier.hh @@ -29,6 +29,7 @@ public: Interval extent (Axis)const; Polynomial polynomial (Axis)const; Offset curve_point (Real t) const; + Real curve_coordinate (Real t, Axis) const; static const int CONTROL_COUNT = 4; diff --git a/lily/include/context.hh b/lily/include/context.hh index 15b281110e..df053d160b 100644 --- a/lily/include/context.hh +++ b/lily/include/context.hh @@ -56,7 +56,7 @@ public: SCM children_contexts () const { return context_list_; } SCM default_child_context_name () const; - Translator_group *implementation () const; + Translator_group *implementation () const { return implementation_; } Context *get_parent_context () const; Context (Object_key const *); @@ -65,7 +65,7 @@ public: SCM internal_get_property (SCM name_sym) const; SCM properties_as_alist () const; void internal_set_property (SCM var_sym, SCM value); - Context *where_defined (SCM name_sym) const; + Context *where_defined (SCM name_sym, SCM *value) const; void unset_property (SCM var_sym); Context *remove_context (Context *trans); diff --git a/lily/include/program-option.hh b/lily/include/program-option.hh index c4279a9714..53f900a00d 100644 --- a/lily/include/program-option.hh +++ b/lily/include/program-option.hh @@ -15,6 +15,7 @@ extern bool do_midi_debugging_global; extern int testing_level_global; extern bool lily_1_8_relative; extern bool lily_1_8_compatibility_used; +extern bool profile_property_accesses; SCM ly_get_option (SCM); SCM ly_set_option (SCM, SCM); diff --git a/lily/include/translator-group.hh b/lily/include/translator-group.hh index d5330dbeb8..1dc5c0170a 100644 --- a/lily/include/translator-group.hh +++ b/lily/include/translator-group.hh @@ -85,7 +85,7 @@ void recurse_over_translators (Context *c, Translator_method ptr, void precomputed_recurse_over_translators (Context *c, Translator_precompute_index idx, Direction dir); Translator_group *get_translator_group (SCM sym); -#define ADD_TRANSLATOR_GROUP(classname, desc, grobs, accepted, acked, read, write) \ +#define ADD_TRANSLATOR_GROUP(classname, desc, grobs, accepted, read, write) \ DECLARE_UNSMOB (Translator_group, translator_group); diff --git a/lily/include/translator.hh b/lily/include/translator.hh index 4056c8d5da..2f7514905c 100644 --- a/lily/include/translator.hh +++ b/lily/include/translator.hh @@ -87,6 +87,7 @@ public: TRANSLATOR_DECLARATIONS (Translator); DECLARE_SMOBS (Translator, dummy); + protected: // should be private. Context *daddy_context_; virtual void derived_mark () const; diff --git a/lily/include/translator.icc b/lily/include/translator.icc index 3097972a4c..6cc1d79daf 100644 --- a/lily/include/translator.icc +++ b/lily/include/translator.icc @@ -30,7 +30,7 @@ } \ ADD_GLOBAL_CTOR (_ ## T ## _adder); -#define ADD_TRANSLATOR(classname, desc, grobs, accepted, acked, read, write) \ +#define ADD_TRANSLATOR(classname, desc, grobs, accepted, read, write) \ Array classname::acknowledge_static_array_;\ IMPLEMENT_FETCH_PRECOMPUTABLE_METHODS(classname); \ ADD_THIS_TRANSLATOR (classname); \ @@ -52,8 +52,6 @@ static_properties = scm_acons (ly_symbol2scm ("description"), \ scm_makfrom0str (desc), static_properties); \ \ - static_properties = scm_acons (ly_symbol2scm ("interfaces-acked"), \ - parse_symbol_list (acked), static_properties); \ static_properties = scm_acons (ly_symbol2scm ("events-accepted"), \ parse_symbol_list (accepted), static_properties); \ \ diff --git a/lily/instrument-name-engraver.cc b/lily/instrument-name-engraver.cc index bf935c31a7..4c6f329f6f 100644 --- a/lily/instrument-name-engraver.cc +++ b/lily/instrument-name-engraver.cc @@ -148,7 +148,6 @@ ADD_TRANSLATOR (Instrument_name_engraver, "at the left of the staff. ", /* creats*/ "InstrumentName", /* accepts */ "", - /* acks */ "bar-line-interface axis-group-interface", /* reads */ "instrument instr", /* write */ ""); @@ -196,6 +195,5 @@ ADD_TRANSLATOR (Vocal_name_engraver, "at the left of the staff. ", /* creats*/ "VocalName", /* accepts */ "", - /* acks */ "", /* reads */ "vocNam vocalName", /* write */ ""); diff --git a/lily/key-engraver.cc b/lily/key-engraver.cc index cd813ea00b..b1fee20684 100644 --- a/lily/key-engraver.cc +++ b/lily/key-engraver.cc @@ -186,6 +186,5 @@ ADD_TRANSLATOR (Key_engraver, /* descr */ "", /* creats*/ "KeySignature", /* accepts */ "key-change-event", - /* acks */ "", /* reads */ "keySignature printKeyCancellation lastKeySignature explicitKeySignatureVisibility createKeyOnClefChange keyAccidentalOrder keySignature", /* write */ "lastKeySignature tonic keySignature"); diff --git a/lily/key-performer.cc b/lily/key-performer.cc index 065dd57fcd..ee0afda9eb 100644 --- a/lily/key-performer.cc +++ b/lily/key-performer.cc @@ -101,4 +101,4 @@ Key_performer::try_music (Music *ev) ADD_TRANSLATOR (Key_performer, "", "", "key-change-event", - "", "", ""); + "", ""); diff --git a/lily/ledger-line-engraver.cc b/lily/ledger-line-engraver.cc index cd86fde310..4ab91ece0f 100644 --- a/lily/ledger-line-engraver.cc +++ b/lily/ledger-line-engraver.cc @@ -98,6 +98,5 @@ ADD_TRANSLATOR (Ledger_line_engraver, "Creates the spanner to draw ledger lines, and notices objects that need ledger lines", /* creats*/ "LedgerLineSpanner", /* accepts */ "", - /* acks */ "", // ledgered-interface? /* reads */ "", /* write */ "") diff --git a/lily/ligature-bracket-engraver.cc b/lily/ligature-bracket-engraver.cc index 9d00279b1c..25702af274 100644 --- a/lily/ligature-bracket-engraver.cc +++ b/lily/ligature-bracket-engraver.cc @@ -62,6 +62,5 @@ ADD_TRANSLATOR (Ligature_bracket_engraver, /* descr */ "Handles Ligature_events by engraving Ligature brackets.", /* creats*/ "TupletBracket", /* accepts */ "ligature-event", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/ligature-engraver.cc b/lily/ligature-engraver.cc index 7f47ce5165..f773c15b1c 100644 --- a/lily/ligature-engraver.cc +++ b/lily/ligature-engraver.cc @@ -293,6 +293,5 @@ ADD_TRANSLATOR (Ligature_engraver, /* descr */ "Abstract class; a concrete subclass handles Ligature_events by engraving Ligatures in a concrete style.", /* creats */ "", /* accepts */ "ligature-event", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/lyric-engraver.cc b/lily/lyric-engraver.cc index 9e93dda444..4ad0e7f48a 100644 --- a/lily/lyric-engraver.cc +++ b/lily/lyric-engraver.cc @@ -163,6 +163,5 @@ ADD_TRANSLATOR (Lyric_engraver, /* descr */ "", /* creats*/ "LyricText", /* accepts */ "lyric-event", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/lyric-performer.cc b/lily/lyric-performer.cc index b914a54644..5ae3366e68 100644 --- a/lily/lyric-performer.cc +++ b/lily/lyric-performer.cc @@ -70,4 +70,5 @@ Lyric_performer::try_music (Music *event) #include "translator.icc" -ADD_TRANSLATOR (Lyric_performer, "", "", "lyric-event", "", "", ""); +ADD_TRANSLATOR (Lyric_performer, "", "", "lyric-event", + "", ""); diff --git a/lily/mark-engraver.cc b/lily/mark-engraver.cc index d88f745277..6b813bfedd 100644 --- a/lily/mark-engraver.cc +++ b/lily/mark-engraver.cc @@ -142,6 +142,5 @@ ADD_TRANSLATOR (Mark_engraver, "end up on the same Y-location", /* creats*/ "RehearsalMark", /* accepts */ "mark-event", - /* acks */ "", /* reads */ "rehearsalMark markFormatter stavesFound", /* write */ ""); diff --git a/lily/measure-grouping-engraver.cc b/lily/measure-grouping-engraver.cc index f207534809..c55bf2fee0 100644 --- a/lily/measure-grouping-engraver.cc +++ b/lily/measure-grouping-engraver.cc @@ -112,6 +112,5 @@ ADD_TRANSLATOR (Measure_grouping_engraver, /* descr */ "Creates MeasureGrouping to indicate beat subdivision.", /* creats*/ "MeasureGrouping", /* accepts */ "", - /* acks */ "", /* reads */ "beatGrouping beatLength measurePosition currentMusicalColumn", /* write */ ""); diff --git a/lily/melisma-translator.cc b/lily/melisma-translator.cc index 97a51df670..dccfb23e51 100644 --- a/lily/melisma-translator.cc +++ b/lily/melisma-translator.cc @@ -71,6 +71,5 @@ ADD_TRANSLATOR (Melisma_translator, /* descr */ "This translator collects melisma information about ties, beams, and user settings (@code{melismaBusy}, and signals it to the @code{\addlyrics} code. ", /* creats*/ "", /* accepts */ "melisma-playing-event melisma-span-event", - /* acks */ "", /* reads */ "melismaBusy melismaBusyProperties slurMelismaBusy tieMelismaBusy beamMelismaBusy", /* write */ ""); diff --git a/lily/mensural-ligature-engraver.cc b/lily/mensural-ligature-engraver.cc index 5a6c662f90..1c9f64674d 100644 --- a/lily/mensural-ligature-engraver.cc +++ b/lily/mensural-ligature-engraver.cc @@ -385,10 +385,11 @@ Mensural_ligature_engraver::build_ligature (Spanner *ligature, #include "translator.icc" +ADD_ACKNOWLEDGER(Mensural_ligature_engraver, rest); +ADD_ACKNOWLEDGER(Mensural_ligature_engraver, note_head); ADD_TRANSLATOR (Mensural_ligature_engraver, /* descr */ "Handles Mensural_ligature_events by glueing special ligature heads together.", /* creats*/ "MensuralLigature", /* accepts */ "ligature-event", - /* acks */ "note-head-interface rest-interface", /* reads */ "", /* write */ ""); diff --git a/lily/metronome-engraver.cc b/lily/metronome-engraver.cc index 9535798f7a..35b8f780be 100644 --- a/lily/metronome-engraver.cc +++ b/lily/metronome-engraver.cc @@ -95,6 +95,5 @@ ADD_TRANSLATOR (Metronome_mark_engraver, "which is maintained by @code{@ref{Staff_collecting_engraver}}. ", /* creats*/ "MetronomeMark", /* accepts */ "metronome-change-event", - /* acks */ "", /* reads */ "stavesFound metronomeMarkFormatter", /* write */ ""); diff --git a/lily/multi-measure-rest-engraver.cc b/lily/multi-measure-rest-engraver.cc index a496977681..05ac7aed32 100644 --- a/lily/multi-measure-rest-engraver.cc +++ b/lily/multi-measure-rest-engraver.cc @@ -256,6 +256,5 @@ ADD_TRANSLATOR (Multi_measure_rest_engraver, "should use a whole rest or a breve rest to represent 1 measure ", /* creats*/ "MultiMeasureRest MultiMeasureRestNumber MultiMeasureRestText", /* accepts */ "multi-measure-rest-event multi-measure-text-event", - /* acks */ "", /* reads */ "currentBarNumber restNumberThreshold breakableSeparationItem currentCommandColumn measurePosition measureLength", /* write */ ""); diff --git a/lily/music.cc b/lily/music.cc index 465cfd6ae2..942e2dbc24 100644 --- a/lily/music.cc +++ b/lily/music.cc @@ -93,8 +93,7 @@ Music::mark_smob (SCM m) { Music *mus = (Music *) SCM_CELL_WORD_1 (m); scm_gc_mark (mus->immutable_property_alist_); - scm_gc_mark (mus->mutable_property_alist_); - return SCM_EOL; + return mus->mutable_property_alist_; } Moment diff --git a/lily/new-fingering-engraver.cc b/lily/new-fingering-engraver.cc index f39a35f5c2..c4489acbb5 100644 --- a/lily/new-fingering-engraver.cc +++ b/lily/new-fingering-engraver.cc @@ -370,6 +370,5 @@ ADD_TRANSLATOR (New_fingering_engraver, "also takes care of articulations and harmonic note heads", /* creats*/ "Fingering", /* accepts */ "", - /* acks */ "rhythmic-head-interface stem-interface", /* reads */ "fingeringOrientations", /* write */ ""); diff --git a/lily/note-head-line-engraver.cc b/lily/note-head-line-engraver.cc index 610c480359..a303d95f8f 100644 --- a/lily/note-head-line-engraver.cc +++ b/lily/note-head-line-engraver.cc @@ -103,6 +103,5 @@ ADD_TRANSLATOR (Note_head_line_engraver, " followVoice is set, staff switches also generate a line.", /* creats*/ "Glissando VoiceFollower", /* accepts */ "glissando-event", - /* acks */ "", /* reads */ "followVoice", /* write */ ""); diff --git a/lily/note-heads-engraver.cc b/lily/note-heads-engraver.cc index 91de2a5047..02dc7d0292 100644 --- a/lily/note-heads-engraver.cc +++ b/lily/note-heads-engraver.cc @@ -137,6 +137,5 @@ ADD_TRANSLATOR (Note_heads_engraver, /* descr */ "Generate noteheads.", /* creats*/ "NoteHead Dots", /* accepts */ "note-event busy-playing-event", - /* acks */ "", /* reads */ "middleCPosition", /* write */ ""); diff --git a/lily/note-name-engraver.cc b/lily/note-name-engraver.cc index a40cb2ac3f..096c01af46 100644 --- a/lily/note-name-engraver.cc +++ b/lily/note-name-engraver.cc @@ -72,6 +72,5 @@ ADD_TRANSLATOR (Note_name_engraver, /* descr */ "", /* creats*/ "NoteName", /* accepts */ "note-event", - /* acks */ "", /* reads */ "printOctaveNames", /* write */ ""); diff --git a/lily/note-performer.cc b/lily/note-performer.cc index 333196f9bd..4ac5f0ebb5 100644 --- a/lily/note-performer.cc +++ b/lily/note-performer.cc @@ -91,7 +91,8 @@ Note_performer::try_music (Music *ev) #include "translator.icc" ADD_TRANSLATOR (Note_performer, "", "", - "note-event busy-playing-event", "", "", ""); + "note-event busy-playing-event", + "", ""); Note_performer::Note_performer () { diff --git a/lily/ottava-engraver.cc b/lily/ottava-engraver.cc index dd6ee2456b..8cf520f924 100644 --- a/lily/ottava-engraver.cc +++ b/lily/ottava-engraver.cc @@ -129,6 +129,5 @@ ADD_TRANSLATOR (Ottava_spanner_engraver, /* descr */ "Create a text spanner when the ottavation property changes..", /* creats*/ "OttavaBracket", /* accepts */ "", - /* acks */ "", /* reads */ "ottavation", /* write */ ""); diff --git a/lily/output-property-engraver.cc b/lily/output-property-engraver.cc index 96f1c04a5f..07ecdd0ea0 100644 --- a/lily/output-property-engraver.cc +++ b/lily/output-property-engraver.cc @@ -84,6 +84,5 @@ ADD_TRANSLATOR (Output_property_engraver, " to any Graphic objects that satisfies the predicate.", /* creats*/ "", /* accepts */ "layout-instruction", -/* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/paper-column-engraver.cc b/lily/paper-column-engraver.cc index 40deecd62d..230220a31f 100644 --- a/lily/paper-column-engraver.cc +++ b/lily/paper-column-engraver.cc @@ -228,6 +228,5 @@ ADD_TRANSLATOR (Paper_column_engraver, "that there are no beams or notes that prevent a breakpoint.) ", /* creats*/ "PaperColumn NonMusicalPaperColumn", /* accepts */ "break-event", - /* acks */ "", /* reads */ "", /* write */ "currentCommandColumn currentMusicalColumn"); diff --git a/lily/part-combine-engraver.cc b/lily/part-combine-engraver.cc index cfda8df12e..b7de2a308f 100644 --- a/lily/part-combine-engraver.cc +++ b/lily/part-combine-engraver.cc @@ -102,7 +102,6 @@ ADD_TRANSLATOR (Part_combine_engraver, "Print markings a2, Solo, Solo II, and unisono ", /* creats*/ "CombineTextScript", /* accepts */ "part-combine-event", - /* acks */ "", /* reads */ "printPartCombineTexts soloText soloIIText " "aDueText", /* write */ ""); diff --git a/lily/percent-repeat-engraver.cc b/lily/percent-repeat-engraver.cc index 208ba3600f..f85b816275 100644 --- a/lily/percent-repeat-engraver.cc +++ b/lily/percent-repeat-engraver.cc @@ -204,6 +204,5 @@ ADD_TRANSLATOR (Percent_repeat_engraver, /* descr */ "Make whole bar and double bar repeats.", /* creats*/ "PercentRepeat DoublePercentRepeat", /* accepts */ "repeated-music", - /* acks */ "", /* reads */ "measureLength currentCommandColumn", /* write */ ""); diff --git a/lily/performer-group-performer.cc b/lily/performer-group-performer.cc index 8c24bbb996..fde075368a 100644 --- a/lily/performer-group-performer.cc +++ b/lily/performer-group-performer.cc @@ -17,7 +17,6 @@ ADD_TRANSLATOR_GROUP (Performer_group_performer, /* descr */ "", /* creats*/ "", /* accepts */ "", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/phrasing-slur-engraver.cc b/lily/phrasing-slur-engraver.cc index d2f43ca8e7..cc9c69a906 100644 --- a/lily/phrasing-slur-engraver.cc +++ b/lily/phrasing-slur-engraver.cc @@ -202,6 +202,5 @@ ADD_TRANSLATOR (Phrasing_slur_engraver, /* descr */ "Print phrasing slurs. Similar to @ref{Slur_engraver}", /* creats*/ "PhrasingSlur", /* accepts */ "phrasing-slur-event", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/piano-pedal-engraver.cc b/lily/piano-pedal-engraver.cc index 270033f29e..d1532ee7d4 100644 --- a/lily/piano-pedal-engraver.cc +++ b/lily/piano-pedal-engraver.cc @@ -528,7 +528,6 @@ ADD_TRANSLATOR (Piano_pedal_engraver, /* descr */ "Engrave piano pedal symbols and brackets.", /* creats*/ "SostenutoPedal SustainPedal UnaCordaPedal SostenutoPedalLineSpanner SustainPedalLineSpanner UnaCordaPedalLineSpanner", /* accepts */ "pedal-event", - /* acks */ "", /* reads */ "currentCommandColumn " "pedalSostenutoStrings pedalSustainStrings " "pedalUnaCordaStrings pedalSostenutoStyle " diff --git a/lily/piano-pedal-performer.cc b/lily/piano-pedal-performer.cc index 65765a24ae..98ba5adab7 100644 --- a/lily/piano-pedal-performer.cc +++ b/lily/piano-pedal-performer.cc @@ -145,4 +145,4 @@ Piano_pedal_performer::try_music (Music *r) ADD_TRANSLATOR (Piano_pedal_performer, "", "", "pedal-event", - "", "", ""); + "", ""); diff --git a/lily/pitch-squash-engraver.cc b/lily/pitch-squash-engraver.cc index fa00090e9b..0d99f15424 100644 --- a/lily/pitch-squash-engraver.cc +++ b/lily/pitch-squash-engraver.cc @@ -43,6 +43,5 @@ ADD_TRANSLATOR (Pitch_squash_engraver, /* creats*/ "", /* accepts */ "", - /* acks */ "", /* reads */ "squashedPosition", /* write */ ""); diff --git a/lily/pitched-trill-engraver.cc b/lily/pitched-trill-engraver.cc index c29adc745d..59753f7c76 100644 --- a/lily/pitched-trill-engraver.cc +++ b/lily/pitched-trill-engraver.cc @@ -158,6 +158,5 @@ ADD_TRANSLATOR (Pitched_trill_engraver, /* descr */ "Print the bracketed notehead after a notehead with trill.", /* creats*/ "TrillPitchHead TrillPitchAccidental TrillPitchGroup", /* accepts */ "", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/program-option.cc b/lily/program-option.cc index 7233a6957e..c585bb4a60 100644 --- a/lily/program-option.cc +++ b/lily/program-option.cc @@ -27,7 +27,7 @@ bool use_object_keys; */ bool lily_1_8_relative = false; bool lily_1_8_compatibility_used = false; - +bool profile_property_accesses = false; /* crash if internally the wrong type is used for a grob property. */ @@ -38,8 +38,15 @@ Protected_scm option_hash_; void internal_set_option (SCM var, SCM val) { scm_hashq_set_x (option_hash_, var, val); - - if (var == ly_symbol2scm ("midi-debug")) + + if (0) + ; + else if (var == ly_symbol2scm ("profile-property-accesses")) + { + profile_property_accesses = to_boolean (val); + val = scm_from_bool (to_boolean (val)); + } + else if (var == ly_symbol2scm ("midi-debug")) { do_midi_debugging_global = to_boolean (val); val = scm_from_bool (to_boolean (val)); diff --git a/lily/recording-group-engraver.cc b/lily/recording-group-engraver.cc index 364494e927..0394d50a46 100644 --- a/lily/recording-group-engraver.cc +++ b/lily/recording-group-engraver.cc @@ -78,6 +78,5 @@ ADD_TRANSLATOR_GROUP (Recording_group_engraver, "in @code{recordEventSequence} when finished.", "", "", - "", "recordEventSequence", ""); diff --git a/lily/repeat-acknowledge-engraver.cc b/lily/repeat-acknowledge-engraver.cc index 7afe740b7a..355e804599 100644 --- a/lily/repeat-acknowledge-engraver.cc +++ b/lily/repeat-acknowledge-engraver.cc @@ -47,7 +47,8 @@ Repeat_acknowledge_engraver::Repeat_acknowledge_engraver () void Repeat_acknowledge_engraver::start_translation_timestep () { - Context *tr = context ()->where_defined (ly_symbol2scm ("repeatCommands")); + SCM rc; + Context *tr = context ()->where_defined (ly_symbol2scm ("repeatCommands"), &rc); if (!tr) tr = context (); @@ -113,6 +114,5 @@ ADD_TRANSLATOR (Repeat_acknowledge_engraver, "repeatCommands ainto an appropriate setting for whichBar.", /* creats*/ "", /* accepts */ "", - /* acks */ "", /* reads */ "repeatCommands whichBar", /* write */ ""); diff --git a/lily/rest-collision-engraver.cc b/lily/rest-collision-engraver.cc index eca0414667..60bb70f6a4 100644 --- a/lily/rest-collision-engraver.cc +++ b/lily/rest-collision-engraver.cc @@ -69,6 +69,5 @@ ADD_TRANSLATOR (Rest_collision_engraver, /* descr */ "Handles collisions of rests.", /* creats*/ "RestCollision", /* accepts */ "", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/rest-engraver.cc b/lily/rest-engraver.cc index 2a90b776ce..84d193dbc8 100644 --- a/lily/rest-engraver.cc +++ b/lily/rest-engraver.cc @@ -107,6 +107,5 @@ ADD_TRANSLATOR (Rest_engraver, /* descr */ "", /* creats*/ "Rest Dots", /* accepts */ "rest-event", - /* acks */ "", /* reads */ "middleCPosition", /* write */ ""); diff --git a/lily/rhythmic-column-engraver.cc b/lily/rhythmic-column-engraver.cc index d4b8a5c826..8b1e899854 100644 --- a/lily/rhythmic-column-engraver.cc +++ b/lily/rhythmic-column-engraver.cc @@ -156,6 +156,5 @@ ADD_TRANSLATOR (Rhythmic_column_engraver, /* descr */ "Generates NoteColumn, an objects that groups stems, noteheads and rests.", /* creats*/ "NoteColumn NoteSpacing", /* accepts */ "", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/score-engraver.cc b/lily/score-engraver.cc index 5fbacd0cb2..5c83021be4 100644 --- a/lily/score-engraver.cc +++ b/lily/score-engraver.cc @@ -175,6 +175,5 @@ ADD_TRANSLATOR_GROUP (Score_engraver, "that there are no beams or notes that prevent a breakpoint.) ", /* creats*/ "System PaperColumn NonMusicalPaperColumn", /* accepts */ "break-event", - /* acks */ "note-spacing-interface staff-spacing-interface axis-group-interface", /* reads */ "currentMusicalColumn currentCommandColumn verticallySpacedContexts", /* write */ ""); diff --git a/lily/score-performer.cc b/lily/score-performer.cc index a8784405f0..833a8575de 100644 --- a/lily/score-performer.cc +++ b/lily/score-performer.cc @@ -22,7 +22,6 @@ ADD_TRANSLATOR_GROUP (Score_performer, /* descr */ "", /* creats*/ "", /* accepts */ "", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/script-column-engraver.cc b/lily/script-column-engraver.cc index e95fd4fd41..b7937ed8b4 100644 --- a/lily/script-column-engraver.cc +++ b/lily/script-column-engraver.cc @@ -75,6 +75,5 @@ ADD_TRANSLATOR (Script_column_engraver, /* descr */ "", /* creats*/ "ScriptColumn", /* accepts */ "", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/script-engraver.cc b/lily/script-engraver.cc index 6925471460..e818c9d482 100644 --- a/lily/script-engraver.cc +++ b/lily/script-engraver.cc @@ -260,6 +260,5 @@ ADD_TRANSLATOR (Script_engraver, /* descr */ "Handles note scripted articulations.", /* creats*/ "Script", /* accepts */ "script-event articulation-event", - /* acks */ "", /* reads */ "scriptDefinitions", /* write */ ""); diff --git a/lily/separating-line-group-engraver.cc b/lily/separating-line-group-engraver.cc index 09214afeb0..4a97081c69 100644 --- a/lily/separating-line-group-engraver.cc +++ b/lily/separating-line-group-engraver.cc @@ -228,6 +228,5 @@ ADD_TRANSLATOR (Separating_line_group_engraver, /* descr */ "Generates objects for computing spacing parameters.", /* creats*/ "SeparationItem SeparatingGroupSpanner StaffSpacing", /* accepts */ "", - /* acks */ "", /* reads */ "createSpacing", /* write */ "breakableSeparationItem"); diff --git a/lily/separation-item.cc b/lily/separation-item.cc index 97009d98c7..b990ad61fb 100644 --- a/lily/separation-item.cc +++ b/lily/separation-item.cc @@ -18,7 +18,6 @@ Separation_item::add_item (Grob *s, Item *i) { assert (i); Pointer_group_interface::add_grob (s, ly_symbol2scm ("elements"), i); - s->add_dependency (i); } void diff --git a/lily/simple-spacer.cc b/lily/simple-spacer.cc index a87846948b..6464651a27 100644 --- a/lily/simple-spacer.cc +++ b/lily/simple-spacer.cc @@ -422,16 +422,15 @@ Simple_spacer_wrapper::add_columns (Link_array const &icols) scm_is_pair (s); s = scm_cdr (s)) { Grob *other = unsmob_grob (scm_caar (s)); - int oi = binsearch_links (cols, other, &compare_paper_column_rank); - if (oi >= 0 - && cols[oi] == other) + int j = binsearch_links (cols, other, &compare_paper_column_rank); + if (j >= 0 && cols[j] == other) { - spacer_->add_rod (i, oi, scm_to_double (scm_cdar (s))); + spacer_->add_rod (i, j, scm_to_double (scm_cdar (s))); } } if (i - && !to_boolean (cols[i]->get_property ("allow-outside-line"))) + && to_boolean (cols[i]->get_property ("keep-inside-line"))) { Interval e = cols[i]->extent (cols[i], X_AXIS); if (!e.is_empty ()) diff --git a/lily/slash-repeat-engraver.cc b/lily/slash-repeat-engraver.cc index 42f622699e..8cd9bc76c1 100644 --- a/lily/slash-repeat-engraver.cc +++ b/lily/slash-repeat-engraver.cc @@ -120,6 +120,5 @@ ADD_TRANSLATOR (Slash_repeat_engraver, /* descr */ "Make beat repeats.", /* creats*/ "RepeatSlash", /* accepts */ "repeated-music", - /* acks */ "", /* reads */ "measureLength", /* write */ ""); diff --git a/lily/slur-engraver.cc b/lily/slur-engraver.cc index 8579bd8064..2a1c7528f8 100644 --- a/lily/slur-engraver.cc +++ b/lily/slur-engraver.cc @@ -209,6 +209,5 @@ ADD_TRANSLATOR (Slur_engraver, /* descr */ "Build slurs grobs from slur events", /* creats*/ "Slur", /* accepts */ "slur-event", - /* acks */ "", /* reads */ "slurMelismaBusy doubleSlurs", /* write */ ""); diff --git a/lily/slur-performer.cc b/lily/slur-performer.cc index 9742d753d9..5d493a60d9 100644 --- a/lily/slur-performer.cc +++ b/lily/slur-performer.cc @@ -91,6 +91,8 @@ Slur_performer::try_music (Music *m) #include "translator.icc" -ADD_TRANSLATOR (Slur_performer, "", "", - "slur-event", "", "", ""); +ADD_TRANSLATOR (Slur_performer, + "", "", + "slur-event", + "", ""); diff --git a/lily/spaceable-grob.cc b/lily/spaceable-grob.cc index 19ad14326c..3f6b9daa77 100644 --- a/lily/spaceable-grob.cc +++ b/lily/spaceable-grob.cc @@ -15,6 +15,7 @@ #include "spring.hh" #include "pointer-group-interface.hh" #include "grob.hh" +#include "paper-column.hh" SCM Spaceable_grob::get_minimum_distances (Grob *me) @@ -47,6 +48,11 @@ Spaceable_grob::add_rod (Grob *me, Grob *p, Real d) } } + if (Paper_column::get_rank (p) < Paper_column::get_rank (me)) + { + programming_error ("Adding reverse rod"); + } + mins = scm_cons (scm_cons (p->self_scm (), newdist), mins); me->set_object ("minimum-distances", mins); } @@ -104,5 +110,5 @@ Spaceable_grob::remove_interface (Grob *me) ADD_INTERFACE (Spaceable_grob, "spaceable-grob-interface", "A layout object that takes part in the spacing problem. ", "measure-length spacing-wishes penalty minimum-distances ideal-distances " - "allow-outside-line left-neighbors right-neighbors"); + "keep-inside-line left-neighbors right-neighbors"); diff --git a/lily/spacing-engraver.cc b/lily/spacing-engraver.cc index 5d51b2f394..dd74d606d4 100644 --- a/lily/spacing-engraver.cc +++ b/lily/spacing-engraver.cc @@ -191,6 +191,5 @@ ADD_TRANSLATOR (Spacing_engraver, /* descr */ "make a SpacingSpanner and do bookkeeping of shortest starting and playing notes ", /* creats*/ "SpacingSpanner", /* accepts */ "", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/span-arpeggio-engraver.cc b/lily/span-arpeggio-engraver.cc index 16846558ee..38ca9f36b9 100644 --- a/lily/span-arpeggio-engraver.cc +++ b/lily/span-arpeggio-engraver.cc @@ -104,6 +104,5 @@ ADD_TRANSLATOR (Span_arpeggio_engraver, /* descr */ "", /* creats*/ "Arpeggio", /* accepts */ "", - /* acks */ "", /* reads */ "connectArpeggios", /* write */ ""); diff --git a/lily/span-bar-engraver.cc b/lily/span-bar-engraver.cc index 645e6d7eb0..aa7d078fde 100644 --- a/lily/span-bar-engraver.cc +++ b/lily/span-bar-engraver.cc @@ -80,6 +80,5 @@ ADD_TRANSLATOR (Span_bar_engraver, "bar lines, and draws a single span-bar across them.", /* creats*/ "SpanBar", /* accepts */ "", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/span-dynamic-performer.cc b/lily/span-dynamic-performer.cc index 7b367c2899..557168fee5 100644 --- a/lily/span-dynamic-performer.cc +++ b/lily/span-dynamic-performer.cc @@ -184,4 +184,4 @@ Span_dynamic_performer::try_music (Music *r) ADD_TRANSLATOR (Span_dynamic_performer, "", "", "crescendo-event decrescendo-event", - "", "", ""); + "", ""); diff --git a/lily/staff-collecting-engraver.cc b/lily/staff-collecting-engraver.cc index b1924090bc..dcf18385cb 100644 --- a/lily/staff-collecting-engraver.cc +++ b/lily/staff-collecting-engraver.cc @@ -39,6 +39,5 @@ ADD_TRANSLATOR (Staff_collecting_engraver, /* creats*/ "", /* accepts */ "", - /* acks */ "", /* reads */ "stavesFound", /* write */ "stavesFound"); diff --git a/lily/staff-performer.cc b/lily/staff-performer.cc index a687a686e0..26174befc3 100644 --- a/lily/staff-performer.cc +++ b/lily/staff-performer.cc @@ -44,7 +44,7 @@ private: ADD_TRANSLATOR (Staff_performer, "", "", "", - "", "", ""); + "", ""); Staff_performer::Staff_performer () { diff --git a/lily/staff-symbol-engraver.cc b/lily/staff-symbol-engraver.cc index 8ec2e655c5..adee8fabe5 100644 --- a/lily/staff-symbol-engraver.cc +++ b/lily/staff-symbol-engraver.cc @@ -117,6 +117,5 @@ ADD_TRANSLATOR (Staff_symbol_engraver, "staff lines.", /* creats*/ "StaffSymbol", /* accepts */ "staff-span-event", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/stanza-number-align-engraver.cc b/lily/stanza-number-align-engraver.cc index 2c78cbb722..0086f2b44c 100644 --- a/lily/stanza-number-align-engraver.cc +++ b/lily/stanza-number-align-engraver.cc @@ -65,6 +65,5 @@ ADD_TRANSLATOR (Stanza_number_align_engraver, "", "", " ", - "", ""); diff --git a/lily/stanza-number-engraver.cc b/lily/stanza-number-engraver.cc index bacc51b6d9..2618274a05 100644 --- a/lily/stanza-number-engraver.cc +++ b/lily/stanza-number-engraver.cc @@ -73,6 +73,5 @@ ADD_TRANSLATOR (Stanza_number_engraver, /* descr */ "", /* creats*/ "StanzaNumber", /* accepts */ "", - /* acks */ "", /* reads */ "stanza", /* write */ ""); diff --git a/lily/stem-engraver.cc b/lily/stem-engraver.cc index 9248ef41cf..549da5f83d 100644 --- a/lily/stem-engraver.cc +++ b/lily/stem-engraver.cc @@ -175,6 +175,5 @@ ADD_TRANSLATOR (Stem_engraver, "the beam engraver for overriding beaming.", /* creats*/ "Stem StemTremolo", /* accepts */ "tremolo-event", - /* acks */ "", /* reads */ "tremoloFlags stemLeftBeamCount stemRightBeamCount", /* write */ ""); diff --git a/lily/string-number-engraver.cc b/lily/string-number-engraver.cc index c21eff2aa4..13fbf873d0 100644 --- a/lily/string-number-engraver.cc +++ b/lily/string-number-engraver.cc @@ -42,6 +42,5 @@ ADD_TRANSLATOR (String_number_engraver, /* creats*/ "", /* accepts */ "string-number-event", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/swallow-engraver.cc b/lily/swallow-engraver.cc index 9d51eb6edd..13fe922f67 100644 --- a/lily/swallow-engraver.cc +++ b/lily/swallow-engraver.cc @@ -33,6 +33,5 @@ ADD_TRANSLATOR (Swallow_engraver, "this is to prevent spurious \"event junked\" warnings.", /* creats*/ "", /* accepts */ "general-music", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/swallow-perf.cc b/lily/swallow-perf.cc index 2c0dbad55c..634cad9791 100644 --- a/lily/swallow-perf.cc +++ b/lily/swallow-perf.cc @@ -37,6 +37,5 @@ ADD_TRANSLATOR (Swallow_performer, /* descr */ "", /* creats*/ "", /* accepts */ "general-music", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/system-start-delimiter-engraver.cc b/lily/system-start-delimiter-engraver.cc index 5a43fc0767..102f48b68e 100644 --- a/lily/system-start-delimiter-engraver.cc +++ b/lily/system-start-delimiter-engraver.cc @@ -91,6 +91,5 @@ ADD_TRANSLATOR (System_start_delimiter_engraver, /* descr */ "Creates a system start delimiter (ie. SystemStart@{Bar, Brace, Bracket@} spanner", /* creats*/ "SystemStartBar SystemStartBrace SystemStartBracket", /* accepts */ "", - /* acks */ "", /* reads */ "systemStartDelimiter", /* write */ ""); diff --git a/lily/system.cc b/lily/system.cc index 115ab8720c..4adadc6e58 100644 --- a/lily/system.cc +++ b/lily/system.cc @@ -100,6 +100,10 @@ System::derived_mark () const ptr ++; } } + + if (pscore_) + scm_gc_mark (pscore_->self_scm ()); + Spanner::derived_mark (); } diff --git a/lily/tab-note-heads-engraver.cc b/lily/tab-note-heads-engraver.cc index 3aab0a9e86..b695832362 100644 --- a/lily/tab-note-heads-engraver.cc +++ b/lily/tab-note-heads-engraver.cc @@ -171,7 +171,6 @@ ADD_TRANSLATOR (Tab_note_heads_engraver, /* descr */ "Generate one or more tablature noteheads from Music of type NoteEvent.", /* creats*/ "TabNoteHead Dots", /* accepts */ "note-event string-number-event busy-playing-event", - /* acks */ "", /* reads */ "middleCPosition stringTunings minimumFret tablatureFormat highStringOne stringOneTopmost", /* write */ ""); diff --git a/lily/tab-staff-symbol-engraver.cc b/lily/tab-staff-symbol-engraver.cc index 32020eee13..aa220631e5 100644 --- a/lily/tab-staff-symbol-engraver.cc +++ b/lily/tab-staff-symbol-engraver.cc @@ -43,6 +43,5 @@ ADD_TRANSLATOR (Tab_staff_symbol_engraver, "staff lines.", /* creats*/ "StaffSymbol", /* accepts */ "staff-span-event", - /* acks */ "", /* reads */ "stringTunings", /* write */ ""); diff --git a/lily/tempo-performer.cc b/lily/tempo-performer.cc index 85f8aa5322..437c271ce0 100644 --- a/lily/tempo-performer.cc +++ b/lily/tempo-performer.cc @@ -81,4 +81,4 @@ Tempo_performer::try_music (Music *event) ADD_TRANSLATOR (Tempo_performer, "", "", "metronome-change-event", - "", "", ""); + "", ""); diff --git a/lily/text-engraver.cc b/lily/text-engraver.cc index bdd0ba8306..72a8126452 100644 --- a/lily/text-engraver.cc +++ b/lily/text-engraver.cc @@ -127,6 +127,5 @@ ADD_TRANSLATOR (Text_engraver, /* descr */ "Create text-scripts", /* creats*/ "TextScript", /* accepts */ "text-script-event", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/text-spanner-engraver.cc b/lily/text-spanner-engraver.cc index 110acce0a0..cca154d0dd 100644 --- a/lily/text-spanner-engraver.cc +++ b/lily/text-spanner-engraver.cc @@ -145,6 +145,5 @@ ADD_TRANSLATOR (Text_spanner_engraver, /* descr */ "Create text spanner from a Music.", /* creats*/ "TextSpanner", /* accepts */ "text-span-event", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/tie-engraver.cc b/lily/tie-engraver.cc index d68c10457e..e12b100f1c 100644 --- a/lily/tie-engraver.cc +++ b/lily/tie-engraver.cc @@ -211,6 +211,5 @@ ADD_TRANSLATOR (Tie_engraver, /* descr */ "Generate ties between noteheads of equal pitch.", /* creats*/ "Tie TieColumn", /* accepts */ "tie-event", - /* acks */ "", /* reads */ "tieMelismaBusy", /* write */ ""); diff --git a/lily/tie-performer.cc b/lily/tie-performer.cc index f47e3ae597..755b4074aa 100644 --- a/lily/tie-performer.cc +++ b/lily/tie-performer.cc @@ -114,6 +114,5 @@ ADD_TRANSLATOR (Tie_performer, /* descr */ "Generate ties between noteheads of equal pitch.", /* creats*/ "", /* accepts */ "tie-event", - /* acks */ "", /* reads */ "tieMelismaBusy", /* write */ ""); diff --git a/lily/time-signature-engraver.cc b/lily/time-signature-engraver.cc index c904595505..90af017890 100644 --- a/lily/time-signature-engraver.cc +++ b/lily/time-signature-engraver.cc @@ -74,6 +74,5 @@ ADD_TRANSLATOR (Time_signature_engraver, /* descr */ "Create a TimeSignature whenever @code{timeSignatureFraction} changes", /* creats*/ "TimeSignature", /* accepts */ "", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/time-signature-performer.cc b/lily/time-signature-performer.cc index 45c74e208e..63b4bf2418 100644 --- a/lily/time-signature-performer.cc +++ b/lily/time-signature-performer.cc @@ -71,4 +71,4 @@ Time_signature_performer::stop_translation_timestep () #include "translator.icc" -ADD_TRANSLATOR (Time_signature_performer, "", "", "", "", "", ""); +ADD_TRANSLATOR (Time_signature_performer, "", "", "", "", ""); diff --git a/lily/timing-translator.cc b/lily/timing-translator.cc index b105d17d60..5bee235cd6 100644 --- a/lily/timing-translator.cc +++ b/lily/timing-translator.cc @@ -148,4 +148,4 @@ ADD_TRANSLATOR (Timing_translator, , - "", "", "", "", ""); + "", "", "", ""); diff --git a/lily/translator.cc b/lily/translator.cc index 46e735acbd..0c0c4da573 100644 --- a/lily/translator.cc +++ b/lily/translator.cc @@ -192,5 +192,4 @@ ADD_TRANSLATOR(Translator, "", "", "", - "", ""); diff --git a/lily/trill-spanner-engraver.cc b/lily/trill-spanner-engraver.cc index 15e628510a..393dfe4ff1 100644 --- a/lily/trill-spanner-engraver.cc +++ b/lily/trill-spanner-engraver.cc @@ -151,6 +151,5 @@ ADD_TRANSLATOR (Trill_spanner_engraver, /* descr */ "Create trill spanner from a Music.", /* creats*/ "TrillSpanner", /* accepts */ "trill-span-event", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/tuplet-engraver.cc b/lily/tuplet-engraver.cc index f0a4844a6e..12b5db31d8 100644 --- a/lily/tuplet-engraver.cc +++ b/lily/tuplet-engraver.cc @@ -135,6 +135,5 @@ ADD_TRANSLATOR (Tuplet_engraver, /* descr */ "Catch Time_scaled_music and generate appropriate bracket ", /* creats*/ "TupletBracket", /* accepts */ "time-scaled-music", - /* acks */ "", /* reads */ "tupletNumberFormatFunction tupletSpannerDuration", /* write */ ""); diff --git a/lily/type-swallow-translator.cc b/lily/type-swallow-translator.cc index 11f79a70cb..cb420405eb 100644 --- a/lily/type-swallow-translator.cc +++ b/lily/type-swallow-translator.cc @@ -38,7 +38,6 @@ ADD_TRANSLATOR (Skip_event_swallow_translator, "", "skip-event", "", - "", ""); Rest_swallow_translator::Rest_swallow_translator (){} @@ -48,8 +47,6 @@ ADD_TRANSLATOR (Rest_swallow_translator, "", "rest-event", "", - "", - ""); class Note_swallow_translator : public Translator @@ -70,6 +67,6 @@ ADD_TRANSLATOR (Note_swallow_translator, "", "note-event", "", - "", + ""); diff --git a/lily/vaticana-ligature-engraver.cc b/lily/vaticana-ligature-engraver.cc index 2804346e2e..94692d483d 100644 --- a/lily/vaticana-ligature-engraver.cc +++ b/lily/vaticana-ligature-engraver.cc @@ -596,10 +596,11 @@ Vaticana_ligature_engraver::transform_heads (Spanner *ligature, #endif } +ADD_ACKNOWLEDGER(Vaticana_ligature_engraver, rest); +ADD_ACKNOWLEDGER(Vaticana_ligature_engraver, note_head); ADD_TRANSLATOR (Vaticana_ligature_engraver, /* descr */ "Handles ligatures by glueing special ligature heads together.", /* creats*/ "VaticanaLigature", /* accepts */ "ligature-event", - /* acks */ "note-head-interface rest-interface", /* reads */ "", /* write */ ""); diff --git a/lily/vertical-align-engraver.cc b/lily/vertical-align-engraver.cc index 2cdd18d9d5..8a05d5e277 100644 --- a/lily/vertical-align-engraver.cc +++ b/lily/vertical-align-engraver.cc @@ -41,7 +41,6 @@ ADD_TRANSLATOR (Vertical_align_engraver, "them vertically.", /* creats*/ "VerticalAlignment", /* accepts */ "", - /* acks */ "", /* reads */ "", /* write */ ""); diff --git a/lily/vertically-spaced-context-engraver.cc b/lily/vertically-spaced-context-engraver.cc index 63a7be9cd1..864f27aa69 100644 --- a/lily/vertically-spaced-context-engraver.cc +++ b/lily/vertically-spaced-context-engraver.cc @@ -61,6 +61,5 @@ ADD_TRANSLATOR (Vertically_spaced_contexts_engraver, /* descr */ "", /* creats*/ "", /* accepts */ "", - /* acks */ "", /* reads */ "verticallySpacedContexts", /* write */ "verticallySpacedContexts"); diff --git a/lily/volta-engraver.cc b/lily/volta-engraver.cc index 3d4082821b..089045005f 100644 --- a/lily/volta-engraver.cc +++ b/lily/volta-engraver.cc @@ -241,6 +241,5 @@ ADD_TRANSLATOR (Volta_engraver, /* descr */ "Make volta brackets.", /* creats*/ "VoltaBracket", /* accepts */ "", - /* acks */ "", /* reads */ "repeatCommands voltaSpannerDuration stavesFound", /* write */ ""); diff --git a/lily/volta-repeat-iterator.cc b/lily/volta-repeat-iterator.cc index 9e37056089..af1127f261 100644 --- a/lily/volta-repeat-iterator.cc +++ b/lily/volta-repeat-iterator.cc @@ -63,9 +63,9 @@ void Volta_repeat_iterator::add_repeat_command (SCM what) { SCM reps = ly_symbol2scm ("repeatCommands"); - SCM current_reps = get_outlet ()->internal_get_property (reps); + SCM current_reps = SCM_EOL; + Context *where = get_outlet ()->where_defined (reps, ¤t_reps); - Context *where = get_outlet ()->where_defined (reps); if (where && current_reps == SCM_EOL || scm_is_pair (current_reps)) { diff --git a/scm/define-grob-properties.scm b/scm/define-grob-properties.scm index 2a209d16cd..faa7491cec 100644 --- a/scm/define-grob-properties.scm +++ b/scm/define-grob-properties.scm @@ -261,7 +261,7 @@ unset, script and slur ignore each other ") (inspect-quants ,number-pair? "If debugging is set, set beam quant to this position, and print the respective scores.") - (allow-outside-line ,boolean? "If set, allow this column to + (keep-inside-line ,boolean? "If set, this column cannot have things sticking into the margin.") (kern ,ly:dimension? "Amount of extra white space to add. For bar line, this is the amount of space after a thick line.") diff --git a/scm/lily.scm b/scm/lily.scm index 1f4f59c89e..a3f166477a 100644 --- a/scm/lily.scm +++ b/scm/lily.scm @@ -16,6 +16,7 @@ (parse-protect #t "continue when finding errors in inline scheme are caught in the parser. If off, halt on errors, and print a stack trace.") + (profile-property-accesses #f "keep statistics of get_property() calls.") (old-relative #f "relative for simultaneous music works similar to chord syntax") -- 2.39.2