]> git.donarmstrong.com Git - lilypond.git/commitdiff
patch::: 1.3.59.uu2.jcn1
authorJan Nieuwenhuizen <janneke@gnu.org>
Thu, 15 Jun 2000 17:27:41 +0000 (19:27 +0200)
committerJan Nieuwenhuizen <janneke@gnu.org>
Thu, 15 Jun 2000 17:27:41 +0000 (19:27 +0200)
1.3.59.uu2.jcn1
===============

* Fixed scm_un/protect_object for guile-1.3.4 and 1.3.5 snapshots,
  in the process reduced number of protect/unprotect calls.  With
  guile-1.3.5 snapshot, memory usage has decreased by 1/5th, now
  just 10% above the 1.2 level.  Also, Lily's a bit faster.

* Fixed make diff bug in stepmake to be able to make this diff :-)

12 files changed:
CHANGES
VERSION
lily/include/identifier.hh
lily/include/moment.hh
lily/paper-column.cc
lily/scm-hash.cc
lily/scope.cc
lily/score-element.cc
lily/spacing-engraver.cc
lily/timing-translator.cc
stepmake/bin/package-diff.py
stepmake/bin/packagepython.py

diff --git a/CHANGES b/CHANGES
index 7018720bb3eb8e78075ee7b0367f1aed304c4dd4..c66b9458b9cb0867f1f8d1ef2ce68e7202f3ea1a 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,3 +1,13 @@
+1.3.59.uu2.jcn1
+===============
+
+* Fixed scm_un/protect_object for guile-1.3.4 and 1.3.5 snapshots,
+  in the process reduced number of protect/unprotect calls.  With
+  guile-1.3.5 snapshot, memory usage has decreased by 1/5th, now
+  just 10% above the 1.2 level.  Also, Lily's a bit faster.
+
+* Fixed make diff bug in stepmake to be able to make this diff :-)
+
 1.3.59.hwn1
 ===========
 
diff --git a/VERSION b/VERSION
index 38595325eaee15f96eecbe5c3a8b46421fec549b..eb96155196f664c1e0d3b2b7bcf98eaa1af4d2dc 100644 (file)
--- a/VERSION
+++ b/VERSION
@@ -2,7 +2,7 @@ PACKAGE_NAME=LilyPond
 MAJOR_VERSION=1
 MINOR_VERSION=3
 PATCH_LEVEL=59
-MY_PATCH_LEVEL=uu2
+MY_PATCH_LEVEL=uu2.jcn1
 
 # use the above to send patches: MY_PATCH_LEVEL is always empty for a
 # released version.
index 718d93d4d08460909b40c55947de98df864c4116..f6f129d493e4f1243b87c719321a37d0a1e38143 100644 (file)
@@ -99,6 +99,7 @@ DECLARE_ID_CLASS(Paper_def);
 DECLARE_ID_CLASS(Midi_def);
 
 Identifier * unsmob_identifier (SCM);
+SCM smobify (Identifier*);
 
 #endif // IDENTIFIER_HH
 
index 615928a62cf7905b76df74737e1ee7a440c91238..ae6dc6f8ce304872f408129bbbc1c6a38b2b61cc 100644 (file)
@@ -27,7 +27,7 @@ struct Moment : public Rational
   DECLARE_SMOBS;
 };
 
-
+SCM smobify (Moment*);
 Moment * unsmob_moment (SCM);
 
 IMPLEMENT_ARITHMETIC_OPERATOR (Moment, / );
index d38687e4f1e24b3a93208ed67cc7781ea6df97cb..5ab553257f9e028413abaab825d2769ec8bfc6b5 100644 (file)
@@ -97,8 +97,7 @@ Paper_column::column_l () const
 Paper_column::Paper_column (Moment w)
   : Item (SCM_EOL)             // guh.?
 {
-  SCM when = (new Moment (w))->smobify_self ();
-  scm_unprotect_object (when);
+  SCM when = smobify (new Moment (w));
   set_elt_property ("when", when);
 
   Axis_group_interface (this).set_interface ();
index 08f90c5aa067c4e256c68e3da9510b5bca2e11d0..98c430b3ebe7a3a3e9b788bf882f74016b40a241 100644 (file)
@@ -97,7 +97,6 @@ void
 Scheme_hash_table::set (SCM k, SCM v)
 {
   (*this)[k] = v;
-  scm_unprotect_object (v);
 }
 
 // UGH. 
index 88056b9b8b7e41f852ba06d129c3d3890410d281..4a27d3ce4609009f1c2507bb867836ba12231db5 100644 (file)
@@ -62,8 +62,7 @@ Scope::elem (String s)const
 void
 Scope::set (String s, Identifier * id) 
 {
-  return id_dict_->set (ly_symbol2scm (s.ch_C()),
-                       id->smobify_self());
+  return id_dict_->set (ly_symbol2scm (s.ch_C()), smobify (id));
 }
 
 SCM
index 327cffe7878452edd61548e0a2603e99dd127485..f54699f63096e6cdef63e0963dd6117f5607fddc 100644 (file)
@@ -89,6 +89,9 @@ Score_element::Score_element (Score_element const&s)
 
 Score_element::~Score_element()
 {
+  // this goes awry when score-elements are copied...
+  // real weird Paper_column::~Paper_column () -> infinity_mom
+  //  unsmobify_self ();
 }
 
 
index 5e05094bdb132104b7e0da51841b7037519b947a..8146b7267678e57d4d3c62e8199d18d5314076c2 100644 (file)
@@ -97,12 +97,9 @@ Spacing_engraver::do_pre_move_processing ()
   Paper_column * sc
     = dynamic_cast<Paper_column*> (get_staff_info ().musical_pcol_l ());
 
-  SCM sh = (new Moment (shortest_playing))->smobify_self ();
-  SCM st = (new Moment (starter))->smobify_self ();
+  SCM sh = smobify (new Moment (shortest_playing));
+  SCM st = smobify (new Moment (starter));
 
-  scm_unprotect_object (st);
-  scm_unprotect_object (sh);
-  
   sc->set_elt_property ("shortest-playing-duration", sh);  
   sc->set_elt_property ("shortest-starter-duration", st);
 }
