The Primus Lisp interpreter uses some state and was previously
implemented as the knowledge monad transformed into the state
monad. The new implementation just uses the newly introduces context
variables, which is much easier and a little bit more performant. It
also enables us to persist the interpreter state between the calls so
that we can generate more efficient code (propagate consts between
instructions), especially for the ghidra backend.
The Primus Lisp interpreter uses some state and was previously implemented as the knowledge monad transformed into the state monad. The new implementation just uses the newly introduces context variables, which is much easier and a little bit more performant. It also enables us to persist the interpreter state between the calls so that we can generate more efficient code (propagate consts between instructions), especially for the ghidra backend.