preprocessor: move all dynamic model reindexing to DynamicModel
parent
3c7f96e29d
commit
a361980437
|
@ -4202,6 +4202,13 @@ DynamicModel::addStaticOnlyEquation(expr_t eq, int lineno)
|
|||
static_only_equations_lineno.push_back(lineno);
|
||||
}
|
||||
|
||||
void
|
||||
DynamicModel::reindex(SymbolTable &orig_symbol_table)
|
||||
{
|
||||
ModelTree::reindex(orig_symbol_table);
|
||||
reindexStaticOnlyEquations(orig_symbol_table);
|
||||
}
|
||||
|
||||
void
|
||||
DynamicModel::reindexStaticOnlyEquations(SymbolTable &orig_symbol_table)
|
||||
{
|
||||
|
|
|
@ -244,6 +244,9 @@ public:
|
|||
//! Adds an equation marked as [static]
|
||||
void addStaticOnlyEquation(expr_t eq, int lineno);
|
||||
|
||||
//! reindex Dynamic Model after removal of extra exogenous
|
||||
void reindex(SymbolTable &orig_symbol_table);
|
||||
|
||||
//! reindex equations marked as [static]
|
||||
void reindexStaticOnlyEquations(SymbolTable &orig_symbol_table);
|
||||
|
||||
|
|
|
@ -314,8 +314,6 @@ ModFile::transformPass(bool nostrict)
|
|||
SymbolTable orig_symbol_table = symbol_table;
|
||||
symbol_table.rmExo(unusedExo);
|
||||
dynamic_model.reindex(orig_symbol_table);
|
||||
dynamic_model.reindexStaticOnlyEquations(orig_symbol_table);
|
||||
|
||||
external_functions_table.reindex(symbol_table, orig_symbol_table);
|
||||
|
||||
vector<Statement *> orig_statements = statements;
|
||||
|
|
Loading…
Reference in New Issue