From 549c6637cbb893ec5425afb773a3a30a4ea7b56e Mon Sep 17 00:00:00 2001 From: Houtan Bastani Date: Tue, 19 May 2015 16:32:26 +0200 Subject: [PATCH] preprocessor: move external_functions_table reindexing to modfile::transformpass --- DataTree.cc | 7 ------- DataTree.hh | 2 -- ModFile.cc | 1 + 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/DataTree.cc b/DataTree.cc index b45d4479..acbae348 100644 --- a/DataTree.cc +++ b/DataTree.cc @@ -61,7 +61,6 @@ DataTree::reindex(SymbolTable &orig_symbol_table) first_deriv_external_function_node_map.clear(); second_deriv_external_function_node_map.clear(); - reindexExternalFunctions(orig_symbol_table); reindexLocalVars(orig_symbol_table); } @@ -76,12 +75,6 @@ DataTree::reindexLocalVars(SymbolTable &orig_symbol_table) it->second->cloneDynamicReindex(*this, orig_symbol_table)); } -void -DataTree::reindexExternalFunctions(SymbolTable &orig_symbol_table) -{ - external_functions_table.reindex(symbol_table, orig_symbol_table); -} - expr_t DataTree::AddNonNegativeConstant(const string &value) { diff --git a/DataTree.hh b/DataTree.hh index 9d0f746c..b7cd2565 100644 --- a/DataTree.hh +++ b/DataTree.hh @@ -238,8 +238,6 @@ public: void writePowerDerivCHeader(ostream &output) const; //! Write getPowerDeriv void writePowerDeriv(ostream &output, bool use_dll) const; - //! reindex external functions - void reindexExternalFunctions(SymbolTable &orig_symbol_table); void reindex(SymbolTable &orig_symbol_table); void reindexLocalVars(SymbolTable &orig_symbol_table); //! Thrown when trying to access an unknown variable by deriv_id diff --git a/ModFile.cc b/ModFile.cc index a206a930..bc9cea5f 100644 --- a/ModFile.cc +++ b/ModFile.cc @@ -316,6 +316,7 @@ ModFile::transformPass(bool nostrict) dynamic_model.reindex(orig_symbol_table); dynamic_model.reindexStaticOnlyEquations(orig_symbol_table); + external_functions_table.reindex(symbol_table, orig_symbol_table); vector orig_statements = statements; statements.clear();