Home
last modified time | relevance | path

Searched refs:map (Results 1 – 25 of 543) sorted by relevance

12345678910>>...22

/wasmtime-44.0.1/crates/wasi-http/src/
H A Dfield_map.rs25 map: Arc<HeaderMap>, field
51 map: Arc::new(map), in new_immutable()
73 for key in map.keys() { in content_size()
214 &self.map in deref()
220 Arc::unwrap_or_clone(map.map) in from()
300 match map.set( in test_limits()
312 match map.set( in test_limits()
329 assert!(map.size > 0); in test_size()
334 assert!(map.size > 0); in test_size()
341 assert!(map.size > 0); in test_size()
[all …]
/wasmtime-44.0.1/cranelift/entity/src/
H A Dsparse.rs11 use crate::map::SecondaryMap;
284 assert!(map.is_empty()); in empty_immutable_map()
285 assert_eq!(map.len(), 0); in empty_immutable_map()
297 assert!(map.is_empty()); in single_entry()
298 assert_eq!(map.len(), 0); in single_entry()
304 assert!(!map.is_empty()); in single_entry()
305 assert_eq!(map.len(), 1); in single_entry()
316 assert_eq!(map.len(), 0); in single_entry()
338 map.values().map(|obj| obj.1).collect::<Vec<_>>(), in multiple_entries()
374 for i in &map { in multiple_entries()
[all …]
/wasmtime-44.0.1/crates/fuzzing/tests/oom/
H A Dindex_map.rs65 map.reserve(100)?; in try_index_map_reserve()
74 map.reserve_exact(100)?; in try_index_map_reserve_exact()
87 map.insert(10, 20)?; in try_index_map_insert()
152 map.insert("a", 20)?; in try_index_map_insert_before()
153 map.insert("b", 30)?; in try_index_map_insert_before()
155 assert_eq!(map[0], 20); in try_index_map_insert_before()
156 assert_eq!(map[1], 40); in try_index_map_insert_before()
157 assert_eq!(map[2], 30); in try_index_map_insert_before()
170 map.insert("a", 20)?; in try_index_map_shift_insert()
171 map.insert("b", 30)?; in try_index_map_shift_insert()
[all …]
H A Dhash_map.rs16 let mut map = TryHashMap::<usize, usize>::new(); in try_hash_map_reserve() localVariable
17 map.reserve(100)?; in try_hash_map_reserve()
25 let mut map = TryHashMap::<usize, usize>::new(); in try_hash_map_insert() localVariable
27 map.insert(i, i * 2)?; in try_hash_map_insert()
30 map.insert(i, i * 2)?; in try_hash_map_insert()
39 let mut map = TryHashMap::new(); in try_hash_map_try_clone() localVariable
41 map.insert(i, i * 2)?; in try_hash_map_try_clone()
43 let map2 = map.try_clone()?; in try_hash_map_try_clone()
44 assert_eq!(map, map2); in try_hash_map_try_clone()
H A Dprimary_map.rs17 let mut map = PrimaryMap::<Key, u32>::new(); in primary_map_try_reserve() localVariable
18 map.try_reserve(100)?; in primary_map_try_reserve()
26 let mut map = PrimaryMap::<Key, u32>::new(); in primary_map_try_reserve_exact() localVariable
27 map.try_reserve_exact(13)?; in primary_map_try_reserve_exact()
H A Dsecondary_map.rs17 let mut map = SecondaryMap::<Key, u32>::new(); in secondary_map_try_resize() localVariable
18 map.try_resize(100)?; in secondary_map_try_resize()
26 let mut map = SecondaryMap::<Key, u32>::new(); in secondary_map_try_insert() localVariable
27 map.try_insert(Key::from_u32(42), 100)?; in secondary_map_try_insert()
/wasmtime-44.0.1/cranelift/codegen/src/
H A Dscoped_hash_map.rs80 map: CtxHashMap<K, Val<V>>, field
148 self.map in get()
237 map.increment_depth(); in basic()
258 map.decrement_depth(); in basic()
267 map.increment_depth(); in basic()
284 map.decrement_depth(); in basic()
285 map.increment_depth(); in basic()
286 map.increment_depth(); in basic()
287 map.increment_depth(); in basic()
304 map.decrement_depth(); in basic()
[all …]
/wasmtime-44.0.1/crates/wasi-common/src/
H A Dtable.rs16 map: HashMap<u32, Arc<dyn Any + Send + Sync>>, field
24 map: HashMap::new(), in new()
31 self.0.write().unwrap().map.insert(key, a); in insert_at()
39 if inner.map.len() == u32::MAX as usize { in push()
45 if inner.map.contains_key(&key) { in push()
48 inner.map.insert(key, a); in push()
55 self.0.read().unwrap().map.contains_key(&key) in contains_key()
101 .map in delete()
103 .map(|r| r.downcast::<T>().unwrap()) in delete()
109 let map = &mut self.0.write().unwrap().map; in renumber() localVariable
[all …]
/wasmtime-44.0.1/crates/environ/src/component/
H A Dnames.rs233 super::alternate_lookup_key(s).map(|(s, _)| s) in alternate_lookup_key()
255 let mut map = NameMap::default(); in name_map_smoke() localVariable
258 map.insert("a", &mut intern, false, 0).unwrap(); in name_map_smoke()
259 map.insert("b", &mut intern, false, 1).unwrap(); in name_map_smoke()
264 assert_eq!(map.get("a", &intern), Some(&0)); in name_map_smoke()
265 assert_eq!(map.get("b", &intern), Some(&1)); in name_map_smoke()
266 assert_eq!(map.get("c", &intern), None); in name_map_smoke()
270 assert_eq!(map.get("a:b/[email protected]", &intern), Some(&2)); in name_map_smoke()
271 assert_eq!(map.get("a:b/[email protected]", &intern), Some(&3)); in name_map_smoke()
272 assert_eq!(map.get("a:b/[email protected]", &intern), Some(&3)); in name_map_smoke()
[all …]
/wasmtime-44.0.1/crates/test-programs/src/bin/
H A Dp2_cli_directory_list.rs8 .map(PathBuf::from) in main()
12 .map(|r| r.map(|d| d.path())) in main()
20 .map(PathBuf::from) in main()
24 .map(|r| r.map(|d| d.path())) in main()
/wasmtime-44.0.1/tests/misc_testsuite/component-model/
H A Dmap-types.wast4 (type (map u32 string))
5 (type (map string u32))
6 (type (map u32 u32))
7 (type (map string (map u32 string)))
/wasmtime-44.0.1/cranelift/codegen/meta/src/
H A Dgen_types.rs26 .map(|ty| (ty, cdsl_types::ValueType::from(ty).membytes())) in emit_vectors()
28 .map(|(ty, lane_size)| (ty, vec_size / lane_size)) in emit_vectors()
29 .map(|(ty, lanes)| cdsl_types::VectorType::new(ty, lanes)) in emit_vectors()
39 .map(|ty| (ty, cdsl_types::ValueType::from(ty).membytes())) in emit_dynamic_vectors()
41 .map(|(ty, lane_size)| (ty, vec_size / lane_size)) in emit_dynamic_vectors()
42 .map(|(ty, lanes)| cdsl_types::DynamicVectorType::new(ty, lanes)) in emit_dynamic_vectors()
51 for ty in cdsl_types::ValueType::all_lane_types().map(cdsl_types::ValueType::from) { in emit_types()
/wasmtime-44.0.1/crates/cranelift/src/debug/transform/
H A Dline_program.rs26 let Some(map) = addr_tr.map().get(index) else { in clone_line_program()
29 let symbol = map.symbol; in clone_line_program()
30 let base_addr = map.offset; in clone_line_program()
34 for addr_map in map.addresses.iter() { in clone_line_program()
63 transform.end_sequence(map.len as u64); in clone_line_program()
H A Dsimulate.rs62 transform.map().iter().filter_map(|(_, map)| { in generate_line_info()
66 Some((map.symbol, map)) in generate_line_info()
71 for (symbol, map) in maps { in generate_line_info()
72 let base_addr = map.offset; in generate_line_info()
87 for addr_map in map.addresses.iter() { in generate_line_info()
115 .map(|s| s.to_string()) in autogenerate_dwarf_wasm_path()
238 .map(|i| { in generate_vars()
366 let map = &addr_tr.map()[index]; in generate_simulated_dwarf() localVariable
371 addend: map.offset as i64, in generate_simulated_dwarf()
373 let code_length = map.len as u64; in generate_simulated_dwarf()
[all …]
H A Daddress_transform.rs195 let mut map = PrimaryMap::new(); in build_function_addr_map() localVariable
225 map.push(FunctionMap { in build_function_addr_map()
234 map in build_function_addr_map()
564 let map = &self.map[func.index]; in translate_raw() localVariable
568 return Some((map.symbol, map.len)); in translate_raw()
571 first_result.map(|(address, _)| (map.symbol, address)) in translate_raw()
652 &self.map in map()
656 let map = &self.map[index]; in func_range() localVariable
657 (map.offset, map.offset + map.len) in func_range()
661 let map = &self.map[index]; in func_source_range() localVariable
[all …]
/wasmtime-44.0.1/cranelift/codegen/src/isa/x64/inst/
H A Demit_tests.rs191 temp: w_r11.map(Gpr::unwrap_new), in test_x64_emit()
203 temp: w_r11.map(Gpr::unwrap_new), in test_x64_emit()
204 dst_old: w_rax.map(Gpr::unwrap_new) in test_x64_emit()
215 temp: w_r11.map(Gpr::unwrap_new), in test_x64_emit()
216 dst_old: w_rax.map(Gpr::unwrap_new) in test_x64_emit()
227 temp: w_r11.map(Gpr::unwrap_new), in test_x64_emit()
228 dst_old: w_rax.map(Gpr::unwrap_new) in test_x64_emit()
239 temp: w_r11.map(Gpr::unwrap_new), in test_x64_emit()
240 dst_old: w_rax.map(Gpr::unwrap_new) in test_x64_emit()
253 temp_low: w_rbx.map(Gpr::unwrap_new), in test_x64_emit()
[all …]
/wasmtime-44.0.1/crates/environ/src/compile/
H A Dstack_maps.rs186 let map = match StackMap::lookup(*pc as u32, data) { in roundtrip() localVariable
187 Some(map) => map, in roundtrip()
193 assert_eq!(map.frame_size(), *frame); in roundtrip()
195 let map_offsets = map.offsets().collect::<Vec<_>>(); in roundtrip()
200 'outer: for (pc, map) in StackMap::iter(data).unwrap() { in roundtrip()
206 assert_eq!(*expected_frame, map.frame_size()); in roundtrip()
207 let offsets = map.offsets().collect::<Vec<_>>(); in roundtrip()
/wasmtime-44.0.1/cranelift/reader/src/
H A Dsourcemap.rs218 let map = &tf.functions[0].1.map; in details() localVariable
220 assert_eq!(map.lookup_str("v0"), None); in details()
221 assert_eq!(map.lookup_str("ss1"), None); in details()
222 assert_eq!(map.lookup_str("ss10").unwrap().to_string(), "ss10"); in details()
223 assert_eq!(map.lookup_str("block0").unwrap().to_string(), "block0"); in details()
224 assert_eq!(map.lookup_str("v4").unwrap().to_string(), "v4"); in details()
225 assert_eq!(map.lookup_str("v7").unwrap().to_string(), "v7"); in details()
226 assert_eq!(map.lookup_str("v10").unwrap().to_string(), "v10"); in details()
/wasmtime-44.0.1/crates/environ/src/collections/
H A Dhash_map.rs29 let mut map = Self::with_capacity_and_hasher(self.len(), self.hasher().try_clone()?)?; in try_clone() localVariable
31 map.insert(k.try_clone()?, v.try_clone()?) in try_clone()
34 Ok(map) in try_clone()
94 let mut map = Self::new(); in with_capacity() localVariable
95 map.reserve(capacity)?; in with_capacity()
96 Ok(map) in with_capacity()
173 let mut map = Self::with_hasher(hasher); in with_capacity_and_hasher() localVariable
174 map.reserve(capacity)?; in with_capacity_and_hasher()
175 Ok(map) in with_capacity_and_hasher()
257 fn from(map: TryHashMap<K, V, S>) -> Self { in from()
[all …]
H A Dsecondary_map.rs240 map.resize(n).map_err(|oom| serde::de::Error::custom(oom))?; in deserialize()
251 map.insert(key, val) in deserialize()
257 Ok(map) in deserialize()
282 let mut map = TrySecondaryMap::<K, u32>::with_default(99); in serialize_deserialize() localVariable
283 map.insert(k(0), 33)?; in serialize_deserialize()
284 map.insert(k(1), 44)?; in serialize_deserialize()
285 map.insert(k(2), 55)?; in serialize_deserialize()
286 map.insert(k(3), 99)?; in serialize_deserialize()
287 map.insert(k(4), 99)?; in serialize_deserialize()
289 let bytes = postcard::to_allocvec(&map)?; in serialize_deserialize()
[all …]
H A Dindex_map.rs11 use indexmap::map as inner;
36 Ok(map) in try_clone()
53 map.inner in from()
77 map.end() in serialize()
147 map.reserve(n)?; in with_capacity_and_hasher()
148 Ok(map) in with_capacity_and_hasher()
250 map.insert(k, v)?; in split_off()
252 Ok(map) in split_off()
818 map.insert("a", 10)?; in smoke()
819 map.insert("b", 20)?; in smoke()
[all …]
/wasmtime-44.0.1/crates/wasmtime/src/runtime/component/
H A Dlinker.rs64 map: NameMap<usize, Definition>, field
75 map: self.map.clone(), in clone()
99 map: &'a mut NameMap<usize, Definition>, field
119 map: NameMap::default(), in new()
148 map: &mut self.map, in root()
237 Definition::Instance(map) => map.get(&name, &self.strings).unwrap(), in instantiate_pre()
384 map: self.map, in as_mut()
818 self.map = match self.map.raw_get_mut(&name) { in into_instance()
819 Some(Definition::Instance(map)) => map, in into_instance()
829 self.map in insert()
[all …]
/wasmtime-44.0.1/crates/wasmtime/src/runtime/wave/
H A Dcomponent.rs82 Box::new(enum_.names().map(Into::into)) in enum_cases()
98 Box::new(flags.names().map(Into::into)) in flags_names()
191 .map(|(name, val)| (name.to_string(), val)) in make_record()
224 let val = Self::Option(val.map(Box::new)); in make_option()
263 Box::new(list.iter().map(cow)) in unwrap_list()
271 Box::new(tuple.iter().map(cow)) in unwrap_tuple()
283 .map(cow) in unwrap_option()
287 Ok(t) => Ok(t.as_deref().map(cow)), in unwrap_result()
288 Err(e) => Err(e.as_deref().map(cow)), in unwrap_result()
293 Box::new(flags.iter().map(Into::into)) in unwrap_flags()
[all …]
/wasmtime-44.0.1/cranelift/srcgen/src/
H A Dlib.rs175 .map(|l| { in doc_comment()
204 .map(|name| { in add_match()
244 for l in self.lines.iter().map(|l| l.as_bytes()) { in write()
275 .map(|l| l.len() - l.trim_start().len()) in parse_multiline()
283 if let Some(s) = lines_iter.next().map(|l| l.trim()).map(|l| l.to_string()) { in parse_multiline()
291 .map(|l| &l[cmp::min(indent, l.len())..]) in parse_multiline()
292 .map(|l| l.trim_end()) in parse_multiline()
293 .map(|l| l.to_string()) in parse_multiline()
297 .map(|l| l.trim_end()) in parse_multiline()
298 .map(|l| l.to_string()) in parse_multiline()
[all …]
/wasmtime-44.0.1/crates/environ/src/
H A Dstring_pool.rs31 map: mem::ManuallyDrop<TryHashMap<&'static str, Atom>>, field
45 mem::ManuallyDrop::drop(&mut self.map); in drop()
62 .map(|(i, s)| (Atom::new(i), s)), in fmt()
151 pool.map.reserve(len).map_err(|oom| A::Error::custom(oom))?; in deserialize()
160 if !pool.map.contains_key(&*s) { in deserialize()
181 if let Some(atom) = self.map.get(s) { in insert()
185 self.map.reserve(1)?; in insert()
199 debug_assert!(!self.map.contains_key(&*owned)); in insert_new_boxed_str()
209 let old = self.map.insert(s, atom)?; in insert_new_boxed_str()
218 self.map.get(s).copied() in get_atom()
[all …]

12345678910>>...22