CVSROOT: /cvsroot/lilypond
Module name: lilypond
Branch:
Changes by: Han-Wen Nienhuys <[EMAIL PROTECTED]> 05/08/04 10:46:35
Modified files:
. : ChangeLog THANKS
lily : auto-beam-engraver.cc clef-engraver.cc
grob-array.cc hara-kiri-engraver.cc
ly-module.cc stanza-number-engraver.cc
time-signature-engraver.cc volta-engraver.cc
Log message:
(derived_mark): new method. Yes. We
have to protect even those unlikely to be corrupted data members.
CVSWeb URLs:
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/ChangeLog.diff?tr1=1.3952&tr2=1.3953&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/THANKS.diff?tr1=1.138&tr2=1.139&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/auto-beam-engraver.cc.diff?tr1=1.153&tr2=1.154&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/clef-engraver.cc.diff?tr1=1.129&tr2=1.130&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/grob-array.cc.diff?tr1=1.2&tr2=1.3&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/hara-kiri-engraver.cc.diff?tr1=1.16&tr2=1.17&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/ly-module.cc.diff?tr1=1.46&tr2=1.47&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/stanza-number-engraver.cc.diff?tr1=1.43&tr2=1.44&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/time-signature-engraver.cc.diff?tr1=1.65&tr2=1.66&r1=text&r2=text
http://savannah.gnu.org/cgi-bin/viewcvs/lilypond/lilypond/lily/volta-engraver.cc.diff?tr1=1.65&tr2=1.66&r1=text&r2=text
Patches:
Index: lilypond/ChangeLog
diff -u lilypond/ChangeLog:1.3952 lilypond/ChangeLog:1.3953
--- lilypond/ChangeLog:1.3952 Thu Aug 4 09:58:13 2005
+++ lilypond/ChangeLog Thu Aug 4 10:46:33 2005
@@ -1,3 +1,8 @@
+2005-08-04 Han-Wen Nienhuys <[EMAIL PROTECTED]>
+
+ * lily/auto-beam-engraver.cc (derived_mark): new method. Yes. We
+ have to protect even those unlikely to be corrupted data members.
+
2005-08-04 Graham Percival <[EMAIL PROTECTED]>
* ly/bagpipe.ly: new file.
Index: lilypond/THANKS
diff -u lilypond/THANKS:1.138 lilypond/THANKS:1.139
--- lilypond/THANKS:1.138 Thu Aug 4 09:58:13 2005
+++ lilypond/THANKS Thu Aug 4 10:46:34 2005
@@ -31,7 +31,7 @@
Erlend Aasland
Bob Broadus
-
+Donald Axel
Release 2.6
Index: lilypond/lily/auto-beam-engraver.cc
diff -u lilypond/lily/auto-beam-engraver.cc:1.153
lilypond/lily/auto-beam-engraver.cc:1.154
--- lilypond/lily/auto-beam-engraver.cc:1.153 Tue Jul 26 22:24:30 2005
+++ lilypond/lily/auto-beam-engraver.cc Thu Aug 4 10:46:34 2005
@@ -31,7 +31,8 @@
void process_music ();
virtual bool try_music (Music *);
virtual void finalize ();
-
+ virtual void derived_mark () const;
+
DECLARE_ACKNOWLEDGER (rest);
DECLARE_ACKNOWLEDGER (beam);
DECLARE_ACKNOWLEDGER (bar_line);
@@ -72,7 +73,7 @@
// We act as if beam were created, and start a grouping anyway.
Beaming_info_list *grouping_;
- SCM beam_settings_; // ugh. should protect ?
+ SCM beam_settings_;
Beaming_info_list *finished_grouping_;
@@ -81,6 +82,13 @@
void
+Auto_beam_engraver::derived_mark () const
+{
+ scm_gc_mark (beam_settings_);
+}
+
+
+void
Auto_beam_engraver::check_bar_property ()
{
/* Duplicated from process_music (), since
@@ -181,7 +189,13 @@
if (Stem::get_beam ((*stems_)[i]))
return 0;
- Spanner *beam = new Spanner (beam_settings_, context ()->get_grob_key
("Beam"));
+ /*
+ Can't use make_spanner_from_properties() because we have to use
+ beam_settings_.
+ */
+ Spanner *beam = new Spanner (beam_settings_,
+ context ()->get_grob_key ("Beam"));
+
for (int i = 0; i < stems_->size (); i++)
{
Beam::add_stem (beam, (*stems_)[i]);
Index: lilypond/lily/clef-engraver.cc
diff -u lilypond/lily/clef-engraver.cc:1.129
lilypond/lily/clef-engraver.cc:1.130
--- lilypond/lily/clef-engraver.cc:1.129 Tue Jul 26 22:24:30 2005
+++ lilypond/lily/clef-engraver.cc Thu Aug 4 10:46:35 2005
@@ -30,6 +30,8 @@
void stop_translation_timestep ();
void process_music ();
DECLARE_ACKNOWLEDGER (bar_line);
+
+ virtual void derived_mark () const;
private:
Item *clef_;
Item *octavate_;
@@ -41,6 +43,14 @@
void set_glyph ();
void inspect_clef_properties ();
};
+
+void
+Clef_engraver::derived_mark () const
+{
+ scm_gc_mark (prev_octavation_);
+ scm_gc_mark (prev_cpos_);
+ scm_gc_mark (prev_glyph_);
+}
Clef_engraver::Clef_engraver ()
{
Index: lilypond/lily/grob-array.cc
diff -u lilypond/lily/grob-array.cc:1.2 lilypond/lily/grob-array.cc:1.3
--- lilypond/lily/grob-array.cc:1.2 Tue Jul 19 10:20:21 2005
+++ lilypond/lily/grob-array.cc Thu Aug 4 10:46:35 2005
@@ -50,7 +50,7 @@
(void) s;
#if 0
- // see System::derived_mark()
+ // see System::derived_mark () const
Grob_array *ga = unsmob_grob_array (s);
for (int i = 0; i < ga->grobs_.size(); i++)
scm_gc_mark (ga->grobs_[i]->self_scm ());
Index: lilypond/lily/hara-kiri-engraver.cc
diff -u lilypond/lily/hara-kiri-engraver.cc:1.16
lilypond/lily/hara-kiri-engraver.cc:1.17
--- lilypond/lily/hara-kiri-engraver.cc:1.16 Tue Jul 26 22:24:30 2005
+++ lilypond/lily/hara-kiri-engraver.cc Thu Aug 4 10:46:35 2005
@@ -21,12 +21,18 @@
DECLARE_ACKNOWLEDGER (grob);
virtual void add_element (Grob *e);
void start_translation_timestep ();
-
+ virtual void derived_mark () const;
SCM interesting_;
public:
TRANSLATOR_DECLARATIONS (Hara_kiri_engraver);
};
+void
+Hara_kiri_engraver::derived_mark () const
+{
+ scm_gc_mark (interesting_);
+}
+
void
Hara_kiri_engraver::start_translation_timestep ()
{
Index: lilypond/lily/ly-module.cc
diff -u lilypond/lily/ly-module.cc:1.46 lilypond/lily/ly-module.cc:1.47
--- lilypond/lily/ly-module.cc:1.46 Mon Aug 1 20:15:09 2005
+++ lilypond/lily/ly-module.cc Thu Aug 4 10:46:35 2005
@@ -162,9 +162,10 @@
SCM old_tab = scm_stand_in_procs;
SCM new_tab = scm_make_weak_key_hash_table (scm_from_int (257));
- new_tab = scm_internal_hash_fold ((Hash_closure_function) & redefine_keyval,
+ new_tab = scm_internal_hash_fold ((Hash_closure_function) &redefine_keyval,
NULL,
- new_tab, old_tab);
+ new_tab,
+ old_tab);
scm_stand_in_procs = new_tab;
}
Index: lilypond/lily/stanza-number-engraver.cc
diff -u lilypond/lily/stanza-number-engraver.cc:1.43
lilypond/lily/stanza-number-engraver.cc:1.44
--- lilypond/lily/stanza-number-engraver.cc:1.43 Tue Jul 26 22:24:30 2005
+++ lilypond/lily/stanza-number-engraver.cc Thu Aug 4 10:46:35 2005
@@ -13,18 +13,20 @@
{
Item *text_;
- /*
- This is naughty, since last_stanza_ may be GCd from under us. But
- since we don't look at the contents, we are/should be (knock on
- wood) OK.
- */
SCM last_stanza_;
public:
TRANSLATOR_DECLARATIONS (Stanza_number_engraver);
void process_music ();
+ virtual void derived_mark () const;
void stop_translation_timestep ();
DECLARE_ACKNOWLEDGER (lyric_syllable);
};
+
+void
+Stanza_number_engraver::derived_mark () const
+{
+ scm_gc_mark (last_stanza_);
+}
/*
TODO: should make engraver that collects all the stanzas on a higher
Index: lilypond/lily/time-signature-engraver.cc
diff -u lilypond/lily/time-signature-engraver.cc:1.65
lilypond/lily/time-signature-engraver.cc:1.66
--- lilypond/lily/time-signature-engraver.cc:1.65 Sun Jul 24 18:58:42 2005
+++ lilypond/lily/time-signature-engraver.cc Thu Aug 4 10:46:35 2005
@@ -20,11 +20,20 @@
SCM last_time_fraction_;
protected:
+ virtual void derived_mark () const;
void stop_translation_timestep ();
void process_music ();
public:
TRANSLATOR_DECLARATIONS (Time_signature_engraver);
};
+
+
+void
+Time_signature_engraver::derived_mark () const
+{
+ scm_gc_mark (last_time_fraction_);
+}
+
Time_signature_engraver::Time_signature_engraver ()
{
Index: lilypond/lily/volta-engraver.cc
diff -u lilypond/lily/volta-engraver.cc:1.65
lilypond/lily/volta-engraver.cc:1.66
--- lilypond/lily/volta-engraver.cc:1.65 Tue Jul 26 22:24:30 2005
+++ lilypond/lily/volta-engraver.cc Thu Aug 4 10:46:35 2005
@@ -32,10 +32,10 @@
DECLARE_ACKNOWLEDGER (bar_line);
virtual void finalize ();
-
+ virtual void derived_mark () const;
void stop_translation_timestep ();
void process_music ();
-
+
Moment started_mom_;
Spanner *volta_span_;
Spanner *end_volta_span_;
@@ -44,6 +44,13 @@
bool staff_eligible ();
};
+
+void
+Volta_engraver::derived_mark () const
+{
+ scm_gc_mark (staff_);
+ scm_gc_mark (start_string_);
+}
Volta_engraver::Volta_engraver ()
{
_______________________________________________
Lilypond-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/lilypond-cvs