From 0284b249f5b351314d918bae77072e654ad4738f Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org>
Date: Thu, 19 May 2022 14:10:22 +0200
Subject: [PATCH] =?UTF-8?q?Remove=20unused=20=E2=80=9Cbytecode=E2=80=9D=20?=
 =?UTF-8?q?argument=20in=20{Static,Dynamic}Model::computingPass()?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/ComputingTasks.cc |  2 +-
 src/DynamicModel.cc   |  3 +--
 src/DynamicModel.hh   |  2 +-
 src/ModFile.cc        | 12 ++++++------
 src/StaticModel.cc    |  2 +-
 src/StaticModel.hh    |  2 +-
 6 files changed, 11 insertions(+), 12 deletions(-)

diff --git a/src/ComputingTasks.cc b/src/ComputingTasks.cc
index 7af37c4e..d32eda89 100644
--- a/src/ComputingTasks.cc
+++ b/src/ComputingTasks.cc
@@ -2423,7 +2423,7 @@ PlannerObjectiveStatement::getPlannerObjective() const
 void
 PlannerObjectiveStatement::computingPass(const ModFileStructure &mod_file_struct)
 {
-  model_tree.computingPass(max(3, mod_file_struct.order_option), 0, {}, false, false, false);
+  model_tree.computingPass(max(3, mod_file_struct.order_option), 0, {}, false, false);
   computing_pass_called = true;
 }
 
diff --git a/src/DynamicModel.cc b/src/DynamicModel.cc
index 67b40bde..0591d2c2 100644
--- a/src/DynamicModel.cc
+++ b/src/DynamicModel.cc
@@ -4189,8 +4189,7 @@ DynamicModel::substitutePacTargetNonstationary(const string &pac_model_name, exp
 
 void
 DynamicModel::computingPass(bool jacobianExo, int derivsOrder, int paramsDerivsOrder,
-                            const eval_context_t &eval_context, bool no_tmp_terms, bool block, bool use_dll,
-                            bool bytecode)
+                            const eval_context_t &eval_context, bool no_tmp_terms, bool block, bool use_dll)
 {
   assert(jacobianExo || (derivsOrder < 2 && paramsDerivsOrder == 0));
 
diff --git a/src/DynamicModel.hh b/src/DynamicModel.hh
index 3a5d97f0..3092d796 100644
--- a/src/DynamicModel.hh
+++ b/src/DynamicModel.hh
@@ -329,7 +329,7 @@ public:
     \param no_tmp_terms if true, no temporary terms will be computed in the dynamic files
   */
   void computingPass(bool jacobianExo, int derivsOrder, int paramsDerivsOrder,
-                     const eval_context_t &eval_context, bool no_tmp_terms, bool block, bool use_dll, bool bytecode);
+                     const eval_context_t &eval_context, bool no_tmp_terms, bool block, bool use_dll);
   //! Writes information about the dynamic model to the driver file
   void writeDriverOutput(ostream &output, const string &basename, bool block, bool use_dll, bool occbin, bool estimation_present, bool compute_xrefs) const;
 
diff --git a/src/ModFile.cc b/src/ModFile.cc
index 3a3b9371..a54a726b 100644
--- a/src/ModFile.cc
+++ b/src/ModFile.cc
@@ -682,7 +682,7 @@ ModFile::computingPass(bool no_tmp_terms, OutputType output, int params_derivs_o
               || (mod_file_struct.GMM_present && (mod_file_struct.analytic_standard_errors_present || mod_file_struct.analytic_jacobian_present)))
             paramsDerivsOrder = params_derivs_order;
 
