Requiring the emulator to own the memory module complicates some broader goals. For example, if we want to support a memory implementation that performs lookups in a different memory module whenever data is unavailable in the main module, the emulator would have to own both modules. But this fallback module could be part of a larger existing architecture that never anticipated sharing its ownership.
So instead the emulator has been changed to instead accept a mutable memory reference for the emulate function. This means the default emulator is now stateless.
Requiring the emulator to own the memory module complicates some broader goals. For example, if we want to support a memory implementation that performs lookups in a different memory module whenever data is unavailable in the main module, the emulator would have to own both modules. But this fallback module could be part of a larger existing architecture that never anticipated sharing its ownership.
So instead the emulator has been changed to instead accept a mutable memory reference for the
emulate
function. This means the default emulator is now stateless.