Commit f1614a6
authored
[Custom Descriptors] Better handle unreachable ref.cast_desc (#7937)
Validate that the descriptor operand of ref.cast_desc is always a
descriptor reference (or a nullref or unreachable), even if the ref
operand and therefore the ref.cast_desc are unreachable. This removes an
edge case passes might otherwise have to consider where the descriptor
operand is not actually a descriptor. Update GTO to preserve this new
validation invariant.
Also print an unreachable ref.cast_desc instruction when we can
determine its type from a concrete, non-null descriptor operand rather
than bailing out and printing an unreachable block. This allows us to
preserve such IR through text round trips, which can help e.g. test case
reduction.1 parent 6ff2f94 commit f1614a6
4 files changed
Lines changed: 376 additions & 71 deletions
File tree
- src
- passes
- wasm
- test
- gtest
- lit/basic
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
324 | | - | |
| 324 | + | |
| 325 | + | |
325 | 326 | | |
326 | 327 | | |
327 | 328 | | |
| |||
2224 | 2225 | | |
2225 | 2226 | | |
2226 | 2227 | | |
2227 | | - | |
| 2228 | + | |
| 2229 | + | |
| 2230 | + | |
| 2231 | + | |
| 2232 | + | |
| 2233 | + | |
| 2234 | + | |
| 2235 | + | |
| 2236 | + | |
| 2237 | + | |
| 2238 | + | |
| 2239 | + | |
| 2240 | + | |
| 2241 | + | |
2228 | 2242 | | |
2229 | 2243 | | |
2230 | 2244 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2944 | 2944 | | |
2945 | 2945 | | |
2946 | 2946 | | |
| 2947 | + | |
| 2948 | + | |
| 2949 | + | |
| 2950 | + | |
| 2951 | + | |
| 2952 | + | |
| 2953 | + | |
| 2954 | + | |
| 2955 | + | |
| 2956 | + | |
| 2957 | + | |
| 2958 | + | |
2947 | 2959 | | |
2948 | 2960 | | |
2949 | 2961 | | |
| |||
3006 | 3018 | | |
3007 | 3019 | | |
3008 | 3020 | | |
3009 | | - | |
3010 | | - | |
3011 | | - | |
3012 | | - | |
3013 | | - | |
| 3021 | + | |
3014 | 3022 | | |
3015 | 3023 | | |
3016 | 3024 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| 25 | + | |
25 | 26 | | |
26 | 27 | | |
27 | 28 | | |
| |||
65 | 66 | | |
66 | 67 | | |
67 | 68 | | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
0 commit comments