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

Function issue_13538_tables

tests/all/func.rs:2462–2493  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2460#[test]
2461#[cfg_attr(miri, ignore)]
2462fn issue_13538_tables() -> Result<()> {
2463 // Same as `issue_13538_memories` but for tables.
2464 assert_returns_regardless_of_inlining(
2465 r#"
2466 (component
2467 (core module $M
2468 (table (export "tab") 1 1 (ref i31) (ref.i31 (i32.const 0)))
2469 (func (export "writeit") (param i32)
2470 (table.set (i32.const 0) (ref.i31 (local.get 0))))
2471 )
2472 (core instance $m (instantiate $M))
2473 (core module $N
2474 (import "" "tab" (table 1 1 (ref i31)))
2475 (import "" "writeit" (func $writeit (param i32)))
2476 (func (export "g") (result i32)
2477 (drop (table.get (i32.const 0)))
2478 (call $writeit (i32.const 123))
2479 (i31.get_u (table.get (i32.const 0))))
2480 )
2481 (core instance $n (instantiate $N
2482 (with "" (instance
2483 (export "tab" (table $m "tab"))
2484 (export "writeit" (func $m "writeit"))))))
2485 (func (export "g") (result u32) (canon lift (core func $n "g"))))
2486 "#,
2487 123,
2488 |config| {
2489 config.wasm_function_references(true);
2490 config.wasm_gc(true);
2491 },
2492 )
2493}

Callers

nothing calls this directly

Calls 3

wasm_gcMethod · 0.45

Tested by

no test coverage detected