File: slice_index.slice_ptr_get_unchecked_range.PreCodegen.after.panic-abort.mir

package info (click to toggle)
rustc 1.85.0%2Bdfsg3-1
  • links: PTS, VCS
  • area: main
  • in suites: experimental, sid, trixie
  • size: 893,396 kB
  • sloc: xml: 158,127; python: 35,830; javascript: 19,497; cpp: 19,002; sh: 17,245; ansic: 13,127; asm: 4,376; makefile: 1,051; perl: 29; lisp: 29; ruby: 19; sql: 11
file content (55 lines) | stat: -rw-r--r-- 1,882 bytes parent folder | download | duplicates (6)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
// MIR for `slice_ptr_get_unchecked_range` after PreCodegen

fn slice_ptr_get_unchecked_range(_1: *const [u32], _2: std::ops::Range<usize>) -> *const [u32] {
    debug slice => _1;
    debug index => _2;
    let mut _0: *const [u32];
    let mut _3: usize;
    let mut _4: usize;
    scope 1 (inlined std::ptr::const_ptr::<impl *const [u32]>::get_unchecked::<std::ops::Range<usize>>) {
        scope 2 (inlined <std::ops::Range<usize> as SliceIndex<[u32]>>::get_unchecked) {
            let mut _5: usize;
            let _6: ();
            let _7: usize;
            scope 3 {
                scope 6 (inlined core::slice::index::get_offset_len_noubcheck::<u32>) {
                    let _9: *const u32;
                    scope 7 {
                    }
                    scope 8 (inlined core::slice::index::get_noubcheck::<u32>) {
                        let _8: *const u32;
                        scope 9 {
                        }
                    }
                }
            }
            scope 4 (inlined std::ptr::const_ptr::<impl *const [u32]>::len) {
                scope 5 (inlined std::ptr::metadata::<[u32]>) {
                }
            }
        }
    }

    bb0: {
        _3 = move (_2.0: usize);
        _4 = move (_2.1: usize);
        StorageLive(_7);
        StorageLive(_5);
        _5 = PtrMetadata(copy _1);
        _6 = <std::ops::Range<usize> as SliceIndex<[T]>>::get_unchecked::precondition_check(copy _3, copy _4, move _5) -> [return: bb1, unwind unreachable];
    }

    bb1: {
        StorageDead(_5);
        _7 = SubUnchecked(copy _4, copy _3);
        StorageLive(_9);
        StorageLive(_8);
        _8 = copy _1 as *const u32 (PtrToPtr);
        _9 = Offset(copy _8, copy _3);
        StorageDead(_8);
        _0 = *const [u32] from (copy _9, copy _7);
        StorageDead(_9);
        StorageDead(_7);
        return;
    }
}