Bytecode: remove Evaluate::{EQN_block,EQN_block_number}

mr#2134
Sébastien Villemot 2023-04-18 15:53:09 +02:00
parent d789e6a4c5
commit 36e8062e25
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
3 changed files with 3 additions and 6 deletions

View File

@ -319,8 +319,8 @@ Evaluate::error_location(it_code_type expr_begin, it_code_type faulty_op, int it
break;
}
Error_loc << " " << EQN_equation+1;
if (EQN_block_number > 1)
Error_loc << " in block " << EQN_block+1;
if (nb_blocks > 1)
Error_loc << " in block " << block_num+1;
switch (EQN_type)
{
case ExpressionType::TemporaryTerm:
@ -1000,7 +1000,6 @@ Evaluate::evaluateBlock(int it_, double *y, const double *ya, int y_size, double
bool go_on = true;
double ll;
double rr;
EQN_block = block_num;
stack<double> Stack;
ExternalFunctionCallType call_type{ExternalFunctionCallType::levelWithoutDerivative};
it_code_type it_code_expr;

View File

@ -54,7 +54,7 @@ private:
vector<size_t> begin_block;
ExpressionType EQN_type;
int EQN_equation, EQN_block, EQN_dvar1;
int EQN_equation, EQN_dvar1;
int EQN_lag1, EQN_lag2, EQN_lag3;
string error_location(it_code_type expr_begin, it_code_type faulty_op, int it_) const;
@ -74,7 +74,6 @@ private:
protected:
BasicSymbolTable &symbol_table;
int EQN_block_number;
void evaluateBlock(int it_, double *y, const double *ya, int y_size, double *x, int nb_row_x, double *params, const double *steady_y, double *u, int Per_u_, double *T, int T_nrows, map<int, double> &TEF, map<pair<int, int>, double> &TEFD, map<tuple<int, int, int>, double> &TEFDD, double *r, double *g1, double *jacob, double *jacob_exo, double *jacob_exo_det, bool evaluate, bool no_derivatives);
int block_num; // Index of the current block

View File

@ -622,7 +622,6 @@ Interpreter::ReadCodeFile(const string &file_name)
+ (steady_state ? "static" : "dynamic") + ".cod"};
loadCodeFile(codfile);
EQN_block_number = get_block_number();
}
void