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

Function test_tail_call_default

tests/all/defaults.rs:5–72  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3#[test]
4#[cfg_attr(miri, ignore)]
5fn test_tail_call_default() -> Result<()> {
6 for (line, expected, cfg) in [
7 (
8 line!(),
9 true,
10 Config::new()
11 .strategy(Strategy::Cranelift)
12 .target("x86_64")?,
13 ),
14 (
15 line!(),
16 true,
17 Config::new()
18 .strategy(Strategy::Cranelift)
19 .target("aarch64")?,
20 ),
21 (
22 line!(),
23 true,
24 Config::new()
25 .strategy(Strategy::Cranelift)
26 .target("riscv64")?,
27 ),
28 (
29 line!(),
30 true,
31 Config::new()
32 .strategy(Strategy::Cranelift)
33 .target("s390x")?,
34 ),
35 (
36 line!(),
37 false,
38 Config::new().strategy(Strategy::Winch).target("x86_64")?,
39 ),
40 (
41 line!(),
42 false,
43 Config::new().strategy(Strategy::Winch).target("aarch64")?,
44 ),
45 (
46 line!(),
47 false,
48 Config::new()
49 .strategy(Strategy::Cranelift)
50 .wasm_tail_call(false)
51 .target("x86_64")?,
52 ),
53 ] {
54 cfg.signals_based_traps(true);
55 let engine = Engine::new(cfg)?;
56
57 eprintln!("running config on line {line}");
58 let wat = r#"
59 (module $from_name_section
60 (func (export "run") (return_call 0))
61 )
62 "#;

Callers

nothing calls this directly

Calls 9

OkFunction · 0.85
precompile_moduleMethod · 0.80
as_bytesMethod · 0.80
newFunction · 0.50
targetMethod · 0.45
strategyMethod · 0.45
wasm_tail_callMethod · 0.45
signals_based_trapsMethod · 0.45
mapMethod · 0.45

Tested by

no test coverage detected