mnemonikr / symbolic-pcode

Apache License 2.0
0 stars 0 forks source link

Pass memory as a parameter to emulator instead of owning it #90

Closed mnemonikr closed 8 months ago

mnemonikr commented 8 months ago

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.