Skip to content

Commit a6dfd37

Browse files
Add memory64 and table64 support to the Canonical ABI (#624)
* Add memory64 and table64 support to the Canonical ABI Parameterize the Canonical ABI to handle 32-bit or 64-bit memory addresses and table indices. This is done by adding two new fields to `LiftOptions` to indicate if the `memory64`/`table64` feature is being used in a core module. * Correct types that are in host tables. * Use existing canonical options and static parameters * typo * small fixes * review comments * some test cleanup * fix spacing Co-authored-by: Luke Wagner <mail@lukewagner.name> * fix spacing Co-authored-by: Luke Wagner <mail@lukewagner.name> * fix spacing Co-authored-by: Luke Wagner <mail@lukewagner.name> * inline table.addrtype Co-authored-by: Luke Wagner <mail@lukewagner.name> * inline table.addrtype Co-authored-by: Luke Wagner <mail@lukewagner.name> * fixup inline table.addrtype * add MemInst class * inline memory defaults in tests * revert max string length to a const * replace PTR with memory.addrtype * note on buffer size * clarify address type * mixed context types behavior * fix 32 bit mask * transparent indexing on MemInst * undo old change * revert some small changes * check list and string lengths when loading * Update design/mvp/Explainer.md Co-authored-by: Luke Wagner <mail@lukewagner.name> * Update design/mvp/Explainer.md Co-authored-by: Luke Wagner <mail@lukewagner.name> * Update design/mvp/Explainer.md Co-authored-by: Luke Wagner <mail@lukewagner.name> * remove equal for MemInst * simplify string load limit * simplify list length limits * string length i32 * Revert "string length i32" This reverts commit cca0beb. * utf16 tag in high bit * remove python comment. Co-authored-by: Luke Wagner <mail@lukewagner.name> * review comments * bound string length by bytes * elephant emoji gate and i64 resource production * update resource types with emoji * Update design/mvp/CanonicalABI.md Co-authored-by: Luke Wagner <mail@lukewagner.name> * Update design/mvp/CanonicalABI.md Co-authored-by: Luke Wagner <mail@lukewagner.name> * Update design/mvp/CanonicalABI.md Co-authored-by: Luke Wagner <mail@lukewagner.name> * Update design/mvp/CanonicalABI.md Co-authored-by: Luke Wagner <mail@lukewagner.name> * Update design/mvp/CanonicalABI.md Co-authored-by: Luke Wagner <mail@lukewagner.name> * Update design/mvp/CanonicalABI.md Co-authored-by: Luke Wagner <mail@lukewagner.name> * Update design/mvp/CanonicalABI.md Co-authored-by: Luke Wagner <mail@lukewagner.name> * Update design/mvp/CanonicalABI.md Co-authored-by: Luke Wagner <mail@lukewagner.name> * Update design/mvp/CanonicalABI.md Co-authored-by: Luke Wagner <mail@lukewagner.name> * Update design/mvp/CanonicalABI.md Co-authored-by: Luke Wagner <mail@lukewagner.name> * Update design/mvp/CanonicalABI.md Co-authored-by: Luke Wagner <mail@lukewagner.name> * Update design/mvp/CanonicalABI.md Co-authored-by: Luke Wagner <mail@lukewagner.name> * Update design/mvp/CanonicalABI.md Co-authored-by: Luke Wagner <mail@lukewagner.name> * Update design/mvp/CanonicalABI.md Co-authored-by: Luke Wagner <mail@lukewagner.name> * Update design/mvp/CanonicalABI.md Co-authored-by: Luke Wagner <mail@lukewagner.name> * Update design/mvp/CanonicalABI.md Co-authored-by: Luke Wagner <mail@lukewagner.name> * merge load length limits into REALLOC_I32_MAX --------- Co-authored-by: Luke Wagner <mail@lukewagner.name>
1 parent 71c2e05 commit a6dfd37

File tree

7 files changed

+686
-495
lines changed

7 files changed

+686
-495
lines changed

design/mvp/Binary.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,8 @@ valtype ::= i:<typeidx> => i
215215
| pvt:<primvaltype> => pvt
216216
resourcetype ::= 0x3f 0x7f f?:<funcidx>? => (resource (rep i32) (dtor f)?)
217217
| 0x3e 0x7f f:<funcidx> cb?:<funcidx>? => (resource (rep i32) (dtor async f (callback cb)?)) 🚝
218+
| 0x3f 0x7e f?:<funcidx>? => (resource (rep i64) (dtor f)?) 🐘
219+
| 0x3e 0x7e f:<funcidx> cb?:<funcidx>? => (resource (rep i64) (dtor async f (callback cb)?)) 🚝🐘
218220
functype ::= 0x40 ps:<paramlist> rs:<resultlist> => (func ps rs)
219221
| 0x43 ps:<paramlist> rs:<resultlist> => (func async ps rs)
220222
paramlist ::= lt*:vec(<labelvaltype>) => (param lt)*

0 commit comments

Comments
 (0)