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

Method tail_call_targets

cranelift/fuzzgen/src/function_generator.rs:1237–1244  ·  view source on GitHub ↗

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,
    )

Source from the content-addressed store, hash-verified

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
1247impl<'r, 'data> FunctionGenerator<'r, 'data>

Callers 1

generate_blocksMethod · 0.80

Calls 1

iterMethod · 0.45

Tested by

no test coverage detected