Bytecode: fix stack_solve_algo=4 on linear blocks

Only one iteration is performed on linear blocks. But in the case of
stack_solve_algo=4 it is not enough, since it will not find the right optimal
path lenght at the first iteration (even though that optimal path length is
ufnitary).
trustregion
Sébastien Villemot 2022-03-01 11:27:56 +01:00
parent dbbbb75874
commit 65e18fe883
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 4 additions and 1 deletions

View File

@ -429,7 +429,10 @@ Interpreter::simulate_a_block(const vector_table_conditional_local_type &vector_
test_mxMalloc(y_save, __LINE__, __FILE__, __func__, y_size*sizeof(double)*(periods+y_kmax+y_kmin));
start_code = it_code;
iter = 0;
if (!is_linear)
if (!is_linear
|| stack_solve_algo == 4) // On linear blocks, stack_solve_algo=4 may
// need more than one iteration to find the
// optimal (unitary!) path length
{
cvg = false;
glambda2 = g0 = very_big;