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

Method reserve

cranelift/codegen/src/ranges.rs:44–49  ·  view source on GitHub ↗

Reserves capacity for at least `additional` more ranges to be added to this list.

(&mut self, mut additional: usize)

Source from the content-addressed store, hash-verified

42 /// Reserves capacity for at least `additional` more ranges to be
43 /// added to this list.
44 pub fn reserve(&mut self, mut additional: usize) {
45 if additional > 0 && self.ranges.is_empty() {
46 additional = additional.saturating_add(1);
47 }
48 self.ranges.reserve(additional);
49 }
50
51 /// Get the range at the specified index.
52 pub fn get(&self, index: usize) -> Range<usize> {

Callers 9

with_capacityMethod · 0.45
create_blocksFunction · 0.45
create_global_valuesFunction · 0.45
create_sig_refsFunction · 0.45
create_func_refsFunction · 0.45
create_stack_slotsFunction · 0.45
create_dynamic_typesFunction · 0.45
create_immediatesFunction · 0.45

Calls 1

is_emptyMethod · 0.45

Tested by

no test coverage detected