Closed ghost closed 8 years ago
The original pull request 243 also had a discussion about that.
@Teemperor The link might not be correct? Could you summarize the reason why the spec and encoding seem to differ here?
@JSStats Fixed the link, thx!
@Teemperor Thank you but I still don't see an answer there? In fact that PR includes the follow test which not only names the memory something other than "memory" but has multiple names for it. The binary encoding has only a single bit to flag the memory as being exported and can not represent these names?
(module (memory 0 0) (export "a" memory) (export "b" memory))
Yeah, I just wanted reference the related discussion about "why multiple memory exports" :)
As of #682, memory exports do have an external name. However, BinaryFormat.md is not yet updated to reflect this.
The current binary encoding has a byte flag for memory export, and v8 seems to interpret this an export named "memory". The spec seems to support other names, and even multiple exports of the memory with different names. Looks like an issue to be resolved.