From f9901a990e84ccea4d49d75e2e61d0e8d633dd4d Mon Sep 17 00:00:00 2001 From: Houtan Bastani Date: Fri, 15 Sep 2017 09:39:59 +0200 Subject: [PATCH 1/4] remove file that was erroneously included in 25121bca4f9c97fed28599e9f9adeba2028e5bd0 --- changed_files.txt | 4 ---- 1 file changed, 4 deletions(-) delete mode 100644 changed_files.txt diff --git a/changed_files.txt b/changed_files.txt deleted file mode 100644 index 2a6f3827..00000000 --- a/changed_files.txt +++ /dev/null @@ -1,4 +0,0 @@ - -license.txt - -windows/dynare.nsi From 42d40d00a6086d7d093e1f310333dec7a92a8b81 Mon Sep 17 00:00:00 2001 From: Houtan Bastani Date: Fri, 15 Sep 2017 10:58:35 +0200 Subject: [PATCH 2/4] preprocessor: fix int/size_t comparison warning for g++ --- SymbolTable.cc | 2 +- SymbolTable.hh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/SymbolTable.cc b/SymbolTable.cc index cf986b41..3d035b09 100644 --- a/SymbolTable.cc +++ b/SymbolTable.cc @@ -110,7 +110,7 @@ SymbolTable::freeze() throw (FrozenException) frozen = true; - for (int i = 0; i < symbol_table.size(); i++) + for (int i = 0; i < (int) symbol_table.size(); i++) { int tsi; switch (getType(i)) diff --git a/SymbolTable.hh b/SymbolTable.hh index b97ad162..b27892bd 100644 --- a/SymbolTable.hh +++ b/SymbolTable.hh @@ -367,7 +367,7 @@ public: inline void SymbolTable::validateSymbID(int symb_id) const throw (UnknownSymbolIDException) { - if (symb_id < 0 || symb_id > symbol_table.size()) + if (symb_id < 0 || symb_id > (int) symbol_table.size()) throw UnknownSymbolIDException(symb_id); } From bde9cfa2115647b93ae1d9e36767487744234807 Mon Sep 17 00:00:00 2001 From: Houtan Bastani Date: Mon, 18 Sep 2017 11:42:36 +0200 Subject: [PATCH 3/4] preprocessor: remove unnecessary global declaration. closes #1518 --- ComputingTasks.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ComputingTasks.cc b/ComputingTasks.cc index 9ff522f8..8e1945d6 100644 --- a/ComputingTasks.cc +++ b/ComputingTasks.cc @@ -1028,8 +1028,7 @@ EstimatedParamsStatement::checkPass(ModFileStructure &mod_file_struct, WarningCo void EstimatedParamsStatement::writeOutput(ostream &output, const string &basename, bool minimal_workspace) const { - output << "global estim_params_" << endl - << "estim_params_.var_exo = [];" << endl + output << "estim_params_.var_exo = [];" << endl << "estim_params_.var_endo = [];" << endl << "estim_params_.corrx = [];" << endl << "estim_params_.corrn = [];" << endl From b3ccd928e3abd0ba10fea6c40e64867f3106829d Mon Sep 17 00:00:00 2001 From: Houtan Bastani Date: Wed, 27 Sep 2017 15:24:33 +0200 Subject: [PATCH 4/4] preprocessor: special output for power deriv in JSON --- ExprNode.cc | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/ExprNode.cc b/ExprNode.cc index 60e46de0..e701170d 100644 --- a/ExprNode.cc +++ b/ExprNode.cc @@ -3330,6 +3330,16 @@ BinaryOpNode::writeJsonOutput(ostream &output, return; } + if (op_code == oPowerDeriv) + { + output << "get_power_deriv("; + arg1->writeJsonOutput(output, temporary_terms, tef_terms); + output << ","; + arg2->writeJsonOutput(output, temporary_terms, tef_terms); + output << "," << powerDerivOrder << ")"; + return; + } + int prec = precedenceJson(temporary_terms); bool close_parenthesis = false;