Commit 89291c4
committed
fix(smir): resolve Subslice projection to correct array type
_projected_ty() returned the original array type for Subslice
projections, so call_edges missed drop glue for subslice drops
like Drop(local.Subslice(1,3,false)) and reduce_to() pruned
the required drop_in_place::<[T; M]> function.
Compute the result array length from the Subslice parameters
(to - from for from_end=false, len - from - to for from_end=true)
and search the type table for a matching ArrayType with the same
element type and length.1 parent 3f76113 commit 89291c4
1 file changed
Lines changed: 24 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
353 | 353 | | |
354 | 354 | | |
355 | 355 | | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
356 | 380 | | |
357 | 381 | | |
358 | 382 | | |
| |||
0 commit comments