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"))
|
||||
)
|
||||
"#
|
||||
);
|
||||
|
||||
@@ -244,17 +244,17 @@
|
||||
(export "" (func $import))
|
||||
))
|
||||
))
|
||||
(func $export (export "thunk") (result u32)
|
||||
(func $export (export "thunk2") (result u32)
|
||||
(canon lift (core func $reexport "thunk"))
|
||||
)
|
||||
)
|
||||
|
||||
(instance $c1 (instantiate $c (with "thunk" (func $root))))
|
||||
(instance $c2 (instantiate $c (with "thunk" (func $c1 "thunk"))))
|
||||
(instance $c3 (instantiate $c (with "thunk" (func $c2 "thunk"))))
|
||||
(instance $c4 (instantiate $c (with "thunk" (func $c3 "thunk"))))
|
||||
(instance $c5 (instantiate $c (with "thunk" (func $c4 "thunk"))))
|
||||
(instance $c6 (instantiate $c (with "thunk" (func $c5 "thunk"))))
|
||||
(instance $c2 (instantiate $c (with "thunk" (func $c1 "thunk2"))))
|
||||
(instance $c3 (instantiate $c (with "thunk" (func $c2 "thunk2"))))
|
||||
(instance $c4 (instantiate $c (with "thunk" (func $c3 "thunk2"))))
|
||||
(instance $c5 (instantiate $c (with "thunk" (func $c4 "thunk2"))))
|
||||
(instance $c6 (instantiate $c (with "thunk" (func $c5 "thunk2"))))
|
||||
|
||||
(component $verify
|
||||
(import "thunk" (func $thunk (result u32)))
|
||||
@@ -276,7 +276,7 @@
|
||||
))
|
||||
))
|
||||
)
|
||||
(instance (instantiate $verify (with "thunk" (func $c6 "thunk"))))
|
||||
(instance (instantiate $verify (with "thunk" (func $c6 "thunk2"))))
|
||||
)
|
||||
|
||||
;; Fancy case of an adapter using an adapter. Note that this is silly and
|
||||
|
||||
@@ -267,7 +267,7 @@
|
||||
(export "a" (global i32))
|
||||
))
|
||||
|
||||
(component (export "c")
|
||||
(component (export "c2")
|
||||
(export "m" (core module $c))
|
||||
)
|
||||
)
|
||||
@@ -278,8 +278,8 @@
|
||||
(instance $c1 (instantiate $c (with "c" (core module $m1))))
|
||||
(instance $c2 (instantiate $c (with "c" (core module $m2))))
|
||||
|
||||
(instance $m1_container (instantiate (component $c1 "c")))
|
||||
(instance $m2_container (instantiate (component $c2 "c")))
|
||||
(instance $m1_container (instantiate (component $c1 "c2")))
|
||||
(instance $m2_container (instantiate (component $c2 "c2")))
|
||||
|
||||
(core instance $core1 (instantiate (module $m1_container "m")))
|
||||
(core instance $core2 (instantiate (module $m2_container "m")))
|
||||
|
||||
Reference in New Issue
Block a user