-          static_model.computingPass(derivsOrder, paramsDerivsOrder, global_eval_context, no_tmp_terms, block, bytecode);
+          static_model.computingPass(derivsOrder, paramsDerivsOrder, global_eval_context, no_tmp_terms, block);
         }
       // Set things to compute for dynamic model
       if (mod_file_struct.perfect_foresight_solver_present
@@ -701,7 +701,7 @@ ModFile::computingPass(bool no_tmp_terms, OutputType output, int params_derivs_o
                 derivsOrder = 2;
               else if  (output == OutputType::third)
                 derivsOrder = 3;
-              dynamic_model.computingPass(true, derivsOrder, 0, global_eval_context, no_tmp_terms, block, use_dll, bytecode);
+              dynamic_model.computingPass(true, derivsOrder, 0, global_eval_context, no_tmp_terms, block, use_dll);
             }
           else
             {
@@ -730,13 +730,13 @@ ModFile::computingPass(bool no_tmp_terms, OutputType output, int params_derivs_o
                   || mod_file_struct.estimation_analytic_derivation
                   || (mod_file_struct.GMM_present && (mod_file_struct.analytic_standard_errors_present || mod_file_struct.analytic_jacobian_present)))
                 paramsDerivsOrder = params_derivs_order;
-              dynamic_model.computingPass(true, derivsOrder, paramsDerivsOrder, global_eval_context, no_tmp_terms, block, use_dll, bytecode);
+              dynamic_model.computingPass(true, derivsOrder, paramsDerivsOrder, global_eval_context, no_tmp_terms, block, use_dll);
               if (linear && mod_file_struct.ramsey_model_present)
-                orig_ramsey_dynamic_model.computingPass(true, 2, paramsDerivsOrder, global_eval_context, no_tmp_terms, block, use_dll, bytecode);
+                orig_ramsey_dynamic_model.computingPass(true, 2, paramsDerivsOrder, global_eval_context, no_tmp_terms, block, use_dll);
             }
         }
       else // No computing task requested, compute derivatives up to 2nd order by default
-        dynamic_model.computingPass(true, 2, 0, global_eval_context, no_tmp_terms, block, use_dll, bytecode);
+        dynamic_model.computingPass(true, 2, 0, global_eval_context, no_tmp_terms, block, use_dll);
 
       /* Check that the model is linear.
          FIXME: this check always passes if derivsOrder = 1, i.e. for a perfect
@@ -775,7 +775,7 @@ ModFile::computingPass(bool no_tmp_terms, OutputType output, int params_derivs_o
   // Compute epilogue derivatives (but silence standard output)
   streambuf *oldcout = cout.rdbuf();
   cout.rdbuf(nullptr);
-  epilogue.computingPass(true, 2, 0, global_eval_context, true, false, false, false);
+  epilogue.computingPass(true, 2, 0, global_eval_context, true, false, false);
   cout.rdbuf(oldcout);
 }
 
diff --git a/src/StaticModel.cc b/src/StaticModel.cc
index 23769b18..a26bb32c 100644
--- a/src/StaticModel.cc
+++ b/src/StaticModel.cc
@@ -983,7 +983,7 @@ StaticModel::writeBlockBytecodeBinFile(const string &basename, int num,
 }
 
 void
-StaticModel::computingPass(int derivsOrder, int paramsDerivsOrder, const eval_context_t &eval_context, bool no_tmp_terms, bool block, bool bytecode)
+StaticModel::computingPass(int derivsOrder, int paramsDerivsOrder, const eval_context_t &eval_context, bool no_tmp_terms, bool block)
 {
   initializeVariablesAndEquations();
 
diff --git a/src/StaticModel.hh b/src/StaticModel.hh
index ab5cafe0..ec1b2ff9 100644
--- a/src/StaticModel.hh
+++ b/src/StaticModel.hh
@@ -134,7 +134,7 @@ public:
     \param derivsOrder order of derivation with respect to endogenous
     \param paramsDerivsOrder order of derivatives w.r. to a pair (endogenous, parameter) to be computed
   */
-  void computingPass(int derivsOrder, int paramsDerivsOrder, const eval_context_t &eval_context, bool no_tmp_terms, bool block, bool bytecode);
+  void computingPass(int derivsOrder, int paramsDerivsOrder, const eval_context_t &eval_context, bool no_tmp_terms, bool block);
 
   //! Writes static model file
   void writeStaticFile(const string &basename, bool block, bool bytecode, bool use_dll, const string &mexext, const filesystem::path &matlabroot, const filesystem::path &dynareroot, bool julia) const;
-- 
GitLab