Commit 4cb6e03
Fixed length list support (#1992)
* support fixed length lists, part 1
* more fixed size
* fix tests for wit-parser
* re-implement as two separate types (outside of WIT)
* adapt the tests for the new type
* handle reading correctly
* wat parsing
* generate fixed size lists in wit-smith
* proper rustfmt (whitespace change)
* implement Alex' suggetions, part one
* implement roundtrip tests
* limit the maximum size of a fixed list. to avoid memory explosion at parsing
* separate list types, as proposed by Alex
* post-rebase fixes
* fix the tests
* Move local test to CLI test
* use same command line order as proposed by Alex
* prefer the name chosen by Alex
* apply missing changes by Alex (I should have fetched before rebase)
* limit the size of flattened fixed size lists, forbid empty ones
* test for zero and too high number
* check for type mismatch during composition
* clearly separate list from fixed-size-list in code
* separate list types in encoder as well
* manually run rustfmt
---------
Co-authored-by: Alex Crichton <[email protected]>1 parent 2dc1c57 commit 4cb6e03
File tree
46 files changed
+621
-44
lines changed- crates
- wasm-compose/src
- wasm-encoder/src
- component
- reencode
- wasm-wave/src
- value
- wasm
- wasmparser/src
- readers/component
- validator
- wasmprinter/src
- wast/src/component
- wit-component/src
- encoding
- wit-encoder/src
- wit-parser
- src
- ast
- resolve
- tests/ui
- parse-fail
- wit-smith/src
- tests
- cli
- component-model
- missing-features/component-model
- snapshots/cli
- component-model
- fixed-size-list.wast
- missing-features/component-model
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
46 files changed
+621
-44
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
649 | 649 | | |
650 | 650 | | |
651 | 651 | | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
652 | 655 | | |
653 | 656 | | |
654 | 657 | | |
| |||
709 | 712 | | |
710 | 713 | | |
711 | 714 | | |
| 715 | + | |
| 716 | + | |
| 717 | + | |
| 718 | + | |
| 719 | + | |
| 720 | + | |
| 721 | + | |
| 722 | + | |
| 723 | + | |
| 724 | + | |
| 725 | + | |
| 726 | + | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
| 730 | + | |
| 731 | + | |
712 | 732 | | |
713 | 733 | | |
714 | 734 | | |
| |||
1228 | 1248 | | |
1229 | 1249 | | |
1230 | 1250 | | |
1231 | | - | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
1232 | 1254 | | |
1233 | 1255 | | |
1234 | 1256 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
593 | 593 | | |
594 | 594 | | |
595 | 595 | | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
596 | 603 | | |
597 | 604 | | |
598 | 605 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
767 | 767 | | |
768 | 768 | | |
769 | 769 | | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
770 | 773 | | |
771 | 774 | | |
772 | 775 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
55 | 56 | | |
56 | 57 | | |
57 | 58 | | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
58 | 68 | | |
59 | 69 | | |
60 | 70 | | |
| |||
189 | 199 | | |
190 | 200 | | |
191 | 201 | | |
| 202 | + | |
192 | 203 | | |
193 | 204 | | |
194 | 205 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
70 | 70 | | |
71 | 71 | | |
72 | 72 | | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
73 | 76 | | |
74 | 77 | | |
75 | 78 | | |
| |||
145 | 148 | | |
146 | 149 | | |
147 | 150 | | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
148 | 156 | | |
149 | 157 | | |
150 | 158 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
| 23 | + | |
23 | 24 | | |
24 | 25 | | |
25 | 26 | | |
| |||
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
| 52 | + | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
75 | 75 | | |
76 | 76 | | |
77 | 77 | | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
78 | 88 | | |
79 | 89 | | |
80 | 90 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
254 | 254 | | |
255 | 255 | | |
256 | 256 | | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
257 | 262 | | |
258 | 263 | | |
259 | 264 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
441 | 441 | | |
442 | 442 | | |
443 | 443 | | |
| 444 | + | |
| 445 | + | |
444 | 446 | | |
445 | 447 | | |
446 | 448 | | |
| |||
503 | 505 | | |
504 | 506 | | |
505 | 507 | | |
506 | | - | |
| 508 | + | |
507 | 509 | | |
| 510 | + | |
508 | 511 | | |
509 | 512 | | |
510 | 513 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
724 | 724 | | |
725 | 725 | | |
726 | 726 | | |
727 | | - | |
728 | | - | |
729 | | - | |
| 727 | + | |
| 728 | + | |
| 729 | + | |
730 | 730 | | |
731 | 731 | | |
732 | 732 | | |
| |||
3475 | 3475 | | |
3476 | 3476 | | |
3477 | 3477 | | |
| 3478 | + | |
| 3479 | + | |
| 3480 | + | |
| 3481 | + | |
| 3482 | + | |
| 3483 | + | |
| 3484 | + | |
| 3485 | + | |
| 3486 | + | |
| 3487 | + | |
| 3488 | + | |
| 3489 | + | |
| 3490 | + | |
| 3491 | + | |
| 3492 | + | |
3478 | 3493 | | |
3479 | 3494 | | |
3480 | 3495 | | |
| |||
0 commit comments