mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-07-31 03:51:56 +00:00
Mass rename anyref to externref (#2142)
Updates a mess of dependencies and tracks the most recent version of the reference types specification.
This commit is contained in:
31
crates/externref-xform/tests/import-anyref-owned.wat
Normal file
31
crates/externref-xform/tests/import-anyref-owned.wat
Normal file
@@ -0,0 +1,31 @@
|
||||
;; @xform import "" "a" (externref_owned)
|
||||
|
||||
(module
|
||||
(import "" "a" (func $a (param i32)))
|
||||
(func (export "foo")
|
||||
i32.const 0
|
||||
call $a)
|
||||
(func $alloc (export "__externref_table_alloc") (result i32)
|
||||
i32.const 0)
|
||||
(func $dealloc (export "__externref_table_dealloc") (param i32))
|
||||
)
|
||||
|
||||
(; CHECK-ALL:
|
||||
(module
|
||||
(type (;0;) (func))
|
||||
(type (;1;) (func (param i32)))
|
||||
(type (;2;) (func (param externref)))
|
||||
(import "" "a" (func $a (type 2)))
|
||||
(func $a externref shim (type 1) (param i32)
|
||||
local.get 0
|
||||
table.get 0
|
||||
local.get 0
|
||||
call $dealloc
|
||||
call $a)
|
||||
(func (;2;) (type 0)
|
||||
i32.const 0
|
||||
call $a externref shim)
|
||||
(func $dealloc (type 1) (param i32))
|
||||
(table (;0;) 32 externref)
|
||||
(export "foo" (func 2)))
|
||||
;)
|
Reference in New Issue
Block a user