mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-04-25 14:12:13 +00:00
51 lines
1.3 KiB
Plaintext
51 lines
1.3 KiB
Plaintext
|
;; @xform import "" "a" (other anyref_borrowed other anyref_owned other)
|
||
|
|
||
|
(module
|
||
|
(import "" "a" (func $a (param f32 i32 i64 i32 i32)))
|
||
|
(func (export "foo")
|
||
|
f32.const 1
|
||
|
i32.const 2
|
||
|
i64.const 3
|
||
|
i32.const 4
|
||
|
i32.const 5
|
||
|
call $a)
|
||
|
(func $alloc (export "__wbindgen_anyref_table_alloc") (result i32)
|
||
|
i32.const 0)
|
||
|
(func $dealloc (export "__wbindgen_anyref_table_dealloc") (param i32))
|
||
|
)
|
||
|
|
||
|
(; CHECK-ALL:
|
||
|
(module
|
||
|
(type (;0;) (func))
|
||
|
(type (;1;) (func (result i32)))
|
||
|
(type (;2;) (func (param i32)))
|
||
|
(type (;3;) (func (param f32 i32 i64 i32 i32)))
|
||
|
(type (;4;) (func (param f32 anyref i64 anyref i32)))
|
||
|
(import "" "a" (func $a (type 4)))
|
||
|
(func $a anyref shim (type 3) (param f32 i32 i64 i32 i32)
|
||
|
local.get 0
|
||
|
local.get 1
|
||
|
table.get 0
|
||
|
local.get 2
|
||
|
local.get 3
|
||
|
table.get 0
|
||
|
local.get 3
|
||
|
call $dealloc
|
||
|
local.get 4
|
||
|
call $a)
|
||
|
(func (;2;) (type 0)
|
||
|
f32.const 0x1p+0 (;=1;)
|
||
|
i32.const 2
|
||
|
i64.const 3
|
||
|
i32.const 4
|
||
|
i32.const 5
|
||
|
call $a anyref shim)
|
||
|
(func $alloc (type 1) (result i32)
|
||
|
i32.const 0)
|
||
|
(func $dealloc (type 2) (param i32))
|
||
|
(table (;0;) 32 anyref)
|
||
|
(export "foo" (func 2))
|
||
|
(export "__wbindgen_anyref_table_alloc" (func $alloc))
|
||
|
(export "__wbindgen_anyref_table_dealloc" (func $dealloc)))
|
||
|
;)
|