From 5097490ed5bcd65115a8a311b5b7e61192cec9f2 Mon Sep 17 00:00:00 2001 From: Han-Wen Nienhuys Date: Sun, 9 Jan 2005 23:37:14 +0000 Subject: [PATCH] * stepmake/aclocal.m4: do NDEBUG for optimizing builds. * lily/include/beam.hh (DEBUG_QUANTING): performance: only switch on BEAMQUANTING for non-NDEBUG builds. * lily/stem.cc (head_count): performance: avoid String::String() inside oft called function. --- ChangeLog | 10 ++++++++++ VERSION | 2 +- flower/rational.cc | 9 +-------- lily/global-context-scheme.cc | 2 +- lily/group-interface.cc | 10 ++-------- lily/include/beam.hh | 2 ++ lily/include/group-interface.hh | 3 +-- lily/stem.cc | 2 +- lily/tie-column.cc | 2 +- mf/feta-beugel.mf | 3 --- stepmake/aclocal.m4 | 11 +---------- 11 files changed, 21 insertions(+), 35 deletions(-) diff --git a/ChangeLog b/ChangeLog index a38c57d07d..26c28781d1 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2005-01-10 Han-Wen Nienhuys + + * stepmake/aclocal.m4: do NDEBUG for optimizing builds. + + * lily/include/beam.hh (DEBUG_QUANTING): performance: only switch + on BEAMQUANTING for non-NDEBUG builds. + + * lily/stem.cc (head_count): performance: avoid String::String() + inside oft called function. + 2005-01-09 Graham Percival * Documentation/user/examles.itely: attempted fix for broken diff --git a/VERSION b/VERSION index c01296d01f..05a322e821 100644 --- a/VERSION +++ b/VERSION @@ -1,6 +1,6 @@ PACKAGE_NAME=LilyPond MAJOR_VERSION=2 MINOR_VERSION=5 -PATCH_LEVEL=7 +PATCH_LEVEL=8 MY_PATCH_LEVEL= diff --git a/flower/rational.cc b/flower/rational.cc index 2d3195514a..4f6678f1c7 100644 --- a/flower/rational.cc +++ b/flower/rational.cc @@ -56,7 +56,7 @@ Rational::Rational (int n) den_= 1; } -static +static inline int gcd (int a, int b) { int t; @@ -68,13 +68,6 @@ int gcd (int a, int b) return b; } -#if 0 -static -int lcm (int a, int b) -{ - return abs (a*b / gcd (a,b)); -} -#endif void Rational::set_infinite (int s) diff --git a/lily/global-context-scheme.cc b/lily/global-context-scheme.cc index 375af3645e..f26b0b19f7 100644 --- a/lily/global-context-scheme.cc +++ b/lily/global-context-scheme.cc @@ -19,7 +19,7 @@ LY_DEFINE (ly_format_output, "ly:format-output", 2, 0, 0, (SCM context, SCM outname), - "Given a Score context in its final state," + "Given a Global context in its final state, " "process it and return the (rendered) result.") { Global_context *g = dynamic_cast (unsmob_context (context)); diff --git a/lily/group-interface.cc b/lily/group-interface.cc index 14cdbc5277..90dfdebd91 100644 --- a/lily/group-interface.cc +++ b/lily/group-interface.cc @@ -16,16 +16,10 @@ Group_interface::add_thing (Grob*me, SCM sym, SCM thing) } -void -Group_interface::add_thing (Grob*me, String name, SCM thing) -{ - add_thing (me, ly_symbol2scm (name.to_str0 ()), thing); -} - int -Group_interface::count (Grob *me, String name) +Group_interface::count (Grob *me, SCM sym) { - return scm_ilength (me->get_property (name.to_str0 ())); + return scm_ilength (me->internal_get_property (sym)); } diff --git a/lily/include/beam.hh b/lily/include/beam.hh index e7594f5a4d..cf4740b349 100644 --- a/lily/include/beam.hh +++ b/lily/include/beam.hh @@ -74,7 +74,9 @@ private: const int REGION_SIZE = 2; +#ifndef NDEBUG #define DEBUG_QUANTING 1 +#endif #endif /* BEAM_HH */ diff --git a/lily/include/group-interface.hh b/lily/include/group-interface.hh index 6d544f27ee..3cdcfedf36 100644 --- a/lily/include/group-interface.hh +++ b/lily/include/group-interface.hh @@ -23,9 +23,8 @@ struct Group_interface { public: - static int count (Grob* , String); + static int count (Grob*, SCM); static void add_thing (Grob*, SCM, SCM); - static void add_thing (Grob*, String nm, SCM); }; struct Pointer_group_interface : public Group_interface { diff --git a/lily/stem.cc b/lily/stem.cc index b098b38af7..6a1e207091 100644 --- a/lily/stem.cc +++ b/lily/stem.cc @@ -141,7 +141,7 @@ Stem::support_head (Grob *me) int Stem::head_count (Grob *me) { - return Pointer_group_interface::count (me, "note-heads"); + return Pointer_group_interface::count (me, ly_symbol2scm ("note-heads")); } /* The note head which forms one end of the stem. diff --git a/lily/tie-column.cc b/lily/tie-column.cc index 16279f4f60..4f47e190b4 100644 --- a/lily/tie-column.cc +++ b/lily/tie-column.cc @@ -28,7 +28,7 @@ Tie_column::add_tie (Grob*me,Grob *s) && Tie_column::has_interface (s->get_parent (Y_AXIS))) return ; - if (! Pointer_group_interface::count (me, "ties")) + if (!Pointer_group_interface::count (me, ly_symbol2scm ("ties"))) { dynamic_cast (me)->set_bound (LEFT, Tie::head (s,LEFT)); dynamic_cast (me)->set_bound (RIGHT, Tie::head (s,RIGHT)); diff --git a/mf/feta-beugel.mf b/mf/feta-beugel.mf index 393d6a372d..6836383bc7 100644 --- a/mf/feta-beugel.mf +++ b/mf/feta-beugel.mf @@ -77,9 +77,6 @@ linethickness := 0.5pt#; increment := 0.5pt#; y := 10pt#; - - - for i := 0 step 1 until font_count: %% We can't store more than 64 (65?) height dimensions in a TFM diff --git a/stepmake/aclocal.m4 b/stepmake/aclocal.m4 index 3d8cc6f159..d8cf86f060 100644 --- a/stepmake/aclocal.m4 +++ b/stepmake/aclocal.m4 @@ -169,16 +169,11 @@ AC_DEFUN(STEPMAKE_COMPILE, [ CFLAGS=${CFLAGS-""} CXXFLAGS=${CXXFLAGS-$CFLAGS} LDFLAGS=${LDFLAGS-""} - checking_b=yes optimise_b=yes profile_b=no debug_b=yes pipe_b=yes - AC_ARG_ENABLE(checking, - [ --enable-checking set runtime checks (assert calls). Default: on], - [checking_b=$enableval] ) - AC_ARG_ENABLE(debugging, [ --enable-debugging compile with debugging info. Default: on], [debug_b=$enableval]) @@ -195,13 +190,9 @@ AC_DEFUN(STEPMAKE_COMPILE, [ [ --enable-pipe compile with -pipe. Default: on], [pipe_b=$enableval]) - if test "$checking_b" = no; then - # ugh + if test "$optimise_b" = yes; then AC_DEFINE(NDEBUG) DEFINES="$DEFINES -DNDEBUG" - fi - - if test "$optimise_b" = yes; then OPTIMIZE="-O2 -finline-functions" fi -- 2.39.5