Repository navigation
Commit f78ac03
authored
Sync with wasm-tools a bit more, clarify task.return & borrows (#737)
* Sync with wasm-tools a bit more, clarify task.return & borrows
This is a few more minor edits to the spec from comparing the
implementation in wasm-tools against the spec. The changes here are:
* Encoding rules for types within a core module type have been updated
to statically disallow core-modules-in-core-modules. This matches
wasm-tools' behavior where within a core module the funky `0x00`
prefix isn't needed for GC types, it's only within components that's
needed. Minor `binary.wast` updates were made for this.
* The `async` option on `canon lower` no longer unconditionally requires
`memory`. This is already tested, wasm-tools already implements this
behavior, so this syncs the explainer with the tests.
* An explicit validation rule was added to disallow `borrow`s in the
`$t` passed to the `task.return` intrinsic. This already wouldn't work
anywhere because it couldn't match a function signature, but it seems
reasonable to go ahead and statically disallow it here to avoid
runtimes having to worry about it.
* Add some task.return tests1 parent 2126546 commit f78ac03
4 files changed
Lines changed: 49 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
145 | 145 | | |
146 | 146 | | |
147 | 147 | | |
148 | | - | |
| 148 | + | |
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| |||
163 | 163 | | |
164 | 164 | | |
165 | 165 | | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
170 | 175 | | |
171 | 176 | | |
172 | 177 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3604 | 3604 | | |
3605 | 3605 | | |
3606 | 3606 | | |
3607 | | - | |
3608 | 3607 | | |
3609 | 3608 | | |
3610 | 3609 | | |
| |||
3928 | 3927 | | |
3929 | 3928 | | |
3930 | 3929 | | |
| 3930 | + | |
3931 | 3931 | | |
3932 | 3932 | | |
3933 | 3933 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
943 | 943 | | |
944 | 944 | | |
945 | 945 | | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + | |
946 | 966 | | |
947 | 967 | | |
948 | 968 | | |
949 | 969 | | |
950 | 970 | | |
951 | 971 | | |
952 | | - | |
953 | | - | |
| 972 | + | |
| 973 | + | |
954 | 974 | | |
955 | 975 | | |
956 | 976 | | |
| |||
0 commit comments