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

Method push_end

cranelift/codegen/src/ranges.rs:25–35  ·  view source on GitHub ↗

Add a new range which begins at the end of the previous range and ends at the specified offset, exclusive.

(&mut self, end: usize)

Source from the content-addressed store, hash-verified

23 /// Add a new range which begins at the end of the previous range
24 /// and ends at the specified offset, exclusive.
25 pub fn push_end(&mut self, end: usize) {
26 debug_assert!(!self.reverse);
27 // To keep this implementation simple we explicitly store the
28 // starting index, which is always 0, so that all ranges are
29 // represented by adjacent pairs in the list. But we add it
30 // lazily so that an empty list doesn't have to allocate.
31 if self.ranges.is_empty() {
32 self.ranges.push(0);
33 }
34 self.ranges.push(u32::try_from(end).unwrap());
35 }
36
37 /// Number of ranges in this list.
38 pub fn len(&self) -> usize {

Callers 4

end_bbMethod · 0.80
collect_operandsMethod · 0.80

Calls 3

is_emptyMethod · 0.45
pushMethod · 0.45
unwrapMethod · 0.45

Tested by

no test coverage detected