Files
wasmtime/tests/misc_testsuite/simple_ref_is_null.wast
Alex Crichton 9c6884e28d Update the spec reference testsuite submodule (#3450)
* Update the spec reference testsuite submodule

This commit brings in recent updates to the spec test suite. Most of the
changes here were already fixed in `wasmparser` with some tweaks to
esoteric modules, but Wasmtime also gets a bug fix where where import
matching for the size of tables/memories is based on the current runtime
size of the table/memory rather than the original type of the
table/memory. This means that during type matching the actual value is
consulted for its size rather than using the minimum size listed in its
type.

* Fix now-missing directories in build script
2021-10-13 16:14:12 -05:00

18 lines
598 B
Plaintext

(module
(func (export "func_is_null") (param funcref) (result i32)
(ref.is_null (local.get 0))
)
(func (export "func_is_null_with_non_null_funcref") (result i32)
(call 0 (ref.func 0))
)
(func (export "extern_is_null") (param externref) (result i32)
(ref.is_null (local.get 0))
)
)
(assert_return (invoke "func_is_null" (ref.null func)) (i32.const 1))
(assert_return (invoke "func_is_null_with_non_null_funcref") (i32.const 0))
(assert_return (invoke "extern_is_null" (ref.null extern)) (i32.const 1))
(assert_return (invoke "extern_is_null" (ref.extern 1)) (i32.const 0))