]> git.donarmstrong.com Git - lilypond.git/commitdiff
Issue 4850: Remove self method bindings of translator groups
authorDavid Kastrup <dak@gnu.org>
Mon, 9 May 2016 18:09:21 +0000 (20:09 +0200)
committerDavid Kastrup <dak@gnu.org>
Tue, 24 May 2016 17:22:23 +0000 (19:22 +0200)
They are not actually being used (and consequently untested), and the added
complexity makes understanding the code harder.

lily/include/translator-group.hh
lily/translator-group.cc

index 6eec2333a6a9b0cf0f2c6789dc6a8baa7ed26d82..4ba2fe6523d493e8b43b77cde05abfa6afb5bfe1 100644 (file)
@@ -36,9 +36,6 @@ private:
   vector<Method_instance>
   precomputed_method_bindings_[TRANSLATOR_METHOD_PRECOMPUTE_COUNT];
 
-  SCM
-  precomputed_self_method_bindings_[TRANSLATOR_METHOD_PRECOMPUTE_COUNT];
-
   SCM protected_events_;
 
   void create_child_translator (SCM);
@@ -57,12 +54,9 @@ public:
   void stop_translation_timestep ();
   void start_translation_timestep ();
 
-  virtual void fetch_precomputable_methods (SCM []);
-
   Translator_group ();
 
   void precomputed_translator_foreach (Translator_precompute_index);
-  void call_precomputed_self_method (Translator_precompute_index);
 
   Context *context () const { return context_; }
 protected:
index 6e47a85ad9a863d965ab87a47915cc1d40aace5e..972a487bf4861428734b8d483ab13a835bfae472 100644 (file)
@@ -241,7 +241,6 @@ precomputed_recurse_over_translators (Context *c, Translator_precompute_index id
   if (tg && dir == DOWN)
     {
       tg->precomputed_translator_foreach (idx);
-      tg->call_precomputed_self_method (idx);
     }
 
   for (SCM s = c->children_contexts (); scm_is_pair (s);
@@ -251,7 +250,6 @@ precomputed_recurse_over_translators (Context *c, Translator_precompute_index id
   if (tg && dir == UP)
     {
       tg->precomputed_translator_foreach (idx);
-      tg->call_precomputed_self_method (idx);
     }
 }
 
@@ -311,7 +309,6 @@ Translator_group::precompute_method_bindings ()
         }
     }
 
-  fetch_precomputable_methods (precomputed_self_method_bindings_);
 }
 
 void
@@ -322,20 +319,6 @@ Translator_group::precomputed_translator_foreach (Translator_precompute_index id
     bindings[i]();
 }
 
-void
-Translator_group::fetch_precomputable_methods (SCM ptrs[])
-{
-  for (int i = 0; i < TRANSLATOR_METHOD_PRECOMPUTE_COUNT; i++)
-    ptrs[i] = SCM_UNDEFINED;
-}
-
-void
-Translator_group::call_precomputed_self_method (Translator_precompute_index idx)
-{
-  if (!SCM_UNBNDP (precomputed_self_method_bindings_[idx]))
-    scm_call_1 (precomputed_self_method_bindings_[idx], self_scm ());
-}
-
 Translator_group::~Translator_group ()
 {
 }