/rust/registry/src/index.crates.io-6f17d22bba15001f/rayon-1.10.0/src/iter/extend.rs
Line | Count | Source (jump to first uncovered line) |
1 | | use super::noop::NoopConsumer; |
2 | | use super::plumbing::{Consumer, Folder, Reducer, UnindexedConsumer}; |
3 | | use super::{IntoParallelIterator, ParallelExtend, ParallelIterator}; |
4 | | |
5 | | use either::Either; |
6 | | use std::borrow::Cow; |
7 | | use std::collections::LinkedList; |
8 | | use std::collections::{BTreeMap, BTreeSet, HashMap, HashSet}; |
9 | | use std::collections::{BinaryHeap, VecDeque}; |
10 | | use std::ffi::{OsStr, OsString}; |
11 | | use std::hash::{BuildHasher, Hash}; |
12 | | |
13 | | /// Performs a generic `par_extend` by collecting to a `LinkedList<Vec<_>>` in |
14 | | /// parallel, then extending the collection sequentially. |
15 | | macro_rules! extend { |
16 | | ($self:ident, $par_iter:ident) => { |
17 | | extend!($self <- fast_collect($par_iter)) |
18 | | }; |
19 | | ($self:ident <- $vecs:expr) => { |
20 | | match $vecs { |
21 | | Either::Left(vec) => $self.extend(vec), |
22 | | Either::Right(list) => { |
23 | | for vec in list { |
24 | | $self.extend(vec); |
25 | | } |
26 | | } |
27 | | } |
28 | | }; |
29 | | } |
30 | | macro_rules! extend_reserved { |
31 | | ($self:ident, $par_iter:ident, $len:ident) => { |
32 | | let vecs = fast_collect($par_iter); |
33 | | $self.reserve($len(&vecs)); |
34 | | extend!($self <- vecs) |
35 | | }; |
36 | | ($self:ident, $par_iter:ident) => { |
37 | | extend_reserved!($self, $par_iter, len) |
38 | | }; |
39 | | } |
40 | | |
41 | | /// Computes the total length of a `fast_collect` result. |
42 | | fn len<T>(vecs: &Either<Vec<T>, LinkedList<Vec<T>>>) -> usize { |
43 | | match vecs { |
44 | | Either::Left(vec) => vec.len(), |
45 | | Either::Right(list) => list.iter().map(Vec::len).sum(), |
46 | | } |
47 | | } |
48 | | |
49 | | /// Computes the total string length of a `fast_collect` result. |
50 | | fn string_len<T: AsRef<str>>(vecs: &Either<Vec<T>, LinkedList<Vec<T>>>) -> usize { |
51 | | let strs = match vecs { |
52 | | Either::Left(vec) => Either::Left(vec.iter()), |
53 | | Either::Right(list) => Either::Right(list.iter().flatten()), |
54 | | }; |
55 | | strs.map(AsRef::as_ref).map(str::len).sum() |
56 | | } |
57 | | |
58 | | /// Computes the total OS-string length of a `fast_collect` result. |
59 | | fn osstring_len<T: AsRef<OsStr>>(vecs: &Either<Vec<T>, LinkedList<Vec<T>>>) -> usize { |
60 | | let osstrs = match vecs { |
61 | | Either::Left(vec) => Either::Left(vec.iter()), |
62 | | Either::Right(list) => Either::Right(list.iter().flatten()), |
63 | | }; |
64 | | osstrs.map(AsRef::as_ref).map(OsStr::len).sum() |
65 | | } |
66 | | |
67 | | pub(super) fn fast_collect<I, T>(pi: I) -> Either<Vec<T>, LinkedList<Vec<T>>> |
68 | | where |
69 | | I: IntoParallelIterator<Item = T>, |
70 | | T: Send, |
71 | | { |
72 | | let par_iter = pi.into_par_iter(); |
73 | | match par_iter.opt_len() { |
74 | | Some(len) => { |
75 | | // Pseudo-specialization. See impl of ParallelExtend for Vec for more details. |
76 | | let mut vec = Vec::new(); |
77 | | super::collect::special_extend(par_iter, len, &mut vec); |
78 | | Either::Left(vec) |
79 | | } |
80 | | None => Either::Right(par_iter.drive_unindexed(ListVecConsumer)), |
81 | | } |
82 | | } |
83 | | |
84 | | struct ListVecConsumer; |
85 | | |
86 | | struct ListVecFolder<T> { |
87 | | vec: Vec<T>, |
88 | | } |
89 | | |
90 | | impl<T: Send> Consumer<T> for ListVecConsumer { |
91 | | type Folder = ListVecFolder<T>; |
92 | | type Reducer = ListReducer; |
93 | | type Result = LinkedList<Vec<T>>; |
94 | | |
95 | 526k | fn split_at(self, _index: usize) -> (Self, Self, Self::Reducer) { |
96 | 526k | (Self, Self, ListReducer) |
97 | 526k | } Unexecuted instantiation: <rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<alloc::vec::Vec<u8>>>::split_at Unexecuted instantiation: <rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<core::result::Result<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>>>::split_at <rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<wasmer_compiler_llvm::object_file::CompiledFunction>>::split_at Line | Count | Source | 95 | 93.2k | fn split_at(self, _index: usize) -> (Self, Self, Self::Reducer) { | 96 | 93.2k | (Self, Self, ListReducer) | 97 | 93.2k | } |
Unexecuted instantiation: <rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<wasmer_types::compilation::function::FunctionBody>>::split_at <rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<wasmer_types::compilation::function::FunctionBody>>::split_at Line | Count | Source | 95 | 42.2k | fn split_at(self, _index: usize) -> (Self, Self, Self::Reducer) { | 96 | 42.2k | (Self, Self, ListReducer) | 97 | 42.2k | } |
<rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>)>>::split_at Line | Count | Source | 95 | 79.3k | fn split_at(self, _index: usize) -> (Self, Self, Self::Reducer) { | 96 | 79.3k | (Self, Self, ListReducer) | 97 | 79.3k | } |
Unexecuted instantiation: <rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<wasmer_types::compilation::section::CustomSection>>::split_at <rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<wasmer_types::compilation::function::FunctionBody>>::split_at Line | Count | Source | 95 | 7.29k | fn split_at(self, _index: usize) -> (Self, Self, Self::Reducer) { | 96 | 7.29k | (Self, Self, ListReducer) | 97 | 7.29k | } |
<rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>)>>::split_at Line | Count | Source | 95 | 182k | fn split_at(self, _index: usize) -> (Self, Self, Self::Reducer) { | 96 | 182k | (Self, Self, ListReducer) | 97 | 182k | } |
Unexecuted instantiation: <rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<wasmer_types::compilation::function::FunctionBody>>::split_at Unexecuted instantiation: <rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>)>>::split_at Unexecuted instantiation: <rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<wasmer_types::compilation::section::CustomSection>>::split_at <rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<wasmer_types::compilation::function::FunctionBody>>::split_at Line | Count | Source | 95 | 42.2k | fn split_at(self, _index: usize) -> (Self, Self, Self::Reducer) { | 96 | 42.2k | (Self, Self, ListReducer) | 97 | 42.2k | } |
<rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>)>>::split_at Line | Count | Source | 95 | 79.3k | fn split_at(self, _index: usize) -> (Self, Self, Self::Reducer) { | 96 | 79.3k | (Self, Self, ListReducer) | 97 | 79.3k | } |
|
98 | | |
99 | 665k | fn into_folder(self) -> Self::Folder { |
100 | 665k | ListVecFolder { vec: Vec::new() } |
101 | 665k | } Unexecuted instantiation: <rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<alloc::vec::Vec<u8>>>::into_folder Unexecuted instantiation: <rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<core::result::Result<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>>>::into_folder <rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<wasmer_compiler_llvm::object_file::CompiledFunction>>::into_folder Line | Count | Source | 99 | 103k | fn into_folder(self) -> Self::Folder { | 100 | 103k | ListVecFolder { vec: Vec::new() } | 101 | 103k | } |
<rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<wasmer_types::compilation::function::FunctionBody>>::into_folder Line | Count | Source | 99 | 10.2k | fn into_folder(self) -> Self::Folder { | 100 | 10.2k | ListVecFolder { vec: Vec::new() } | 101 | 10.2k | } |
<rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<wasmer_types::compilation::function::FunctionBody>>::into_folder Line | Count | Source | 99 | 62.3k | fn into_folder(self) -> Self::Folder { | 100 | 62.3k | ListVecFolder { vec: Vec::new() } | 101 | 62.3k | } |
<rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>)>>::into_folder Line | Count | Source | 99 | 89.3k | fn into_folder(self) -> Self::Folder { | 100 | 89.3k | ListVecFolder { vec: Vec::new() } | 101 | 89.3k | } |
<rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<wasmer_types::compilation::section::CustomSection>>::into_folder Line | Count | Source | 99 | 12.2k | fn into_folder(self) -> Self::Folder { | 100 | 12.2k | ListVecFolder { vec: Vec::new() } | 101 | 12.2k | } |
<rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<wasmer_types::compilation::function::FunctionBody>>::into_folder Line | Count | Source | 99 | 31.7k | fn into_folder(self) -> Self::Folder { | 100 | 31.7k | ListVecFolder { vec: Vec::new() } | 101 | 31.7k | } |
<rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>)>>::into_folder Line | Count | Source | 99 | 194k | fn into_folder(self) -> Self::Folder { | 100 | 194k | ListVecFolder { vec: Vec::new() } | 101 | 194k | } |
Unexecuted instantiation: <rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<wasmer_types::compilation::function::FunctionBody>>::into_folder Unexecuted instantiation: <rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>)>>::into_folder <rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<wasmer_types::compilation::section::CustomSection>>::into_folder Line | Count | Source | 99 | 10.0k | fn into_folder(self) -> Self::Folder { | 100 | 10.0k | ListVecFolder { vec: Vec::new() } | 101 | 10.0k | } |
<rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<wasmer_types::compilation::function::FunctionBody>>::into_folder Line | Count | Source | 99 | 62.3k | fn into_folder(self) -> Self::Folder { | 100 | 62.3k | ListVecFolder { vec: Vec::new() } | 101 | 62.3k | } |
<rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>)>>::into_folder Line | Count | Source | 99 | 89.3k | fn into_folder(self) -> Self::Folder { | 100 | 89.3k | ListVecFolder { vec: Vec::new() } | 101 | 89.3k | } |
|
102 | | |
103 | 1.19M | fn full(&self) -> bool { |
104 | 1.19M | false |
105 | 1.19M | } Unexecuted instantiation: <rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<alloc::vec::Vec<u8>>>::full Unexecuted instantiation: <rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<core::result::Result<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>>>::full <rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<wasmer_compiler_llvm::object_file::CompiledFunction>>::full Line | Count | Source | 103 | 196k | fn full(&self) -> bool { | 104 | 196k | false | 105 | 196k | } |
<rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<wasmer_types::compilation::function::FunctionBody>>::full Line | Count | Source | 103 | 10.2k | fn full(&self) -> bool { | 104 | 10.2k | false | 105 | 10.2k | } |
<rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<wasmer_types::compilation::function::FunctionBody>>::full Line | Count | Source | 103 | 104k | fn full(&self) -> bool { | 104 | 104k | false | 105 | 104k | } |
<rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>)>>::full Line | Count | Source | 103 | 168k | fn full(&self) -> bool { | 104 | 168k | false | 105 | 168k | } |
<rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<wasmer_types::compilation::section::CustomSection>>::full Line | Count | Source | 103 | 12.2k | fn full(&self) -> bool { | 104 | 12.2k | false | 105 | 12.2k | } |
<rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<wasmer_types::compilation::function::FunctionBody>>::full Line | Count | Source | 103 | 39.0k | fn full(&self) -> bool { | 104 | 39.0k | false | 105 | 39.0k | } |
<rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>)>>::full Line | Count | Source | 103 | 377k | fn full(&self) -> bool { | 104 | 377k | false | 105 | 377k | } |
Unexecuted instantiation: <rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<wasmer_types::compilation::function::FunctionBody>>::full Unexecuted instantiation: <rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>)>>::full <rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<wasmer_types::compilation::section::CustomSection>>::full Line | Count | Source | 103 | 10.0k | fn full(&self) -> bool { | 104 | 10.0k | false | 105 | 10.0k | } |
<rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<wasmer_types::compilation::function::FunctionBody>>::full Line | Count | Source | 103 | 104k | fn full(&self) -> bool { | 104 | 104k | false | 105 | 104k | } |
<rayon::iter::extend::ListVecConsumer as rayon::iter::plumbing::Consumer<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>)>>::full Line | Count | Source | 103 | 168k | fn full(&self) -> bool { | 104 | 168k | false | 105 | 168k | } |
|
106 | | } |
107 | | |
108 | | impl<T: Send> UnindexedConsumer<T> for ListVecConsumer { |
109 | 0 | fn split_off_left(&self) -> Self { |
110 | 0 | Self |
111 | 0 | } |
112 | | |
113 | 0 | fn to_reducer(&self) -> Self::Reducer { |
114 | 0 | ListReducer |
115 | 0 | } |
116 | | } |
117 | | |
118 | | impl<T> Folder<T> for ListVecFolder<T> { |
119 | | type Result = LinkedList<Vec<T>>; |
120 | | |
121 | 0 | fn consume(mut self, item: T) -> Self { |
122 | 0 | self.vec.push(item); |
123 | 0 | self |
124 | 0 | } |
125 | | |
126 | 665k | fn consume_iter<I>(mut self, iter: I) -> Self |
127 | 665k | where |
128 | 665k | I: IntoIterator<Item = T>, |
129 | 665k | { |
130 | 665k | self.vec.extend(iter); |
131 | 665k | self |
132 | 665k | } Unexecuted instantiation: <rayon::iter::extend::ListVecFolder<core::result::Result<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>> as rayon::iter::plumbing::Folder<core::result::Result<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>>>::consume_iter::<core::iter::adapters::map::Map<core::slice::iter::Iter<&wasmer_types::types::FunctionType>, <rayon::iter::map_with::MapWithFolder<_, _, _> as rayon::iter::plumbing::Folder<_>>::consume_iter::with<&&wasmer_types::types::FunctionType, wasmer_compiler_llvm::trampoline::wasm::FuncTrampoline, core::result::Result<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>, &<wasmer_compiler_llvm::compiler::LLVMCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#4}>::{closure#0}>><rayon::iter::extend::ListVecFolder<wasmer_compiler_llvm::object_file::CompiledFunction> as rayon::iter::plumbing::Folder<wasmer_compiler_llvm::object_file::CompiledFunction>>::consume_iter::<core::iter::adapters::map::Map<core::iter::adapters::take_while::TakeWhile<core::iter::adapters::map::Map<core::iter::adapters::map::Map<core::slice::iter::Iter<(wasmer_types::indexes::LocalFunctionIndex, &wasmer_compiler::translator::environ::FunctionBodyData)>, <rayon::iter::map_with::MapWithFolder<_, _, _> as rayon::iter::plumbing::Folder<_>>::consume_iter::with<&(wasmer_types::indexes::LocalFunctionIndex, &wasmer_compiler::translator::environ::FunctionBodyData), wasmer_compiler_llvm::translator::code::FuncTranslator, core::result::Result<wasmer_compiler_llvm::object_file::CompiledFunction, wasmer_types::error::CompileError>, &<wasmer_compiler_llvm::compiler::LLVMCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#1}>::{closure#0}>, &<core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<wasmer_compiler_llvm::object_file::CompiledFunction, wasmer_types::error::CompileError>::{closure#0}>, <rayon::iter::while_some::WhileSomeFolder<_> as rayon::iter::plumbing::Folder<core::option::Option<_>>>::consume_iter::some<wasmer_compiler_llvm::object_file::CompiledFunction>::{closure#0}>, <core::option::Option<wasmer_compiler_llvm::object_file::CompiledFunction>>::unwrap>>Line | Count | Source | 126 | 103k | fn consume_iter<I>(mut self, iter: I) -> Self | 127 | 103k | where | 128 | 103k | I: IntoIterator<Item = T>, | 129 | 103k | { | 130 | 103k | self.vec.extend(iter); | 131 | 103k | self | 132 | 103k | } |
<rayon::iter::extend::ListVecFolder<wasmer_types::compilation::function::FunctionBody> as rayon::iter::plumbing::Folder<wasmer_types::compilation::function::FunctionBody>>::consume_iter::<core::iter::adapters::map::Map<core::iter::adapters::take_while::TakeWhile<core::iter::adapters::map::Map<core::iter::adapters::map::Map<core::slice::iter::Iter<wasmer_types::types::FunctionType>, <rayon::iter::map_with::MapWithFolder<_, _, _> as rayon::iter::plumbing::Folder<_>>::consume_iter::with<&wasmer_types::types::FunctionType, wasmer_compiler_llvm::trampoline::wasm::FuncTrampoline, core::result::Result<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>, &<wasmer_compiler_llvm::compiler::LLVMCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#6}>::{closure#0}>, &<core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>::{closure#0}>, <rayon::iter::while_some::WhileSomeFolder<_> as rayon::iter::plumbing::Folder<core::option::Option<_>>>::consume_iter::some<wasmer_types::compilation::function::FunctionBody>::{closure#0}>, <core::option::Option<wasmer_types::compilation::function::FunctionBody>>::unwrap>>Line | Count | Source | 126 | 10.2k | fn consume_iter<I>(mut self, iter: I) -> Self | 127 | 10.2k | where | 128 | 10.2k | I: IntoIterator<Item = T>, | 129 | 10.2k | { | 130 | 10.2k | self.vec.extend(iter); | 131 | 10.2k | self | 132 | 10.2k | } |
<rayon::iter::extend::ListVecFolder<wasmer_types::compilation::function::FunctionBody> as rayon::iter::plumbing::Folder<wasmer_types::compilation::function::FunctionBody>>::consume_iter::<core::iter::adapters::map::Map<core::iter::adapters::take_while::TakeWhile<core::iter::adapters::map::Map<core::iter::adapters::map::Map<core::slice::iter::Iter<wasmer_types::types::FunctionType>, <rayon::iter::map_with::MapWithFolder<_, _, _> as rayon::iter::plumbing::Folder<_>>::consume_iter::with<&wasmer_types::types::FunctionType, cranelift_frontend::frontend::FunctionBuilderContext, core::result::Result<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>, &<wasmer_compiler_cranelift::compiler::CraneliftCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#4}>::{closure#0}>, &<core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>::{closure#0}>, <rayon::iter::while_some::WhileSomeFolder<_> as rayon::iter::plumbing::Folder<core::option::Option<_>>>::consume_iter::some<wasmer_types::compilation::function::FunctionBody>::{closure#0}>, <core::option::Option<wasmer_types::compilation::function::FunctionBody>>::unwrap>>Line | Count | Source | 126 | 10.0k | fn consume_iter<I>(mut self, iter: I) -> Self | 127 | 10.0k | where | 128 | 10.0k | I: IntoIterator<Item = T>, | 129 | 10.0k | { | 130 | 10.0k | self.vec.extend(iter); | 131 | 10.0k | self | 132 | 10.0k | } |
<rayon::iter::extend::ListVecFolder<wasmer_types::compilation::function::FunctionBody> as rayon::iter::plumbing::Folder<wasmer_types::compilation::function::FunctionBody>>::consume_iter::<core::iter::adapters::map::Map<core::iter::adapters::take_while::TakeWhile<core::iter::adapters::map::Map<core::iter::adapters::map::Map<core::slice::iter::Iter<&wasmer_types::types::FunctionType>, <rayon::iter::map_with::MapWithFolder<_, _, _> as rayon::iter::plumbing::Folder<_>>::consume_iter::with<&&wasmer_types::types::FunctionType, cranelift_frontend::frontend::FunctionBuilderContext, core::result::Result<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>, &<wasmer_compiler_cranelift::compiler::CraneliftCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#3}>::{closure#0}>, &<core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>::{closure#0}>, <rayon::iter::while_some::WhileSomeFolder<_> as rayon::iter::plumbing::Folder<core::option::Option<_>>>::consume_iter::some<wasmer_types::compilation::function::FunctionBody>::{closure#0}>, <core::option::Option<wasmer_types::compilation::function::FunctionBody>>::unwrap>>Line | Count | Source | 126 | 52.2k | fn consume_iter<I>(mut self, iter: I) -> Self | 127 | 52.2k | where | 128 | 52.2k | I: IntoIterator<Item = T>, | 129 | 52.2k | { | 130 | 52.2k | self.vec.extend(iter); | 131 | 52.2k | self | 132 | 52.2k | } |
<rayon::iter::extend::ListVecFolder<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>)> as rayon::iter::plumbing::Folder<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>)>>::consume_iter::<core::iter::adapters::map::Map<core::iter::adapters::take_while::TakeWhile<core::iter::adapters::map::Map<core::iter::adapters::map::Map<core::slice::iter::Iter<(wasmer_types::indexes::LocalFunctionIndex, &wasmer_compiler::translator::environ::FunctionBodyData)>, <rayon::iter::map_with::MapWithFolder<_, _, _> as rayon::iter::plumbing::Folder<_>>::consume_iter::with<&(wasmer_types::indexes::LocalFunctionIndex, &wasmer_compiler::translator::environ::FunctionBodyData), wasmer_compiler_cranelift::translator::func_translator::FuncTranslator, core::result::Result<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>), wasmer_types::error::CompileError>, &<wasmer_compiler_cranelift::compiler::CraneliftCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#2}>::{closure#0}>, &<core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>), wasmer_types::error::CompileError>::{closure#0}>, <rayon::iter::while_some::WhileSomeFolder<_> as rayon::iter::plumbing::Folder<core::option::Option<_>>>::consume_iter::some<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>)>::{closure#0}>, <core::option::Option<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>)>>::unwrap>>Line | Count | Source | 126 | 89.3k | fn consume_iter<I>(mut self, iter: I) -> Self | 127 | 89.3k | where | 128 | 89.3k | I: IntoIterator<Item = T>, | 129 | 89.3k | { | 130 | 89.3k | self.vec.extend(iter); | 131 | 89.3k | self | 132 | 89.3k | } |
<rayon::iter::extend::ListVecFolder<wasmer_types::compilation::section::CustomSection> as rayon::iter::plumbing::Folder<wasmer_types::compilation::section::CustomSection>>::consume_iter::<core::iter::adapters::map::Map<core::iter::adapters::take_while::TakeWhile<core::iter::adapters::map::Map<core::iter::adapters::map::Map<rayon::vec::SliceDrain<wasmer_types::indexes::FunctionIndex>, &<wasmer_compiler_singlepass::compiler::SinglepassCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#0}>, &<core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<wasmer_types::compilation::section::CustomSection, wasmer_types::error::CompileError>::{closure#0}>, <rayon::iter::while_some::WhileSomeFolder<_> as rayon::iter::plumbing::Folder<core::option::Option<_>>>::consume_iter::some<wasmer_types::compilation::section::CustomSection>::{closure#0}>, <core::option::Option<wasmer_types::compilation::section::CustomSection>>::unwrap>>Line | Count | Source | 126 | 12.2k | fn consume_iter<I>(mut self, iter: I) -> Self | 127 | 12.2k | where | 128 | 12.2k | I: IntoIterator<Item = T>, | 129 | 12.2k | { | 130 | 12.2k | self.vec.extend(iter); | 131 | 12.2k | self | 132 | 12.2k | } |
<rayon::iter::extend::ListVecFolder<wasmer_types::compilation::function::FunctionBody> as rayon::iter::plumbing::Folder<wasmer_types::compilation::function::FunctionBody>>::consume_iter::<core::iter::adapters::map::Map<core::iter::adapters::take_while::TakeWhile<core::iter::adapters::map::Map<core::iter::adapters::map::Map<rayon::vec::SliceDrain<wasmer_types::types::FunctionType>, &<wasmer_compiler_singlepass::compiler::SinglepassCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#3}>, &<core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>::{closure#0}>, <rayon::iter::while_some::WhileSomeFolder<_> as rayon::iter::plumbing::Folder<core::option::Option<_>>>::consume_iter::some<wasmer_types::compilation::function::FunctionBody>::{closure#0}>, <core::option::Option<wasmer_types::compilation::function::FunctionBody>>::unwrap>>Line | Count | Source | 126 | 12.2k | fn consume_iter<I>(mut self, iter: I) -> Self | 127 | 12.2k | where | 128 | 12.2k | I: IntoIterator<Item = T>, | 129 | 12.2k | { | 130 | 12.2k | self.vec.extend(iter); | 131 | 12.2k | self | 132 | 12.2k | } |
<rayon::iter::extend::ListVecFolder<wasmer_types::compilation::function::FunctionBody> as rayon::iter::plumbing::Folder<wasmer_types::compilation::function::FunctionBody>>::consume_iter::<core::iter::adapters::map::Map<core::iter::adapters::take_while::TakeWhile<core::iter::adapters::map::Map<core::iter::adapters::map::Map<rayon::vec::SliceDrain<&wasmer_types::types::FunctionType>, &<wasmer_compiler_singlepass::compiler::SinglepassCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#2}>, &<core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>::{closure#0}>, <rayon::iter::while_some::WhileSomeFolder<_> as rayon::iter::plumbing::Folder<core::option::Option<_>>>::consume_iter::some<wasmer_types::compilation::function::FunctionBody>::{closure#0}>, <core::option::Option<wasmer_types::compilation::function::FunctionBody>>::unwrap>>Line | Count | Source | 126 | 19.5k | fn consume_iter<I>(mut self, iter: I) -> Self | 127 | 19.5k | where | 128 | 19.5k | I: IntoIterator<Item = T>, | 129 | 19.5k | { | 130 | 19.5k | self.vec.extend(iter); | 131 | 19.5k | self | 132 | 19.5k | } |
<rayon::iter::extend::ListVecFolder<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>)> as rayon::iter::plumbing::Folder<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>)>>::consume_iter::<core::iter::adapters::map::Map<core::iter::adapters::take_while::TakeWhile<core::iter::adapters::map::Map<core::iter::adapters::map::Map<rayon::vec::SliceDrain<(wasmer_types::indexes::LocalFunctionIndex, &wasmer_compiler::translator::environ::FunctionBodyData)>, &<wasmer_compiler_singlepass::compiler::SinglepassCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#1}>, &<core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>), wasmer_types::error::CompileError>::{closure#0}>, <rayon::iter::while_some::WhileSomeFolder<_> as rayon::iter::plumbing::Folder<core::option::Option<_>>>::consume_iter::some<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>)>::{closure#0}>, <core::option::Option<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>)>>::unwrap>>Line | Count | Source | 126 | 194k | fn consume_iter<I>(mut self, iter: I) -> Self | 127 | 194k | where | 128 | 194k | I: IntoIterator<Item = T>, | 129 | 194k | { | 130 | 194k | self.vec.extend(iter); | 131 | 194k | self | 132 | 194k | } |
Unexecuted instantiation: <rayon::iter::extend::ListVecFolder<wasmer_types::compilation::function::FunctionBody> as rayon::iter::plumbing::Folder<wasmer_types::compilation::function::FunctionBody>>::consume_iter::<core::iter::adapters::map::Map<core::iter::adapters::take_while::TakeWhile<core::iter::adapters::map::Map<core::iter::adapters::map::Map<core::slice::iter::Iter<wasmer_types::types::FunctionType>, <rayon::iter::map_with::MapWithFolder<_, _, _> as rayon::iter::plumbing::Folder<_>>::consume_iter::with<&wasmer_types::types::FunctionType, cranelift_frontend::frontend::FunctionBuilderContext, core::result::Result<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>, &<wasmer_compiler_cranelift::compiler::CraneliftCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#4}>::{closure#0}>, &<core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>::{closure#0}>, <rayon::iter::while_some::WhileSomeFolder<_> as rayon::iter::plumbing::Folder<core::option::Option<_>>>::consume_iter::some<wasmer_types::compilation::function::FunctionBody>::{closure#0}>, <core::option::Option<wasmer_types::compilation::function::FunctionBody>>::unwrap>>Unexecuted instantiation: <rayon::iter::extend::ListVecFolder<wasmer_types::compilation::function::FunctionBody> as rayon::iter::plumbing::Folder<wasmer_types::compilation::function::FunctionBody>>::consume_iter::<core::iter::adapters::map::Map<core::iter::adapters::take_while::TakeWhile<core::iter::adapters::map::Map<core::iter::adapters::map::Map<core::slice::iter::Iter<&wasmer_types::types::FunctionType>, <rayon::iter::map_with::MapWithFolder<_, _, _> as rayon::iter::plumbing::Folder<_>>::consume_iter::with<&&wasmer_types::types::FunctionType, cranelift_frontend::frontend::FunctionBuilderContext, core::result::Result<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>, &<wasmer_compiler_cranelift::compiler::CraneliftCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#3}>::{closure#0}>, &<core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>::{closure#0}>, <rayon::iter::while_some::WhileSomeFolder<_> as rayon::iter::plumbing::Folder<core::option::Option<_>>>::consume_iter::some<wasmer_types::compilation::function::FunctionBody>::{closure#0}>, <core::option::Option<wasmer_types::compilation::function::FunctionBody>>::unwrap>>Unexecuted instantiation: <rayon::iter::extend::ListVecFolder<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>)> as rayon::iter::plumbing::Folder<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>)>>::consume_iter::<core::iter::adapters::map::Map<core::iter::adapters::take_while::TakeWhile<core::iter::adapters::map::Map<core::iter::adapters::map::Map<core::slice::iter::Iter<(wasmer_types::indexes::LocalFunctionIndex, &wasmer_compiler::translator::environ::FunctionBodyData)>, <rayon::iter::map_with::MapWithFolder<_, _, _> as rayon::iter::plumbing::Folder<_>>::consume_iter::with<&(wasmer_types::indexes::LocalFunctionIndex, &wasmer_compiler::translator::environ::FunctionBodyData), wasmer_compiler_cranelift::translator::func_translator::FuncTranslator, core::result::Result<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>), wasmer_types::error::CompileError>, &<wasmer_compiler_cranelift::compiler::CraneliftCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#2}>::{closure#0}>, &<core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>), wasmer_types::error::CompileError>::{closure#0}>, <rayon::iter::while_some::WhileSomeFolder<_> as rayon::iter::plumbing::Folder<core::option::Option<_>>>::consume_iter::some<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>)>::{closure#0}>, <core::option::Option<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>)>>::unwrap>><rayon::iter::extend::ListVecFolder<wasmer_types::compilation::section::CustomSection> as rayon::iter::plumbing::Folder<wasmer_types::compilation::section::CustomSection>>::consume_iter::<core::iter::adapters::map::Map<core::iter::adapters::take_while::TakeWhile<core::iter::adapters::map::Map<core::iter::adapters::map::Map<rayon::vec::SliceDrain<wasmer_types::indexes::FunctionIndex>, &<wasmer_compiler_singlepass::compiler::SinglepassCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#0}>, &<core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<wasmer_types::compilation::section::CustomSection, wasmer_types::error::CompileError>::{closure#0}>, <rayon::iter::while_some::WhileSomeFolder<_> as rayon::iter::plumbing::Folder<core::option::Option<_>>>::consume_iter::some<wasmer_types::compilation::section::CustomSection>::{closure#0}>, <core::option::Option<wasmer_types::compilation::section::CustomSection>>::unwrap>>Line | Count | Source | 126 | 10.0k | fn consume_iter<I>(mut self, iter: I) -> Self | 127 | 10.0k | where | 128 | 10.0k | I: IntoIterator<Item = T>, | 129 | 10.0k | { | 130 | 10.0k | self.vec.extend(iter); | 131 | 10.0k | self | 132 | 10.0k | } |
<rayon::iter::extend::ListVecFolder<wasmer_types::compilation::function::FunctionBody> as rayon::iter::plumbing::Folder<wasmer_types::compilation::function::FunctionBody>>::consume_iter::<core::iter::adapters::map::Map<core::iter::adapters::take_while::TakeWhile<core::iter::adapters::map::Map<core::iter::adapters::map::Map<rayon::vec::SliceDrain<wasmer_types::types::FunctionType>, &<wasmer_compiler_singlepass::compiler::SinglepassCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#3}>, &<core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>::{closure#0}>, <rayon::iter::while_some::WhileSomeFolder<_> as rayon::iter::plumbing::Folder<core::option::Option<_>>>::consume_iter::some<wasmer_types::compilation::function::FunctionBody>::{closure#0}>, <core::option::Option<wasmer_types::compilation::function::FunctionBody>>::unwrap>>Line | Count | Source | 126 | 10.0k | fn consume_iter<I>(mut self, iter: I) -> Self | 127 | 10.0k | where | 128 | 10.0k | I: IntoIterator<Item = T>, | 129 | 10.0k | { | 130 | 10.0k | self.vec.extend(iter); | 131 | 10.0k | self | 132 | 10.0k | } |
<rayon::iter::extend::ListVecFolder<wasmer_types::compilation::function::FunctionBody> as rayon::iter::plumbing::Folder<wasmer_types::compilation::function::FunctionBody>>::consume_iter::<core::iter::adapters::map::Map<core::iter::adapters::take_while::TakeWhile<core::iter::adapters::map::Map<core::iter::adapters::map::Map<rayon::vec::SliceDrain<&wasmer_types::types::FunctionType>, &<wasmer_compiler_singlepass::compiler::SinglepassCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#2}>, &<core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>::{closure#0}>, <rayon::iter::while_some::WhileSomeFolder<_> as rayon::iter::plumbing::Folder<core::option::Option<_>>>::consume_iter::some<wasmer_types::compilation::function::FunctionBody>::{closure#0}>, <core::option::Option<wasmer_types::compilation::function::FunctionBody>>::unwrap>>Line | Count | Source | 126 | 52.2k | fn consume_iter<I>(mut self, iter: I) -> Self | 127 | 52.2k | where | 128 | 52.2k | I: IntoIterator<Item = T>, | 129 | 52.2k | { | 130 | 52.2k | self.vec.extend(iter); | 131 | 52.2k | self | 132 | 52.2k | } |
<rayon::iter::extend::ListVecFolder<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>)> as rayon::iter::plumbing::Folder<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>)>>::consume_iter::<core::iter::adapters::map::Map<core::iter::adapters::take_while::TakeWhile<core::iter::adapters::map::Map<core::iter::adapters::map::Map<rayon::vec::SliceDrain<(wasmer_types::indexes::LocalFunctionIndex, &wasmer_compiler::translator::environ::FunctionBodyData)>, &<wasmer_compiler_singlepass::compiler::SinglepassCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#1}>, &<core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>), wasmer_types::error::CompileError>::{closure#0}>, <rayon::iter::while_some::WhileSomeFolder<_> as rayon::iter::plumbing::Folder<core::option::Option<_>>>::consume_iter::some<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>)>::{closure#0}>, <core::option::Option<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>)>>::unwrap>>Line | Count | Source | 126 | 89.3k | fn consume_iter<I>(mut self, iter: I) -> Self | 127 | 89.3k | where | 128 | 89.3k | I: IntoIterator<Item = T>, | 129 | 89.3k | { | 130 | 89.3k | self.vec.extend(iter); | 131 | 89.3k | self | 132 | 89.3k | } |
|
133 | | |
134 | 665k | fn complete(self) -> Self::Result { |
135 | 665k | let mut list = LinkedList::new(); |
136 | 665k | if !self.vec.is_empty() { |
137 | 593k | list.push_back(self.vec); |
138 | 593k | } |
139 | 665k | list |
140 | 665k | } Unexecuted instantiation: <rayon::iter::extend::ListVecFolder<alloc::vec::Vec<u8>> as rayon::iter::plumbing::Folder<alloc::vec::Vec<u8>>>::complete Unexecuted instantiation: <rayon::iter::extend::ListVecFolder<core::result::Result<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>> as rayon::iter::plumbing::Folder<core::result::Result<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>>>::complete <rayon::iter::extend::ListVecFolder<wasmer_compiler_llvm::object_file::CompiledFunction> as rayon::iter::plumbing::Folder<wasmer_compiler_llvm::object_file::CompiledFunction>>::complete Line | Count | Source | 134 | 103k | fn complete(self) -> Self::Result { | 135 | 103k | let mut list = LinkedList::new(); | 136 | 103k | if !self.vec.is_empty() { | 137 | 101k | list.push_back(self.vec); | 138 | 101k | } | 139 | 103k | list | 140 | 103k | } |
<rayon::iter::extend::ListVecFolder<wasmer_types::compilation::function::FunctionBody> as rayon::iter::plumbing::Folder<wasmer_types::compilation::function::FunctionBody>>::complete Line | Count | Source | 134 | 10.2k | fn complete(self) -> Self::Result { | 135 | 10.2k | let mut list = LinkedList::new(); | 136 | 10.2k | if !self.vec.is_empty() { | 137 | 0 | list.push_back(self.vec); | 138 | 10.2k | } | 139 | 10.2k | list | 140 | 10.2k | } |
<rayon::iter::extend::ListVecFolder<wasmer_types::compilation::function::FunctionBody> as rayon::iter::plumbing::Folder<wasmer_types::compilation::function::FunctionBody>>::complete Line | Count | Source | 134 | 62.3k | fn complete(self) -> Self::Result { | 135 | 62.3k | let mut list = LinkedList::new(); | 136 | 62.3k | if !self.vec.is_empty() { | 137 | 51.5k | list.push_back(self.vec); | 138 | 51.5k | } | 139 | 62.3k | list | 140 | 62.3k | } |
<rayon::iter::extend::ListVecFolder<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>)> as rayon::iter::plumbing::Folder<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>)>>::complete Line | Count | Source | 134 | 89.3k | fn complete(self) -> Self::Result { | 135 | 89.3k | let mut list = LinkedList::new(); | 136 | 89.3k | if !self.vec.is_empty() { | 137 | 87.8k | list.push_back(self.vec); | 138 | 87.8k | } | 139 | 89.3k | list | 140 | 89.3k | } |
<rayon::iter::extend::ListVecFolder<wasmer_types::compilation::section::CustomSection> as rayon::iter::plumbing::Folder<wasmer_types::compilation::section::CustomSection>>::complete Line | Count | Source | 134 | 12.2k | fn complete(self) -> Self::Result { | 135 | 12.2k | let mut list = LinkedList::new(); | 136 | 12.2k | if !self.vec.is_empty() { | 137 | 0 | list.push_back(self.vec); | 138 | 12.2k | } | 139 | 12.2k | list | 140 | 12.2k | } |
<rayon::iter::extend::ListVecFolder<wasmer_types::compilation::function::FunctionBody> as rayon::iter::plumbing::Folder<wasmer_types::compilation::function::FunctionBody>>::complete Line | Count | Source | 134 | 31.7k | fn complete(self) -> Self::Result { | 135 | 31.7k | let mut list = LinkedList::new(); | 136 | 31.7k | if !self.vec.is_empty() { | 137 | 18.8k | list.push_back(self.vec); | 138 | 18.8k | } | 139 | 31.7k | list | 140 | 31.7k | } |
<rayon::iter::extend::ListVecFolder<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>)> as rayon::iter::plumbing::Folder<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>)>>::complete Line | Count | Source | 134 | 194k | fn complete(self) -> Self::Result { | 135 | 194k | let mut list = LinkedList::new(); | 136 | 194k | if !self.vec.is_empty() { | 137 | 193k | list.push_back(self.vec); | 138 | 193k | } | 139 | 194k | list | 140 | 194k | } |
Unexecuted instantiation: <rayon::iter::extend::ListVecFolder<wasmer_types::compilation::function::FunctionBody> as rayon::iter::plumbing::Folder<wasmer_types::compilation::function::FunctionBody>>::complete Unexecuted instantiation: <rayon::iter::extend::ListVecFolder<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>)> as rayon::iter::plumbing::Folder<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>)>>::complete <rayon::iter::extend::ListVecFolder<wasmer_types::compilation::section::CustomSection> as rayon::iter::plumbing::Folder<wasmer_types::compilation::section::CustomSection>>::complete Line | Count | Source | 134 | 10.0k | fn complete(self) -> Self::Result { | 135 | 10.0k | let mut list = LinkedList::new(); | 136 | 10.0k | if !self.vec.is_empty() { | 137 | 0 | list.push_back(self.vec); | 138 | 10.0k | } | 139 | 10.0k | list | 140 | 10.0k | } |
<rayon::iter::extend::ListVecFolder<wasmer_types::compilation::function::FunctionBody> as rayon::iter::plumbing::Folder<wasmer_types::compilation::function::FunctionBody>>::complete Line | Count | Source | 134 | 62.3k | fn complete(self) -> Self::Result { | 135 | 62.3k | let mut list = LinkedList::new(); | 136 | 62.3k | if !self.vec.is_empty() { | 137 | 51.5k | list.push_back(self.vec); | 138 | 51.5k | } | 139 | 62.3k | list | 140 | 62.3k | } |
<rayon::iter::extend::ListVecFolder<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>)> as rayon::iter::plumbing::Folder<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>)>>::complete Line | Count | Source | 134 | 89.3k | fn complete(self) -> Self::Result { | 135 | 89.3k | let mut list = LinkedList::new(); | 136 | 89.3k | if !self.vec.is_empty() { | 137 | 87.8k | list.push_back(self.vec); | 138 | 87.8k | } | 139 | 89.3k | list | 140 | 89.3k | } |
|
141 | | |
142 | 0 | fn full(&self) -> bool { |
143 | 0 | false |
144 | 0 | } |
145 | | } |
146 | | |
147 | | /// Extends a binary heap with items from a parallel iterator. |
148 | | impl<T> ParallelExtend<T> for BinaryHeap<T> |
149 | | where |
150 | | T: Ord + Send, |
151 | | { |
152 | | fn par_extend<I>(&mut self, par_iter: I) |
153 | | where |
154 | | I: IntoParallelIterator<Item = T>, |
155 | | { |
156 | | extend_reserved!(self, par_iter); |
157 | | } |
158 | | } |
159 | | |
160 | | /// Extends a binary heap with copied items from a parallel iterator. |
161 | | impl<'a, T> ParallelExtend<&'a T> for BinaryHeap<T> |
162 | | where |
163 | | T: 'a + Copy + Ord + Send + Sync, |
164 | | { |
165 | | fn par_extend<I>(&mut self, par_iter: I) |
166 | | where |
167 | | I: IntoParallelIterator<Item = &'a T>, |
168 | | { |
169 | | extend_reserved!(self, par_iter); |
170 | | } |
171 | | } |
172 | | |
173 | | /// Extends a B-tree map with items from a parallel iterator. |
174 | | impl<K, V> ParallelExtend<(K, V)> for BTreeMap<K, V> |
175 | | where |
176 | | K: Ord + Send, |
177 | | V: Send, |
178 | | { |
179 | | fn par_extend<I>(&mut self, par_iter: I) |
180 | | where |
181 | | I: IntoParallelIterator<Item = (K, V)>, |
182 | | { |
183 | | extend!(self, par_iter); |
184 | | } |
185 | | } |
186 | | |
187 | | /// Extends a B-tree map with copied items from a parallel iterator. |
188 | | impl<'a, K: 'a, V: 'a> ParallelExtend<(&'a K, &'a V)> for BTreeMap<K, V> |
189 | | where |
190 | | K: Copy + Ord + Send + Sync, |
191 | | V: Copy + Send + Sync, |
192 | | { |
193 | | fn par_extend<I>(&mut self, par_iter: I) |
194 | | where |
195 | | I: IntoParallelIterator<Item = (&'a K, &'a V)>, |
196 | | { |
197 | | extend!(self, par_iter); |
198 | | } |
199 | | } |
200 | | |
201 | | /// Extends a B-tree set with items from a parallel iterator. |
202 | | impl<T> ParallelExtend<T> for BTreeSet<T> |
203 | | where |
204 | | T: Ord + Send, |
205 | | { |
206 | | fn par_extend<I>(&mut self, par_iter: I) |
207 | | where |
208 | | I: IntoParallelIterator<Item = T>, |
209 | | { |
210 | | extend!(self, par_iter); |
211 | | } |
212 | | } |
213 | | |
214 | | /// Extends a B-tree set with copied items from a parallel iterator. |
215 | | impl<'a, T> ParallelExtend<&'a T> for BTreeSet<T> |
216 | | where |
217 | | T: 'a + Copy + Ord + Send + Sync, |
218 | | { |
219 | | fn par_extend<I>(&mut self, par_iter: I) |
220 | | where |
221 | | I: IntoParallelIterator<Item = &'a T>, |
222 | | { |
223 | | extend!(self, par_iter); |
224 | | } |
225 | | } |
226 | | |
227 | | /// Extends a hash map with items from a parallel iterator. |
228 | | impl<K, V, S> ParallelExtend<(K, V)> for HashMap<K, V, S> |
229 | | where |
230 | | K: Eq + Hash + Send, |
231 | | V: Send, |
232 | | S: BuildHasher + Send, |
233 | | { |
234 | | fn par_extend<I>(&mut self, par_iter: I) |
235 | | where |
236 | | I: IntoParallelIterator<Item = (K, V)>, |
237 | | { |
238 | | // See the map_collect benchmarks in rayon-demo for different strategies. |
239 | | extend_reserved!(self, par_iter); |
240 | | } |
241 | | } |
242 | | |
243 | | /// Extends a hash map with copied items from a parallel iterator. |
244 | | impl<'a, K: 'a, V: 'a, S> ParallelExtend<(&'a K, &'a V)> for HashMap<K, V, S> |
245 | | where |
246 | | K: Copy + Eq + Hash + Send + Sync, |
247 | | V: Copy + Send + Sync, |
248 | | S: BuildHasher + Send, |
249 | | { |
250 | | fn par_extend<I>(&mut self, par_iter: I) |
251 | | where |
252 | | I: IntoParallelIterator<Item = (&'a K, &'a V)>, |
253 | | { |
254 | | extend_reserved!(self, par_iter); |
255 | | } |
256 | | } |
257 | | |
258 | | /// Extends a hash set with items from a parallel iterator. |
259 | | impl<T, S> ParallelExtend<T> for HashSet<T, S> |
260 | | where |
261 | | T: Eq + Hash + Send, |
262 | | S: BuildHasher + Send, |
263 | | { |
264 | | fn par_extend<I>(&mut self, par_iter: I) |
265 | | where |
266 | | I: IntoParallelIterator<Item = T>, |
267 | | { |
268 | | extend_reserved!(self, par_iter); |
269 | | } |
270 | | } |
271 | | |
272 | | /// Extends a hash set with copied items from a parallel iterator. |
273 | | impl<'a, T, S> ParallelExtend<&'a T> for HashSet<T, S> |
274 | | where |
275 | | T: 'a + Copy + Eq + Hash + Send + Sync, |
276 | | S: BuildHasher + Send, |
277 | | { |
278 | | fn par_extend<I>(&mut self, par_iter: I) |
279 | | where |
280 | | I: IntoParallelIterator<Item = &'a T>, |
281 | | { |
282 | | extend_reserved!(self, par_iter); |
283 | | } |
284 | | } |
285 | | |
286 | | /// Extends a linked list with items from a parallel iterator. |
287 | | impl<T> ParallelExtend<T> for LinkedList<T> |
288 | | where |
289 | | T: Send, |
290 | | { |
291 | | fn par_extend<I>(&mut self, par_iter: I) |
292 | | where |
293 | | I: IntoParallelIterator<Item = T>, |
294 | | { |
295 | | let mut list = par_iter.into_par_iter().drive_unindexed(ListConsumer); |
296 | | self.append(&mut list); |
297 | | } |
298 | | } |
299 | | |
300 | | /// Extends a linked list with copied items from a parallel iterator. |
301 | | impl<'a, T> ParallelExtend<&'a T> for LinkedList<T> |
302 | | where |
303 | | T: 'a + Copy + Send + Sync, |
304 | | { |
305 | | fn par_extend<I>(&mut self, par_iter: I) |
306 | | where |
307 | | I: IntoParallelIterator<Item = &'a T>, |
308 | | { |
309 | | self.par_extend(par_iter.into_par_iter().copied()) |
310 | | } |
311 | | } |
312 | | |
313 | | struct ListConsumer; |
314 | | |
315 | | struct ListFolder<T> { |
316 | | list: LinkedList<T>, |
317 | | } |
318 | | |
319 | | struct ListReducer; |
320 | | |
321 | | impl<T: Send> Consumer<T> for ListConsumer { |
322 | | type Folder = ListFolder<T>; |
323 | | type Reducer = ListReducer; |
324 | | type Result = LinkedList<T>; |
325 | | |
326 | | fn split_at(self, _index: usize) -> (Self, Self, Self::Reducer) { |
327 | | (Self, Self, ListReducer) |
328 | | } |
329 | | |
330 | | fn into_folder(self) -> Self::Folder { |
331 | | ListFolder { |
332 | | list: LinkedList::new(), |
333 | | } |
334 | | } |
335 | | |
336 | | fn full(&self) -> bool { |
337 | | false |
338 | | } |
339 | | } |
340 | | |
341 | | impl<T: Send> UnindexedConsumer<T> for ListConsumer { |
342 | | fn split_off_left(&self) -> Self { |
343 | | Self |
344 | | } |
345 | | |
346 | | fn to_reducer(&self) -> Self::Reducer { |
347 | | ListReducer |
348 | | } |
349 | | } |
350 | | |
351 | | impl<T> Folder<T> for ListFolder<T> { |
352 | | type Result = LinkedList<T>; |
353 | | |
354 | | fn consume(mut self, item: T) -> Self { |
355 | | self.list.push_back(item); |
356 | | self |
357 | | } |
358 | | |
359 | | fn consume_iter<I>(mut self, iter: I) -> Self |
360 | | where |
361 | | I: IntoIterator<Item = T>, |
362 | | { |
363 | | self.list.extend(iter); |
364 | | self |
365 | | } |
366 | | |
367 | | fn complete(self) -> Self::Result { |
368 | | self.list |
369 | | } |
370 | | |
371 | | fn full(&self) -> bool { |
372 | | false |
373 | | } |
374 | | } |
375 | | |
376 | | impl<T> Reducer<LinkedList<T>> for ListReducer { |
377 | 526k | fn reduce(self, mut left: LinkedList<T>, mut right: LinkedList<T>) -> LinkedList<T> { |
378 | 526k | left.append(&mut right); |
379 | 526k | left |
380 | 526k | } Unexecuted instantiation: <rayon::iter::extend::ListReducer as rayon::iter::plumbing::Reducer<alloc::collections::linked_list::LinkedList<alloc::vec::Vec<alloc::vec::Vec<u8>>>>>::reduce Unexecuted instantiation: <rayon::iter::extend::ListReducer as rayon::iter::plumbing::Reducer<alloc::collections::linked_list::LinkedList<alloc::vec::Vec<core::result::Result<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>>>>>::reduce <rayon::iter::extend::ListReducer as rayon::iter::plumbing::Reducer<alloc::collections::linked_list::LinkedList<alloc::vec::Vec<wasmer_compiler_llvm::object_file::CompiledFunction>>>>::reduce Line | Count | Source | 377 | 93.2k | fn reduce(self, mut left: LinkedList<T>, mut right: LinkedList<T>) -> LinkedList<T> { | 378 | 93.2k | left.append(&mut right); | 379 | 93.2k | left | 380 | 93.2k | } |
Unexecuted instantiation: <rayon::iter::extend::ListReducer as rayon::iter::plumbing::Reducer<alloc::collections::linked_list::LinkedList<alloc::vec::Vec<wasmer_types::compilation::function::FunctionBody>>>>::reduce <rayon::iter::extend::ListReducer as rayon::iter::plumbing::Reducer<alloc::collections::linked_list::LinkedList<alloc::vec::Vec<wasmer_types::compilation::function::FunctionBody>>>>::reduce Line | Count | Source | 377 | 42.2k | fn reduce(self, mut left: LinkedList<T>, mut right: LinkedList<T>) -> LinkedList<T> { | 378 | 42.2k | left.append(&mut right); | 379 | 42.2k | left | 380 | 42.2k | } |
<rayon::iter::extend::ListReducer as rayon::iter::plumbing::Reducer<alloc::collections::linked_list::LinkedList<alloc::vec::Vec<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>)>>>>::reduce Line | Count | Source | 377 | 79.3k | fn reduce(self, mut left: LinkedList<T>, mut right: LinkedList<T>) -> LinkedList<T> { | 378 | 79.3k | left.append(&mut right); | 379 | 79.3k | left | 380 | 79.3k | } |
Unexecuted instantiation: <rayon::iter::extend::ListReducer as rayon::iter::plumbing::Reducer<alloc::collections::linked_list::LinkedList<alloc::vec::Vec<wasmer_types::compilation::section::CustomSection>>>>::reduce <rayon::iter::extend::ListReducer as rayon::iter::plumbing::Reducer<alloc::collections::linked_list::LinkedList<alloc::vec::Vec<wasmer_types::compilation::function::FunctionBody>>>>::reduce Line | Count | Source | 377 | 7.29k | fn reduce(self, mut left: LinkedList<T>, mut right: LinkedList<T>) -> LinkedList<T> { | 378 | 7.29k | left.append(&mut right); | 379 | 7.29k | left | 380 | 7.29k | } |
<rayon::iter::extend::ListReducer as rayon::iter::plumbing::Reducer<alloc::collections::linked_list::LinkedList<alloc::vec::Vec<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>)>>>>::reduce Line | Count | Source | 377 | 182k | fn reduce(self, mut left: LinkedList<T>, mut right: LinkedList<T>) -> LinkedList<T> { | 378 | 182k | left.append(&mut right); | 379 | 182k | left | 380 | 182k | } |
Unexecuted instantiation: <rayon::iter::extend::ListReducer as rayon::iter::plumbing::Reducer<alloc::collections::linked_list::LinkedList<alloc::vec::Vec<wasmer_types::compilation::function::FunctionBody>>>>::reduce Unexecuted instantiation: <rayon::iter::extend::ListReducer as rayon::iter::plumbing::Reducer<alloc::collections::linked_list::LinkedList<alloc::vec::Vec<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>)>>>>::reduce Unexecuted instantiation: <rayon::iter::extend::ListReducer as rayon::iter::plumbing::Reducer<alloc::collections::linked_list::LinkedList<alloc::vec::Vec<wasmer_types::compilation::section::CustomSection>>>>::reduce <rayon::iter::extend::ListReducer as rayon::iter::plumbing::Reducer<alloc::collections::linked_list::LinkedList<alloc::vec::Vec<wasmer_types::compilation::function::FunctionBody>>>>::reduce Line | Count | Source | 377 | 42.2k | fn reduce(self, mut left: LinkedList<T>, mut right: LinkedList<T>) -> LinkedList<T> { | 378 | 42.2k | left.append(&mut right); | 379 | 42.2k | left | 380 | 42.2k | } |
<rayon::iter::extend::ListReducer as rayon::iter::plumbing::Reducer<alloc::collections::linked_list::LinkedList<alloc::vec::Vec<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>)>>>>::reduce Line | Count | Source | 377 | 79.3k | fn reduce(self, mut left: LinkedList<T>, mut right: LinkedList<T>) -> LinkedList<T> { | 378 | 79.3k | left.append(&mut right); | 379 | 79.3k | left | 380 | 79.3k | } |
|
381 | | } |
382 | | |
383 | | /// Extends an OS-string with string slices from a parallel iterator. |
384 | | impl<'a> ParallelExtend<&'a OsStr> for OsString { |
385 | | fn par_extend<I>(&mut self, par_iter: I) |
386 | | where |
387 | | I: IntoParallelIterator<Item = &'a OsStr>, |
388 | | { |
389 | | extend_reserved!(self, par_iter, osstring_len); |
390 | | } |
391 | | } |
392 | | |
393 | | /// Extends an OS-string with strings from a parallel iterator. |
394 | | impl ParallelExtend<OsString> for OsString { |
395 | | fn par_extend<I>(&mut self, par_iter: I) |
396 | | where |
397 | | I: IntoParallelIterator<Item = OsString>, |
398 | | { |
399 | | extend_reserved!(self, par_iter, osstring_len); |
400 | | } |
401 | | } |
402 | | |
403 | | /// Extends an OS-string with string slices from a parallel iterator. |
404 | | impl<'a> ParallelExtend<Cow<'a, OsStr>> for OsString { |
405 | | fn par_extend<I>(&mut self, par_iter: I) |
406 | | where |
407 | | I: IntoParallelIterator<Item = Cow<'a, OsStr>>, |
408 | | { |
409 | | extend_reserved!(self, par_iter, osstring_len); |
410 | | } |
411 | | } |
412 | | |
413 | | /// Extends a string with characters from a parallel iterator. |
414 | | impl ParallelExtend<char> for String { |
415 | | fn par_extend<I>(&mut self, par_iter: I) |
416 | | where |
417 | | I: IntoParallelIterator<Item = char>, |
418 | | { |
419 | | // This is like `extend`, but `Vec<char>` is less efficient to deal |
420 | | // with than `String`, so instead collect to `LinkedList<String>`. |
421 | | let list = par_iter.into_par_iter().drive_unindexed(ListStringConsumer); |
422 | | self.reserve(list.iter().map(String::len).sum()); |
423 | | self.extend(list); |
424 | | } |
425 | | } |
426 | | |
427 | | /// Extends a string with copied characters from a parallel iterator. |
428 | | impl<'a> ParallelExtend<&'a char> for String { |
429 | | fn par_extend<I>(&mut self, par_iter: I) |
430 | | where |
431 | | I: IntoParallelIterator<Item = &'a char>, |
432 | | { |
433 | | self.par_extend(par_iter.into_par_iter().copied()) |
434 | | } |
435 | | } |
436 | | |
437 | | struct ListStringConsumer; |
438 | | |
439 | | struct ListStringFolder { |
440 | | string: String, |
441 | | } |
442 | | |
443 | | impl Consumer<char> for ListStringConsumer { |
444 | | type Folder = ListStringFolder; |
445 | | type Reducer = ListReducer; |
446 | | type Result = LinkedList<String>; |
447 | | |
448 | | fn split_at(self, _index: usize) -> (Self, Self, Self::Reducer) { |
449 | | (Self, Self, ListReducer) |
450 | | } |
451 | | |
452 | | fn into_folder(self) -> Self::Folder { |
453 | | ListStringFolder { |
454 | | string: String::new(), |
455 | | } |
456 | | } |
457 | | |
458 | | fn full(&self) -> bool { |
459 | | false |
460 | | } |
461 | | } |
462 | | |
463 | | impl UnindexedConsumer<char> for ListStringConsumer { |
464 | | fn split_off_left(&self) -> Self { |
465 | | Self |
466 | | } |
467 | | |
468 | | fn to_reducer(&self) -> Self::Reducer { |
469 | | ListReducer |
470 | | } |
471 | | } |
472 | | |
473 | | impl Folder<char> for ListStringFolder { |
474 | | type Result = LinkedList<String>; |
475 | | |
476 | | fn consume(mut self, item: char) -> Self { |
477 | | self.string.push(item); |
478 | | self |
479 | | } |
480 | | |
481 | | fn consume_iter<I>(mut self, iter: I) -> Self |
482 | | where |
483 | | I: IntoIterator<Item = char>, |
484 | | { |
485 | | self.string.extend(iter); |
486 | | self |
487 | | } |
488 | | |
489 | | fn complete(self) -> Self::Result { |
490 | | let mut list = LinkedList::new(); |
491 | | if !self.string.is_empty() { |
492 | | list.push_back(self.string); |
493 | | } |
494 | | list |
495 | | } |
496 | | |
497 | | fn full(&self) -> bool { |
498 | | false |
499 | | } |
500 | | } |
501 | | |
502 | | /// Extends a string with string slices from a parallel iterator. |
503 | | impl<'a> ParallelExtend<&'a str> for String { |
504 | | fn par_extend<I>(&mut self, par_iter: I) |
505 | | where |
506 | | I: IntoParallelIterator<Item = &'a str>, |
507 | | { |
508 | | extend_reserved!(self, par_iter, string_len); |
509 | | } |
510 | | } |
511 | | |
512 | | /// Extends a string with strings from a parallel iterator. |
513 | | impl ParallelExtend<String> for String { |
514 | | fn par_extend<I>(&mut self, par_iter: I) |
515 | | where |
516 | | I: IntoParallelIterator<Item = String>, |
517 | | { |
518 | | extend_reserved!(self, par_iter, string_len); |
519 | | } |
520 | | } |
521 | | |
522 | | /// Extends a string with boxed strings from a parallel iterator. |
523 | | impl ParallelExtend<Box<str>> for String { |
524 | | fn par_extend<I>(&mut self, par_iter: I) |
525 | | where |
526 | | I: IntoParallelIterator<Item = Box<str>>, |
527 | | { |
528 | | extend_reserved!(self, par_iter, string_len); |
529 | | } |
530 | | } |
531 | | |
532 | | /// Extends a string with string slices from a parallel iterator. |
533 | | impl<'a> ParallelExtend<Cow<'a, str>> for String { |
534 | | fn par_extend<I>(&mut self, par_iter: I) |
535 | | where |
536 | | I: IntoParallelIterator<Item = Cow<'a, str>>, |
537 | | { |
538 | | extend_reserved!(self, par_iter, string_len); |
539 | | } |
540 | | } |
541 | | |
542 | | /// Extends a deque with items from a parallel iterator. |
543 | | impl<T> ParallelExtend<T> for VecDeque<T> |
544 | | where |
545 | | T: Send, |
546 | | { |
547 | | fn par_extend<I>(&mut self, par_iter: I) |
548 | | where |
549 | | I: IntoParallelIterator<Item = T>, |
550 | | { |
551 | | extend_reserved!(self, par_iter); |
552 | | } |
553 | | } |
554 | | |
555 | | /// Extends a deque with copied items from a parallel iterator. |
556 | | impl<'a, T> ParallelExtend<&'a T> for VecDeque<T> |
557 | | where |
558 | | T: 'a + Copy + Send + Sync, |
559 | | { |
560 | | fn par_extend<I>(&mut self, par_iter: I) |
561 | | where |
562 | | I: IntoParallelIterator<Item = &'a T>, |
563 | | { |
564 | | extend_reserved!(self, par_iter); |
565 | | } |
566 | | } |
567 | | |
568 | | /// Extends a vector with items from a parallel iterator. |
569 | | impl<T> ParallelExtend<T> for Vec<T> |
570 | | where |
571 | | T: Send, |
572 | | { |
573 | 149k | fn par_extend<I>(&mut self, par_iter: I) |
574 | 149k | where |
575 | 149k | I: IntoParallelIterator<Item = T>, |
576 | 149k | { |
577 | 149k | // See the vec_collect benchmarks in rayon-demo for different strategies. |
578 | 149k | let par_iter = par_iter.into_par_iter(); |
579 | 149k | match par_iter.opt_len() { |
580 | 10.2k | Some(len) => { |
581 | 10.2k | // When Rust gets specialization, we can get here for indexed iterators |
582 | 10.2k | // without relying on `opt_len`. Until then, `special_extend()` fakes |
583 | 10.2k | // an unindexed mode on the promise that `opt_len()` is accurate. |
584 | 10.2k | super::collect::special_extend(par_iter, len, self); |
585 | 10.2k | } |
586 | | None => { |
587 | | // This works like `extend`, but `Vec::append` is more efficient. |
588 | 139k | let list = par_iter.drive_unindexed(ListVecConsumer); |
589 | 139k | self.reserve(list.iter().map(Vec::len).sum()); |
590 | 733k | for mut other in list { |
591 | 593k | self.append(&mut other); |
592 | 593k | } |
593 | | } |
594 | | } |
595 | 149k | } Unexecuted instantiation: <alloc::vec::Vec<alloc::vec::Vec<u8>> as rayon::iter::ParallelExtend<alloc::vec::Vec<u8>>>::par_extend::<rayon::iter::while_some::WhileSome<rayon::iter::map::Map<rayon::iter::chain::Chain<rayon::iter::chain::Chain<rayon::iter::map_with::MapInit<rayon::iter::par_bridge::IterBridge<wasmer_types::entity::iter::Iter<wasmer_types::indexes::LocalFunctionIndex, wasmer_compiler::translator::environ::FunctionBodyData>>, <wasmer_compiler_llvm::compiler::LLVMCompiler>::compile_native_object::{closure#0}, <wasmer_compiler_llvm::compiler::LLVMCompiler>::compile_native_object::{closure#1}>, rayon::iter::map_with::MapInit<rayon::iter::par_bridge::IterBridge<wasmer_types::entity::iter::Iter<wasmer_types::indexes::SignatureIndex, wasmer_types::types::FunctionType>>, <wasmer_compiler_llvm::compiler::LLVMCompiler>::compile_native_object::{closure#2}, <wasmer_compiler_llvm::compiler::LLVMCompiler>::compile_native_object::{closure#3}>>, rayon::iter::map_with::MapInit<rayon::iter::par_bridge::IterBridge<wasmer_types::entity::iter::Iter<wasmer_types::indexes::FunctionIndex, wasmer_types::indexes::SignatureIndex>>, <wasmer_compiler_llvm::compiler::LLVMCompiler>::compile_native_object::{closure#4}, <wasmer_compiler_llvm::compiler::LLVMCompiler>::compile_native_object::{closure#5}>>, <core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<alloc::vec::Vec<u8>, wasmer_types::error::CompileError>::{closure#0}>>><alloc::vec::Vec<core::result::Result<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>> as rayon::iter::ParallelExtend<core::result::Result<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>>>::par_extend::<rayon::iter::map_with::MapInit<rayon::slice::Iter<&wasmer_types::types::FunctionType>, <wasmer_compiler_llvm::compiler::LLVMCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#3}, <wasmer_compiler_llvm::compiler::LLVMCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#4}>>Line | Count | Source | 573 | 10.2k | fn par_extend<I>(&mut self, par_iter: I) | 574 | 10.2k | where | 575 | 10.2k | I: IntoParallelIterator<Item = T>, | 576 | 10.2k | { | 577 | 10.2k | // See the vec_collect benchmarks in rayon-demo for different strategies. | 578 | 10.2k | let par_iter = par_iter.into_par_iter(); | 579 | 10.2k | match par_iter.opt_len() { | 580 | 10.2k | Some(len) => { | 581 | 10.2k | // When Rust gets specialization, we can get here for indexed iterators | 582 | 10.2k | // without relying on `opt_len`. Until then, `special_extend()` fakes | 583 | 10.2k | // an unindexed mode on the promise that `opt_len()` is accurate. | 584 | 10.2k | super::collect::special_extend(par_iter, len, self); | 585 | 10.2k | } | 586 | | None => { | 587 | | // This works like `extend`, but `Vec::append` is more efficient. | 588 | 0 | let list = par_iter.drive_unindexed(ListVecConsumer); | 589 | 0 | self.reserve(list.iter().map(Vec::len).sum()); | 590 | 0 | for mut other in list { | 591 | 0 | self.append(&mut other); | 592 | 0 | } | 593 | | } | 594 | | } | 595 | 10.2k | } |
<alloc::vec::Vec<wasmer_compiler_llvm::object_file::CompiledFunction> as rayon::iter::ParallelExtend<wasmer_compiler_llvm::object_file::CompiledFunction>>::par_extend::<rayon::iter::while_some::WhileSome<rayon::iter::map::Map<rayon::iter::map_with::MapInit<rayon::slice::Iter<(wasmer_types::indexes::LocalFunctionIndex, &wasmer_compiler::translator::environ::FunctionBodyData)>, <wasmer_compiler_llvm::compiler::LLVMCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#0}, <wasmer_compiler_llvm::compiler::LLVMCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#1}>, <core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<wasmer_compiler_llvm::object_file::CompiledFunction, wasmer_types::error::CompileError>::{closure#0}>>>Line | Count | Source | 573 | 10.2k | fn par_extend<I>(&mut self, par_iter: I) | 574 | 10.2k | where | 575 | 10.2k | I: IntoParallelIterator<Item = T>, | 576 | 10.2k | { | 577 | 10.2k | // See the vec_collect benchmarks in rayon-demo for different strategies. | 578 | 10.2k | let par_iter = par_iter.into_par_iter(); | 579 | 10.2k | match par_iter.opt_len() { | 580 | 0 | Some(len) => { | 581 | 0 | // When Rust gets specialization, we can get here for indexed iterators | 582 | 0 | // without relying on `opt_len`. Until then, `special_extend()` fakes | 583 | 0 | // an unindexed mode on the promise that `opt_len()` is accurate. | 584 | 0 | super::collect::special_extend(par_iter, len, self); | 585 | 0 | } | 586 | | None => { | 587 | | // This works like `extend`, but `Vec::append` is more efficient. | 588 | 10.2k | let list = par_iter.drive_unindexed(ListVecConsumer); | 589 | 10.2k | self.reserve(list.iter().map(Vec::len).sum()); | 590 | 112k | for mut other in list { | 591 | 101k | self.append(&mut other); | 592 | 101k | } | 593 | | } | 594 | | } | 595 | 10.2k | } |
<alloc::vec::Vec<wasmer_types::compilation::function::FunctionBody> as rayon::iter::ParallelExtend<wasmer_types::compilation::function::FunctionBody>>::par_extend::<rayon::iter::while_some::WhileSome<rayon::iter::map::Map<rayon::iter::map_with::MapInit<rayon::slice::Iter<wasmer_types::types::FunctionType>, <wasmer_compiler_llvm::compiler::LLVMCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#5}, <wasmer_compiler_llvm::compiler::LLVMCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#6}>, <core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>::{closure#0}>>>Line | Count | Source | 573 | 10.2k | fn par_extend<I>(&mut self, par_iter: I) | 574 | 10.2k | where | 575 | 10.2k | I: IntoParallelIterator<Item = T>, | 576 | 10.2k | { | 577 | 10.2k | // See the vec_collect benchmarks in rayon-demo for different strategies. | 578 | 10.2k | let par_iter = par_iter.into_par_iter(); | 579 | 10.2k | match par_iter.opt_len() { | 580 | 0 | Some(len) => { | 581 | 0 | // When Rust gets specialization, we can get here for indexed iterators | 582 | 0 | // without relying on `opt_len`. Until then, `special_extend()` fakes | 583 | 0 | // an unindexed mode on the promise that `opt_len()` is accurate. | 584 | 0 | super::collect::special_extend(par_iter, len, self); | 585 | 0 | } | 586 | | None => { | 587 | | // This works like `extend`, but `Vec::append` is more efficient. | 588 | 10.2k | let list = par_iter.drive_unindexed(ListVecConsumer); | 589 | 10.2k | self.reserve(list.iter().map(Vec::len).sum()); | 590 | 10.2k | for mut other in list { | 591 | 0 | self.append(&mut other); | 592 | 0 | } | 593 | | } | 594 | | } | 595 | 10.2k | } |
<alloc::vec::Vec<wasmer_types::compilation::function::FunctionBody> as rayon::iter::ParallelExtend<wasmer_types::compilation::function::FunctionBody>>::par_extend::<rayon::iter::while_some::WhileSome<rayon::iter::map::Map<rayon::iter::map_with::MapInit<rayon::slice::Iter<wasmer_types::types::FunctionType>, <cranelift_frontend::frontend::FunctionBuilderContext>::new, <wasmer_compiler_cranelift::compiler::CraneliftCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#4}>, <core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>::{closure#0}>>>Line | Count | Source | 573 | 10.0k | fn par_extend<I>(&mut self, par_iter: I) | 574 | 10.0k | where | 575 | 10.0k | I: IntoParallelIterator<Item = T>, | 576 | 10.0k | { | 577 | 10.0k | // See the vec_collect benchmarks in rayon-demo for different strategies. | 578 | 10.0k | let par_iter = par_iter.into_par_iter(); | 579 | 10.0k | match par_iter.opt_len() { | 580 | 0 | Some(len) => { | 581 | 0 | // When Rust gets specialization, we can get here for indexed iterators | 582 | 0 | // without relying on `opt_len`. Until then, `special_extend()` fakes | 583 | 0 | // an unindexed mode on the promise that `opt_len()` is accurate. | 584 | 0 | super::collect::special_extend(par_iter, len, self); | 585 | 0 | } | 586 | | None => { | 587 | | // This works like `extend`, but `Vec::append` is more efficient. | 588 | 10.0k | let list = par_iter.drive_unindexed(ListVecConsumer); | 589 | 10.0k | self.reserve(list.iter().map(Vec::len).sum()); | 590 | 10.0k | for mut other in list { | 591 | 0 | self.append(&mut other); | 592 | 0 | } | 593 | | } | 594 | | } | 595 | 10.0k | } |
<alloc::vec::Vec<wasmer_types::compilation::function::FunctionBody> as rayon::iter::ParallelExtend<wasmer_types::compilation::function::FunctionBody>>::par_extend::<rayon::iter::while_some::WhileSome<rayon::iter::map::Map<rayon::iter::map_with::MapInit<rayon::slice::Iter<&wasmer_types::types::FunctionType>, <cranelift_frontend::frontend::FunctionBuilderContext>::new, <wasmer_compiler_cranelift::compiler::CraneliftCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#3}>, <core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>::{closure#0}>>>Line | Count | Source | 573 | 10.0k | fn par_extend<I>(&mut self, par_iter: I) | 574 | 10.0k | where | 575 | 10.0k | I: IntoParallelIterator<Item = T>, | 576 | 10.0k | { | 577 | 10.0k | // See the vec_collect benchmarks in rayon-demo for different strategies. | 578 | 10.0k | let par_iter = par_iter.into_par_iter(); | 579 | 10.0k | match par_iter.opt_len() { | 580 | 0 | Some(len) => { | 581 | 0 | // When Rust gets specialization, we can get here for indexed iterators | 582 | 0 | // without relying on `opt_len`. Until then, `special_extend()` fakes | 583 | 0 | // an unindexed mode on the promise that `opt_len()` is accurate. | 584 | 0 | super::collect::special_extend(par_iter, len, self); | 585 | 0 | } | 586 | | None => { | 587 | | // This works like `extend`, but `Vec::append` is more efficient. | 588 | 10.0k | let list = par_iter.drive_unindexed(ListVecConsumer); | 589 | 10.0k | self.reserve(list.iter().map(Vec::len).sum()); | 590 | 61.6k | for mut other in list { | 591 | 51.5k | self.append(&mut other); | 592 | 51.5k | } | 593 | | } | 594 | | } | 595 | 10.0k | } |
<alloc::vec::Vec<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>)> as rayon::iter::ParallelExtend<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>)>>::par_extend::<rayon::iter::while_some::WhileSome<rayon::iter::map::Map<rayon::iter::map_with::MapInit<rayon::slice::Iter<(wasmer_types::indexes::LocalFunctionIndex, &wasmer_compiler::translator::environ::FunctionBodyData)>, <wasmer_compiler_cranelift::translator::func_translator::FuncTranslator>::new, <wasmer_compiler_cranelift::compiler::CraneliftCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#2}>, <core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>), wasmer_types::error::CompileError>::{closure#0}>>>Line | Count | Source | 573 | 10.0k | fn par_extend<I>(&mut self, par_iter: I) | 574 | 10.0k | where | 575 | 10.0k | I: IntoParallelIterator<Item = T>, | 576 | 10.0k | { | 577 | 10.0k | // See the vec_collect benchmarks in rayon-demo for different strategies. | 578 | 10.0k | let par_iter = par_iter.into_par_iter(); | 579 | 10.0k | match par_iter.opt_len() { | 580 | 0 | Some(len) => { | 581 | 0 | // When Rust gets specialization, we can get here for indexed iterators | 582 | 0 | // without relying on `opt_len`. Until then, `special_extend()` fakes | 583 | 0 | // an unindexed mode on the promise that `opt_len()` is accurate. | 584 | 0 | super::collect::special_extend(par_iter, len, self); | 585 | 0 | } | 586 | | None => { | 587 | | // This works like `extend`, but `Vec::append` is more efficient. | 588 | 10.0k | let list = par_iter.drive_unindexed(ListVecConsumer); | 589 | 10.0k | self.reserve(list.iter().map(Vec::len).sum()); | 590 | 97.8k | for mut other in list { | 591 | 87.8k | self.append(&mut other); | 592 | 87.8k | } | 593 | | } | 594 | | } | 595 | 10.0k | } |
<alloc::vec::Vec<wasmer_types::compilation::section::CustomSection> as rayon::iter::ParallelExtend<wasmer_types::compilation::section::CustomSection>>::par_extend::<rayon::iter::while_some::WhileSome<rayon::iter::map::Map<rayon::iter::map::Map<rayon::vec::IntoIter<wasmer_types::indexes::FunctionIndex>, <wasmer_compiler_singlepass::compiler::SinglepassCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#0}>, <core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<wasmer_types::compilation::section::CustomSection, wasmer_types::error::CompileError>::{closure#0}>>>Line | Count | Source | 573 | 12.2k | fn par_extend<I>(&mut self, par_iter: I) | 574 | 12.2k | where | 575 | 12.2k | I: IntoParallelIterator<Item = T>, | 576 | 12.2k | { | 577 | 12.2k | // See the vec_collect benchmarks in rayon-demo for different strategies. | 578 | 12.2k | let par_iter = par_iter.into_par_iter(); | 579 | 12.2k | match par_iter.opt_len() { | 580 | 0 | Some(len) => { | 581 | 0 | // When Rust gets specialization, we can get here for indexed iterators | 582 | 0 | // without relying on `opt_len`. Until then, `special_extend()` fakes | 583 | 0 | // an unindexed mode on the promise that `opt_len()` is accurate. | 584 | 0 | super::collect::special_extend(par_iter, len, self); | 585 | 0 | } | 586 | | None => { | 587 | | // This works like `extend`, but `Vec::append` is more efficient. | 588 | 12.2k | let list = par_iter.drive_unindexed(ListVecConsumer); | 589 | 12.2k | self.reserve(list.iter().map(Vec::len).sum()); | 590 | 12.2k | for mut other in list { | 591 | 0 | self.append(&mut other); | 592 | 0 | } | 593 | | } | 594 | | } | 595 | 12.2k | } |
<alloc::vec::Vec<wasmer_types::compilation::function::FunctionBody> as rayon::iter::ParallelExtend<wasmer_types::compilation::function::FunctionBody>>::par_extend::<rayon::iter::while_some::WhileSome<rayon::iter::map::Map<rayon::iter::map::Map<rayon::vec::IntoIter<wasmer_types::types::FunctionType>, <wasmer_compiler_singlepass::compiler::SinglepassCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#3}>, <core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>::{closure#0}>>>Line | Count | Source | 573 | 12.2k | fn par_extend<I>(&mut self, par_iter: I) | 574 | 12.2k | where | 575 | 12.2k | I: IntoParallelIterator<Item = T>, | 576 | 12.2k | { | 577 | 12.2k | // See the vec_collect benchmarks in rayon-demo for different strategies. | 578 | 12.2k | let par_iter = par_iter.into_par_iter(); | 579 | 12.2k | match par_iter.opt_len() { | 580 | 0 | Some(len) => { | 581 | 0 | // When Rust gets specialization, we can get here for indexed iterators | 582 | 0 | // without relying on `opt_len`. Until then, `special_extend()` fakes | 583 | 0 | // an unindexed mode on the promise that `opt_len()` is accurate. | 584 | 0 | super::collect::special_extend(par_iter, len, self); | 585 | 0 | } | 586 | | None => { | 587 | | // This works like `extend`, but `Vec::append` is more efficient. | 588 | 12.2k | let list = par_iter.drive_unindexed(ListVecConsumer); | 589 | 12.2k | self.reserve(list.iter().map(Vec::len).sum()); | 590 | 12.2k | for mut other in list { | 591 | 0 | self.append(&mut other); | 592 | 0 | } | 593 | | } | 594 | | } | 595 | 12.2k | } |
<alloc::vec::Vec<wasmer_types::compilation::function::FunctionBody> as rayon::iter::ParallelExtend<wasmer_types::compilation::function::FunctionBody>>::par_extend::<rayon::iter::while_some::WhileSome<rayon::iter::map::Map<rayon::iter::map::Map<rayon::vec::IntoIter<&wasmer_types::types::FunctionType>, <wasmer_compiler_singlepass::compiler::SinglepassCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#2}>, <core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>::{closure#0}>>>Line | Count | Source | 573 | 12.2k | fn par_extend<I>(&mut self, par_iter: I) | 574 | 12.2k | where | 575 | 12.2k | I: IntoParallelIterator<Item = T>, | 576 | 12.2k | { | 577 | 12.2k | // See the vec_collect benchmarks in rayon-demo for different strategies. | 578 | 12.2k | let par_iter = par_iter.into_par_iter(); | 579 | 12.2k | match par_iter.opt_len() { | 580 | 0 | Some(len) => { | 581 | 0 | // When Rust gets specialization, we can get here for indexed iterators | 582 | 0 | // without relying on `opt_len`. Until then, `special_extend()` fakes | 583 | 0 | // an unindexed mode on the promise that `opt_len()` is accurate. | 584 | 0 | super::collect::special_extend(par_iter, len, self); | 585 | 0 | } | 586 | | None => { | 587 | | // This works like `extend`, but `Vec::append` is more efficient. | 588 | 12.2k | let list = par_iter.drive_unindexed(ListVecConsumer); | 589 | 12.2k | self.reserve(list.iter().map(Vec::len).sum()); | 590 | 31.0k | for mut other in list { | 591 | 18.8k | self.append(&mut other); | 592 | 18.8k | } | 593 | | } | 594 | | } | 595 | 12.2k | } |
<alloc::vec::Vec<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>)> as rayon::iter::ParallelExtend<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>)>>::par_extend::<rayon::iter::while_some::WhileSome<rayon::iter::map::Map<rayon::iter::map::Map<rayon::vec::IntoIter<(wasmer_types::indexes::LocalFunctionIndex, &wasmer_compiler::translator::environ::FunctionBodyData)>, <wasmer_compiler_singlepass::compiler::SinglepassCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#1}>, <core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>), wasmer_types::error::CompileError>::{closure#0}>>>Line | Count | Source | 573 | 12.2k | fn par_extend<I>(&mut self, par_iter: I) | 574 | 12.2k | where | 575 | 12.2k | I: IntoParallelIterator<Item = T>, | 576 | 12.2k | { | 577 | 12.2k | // See the vec_collect benchmarks in rayon-demo for different strategies. | 578 | 12.2k | let par_iter = par_iter.into_par_iter(); | 579 | 12.2k | match par_iter.opt_len() { | 580 | 0 | Some(len) => { | 581 | 0 | // When Rust gets specialization, we can get here for indexed iterators | 582 | 0 | // without relying on `opt_len`. Until then, `special_extend()` fakes | 583 | 0 | // an unindexed mode on the promise that `opt_len()` is accurate. | 584 | 0 | super::collect::special_extend(par_iter, len, self); | 585 | 0 | } | 586 | | None => { | 587 | | // This works like `extend`, but `Vec::append` is more efficient. | 588 | 12.2k | let list = par_iter.drive_unindexed(ListVecConsumer); | 589 | 12.2k | self.reserve(list.iter().map(Vec::len).sum()); | 590 | 206k | for mut other in list { | 591 | 193k | self.append(&mut other); | 592 | 193k | } | 593 | | } | 594 | | } | 595 | 12.2k | } |
Unexecuted instantiation: <alloc::vec::Vec<wasmer_types::compilation::function::FunctionBody> as rayon::iter::ParallelExtend<wasmer_types::compilation::function::FunctionBody>>::par_extend::<rayon::iter::while_some::WhileSome<rayon::iter::map::Map<rayon::iter::map_with::MapInit<rayon::slice::Iter<wasmer_types::types::FunctionType>, <cranelift_frontend::frontend::FunctionBuilderContext>::new, <wasmer_compiler_cranelift::compiler::CraneliftCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#4}>, <core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>::{closure#0}>>>Unexecuted instantiation: <alloc::vec::Vec<wasmer_types::compilation::function::FunctionBody> as rayon::iter::ParallelExtend<wasmer_types::compilation::function::FunctionBody>>::par_extend::<rayon::iter::while_some::WhileSome<rayon::iter::map::Map<rayon::iter::map_with::MapInit<rayon::slice::Iter<&wasmer_types::types::FunctionType>, <cranelift_frontend::frontend::FunctionBuilderContext>::new, <wasmer_compiler_cranelift::compiler::CraneliftCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#3}>, <core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>::{closure#0}>>>Unexecuted instantiation: <alloc::vec::Vec<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>)> as rayon::iter::ParallelExtend<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>)>>::par_extend::<rayon::iter::while_some::WhileSome<rayon::iter::map::Map<rayon::iter::map_with::MapInit<rayon::slice::Iter<(wasmer_types::indexes::LocalFunctionIndex, &wasmer_compiler::translator::environ::FunctionBodyData)>, <wasmer_compiler_cranelift::translator::func_translator::FuncTranslator>::new, <wasmer_compiler_cranelift::compiler::CraneliftCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#2}>, <core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<gimli::write::cfi::FrameDescriptionEntry>), wasmer_types::error::CompileError>::{closure#0}>>><alloc::vec::Vec<wasmer_types::compilation::section::CustomSection> as rayon::iter::ParallelExtend<wasmer_types::compilation::section::CustomSection>>::par_extend::<rayon::iter::while_some::WhileSome<rayon::iter::map::Map<rayon::iter::map::Map<rayon::vec::IntoIter<wasmer_types::indexes::FunctionIndex>, <wasmer_compiler_singlepass::compiler::SinglepassCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#0}>, <core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<wasmer_types::compilation::section::CustomSection, wasmer_types::error::CompileError>::{closure#0}>>>Line | Count | Source | 573 | 10.0k | fn par_extend<I>(&mut self, par_iter: I) | 574 | 10.0k | where | 575 | 10.0k | I: IntoParallelIterator<Item = T>, | 576 | 10.0k | { | 577 | 10.0k | // See the vec_collect benchmarks in rayon-demo for different strategies. | 578 | 10.0k | let par_iter = par_iter.into_par_iter(); | 579 | 10.0k | match par_iter.opt_len() { | 580 | 0 | Some(len) => { | 581 | 0 | // When Rust gets specialization, we can get here for indexed iterators | 582 | 0 | // without relying on `opt_len`. Until then, `special_extend()` fakes | 583 | 0 | // an unindexed mode on the promise that `opt_len()` is accurate. | 584 | 0 | super::collect::special_extend(par_iter, len, self); | 585 | 0 | } | 586 | | None => { | 587 | | // This works like `extend`, but `Vec::append` is more efficient. | 588 | 10.0k | let list = par_iter.drive_unindexed(ListVecConsumer); | 589 | 10.0k | self.reserve(list.iter().map(Vec::len).sum()); | 590 | 10.0k | for mut other in list { | 591 | 0 | self.append(&mut other); | 592 | 0 | } | 593 | | } | 594 | | } | 595 | 10.0k | } |
<alloc::vec::Vec<wasmer_types::compilation::function::FunctionBody> as rayon::iter::ParallelExtend<wasmer_types::compilation::function::FunctionBody>>::par_extend::<rayon::iter::while_some::WhileSome<rayon::iter::map::Map<rayon::iter::map::Map<rayon::vec::IntoIter<wasmer_types::types::FunctionType>, <wasmer_compiler_singlepass::compiler::SinglepassCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#3}>, <core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>::{closure#0}>>>Line | Count | Source | 573 | 10.0k | fn par_extend<I>(&mut self, par_iter: I) | 574 | 10.0k | where | 575 | 10.0k | I: IntoParallelIterator<Item = T>, | 576 | 10.0k | { | 577 | 10.0k | // See the vec_collect benchmarks in rayon-demo for different strategies. | 578 | 10.0k | let par_iter = par_iter.into_par_iter(); | 579 | 10.0k | match par_iter.opt_len() { | 580 | 0 | Some(len) => { | 581 | 0 | // When Rust gets specialization, we can get here for indexed iterators | 582 | 0 | // without relying on `opt_len`. Until then, `special_extend()` fakes | 583 | 0 | // an unindexed mode on the promise that `opt_len()` is accurate. | 584 | 0 | super::collect::special_extend(par_iter, len, self); | 585 | 0 | } | 586 | | None => { | 587 | | // This works like `extend`, but `Vec::append` is more efficient. | 588 | 10.0k | let list = par_iter.drive_unindexed(ListVecConsumer); | 589 | 10.0k | self.reserve(list.iter().map(Vec::len).sum()); | 590 | 10.0k | for mut other in list { | 591 | 0 | self.append(&mut other); | 592 | 0 | } | 593 | | } | 594 | | } | 595 | 10.0k | } |
<alloc::vec::Vec<wasmer_types::compilation::function::FunctionBody> as rayon::iter::ParallelExtend<wasmer_types::compilation::function::FunctionBody>>::par_extend::<rayon::iter::while_some::WhileSome<rayon::iter::map::Map<rayon::iter::map::Map<rayon::vec::IntoIter<&wasmer_types::types::FunctionType>, <wasmer_compiler_singlepass::compiler::SinglepassCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#2}>, <core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<wasmer_types::compilation::function::FunctionBody, wasmer_types::error::CompileError>::{closure#0}>>>Line | Count | Source | 573 | 10.0k | fn par_extend<I>(&mut self, par_iter: I) | 574 | 10.0k | where | 575 | 10.0k | I: IntoParallelIterator<Item = T>, | 576 | 10.0k | { | 577 | 10.0k | // See the vec_collect benchmarks in rayon-demo for different strategies. | 578 | 10.0k | let par_iter = par_iter.into_par_iter(); | 579 | 10.0k | match par_iter.opt_len() { | 580 | 0 | Some(len) => { | 581 | 0 | // When Rust gets specialization, we can get here for indexed iterators | 582 | 0 | // without relying on `opt_len`. Until then, `special_extend()` fakes | 583 | 0 | // an unindexed mode on the promise that `opt_len()` is accurate. | 584 | 0 | super::collect::special_extend(par_iter, len, self); | 585 | 0 | } | 586 | | None => { | 587 | | // This works like `extend`, but `Vec::append` is more efficient. | 588 | 10.0k | let list = par_iter.drive_unindexed(ListVecConsumer); | 589 | 10.0k | self.reserve(list.iter().map(Vec::len).sum()); | 590 | 61.6k | for mut other in list { | 591 | 51.5k | self.append(&mut other); | 592 | 51.5k | } | 593 | | } | 594 | | } | 595 | 10.0k | } |
<alloc::vec::Vec<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>)> as rayon::iter::ParallelExtend<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>)>>::par_extend::<rayon::iter::while_some::WhileSome<rayon::iter::map::Map<rayon::iter::map::Map<rayon::vec::IntoIter<(wasmer_types::indexes::LocalFunctionIndex, &wasmer_compiler::translator::environ::FunctionBodyData)>, <wasmer_compiler_singlepass::compiler::SinglepassCompiler as wasmer_compiler::compiler::Compiler>::compile_module::{closure#1}>, <core::result::Result<_, _> as rayon::iter::FromParallelIterator<core::result::Result<_, _>>>::from_par_iter::ok<(wasmer_types::compilation::function::CompiledFunction, core::option::Option<wasmer_compiler_singlepass::unwind::UnwindFrame>), wasmer_types::error::CompileError>::{closure#0}>>>Line | Count | Source | 573 | 10.0k | fn par_extend<I>(&mut self, par_iter: I) | 574 | 10.0k | where | 575 | 10.0k | I: IntoParallelIterator<Item = T>, | 576 | 10.0k | { | 577 | 10.0k | // See the vec_collect benchmarks in rayon-demo for different strategies. | 578 | 10.0k | let par_iter = par_iter.into_par_iter(); | 579 | 10.0k | match par_iter.opt_len() { | 580 | 0 | Some(len) => { | 581 | 0 | // When Rust gets specialization, we can get here for indexed iterators | 582 | 0 | // without relying on `opt_len`. Until then, `special_extend()` fakes | 583 | 0 | // an unindexed mode on the promise that `opt_len()` is accurate. | 584 | 0 | super::collect::special_extend(par_iter, len, self); | 585 | 0 | } | 586 | | None => { | 587 | | // This works like `extend`, but `Vec::append` is more efficient. | 588 | 10.0k | let list = par_iter.drive_unindexed(ListVecConsumer); | 589 | 10.0k | self.reserve(list.iter().map(Vec::len).sum()); | 590 | 97.8k | for mut other in list { | 591 | 87.8k | self.append(&mut other); | 592 | 87.8k | } | 593 | | } | 594 | | } | 595 | 10.0k | } |
|
596 | | } |
597 | | |
598 | | /// Extends a vector with copied items from a parallel iterator. |
599 | | impl<'a, T> ParallelExtend<&'a T> for Vec<T> |
600 | | where |
601 | | T: 'a + Copy + Send + Sync, |
602 | | { |
603 | | fn par_extend<I>(&mut self, par_iter: I) |
604 | | where |
605 | | I: IntoParallelIterator<Item = &'a T>, |
606 | | { |
607 | | self.par_extend(par_iter.into_par_iter().copied()) |
608 | | } |
609 | | } |
610 | | |
611 | | /// Collapses all unit items from a parallel iterator into one. |
612 | | impl ParallelExtend<()> for () { |
613 | | fn par_extend<I>(&mut self, par_iter: I) |
614 | | where |
615 | | I: IntoParallelIterator<Item = ()>, |
616 | | { |
617 | | par_iter.into_par_iter().drive_unindexed(NoopConsumer) |
618 | | } |
619 | | } |