have to protect even those unlikely to be corrupted data members.
+2005-08-04 Han-Wen Nienhuys <hanwen@xs4all.nl>
+
+ * 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 <gperlist@shaw.ca>
* ly/bagpipe.ly: new file.
Erlend Aasland
Bob Broadus
-
+Donald Axel
Release 2.6
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);
// 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_;
};
+void
+Auto_beam_engraver::derived_mark () const
+{
+ scm_gc_mark (beam_settings_);
+}
+
+
void
Auto_beam_engraver::check_bar_property ()
{
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]);
void stop_translation_timestep ();
void process_music ();
DECLARE_ACKNOWLEDGER (bar_line);
+
+ virtual void derived_mark () const;
private:
Item *clef_;
Item *octavate_;
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 ()
{
clef_ = 0;
(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 ());
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 ()
{
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;
}
{
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
level, and then groups them to the side. Stanza numbers should be
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 ()
{
time_signature_ = 0;
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_;
bool staff_eligible ();
};
+void
+Volta_engraver::derived_mark () const
+{
+ scm_gc_mark (staff_);
+ scm_gc_mark (start_string_);
+}
+
Volta_engraver::Volta_engraver ()
{
staff_ = SCM_EOL;