index 9cec28f42bcae3d1553a6253e1253ca06630f984..74efa874af0df6255f9fea7bb21fe07f4c2dd6fa 100644 (file)
@@ -79,7 +79,7 @@ Timing_translator::do_process_music()
                                  measure_position ().str ()));
              // resync
              daddy_trans_l_->set_property("measurePosition",
-                                          (new Moment)->smobify_self ());
+                                          smobify (new Moment));
 
            }
        }
@@ -124,12 +124,9 @@ Timing_translator::do_creation_processing()
 {
   daddy_trans_l_->set_property ("timing" , SCM_BOOL_T);  
   daddy_trans_l_->set_property ("currentBarNumber" , gh_int2scm (1));
-  daddy_trans_l_->set_property("measurePosition",
-                              (new Moment)->smobify_self());
-  daddy_trans_l_->set_property ("oneBeat",
-                               (new Moment (1,4))->smobify_self ());
-  daddy_trans_l_->set_property("measureLength",
-                              (new Moment (1))->smobify_self());
+  daddy_trans_l_->set_property ("measurePosition", smobify (new Moment));
+  daddy_trans_l_->set_property ("oneBeat", smobify (new Moment (1,4)));
+  daddy_trans_l_->set_property ("measureLength", smobify (new Moment (1)));
 }
 
 Moment
@@ -160,10 +157,8 @@ Timing_translator::set_time_signature (int l, int o)
 {
   Moment one_beat = Moment (1)/Moment (o);
   Moment len = Moment (l) * one_beat;
-  daddy_trans_l_->set_property ("measureLength",
-                               (new Moment (len))->smobify_self ());
-  daddy_trans_l_->set_property ("beatLength",
-                               (new Moment (one_beat))->smobify_self ());
+  daddy_trans_l_->set_property ("measureLength", smobify (new Moment (len)));
+  daddy_trans_l_->set_property ("beatLength", smobify (new Moment (one_beat)));
 }
 
 Timing_translator::Timing_translator()
@@ -219,7 +214,7 @@ Timing_translator::do_post_move_processing()
   else
     {
       measposp = new Moment;
-      daddy_trans_l_->set_property ("measurePosition", measposp->smobify_self ());
+      daddy_trans_l_->set_property ("measurePosition", smobify (measposp));
     }
   
   *measposp += dt;
index b1fe324985e0d8963afcdbda1965a1d14fc11c34..98fcbfe64b8a530b059c292575b36f5400f6c8e2 100644 (file)
@@ -257,7 +257,7 @@ if to_diff == from_diff:
        elif to_src:
              to_diff = to_diff + '.src'
        else:
-             sys.stderr.write (name + ': nothing to do: to == from == ' + from_diff + '\n')
+             sys.stderr.write (patch_name + ': nothing to do: to == from = ' + from_diff + '\n')
              sys.exit (1)
 
 if not patch_name:
index 1950f569354970c830d58cdd5a510d99aa6a9317..10ab9a806593d90a885d4bc478495ad335961e9c 100755 (executable)
@@ -121,10 +121,9 @@ def version_tuple_to_str(tup):
 
 def version_str_to_tuple(str):
        t = string.split(str, '.')
-       try:
-               mypatch = t[3]
-       except IndexError:
-               mypatch = ''
+       mypatch = ''
+       if len (t) >= 4:
+               mypatch = string.join (t[3:], '.')
        return (string.atoi(t[0]), string.atoi(t[1]), string.atoi(t[2]), mypatch)
 
 def version_compare (tupl, tupr):