mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-12 20:41:24 +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:
37
crates/externref-xform/tests/anyref-param.wat
Normal file
37
crates/externref-xform/tests/anyref-param.wat
Normal file
@ -0,0 +1,37 @@
|
||||
;; @xform export "foo" (externref_borrowed)
|
||||
|
||||
(module
|
||||
(func $foo (export "foo") (param i32))
|
||||
(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 (param i32)))
|
||||
(type (;1;) (func (param externref)))
|
||||
(func $foo externref shim (type 1) (param externref)
|
||||
(local i32)
|
||||
global.get 0
|
||||
i32.const 1
|
||||
i32.sub
|
||||
local.tee 1
|
||||
global.set 0
|
||||
local.get 1
|
||||
local.get 0
|
||||
table.set 0
|
||||
local.get 1
|
||||
call $foo
|
||||
local.get 1
|
||||
ref.nullextern
|
||||
table.set 0
|
||||
local.get 1
|
||||
i32.const 1
|
||||
i32.add
|
||||
global.set 0)
|
||||
(func $foo (type 0) (param i32))
|
||||
(table (;0;) 32 externref)
|
||||
(global (;0;) (mut i32) (i32.const 32))
|
||||
(export "foo" (func $foo externref shim)))
|
||||
;)
|
Reference in New Issue
Block a user