-
Notifications
You must be signed in to change notification settings - Fork 472
Reword 6.6.5.1. Function Abbreviations to be more specific about impact #1418
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Actually, per the grammar, I think it should be possible to have exports after a single import, just not more than one import. However, in practice, both wabt and wasm-tools require an abbreviated import to be last. Ex.
Ex.
Presuming no-one has complained, I'm personally ok restricting this to |
cc @rossberg - spec side |
actually I can see how this can result in the terminal import as the first abbreviation has no trailing ... So, that means Meanwhile, took a while to figure out which may be due to my denseness. hope something in this issue can be of use to make things more obvious or at least obvious faster than it took me! FWIW if it wrote the same info more straightforwardly, like |
…flect impact While implementing this specification, I became confused as while the language did say the latter was repeatable, the rest used plural words for things that cannot repeat. This changes the text to hopefully prevent future folks from reaching the same misconclusion. Fixes WebAssembly#1418 Signed-off-by: Adrian Cole <[email protected]>
#1420 is best I can do to clarify this "The latter abbreviation can be applied repeatedly, with “…” containing another import or export." ^^ this seems to hint that you can do (export) (import) (export) (import) resulting in multiple imports that won't work as there can be at most one and really only exports can repeat. IOTW, I think even if the grammar can be interpreted correctly as is, it wouldn't hurt to help it become interpreted correctly. Meanwhile, closing this issue to whatever end the WG feels as I've made copious notes on my side regardless.. |
…flect impact While implementing this specification, I became confused as while the language did say the latter was repeatable, the rest used plural words for things that cannot repeat. This changes the text to hopefully prevent future folks from reaching the same misconclusion. Fixes WebAssembly#1418 Signed-off-by: Adrian Cole <[email protected]> Co-authored-by: Andreas Rossberg <[email protected]>
The WebAssembly 1.0 (MVP) and 1.1 draft both allow repetition and co-mingling of inlined/abbreviated function import and exports.
The wording "The latter abbreviation can be applied repeatedly, with “…” containing another import or export." is more wide than necessary. The only possible grammar seems
(export)* (import)?
because the "import", if present, must be present at the end.For example, the valid combinations besides no inlined import/export
To figure these points out from the spec requires too much thinking, so I think the section can be worded, ya?
The text was updated successfully, but these errors were encountered: