Update wasm-tools crates (#5945)
This notably updates `wasmparser` for updates to the relaxed-simd proposal and an implementation of the function-references proposal. Additionally there are some minor bug fixes being picked up for WIT and the component model.
This commit is contained in:
@@ -1984,7 +1984,7 @@ fn drop_component_still_works() -> Result<()> {
|
||||
(export "" (func $f_lower))
|
||||
))
|
||||
))
|
||||
(func (export "f")
|
||||
(func (export "g")
|
||||
(canon lift
|
||||
(core func $i "f")
|
||||
)
|
||||
@@ -2008,7 +2008,7 @@ fn drop_component_still_works() -> Result<()> {
|
||||
(store, instance)
|
||||
};
|
||||
|
||||
let f = instance.get_typed_func::<(), ()>(&mut store, "f")?;
|
||||
let f = instance.get_typed_func::<(), ()>(&mut store, "g")?;
|
||||
assert_eq!(*store.data(), 0);
|
||||
f.call(&mut store, ())?;
|
||||
assert_eq!(*store.data(), 2);
|
||||
@@ -2202,7 +2202,7 @@ fn lower_then_lift() -> Result<()> {
|
||||
(func $f2 (result s32)
|
||||
(canon lift (core func $f_lower))
|
||||
)
|
||||
(export "f" (func $f2))
|
||||
(export "f2" (func $f2))
|
||||
)
|
||||
"#;
|
||||
|
||||
@@ -2213,7 +2213,7 @@ fn lower_then_lift() -> Result<()> {
|
||||
linker.root().func_wrap("f", |_, _: ()| Ok((2u32,)))?;
|
||||
let instance = linker.instantiate(&mut store, &component)?;
|
||||
|
||||
let f = instance.get_typed_func::<(), (i32,)>(&mut store, "f")?;
|
||||
let f = instance.get_typed_func::<(), (i32,)>(&mut store, "f2")?;
|
||||
assert_eq!(f.call(&mut store, ())?, (2,));
|
||||
|
||||
// First test strings when the import/export ABI happen to line up
|
||||
|
||||
@@ -685,10 +685,10 @@ fn bad_import_alignment() -> Result<()> {
|
||||
))
|
||||
))
|
||||
|
||||
(func (export "unaligned-retptr")
|
||||
(func (export "unaligned-retptr2")
|
||||
(canon lift (core func $m "unaligned-retptr"))
|
||||
)
|
||||
(func (export "unaligned-argptr")
|
||||
(func (export "unaligned-argptr2")
|
||||
(canon lift (core func $m "unaligned-argptr"))
|
||||
)
|
||||
)
|
||||
@@ -723,7 +723,7 @@ fn bad_import_alignment() -> Result<()> {
|
||||
|
||||
let trap = linker
|
||||
.instantiate(&mut store, &component)?
|
||||
.get_typed_func::<(), ()>(&mut store, "unaligned-retptr")?
|
||||
.get_typed_func::<(), ()>(&mut store, "unaligned-retptr2")?
|
||||
.call(&mut store, ())
|
||||
.unwrap_err();
|
||||
assert!(
|
||||
@@ -733,7 +733,7 @@ fn bad_import_alignment() -> Result<()> {
|
||||
);
|
||||
let trap = linker
|
||||
.instantiate(&mut store, &component)?
|
||||
.get_typed_func::<(), ()>(&mut store, "unaligned-argptr")?
|
||||
.get_typed_func::<(), ()>(&mut store, "unaligned-argptr2")?
|
||||
.call(&mut store, ())
|
||||
.unwrap_err();
|
||||
assert!(
|
||||
|
||||
@@ -114,7 +114,7 @@ fn test_roundtrip(engine: &Engine, src: &str, dst: &str) -> Result<()> {
|
||||
(with "libc" (instance $libc))
|
||||
(with "" (instance (export "echo" (func $echo))))
|
||||
))
|
||||
(func (export "echo") (param "a" string) (result string)
|
||||
(func (export "echo2") (param "a" string) (result string)
|
||||
(canon lift
|
||||
(core func $echo "echo")
|
||||
(memory $libc "memory")
|
||||
@@ -163,8 +163,8 @@ fn test_roundtrip(engine: &Engine, src: &str, dst: &str) -> Result<()> {
|
||||
{dst}
|
||||
|
||||
(instance $dst (instantiate $dst (with "echo" (func $host))))
|
||||
(instance $src (instantiate $src (with "echo" (func $dst "echo"))))
|
||||
(export "echo" (func $src "echo"))
|
||||
(instance $src (instantiate $src (with "echo" (func $dst "echo2"))))
|
||||
(export "echo" (func $src "echo2"))
|
||||
)
|
||||
"#
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user