Commit a4b41c6
authored
Synchronize some component model intrinsics with the spec (bytecodealliance#2065)
* Synchronize some component model intrinsics with the spec
This commit goes through a few component model intrinsics and
synchronizes them with the current specification, mainly centered around
async intrinsics. This doesn't synchronize all of them but is at least a
start. Changes here include:
* Support for `resource.drop async` intrinsics.
* Renaming `task.backpressure` to `backpressure.set`.
* Adding canonical ABI options to `task.return`.
* A number of refactorings to simplify some constructs, reduce
duplication, etc.
The validation of `task.return` has been updated to take
WebAssembly/component-model#453 into account with the new set of options
that are allowed on it. Additionally `wit-component` was updated to set
options for `task.return` in the same manner as the `canon lift`'d
function on the other end.
* Review comments1 parent fc75d9b commit a4b41c6
File tree
35 files changed
+641
-348
lines changed- crates
- wasm-encoder/src
- component
- reencode
- wasmparser/src
- readers/component
- validator
- wasmprinter/src
- wast/src
- component
- wit-component
- src
- tests/components/async-builtins
- src/bin/wasm-tools
- tests
- local
- component-model-async
- missing-features/component-model
- snapshots/local
- component-model-async
- resources.wast
- task-builtins.wast
- missing-features/component-model
35 files changed
+641
-348
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
361 | 361 | | |
362 | 362 | | |
363 | 363 | | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
364 | 370 | | |
365 | 371 | | |
366 | 372 | | |
| |||
385 | 391 | | |
386 | 392 | | |
387 | 393 | | |
388 | | - | |
389 | | - | |
390 | | - | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
391 | 397 | | |
392 | 398 | | |
393 | 399 | | |
394 | 400 | | |
395 | | - | |
396 | | - | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
397 | 407 | | |
398 | 408 | | |
399 | 409 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
101 | 101 | | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
105 | 104 | | |
106 | 105 | | |
107 | 106 | | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | | - | |
| 107 | + | |
112 | 108 | | |
113 | 109 | | |
114 | 110 | | |
| |||
120 | 116 | | |
121 | 117 | | |
122 | 118 | | |
123 | | - | |
124 | 119 | | |
125 | 120 | | |
126 | 121 | | |
127 | | - | |
128 | | - | |
129 | | - | |
130 | | - | |
| 122 | + | |
131 | 123 | | |
132 | 124 | | |
133 | 125 | | |
| |||
149 | 141 | | |
150 | 142 | | |
151 | 143 | | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
| |||
179 | 179 | | |
180 | 180 | | |
181 | 181 | | |
182 | | - | |
| 182 | + | |
183 | 183 | | |
184 | 184 | | |
185 | 185 | | |
| |||
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | | - | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
| 195 | + | |
192 | 196 | | |
193 | | - | |
194 | | - | |
195 | | - | |
196 | | - | |
197 | | - | |
198 | | - | |
199 | | - | |
| 197 | + | |
| 198 | + | |
200 | 199 | | |
201 | 200 | | |
202 | 201 | | |
| |||
261 | 260 | | |
262 | 261 | | |
263 | 262 | | |
264 | | - | |
265 | | - | |
266 | | - | |
267 | | - | |
268 | | - | |
| 263 | + | |
269 | 264 | | |
270 | 265 | | |
271 | 266 | | |
| |||
278 | 273 | | |
279 | 274 | | |
280 | 275 | | |
281 | | - | |
282 | | - | |
283 | | - | |
284 | | - | |
285 | | - | |
| 276 | + | |
286 | 277 | | |
287 | 278 | | |
288 | 279 | | |
| |||
342 | 333 | | |
343 | 334 | | |
344 | 335 | | |
345 | | - | |
346 | | - | |
347 | | - | |
348 | | - | |
349 | | - | |
| 336 | + | |
350 | 337 | | |
351 | 338 | | |
352 | 339 | | |
| |||
359 | 346 | | |
360 | 347 | | |
361 | 348 | | |
362 | | - | |
363 | | - | |
364 | | - | |
365 | | - | |
366 | | - | |
| 349 | + | |
367 | 350 | | |
368 | 351 | | |
369 | 352 | | |
| |||
414 | 397 | | |
415 | 398 | | |
416 | 399 | | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
| 400 | + | |
422 | 401 | | |
423 | 402 | | |
424 | 403 | | |
| |||
434 | 413 | | |
435 | 414 | | |
436 | 415 | | |
437 | | - | |
438 | | - | |
439 | | - | |
440 | | - | |
441 | | - | |
| 416 | + | |
442 | 417 | | |
443 | 418 | | |
444 | 419 | | |
| |||
449 | 424 | | |
450 | 425 | | |
451 | 426 | | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
| 431 | + | |
| 432 | + | |
| 433 | + | |
| 434 | + | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
452 | 440 | | |
453 | 441 | | |
454 | 442 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
405 | 405 | | |
406 | 406 | | |
407 | 407 | | |
408 | | - | |
409 | | - | |
410 | | - | |
411 | | - | |
412 | | - | |
413 | | - | |
414 | | - | |
415 | | - | |
416 | | - | |
417 | | - | |
| 408 | + | |
418 | 409 | | |
419 | 410 | | |
420 | 411 | | |
421 | 412 | | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
422 | 426 | | |
423 | 427 | | |
424 | 428 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
945 | 945 | | |
946 | 946 | | |
947 | 947 | | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
948 | 952 | | |
949 | 953 | | |
950 | 954 | | |
| |||
956 | 960 | | |
957 | 961 | | |
958 | 962 | | |
959 | | - | |
960 | | - | |
| 963 | + | |
| 964 | + | |
961 | 965 | | |
962 | | - | |
963 | | - | |
| 966 | + | |
| 967 | + | |
| 968 | + | |
| 969 | + | |
| 970 | + | |
964 | 971 | | |
965 | 972 | | |
966 | 973 | | |
| |||
0 commit comments