Adjust canonical ABI option syntax to be less verbose#42
Adjust canonical ABI option syntax to be less verbose#42lukewagner merged 1 commit intoWebAssembly:mainfrom
Conversation
|
Totally agreed the current syntax feels overly verbose in these scenarios so thanks for bringing this up! So, first, I was already on the edge about whether we needed the If we wanted to drop the So: drop the |
|
👍 sounds reasonable to me! |
design/mvp/Explainer.md
Outdated
| | (realloc (func <core:funcidx>)) | ||
| | (post-return (func <core:funcidx>)) |
There was a problem hiding this comment.
| | (realloc (func <core:funcidx>)) | |
| | (post-return (func <core:funcidx>)) | |
| | (realloc <core:funcidx>) | |
| | (post-return <core:funcidx>) |
The idea being that you can either write (canon lift $f (realloc $r) (func $l)) or, via inline-alias-sugar, (canon lift $f (realloc (func $i "r")) (func $l)).
Currently the syntax for specifying a memory with a canonical option is:
(memory (core memory $memory))
and optionally instance alias sugar can also be used:
(memory (core memory $libc "memory"))
This PR proposes changing these two syntaxes to:
(memory $memory)
(memory $libc "memory")
with the theory that the "core" part is already implied by the canonical
option itself and otherwise saying "memory" twice is redundant.
06efb61 to
7d29dee
Compare
|
Sure thing, should be updated now I believe. |
|
Thanks! |
Currently the syntax for specifying a memory with a canonical option is:
and optionally instance alias sugar can also be used:
This PR proposes changing these two syntaxes to:
with the theory that the "core" part is already implied by the canonical
option itself and otherwise saying "memory" twice is redundant.