MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime / as_slice

Method as_slice

cranelift/entity/src/list.rs:313–319  ·  view source on GitHub ↗

Get the list as a slice.

(&self, pool: &'a ListPool<T>)

Source from the content-addressed store, hash-verified

311
312 /// Get the list as a slice.
313 pub fn as_slice<'a>(&self, pool: &'a ListPool<T>) -> &'a [T] {
314 let idx = self.index as usize;
315 match pool.len_of(self) {
316 None => &[],
317 Some(len) => &pool.data[idx..idx + len],
318 }
319 }
320
321 /// Get a single element from the list.
322 pub fn get(&self, index: usize, pool: &ListPool<T>) -> Option<T> {

Callers 15

predecessorsMethod · 0.45
stepFunction · 0.45
parse_data_valueMethod · 0.45
check_sse_matches_avxFunction · 0.45
generate_rex_prefixMethod · 0.45
generate_modrm_byteMethod · 0.45
generate_immediateMethod · 0.45

Calls 1

len_ofMethod · 0.80

Tested by

no test coverage detected