Commit 967f460
authored
generate precise traps in component adapters (#12215)
* generate precise traps in component adapters
Previously, we generated a generic `unreachable` instruction for each trap in a
fused adapter, plus some metadata to recover the specific kind of trap.
However, that metadata was never hooked up to anything, so we only got a generic
`unreachable` message at runtime.
This commit removes the metadata tracking and instead simply calls a host
intrinsic, passing the trap code as a parameter. This is somewhate pessimal
compared with what we had before, but improves ergonomics and allows us to avoid
forking as many tests from the component-model repo.
If performance becomes an issue, we can easily add an option to skip the host
call and only emit an `unreachable` instruction as before.
Note that I've removed forked versions of three tests in favor of their upstream
equivalents.
Fixes #11683
* update `strings.rs` tests
* bless disas tests1 parent 34ba273 commit 967f460
File tree
20 files changed
+294
-2097
lines changed- crates
- cranelift/src/compiler
- environ/src
- component
- translate
- fact
- test-util/src
- wasmtime/src/runtime/vm/component
- tests
- all/component_model
- disas/component-model
- misc_testsuite/component-model
- async
20 files changed
+294
-2097
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
171 | 171 | | |
172 | 172 | | |
173 | 173 | | |
174 | | - | |
| 174 | + | |
175 | 175 | | |
176 | 176 | | |
177 | 177 | | |
| |||
740 | 740 | | |
741 | 741 | | |
742 | 742 | | |
| 743 | + | |
| 744 | + | |
| 745 | + | |
| 746 | + | |
| 747 | + | |
| 748 | + | |
| 749 | + | |
| 750 | + | |
743 | 751 | | |
744 | 752 | | |
745 | 753 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
206 | | - | |
| 206 | + | |
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
476 | 476 | | |
477 | 477 | | |
478 | 478 | | |
| 479 | + | |
479 | 480 | | |
480 | 481 | | |
481 | 482 | | |
| |||
1156 | 1157 | | |
1157 | 1158 | | |
1158 | 1159 | | |
| 1160 | + | |
1159 | 1161 | | |
1160 | 1162 | | |
1161 | 1163 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1109 | 1109 | | |
1110 | 1110 | | |
1111 | 1111 | | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
1112 | 1116 | | |
1113 | 1117 | | |
1114 | 1118 | | |
| |||
1239 | 1243 | | |
1240 | 1244 | | |
1241 | 1245 | | |
| 1246 | + | |
1242 | 1247 | | |
1243 | 1248 | | |
1244 | 1249 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
346 | 346 | | |
347 | 347 | | |
348 | 348 | | |
| 349 | + | |
349 | 350 | | |
350 | 351 | | |
351 | 352 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
30 | 29 | | |
31 | 30 | | |
32 | 31 | | |
33 | 32 | | |
34 | 33 | | |
35 | 34 | | |
36 | 35 | | |
37 | | - | |
38 | 36 | | |
39 | 37 | | |
40 | 38 | | |
| |||
92 | 90 | | |
93 | 91 | | |
94 | 92 | | |
| 93 | + | |
| 94 | + | |
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| |||
263 | 263 | | |
264 | 264 | | |
265 | 265 | | |
| 266 | + | |
266 | 267 | | |
267 | 268 | | |
268 | 269 | | |
| |||
727 | 728 | | |
728 | 729 | | |
729 | 730 | | |
| 731 | + | |
| 732 | + | |
| 733 | + | |
| 734 | + | |
| 735 | + | |
| 736 | + | |
| 737 | + | |
| 738 | + | |
| 739 | + | |
| 740 | + | |
| 741 | + | |
730 | 742 | | |
731 | 743 | | |
732 | 744 | | |
| |||
765 | 777 | | |
766 | 778 | | |
767 | 779 | | |
768 | | - | |
769 | | - | |
770 | | - | |
| 780 | + | |
771 | 781 | | |
772 | 782 | | |
773 | 783 | | |
| |||
783 | 793 | | |
784 | 794 | | |
785 | 795 | | |
786 | | - | |
787 | | - | |
| 796 | + | |
788 | 797 | | |
789 | | - | |
790 | | - | |
791 | | - | |
792 | 798 | | |
793 | 799 | | |
794 | 800 | | |
| |||
799 | 805 | | |
800 | 806 | | |
801 | 807 | | |
802 | | - | |
803 | 808 | | |
804 | 809 | | |
805 | | - | |
806 | | - | |
807 | 810 | | |
808 | 811 | | |
809 | 812 | | |
810 | 813 | | |
811 | 814 | | |
812 | 815 | | |
813 | | - | |
814 | | - | |
815 | | - | |
816 | | - | |
817 | | - | |
818 | | - | |
819 | 816 | | |
820 | 817 | | |
821 | 818 | | |
| |||
888 | 885 | | |
889 | 886 | | |
890 | 887 | | |
| 888 | + | |
| 889 | + | |
891 | 890 | | |
892 | 891 | | |
893 | 892 | | |
| |||
954 | 953 | | |
955 | 954 | | |
956 | 955 | | |
957 | | - | |
958 | | - | |
959 | 956 | | |
960 | 957 | | |
961 | 958 | | |
| |||
971 | 968 | | |
972 | 969 | | |
973 | 970 | | |
974 | | - | |
| 971 | + | |
975 | 972 | | |
976 | 973 | | |
977 | 974 | | |
| |||
0 commit comments