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

Method first

cranelift/entity/src/list.rs:327–333  ·  view source on GitHub ↗

Get the first element from the list.

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

Source from the content-addressed store, hash-verified

325
326 /// Get the first element from the list.
327 pub fn first(&self, pool: &ListPool<T>) -> Option<T> {
328 if self.is_empty() {
329 None
330 } else {
331 Some(pool.data[self.index as usize])
332 }
333 }
334
335 /// Get the list as a mutable slice.
336 pub fn as_mut_slice<'a>(&'a mut self, pool: &'a mut ListPool<T>) -> &'a mut [T] {

Callers 15

insert_opcodeFunction · 0.45
insert_load_storeFunction · 0.45
insert_atomic_rmwFunction · 0.45
insert_atomic_casFunction · 0.45
insert_shuffleFunction · 0.45
insert_ins_ext_laneFunction · 0.45
disassembleFunction · 0.45
resolve_dynamic_widthsFunction · 0.45
test_named_small_rotrFunction · 0.45

Calls 1

is_emptyMethod · 0.45