Skip to content

Commit 1d20b88

Browse files
authored
Clarify and regularize text format index parsing rules (#655)
Resolves #648
1 parent 706074c commit 1d20b88

5 files changed

Lines changed: 478 additions & 199 deletions

File tree

design/mvp/Binary.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -325,21 +325,21 @@ canon ::= 0x00 0x00 f:<core:funcidx> opts:<opts> ft:<typeidx> => (canon lift
325325
| 0x1d opts:<opts> => (canon error-context.debug-message opts (core func)) 📝
326326
| 0x1e => (canon error-context.drop (core func)) 📝
327327
| 0x1f => (canon waitable-set.new (core func)) 🔀
328-
| 0x20 cancel?:<cancel?> m:<core:memidx> => (canon waitable-set.wait cancel? (memory m) (core func)) 🔀
329-
| 0x21 cancel?:<cancel?> m:<core:memidx> => (canon waitable-set.poll cancel? (memory m) (core func)) 🔀
328+
| 0x20 cancel?:<cancel?> m:<core:memoryidx> => (canon waitable-set.wait cancel? (memory m) (core func)) 🔀
329+
| 0x21 cancel?:<cancel?> m:<core:memoryidx> => (canon waitable-set.poll cancel? (memory m) (core func)) 🔀
330330
| 0x22 => (canon waitable-set.drop (core func)) 🔀
331331
| 0x23 => (canon waitable.join (core func)) 🔀
332332
| 0x26 => (canon thread.index (core func)) 🧵
333-
| 0x27 ft:<typeidx> tbl:<core:tableidx> => (canon thread.new-indirect ft tbl (core func)) 🧵
333+
| 0x27 ft:<core:typeidx> tbl:<core:tableidx> => (canon thread.new-indirect ft tbl (core func)) 🧵
334334
| 0x28 => (canon thread.resume-later (core func)) 🧵
335335
| 0x29 cancel?:<cancel?> => (canon thread.suspend cancel? (core func)) 🧵
336336
| 0x0c cancel?:<cancel?> => (canon thread.yield cancel? (core func)) 🔀
337337
| 0x2a cancel?:<cancel?> => (canon thread.suspend-then-resume cancel? (core func)) 🧵
338338
| 0x2b cancel?:<cancel?> => (canon thread.yield-then-resume cancel? (core func)) 🧵
339339
| 0x2c cancel?:<cancel?> => (canon thread.suspend-then-promote cancel? (core func)) 🧵
340340
| 0x2d cancel?:<cancel?> => (canon thread.yield-then-promote cancel? (core func)) 🧵
341-
| 0x40 shared?:<sh?> ft:<typeidx> => (canon thread.spawn-ref shared? ft (core func)) 🧵②
342-
| 0x41 shared?:<sh?> ft:<typeidx> tbl:<core:tableidx> => (canon thread.spawn-indirect shared? ft tbl (core func)) 🧵②
341+
| 0x40 shared?:<sh?> ft:<core:typeidx> => (canon thread.spawn-ref shared? ft (core func)) 🧵②
342+
| 0x41 shared?:<sh?> ft:<core:typeidx> tbl:<core:tableidx> => (canon thread.spawn-indirect shared? ft tbl (core func)) 🧵②
343343
| 0x42 shared?:<sh?> => (canon thread.available-parallelism shared? (core func)) 🧵②
344344
async? ::= 0x00 =>
345345
| 0x01 => async
@@ -351,7 +351,7 @@ opts ::= opt*:vec(<canonopt>) => opt*
351351
canonopt ::= 0x00 => string-encoding=utf8
352352
| 0x01 => string-encoding=utf16
353353
| 0x02 => string-encoding=latin1+utf16
354-
| 0x03 m:<core:memidx> => (memory m)
354+
| 0x03 m:<core:memoryidx> => (memory m)
355355
| 0x04 f:<core:funcidx> => (realloc f)
356356
| 0x05 f:<core:funcidx> => (post-return f)
357357
| 0x06 => async 🔀

design/mvp/CanonicalABI.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3563,7 +3563,7 @@ performed for a component. These are defined as:
35633563

35643564
For a canonical definition:
35653565
```wat
3566-
(canon lift $callee:<funcidx> $opts:<canonopt>* (func $f (type $ft)))
3566+
(canon lift $callee $opts (func $f (type $ft)))
35673567
```
35683568

35693569
In addition to [general validation of `$opts`](#canonopt-validation) the additional

0 commit comments

Comments
 (0)