Skip to content

[TM-256] Fix `InterpreterRes` propagation in `interpreterPure`

Ivan Gromakovskii requested to merge gromak/tm256-fix-interpreter into master

Description

Problem: when step constructs start it takes currentRes which contains all updates that happened before and all _irInterpretResults. Then statefulInterpreter may put something new there and eventually it gets concatenated with currentRes. After that currentRes contains about twice more elements (half of which are redundant).

Solution: it should pass empty updates and results to statefulInterpreter, because they are not used by statefulInterpreter. statefulInterpreter only adds something there.

Related issue(s)

https://issues.serokell.io/issue/TM-256

Checklist for your Merge Request

Related changes (conditional)

  • Tests (see short guidelines)

    • If I added new functionality, I added tests covering it.
    • If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again ← no because the fix is kinda very deep and it's implementation detail, so this behavior mostly affected performance.
  • Documentation

    • I checked whether I should update the docs and did so if necessary:

Stylistic guide (mandatory)

Merge request reports