From 0719f749e7bf92291a16627d520f588651f95e2a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org> Date: Fri, 17 Jun 2022 16:28:52 +0200 Subject: [PATCH] Bytecode: remove unused opcodes --- mex/sources/bytecode/ErrorHandling.hh | 2 -- mex/sources/bytecode/Evaluate.cc | 8 -------- preprocessor | 2 +- 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/mex/sources/bytecode/ErrorHandling.hh b/mex/sources/bytecode/ErrorHandling.hh index 7a3e90646e..b5b14cf36e 100644 --- a/mex/sources/bytecode/ErrorHandling.hh +++ b/mex/sources/bytecode/ErrorHandling.hh @@ -1761,8 +1761,6 @@ public: case Tags::FENDEQU: go_on = false; break; - case Tags::FOK: - break; default: mexPrintf("Error it_code->first=%d unknown\n", it_code->first); mexEvalString("drawnow;"); throw FatalExceptionHandling(" in print_expression, unknown opcode " diff --git a/mex/sources/bytecode/Evaluate.cc b/mex/sources/bytecode/Evaluate.cc index c8296a9f69..c959f52ab8 100644 --- a/mex/sources/bytecode/Evaluate.cc +++ b/mex/sources/bytecode/Evaluate.cc @@ -1112,9 +1112,6 @@ Evaluate::compute_block_time(int Per_u_, bool evaluate, bool no_derivative) } break; - case Tags::FPUSH: - break; - case Tags::FCALL: { #ifdef DEBUG @@ -1436,11 +1433,6 @@ Evaluate::compute_block_time(int Per_u_, bool evaluate, bool no_derivative) #endif it_code += static_cast<FJMP_ *>(it_code->second)->get_pos() /*- 1 */; break; - case Tags::FOK: - op = static_cast<FOK_ *>(it_code->second)->get_arg(); - if (Stack.size() > 0) - throw FatalExceptionHandling(" in compute_block_time, stack not empty\n"); - break; default: throw FatalExceptionHandling(" in compute_block_time, unknown opcode " + to_string(static_cast<int>(it_code->first)) + "\n"); } diff --git a/preprocessor b/preprocessor index 5a0c6ad206..b3b8ed63e1 160000 --- a/preprocessor +++ b/preprocessor @@ -1 +1 @@ -Subproject commit 5a0c6ad206aaf1ac26139a651c3612d500e6857c +Subproject commit b3b8ed63e10ab7a147681ed625d158903d72913b -- GitLab