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

Method insert_with_depth

cranelift/codegen/src/scoped_hash_map.rs:184–194  ·  view source on GitHub ↗

Insert a key-value pair, using the given depth for the insertion. Removes existing entry and overwrites if already existed.

(&mut self, ctx: &C, key: K, value: V, depth: usize)

Source from the content-addressed store, hash-verified

182 /// insertion. Removes existing entry and overwrites if already
183 /// existed.
184 pub fn insert_with_depth<C>(&mut self, ctx: &C, key: K, value: V, depth: usize)
185 where
186 C: CtxEq<K, K> + CtxHash<K>,
187 {
188 let val = Val {
189 value,
190 level: depth as u32,
191 generation: self.generation_by_depth[depth],
192 };
193 self.map.insert(key, val, ctx);
194 }
195
196 /// Enter a new scope.
197 pub fn increment_depth(&mut self) {

Callers 1

insert_pure_enodeMethod · 0.80

Calls 1

insertMethod · 0.45

Tested by

no test coverage detected