Generates an iterator of all valid tail call targets. This includes all functions with both the `tail` calling convention and the same return values as the caller.
(
&'a self,
caller_sig: &'a Signature,
)
| 1235 | /// Generates an iterator of all valid tail call targets. This includes all functions with both |
| 1236 | /// the `tail` calling convention and the same return values as the caller. |
| 1237 | fn tail_call_targets<'a>( |
| 1238 | &'a self, |
| 1239 | caller_sig: &'a Signature, |
| 1240 | ) -> impl Iterator<Item = &'a (Signature, SigRef, FuncRef)> { |
| 1241 | self.func_refs.iter().filter(|(sig, _, _)| { |
| 1242 | sig.call_conv == CallConv::Tail && sig.returns == caller_sig.returns |
| 1243 | }) |
| 1244 | } |
| 1245 | } |
| 1246 | |
| 1247 | impl<'r, 'data> FunctionGenerator<'r, 'data> |