I wonder if it's worth having a method like wasm.getOnlyMemory that asserts that there is exactly one memory and returns is. Then finding all the places that need to be updated to handle multi-memory could be found by searching for uses of that method.
Originally posted by @tlively in #4811 (comment)
This sounds like a good idea to me. I think getSingleMemory would be perhaps a better name given existing getSingle* stuff we have. Also the method could be on MemoryUtils.
Originally posted by @kripken in #4811 (comment)
I wonder if it's worth having a method like
wasm.getOnlyMemorythat asserts that there is exactly one memory and returns is. Then finding all the places that need to be updated to handle multi-memory could be found by searching for uses of that method.Originally posted by @tlively in #4811 (comment)
This sounds like a good idea to me. I think
getSingleMemorywould be perhaps a better name given existinggetSingle*stuff we have. Also the method could be onMemoryUtils.Originally posted by @kripken in #4811 (comment)