Skip to content

A lightweight WebAssembly runtime that is fast, secure, and standards-compliant

Update wast syntax in tests for spec changes (#13952)

Alex Crichtonce96646f84c2
diff --git a/benches/compile_time_builtins.rs b/benches/compile_time_builtins.rs
index 4c4ff1b51b..867bd703dd 100644
--- a/benches/compile_time_builtins.rs
+++ b/benches/compile_time_builtins.rs
@@ -433,8 +433,8 @@ mod inc_list {
(core instance $i (instantiate $m))
(func (export "inc-list") (param "xs" (list u8)) (result (list u8))
(canon lift (core func $i "inc-list")
- (memory $i "memory")
- (realloc (func $i "realloc")))
+ (memory (core memory $i "memory"))
+ (realloc (core func $i "realloc")))
)
)
"#;
@@ -658,8 +658,8 @@ mod inc_random {
(core instance $i (instantiate $m))
(func (export "inc-random") (param "i" u32) (param "xs" (list u8)) (result (list u8))
(canon lift (core func $i "inc-random")
- (memory $i "memory")
- (realloc (func $i "realloc")))
+ (memory (core memory $i "memory"))
+ (realloc (core func $i "realloc")))
)
)
"#;
diff --git a/crates/c-api/tests/component/values.cc b/crates/c-api/tests/component/values.cc
index be9a562f12..3b5c68fd00 100644
--- a/crates/c-api/tests/component/values.cc
+++ b/crates/c-api/tests/component/values.cc
@@ -30,7 +30,7 @@ static std::string echo_component(std::string_view type, std::string_view func,
{}
)
(core instance $libc (instantiate $libc))
- (core func $do_lower (canon lower (func $do) (memory $libc "memory") (realloc (func $libc "realloc"))))
+ (core func $do_lower (canon lower (func $do) (memory (core memory $libc "memory")) (realloc (core func $libc "realloc"))))
(core module $doer
(import "host" "do" (func $do {}))
@@ -50,8 +50,8 @@ static std::string echo_component(std::string_view type, std::string_view func,
(result $Foo)
(canon lift
(core func $doer "call")
- (memory $libc "memory")
- (realloc (func $libc "realloc")))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc")))
)
(export "call" (func $call))
@@ -946,7 +946,7 @@ TEST(component, value_guest_resource) {
(func (export "last-dtor-rep") (result i32) global.get $g)
)
(core instance $a (instantiate $a))
- (type $r' (resource (rep i32) (dtor (func $a "dtor"))))
+ (type $r' (resource (rep i32) (dtor (core func $a "dtor"))))
(export $r "r" (type $r'))
(core func $new (canon resource.new $r))
diff --git a/crates/test-util/src/component_fuzz.rs b/crates/test-util/src/component_fuzz.rs
index 9daf8d6b48..44cd68b2f6 100644
--- a/crates/test-util/src/component_fuzz.rs
+++ b/crates/test-util/src/component_fuzz.rs
@@ -1532,7 +1532,7 @@ impl Declarations {
let lift_async_option = match lift_abi {
LiftAbi::Sync => "",
LiftAbi::AsyncStackful => "async",
- LiftAbi::AsyncCallback => "async (callback (func $i \"callback\"))",
+ LiftAbi::AsyncCallback => "async (callback (core func $i \"callback\"))",
};
let mut intrinsic_defs = String::new();
@@ -1544,7 +1544,7 @@ impl Declarations {
intrinsic_defs.push_str(&format!(
r#"
(core func $task.return (canon task.return {results}
- (memory $libc "memory") string-encoding={encoding}))
+ (memory (core memory $libc "memory")) string-encoding={encoding}))
"#,
));
intrinsic_imports.push_str(
@@ -1567,8 +1567,8 @@ impl Declarations {
(core func $f_lower (canon lower
(func $f)
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
string-encoding={encoding}
{lower_async_option}
))
@@ -1591,8 +1591,8 @@ impl Declarations {
(func (export "{EXPORT_FUNCTION}") (type $export_sig)
(canon lift
(core func $i "{EXPORT_FUNCTION}")
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
string-encoding={encoding}
{lift_async_option}
)
diff --git a/tests/all/component_model.rs b/tests/all/component_model.rs
index 140662054b..43b6a9b194 100644
--- a/tests/all/component_model.rs
+++ b/tests/all/component_model.rs
@@ -284,8 +284,8 @@ fn make_echo_component_with_params(type_definition: &str, params: &[Param]) -> S
(func (export "echo") (param "a" $Foo) (result $Foo)
(canon lift
(core func $i "echo")
- (memory $i "memory")
- (realloc (func $i "realloc"))
+ (memory (core memory $i "memory"))
+ (realloc (core func $i "realloc"))
)
)
)"#
diff --git a/tests/all/component_model/async.rs b/tests/all/component_model/async.rs
index 62981f5f51..d7c712e85b 100644
--- a/tests/all/component_model/async.rs
+++ b/tests/all/component_model/async.rs
@@ -120,8 +120,8 @@ async fn resume_separate_thread() -> Result<()> {
(core func $yield
(canon lower
(func $yield)
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
)
)
@@ -195,8 +195,8 @@ async fn poll_through_wasm_activation() -> Result<()> {
(core instance $i (instantiate $m))
(func (export "run") (param "x" (list u8))
(canon lift (core func $i "run")
- (memory $i "memory")
- (realloc (func $i "realloc"))))
+ (memory (core memory $i "memory"))
+ (realloc (core func $i "realloc"))))
)
"#
);
@@ -355,7 +355,7 @@ async fn cancel_host_future() -> Result<()> {
)
(type $f (future u32))
- (core func $future.read (canon future.read $f async (memory $libc "memory")))
+ (core func $future.read (canon future.read $f async (memory (core memory $libc "memory"))))
(core func $future.cancel-read (canon future.cancel-read $f))
(core instance $i (instantiate $m
@@ -368,7 +368,7 @@ async fn cancel_host_future() -> Result<()> {
(func (export "run") async (param "f" $f)
(canon lift
(core func $i "run")
- (memory $libc "memory")
+ (memory (core memory $libc "memory"))
)
)
)
@@ -757,12 +757,12 @@ async fn stream_cancel_read_async_does_not_corrupt_state() -> Result<()> {
)
(type $s (stream u8))
- (core func $stream.read (canon stream.read $s async (memory $libc "memory")))
+ (core func $stream.read (canon stream.read $s async (memory (core memory $libc "memory"))))
(core func $stream.cancel-read (canon stream.cancel-read $s async))
(core func $stream.drop-readable (canon stream.drop-readable $s))
(canon waitable.join (core func $waitable.join))
(canon waitable-set.new (core func $waitable-set.new))
- (canon waitable-set.wait (memory $libc "memory") (core func $waitable-set.wait))
+ (canon waitable-set.wait (memory (core memory $libc "memory")) (core func $waitable-set.wait))
(canon waitable-set.drop (core func $waitable-set.drop))
(core instance $i (instantiate $m
@@ -780,7 +780,7 @@ async fn stream_cancel_read_async_does_not_corrupt_state() -> Result<()> {
(func (export "run") async (param "s" (stream u8))
(canon lift
(core func $i "run")
- (memory $libc "memory")
+ (memory (core memory $libc "memory"))
)
)
)
@@ -874,7 +874,7 @@ async fn concurrent_sync_calls_to_async_host() -> Result<()> {
(core type $start-func-ty (func (param i32)))
(alias core export $libc "__indirect_function_table" (core table $indirect-function-table))
(core func $thread-new-indirect
- (canon thread.new-indirect $start-func-ty (table $indirect-function-table)))
+ (canon thread.new-indirect $start-func-ty (core table $indirect-function-table)))
(core func $thread-resume-later (canon thread.resume-later))
(core func $await-three-calls (canon lower (func $await-three-calls) ))
@@ -936,7 +936,7 @@ async fn bytes_stream_producer() -> Result<()> {
)
)
(type $s (stream u8))
- (core func $stream.read (canon stream.read $s async (memory $libc "mem")))
+ (core func $stream.read (canon stream.read $s async (memory (core memory $libc "mem"))))
(core instance $i (instantiate $m
(with "" (instance
(export "mem" (memory $libc "mem"))
diff --git a/tests/all/component_model/async_dynamic.rs b/tests/all/component_model/async_dynamic.rs
index 7021084da3..3b0b674357 100644
--- a/tests/all/component_model/async_dynamic.rs
+++ b/tests/all/component_model/async_dynamic.rs
@@ -239,7 +239,7 @@ async fn stream_any_smoke() -> Result<()> {
(core func $task.return (canon task.return))
(core func $waitable-set.new (canon waitable-set.new))
(core func $waitable.join (canon waitable.join))
- (core func $waitable-set.wait (canon waitable-set.wait (memory $libc "mem")))
+ (core func $waitable-set.wait (canon waitable-set.wait (memory (core memory $libc "mem"))))
(core func $waitable-set.drop (canon waitable-set.drop))
(core instance $i (instantiate $m
(with "" (instance
@@ -255,7 +255,7 @@ async fn stream_any_smoke() -> Result<()> {
(func (export "mk") (result (stream u8))
(canon lift (core func $i "mk")))
(func (export "run") async
- (canon lift (core func $i "run") async (callback (func $i "cb"))))
+ (canon lift (core func $i "run") async (callback (core func $i "cb"))))
)
"#,
)?;
diff --git a/tests/all/component_model/bindgen.rs b/tests/all/component_model/bindgen.rs
index cc3bae74ee..95bf96dcec 100644
--- a/tests/all/component_model/bindgen.rs
+++ b/tests/all/component_model/bindgen.rs
@@ -109,7 +109,7 @@ mod no_imports_concurrent {
))
(func $f (export "bar") async
- (canon lift (core func $i "bar") async (callback (func $i "callback")))
+ (canon lift (core func $i "bar") async (callback (core func $i "callback")))
)
(instance $i (export "foo" (func $f)))
@@ -244,7 +244,7 @@ mod one_import_concurrent {
)
(func (export "callback") (param i32 i32 i32) (result i32) unreachable)
)
- (core func $foo (canon lower (func $foo-instance "foo") async (memory $libc-instance "memory")))
+ (core func $foo (canon lower (func $foo-instance "foo") async (memory (core memory $libc-instance "memory"))))
(core func $task-return (canon task.return))
(core instance $i (instantiate $m
(with "" (instance
@@ -254,7 +254,7 @@ mod one_import_concurrent {
))
(func $f (export "bar") async
- (canon lift (core func $i "bar") async (callback (func $i "callback")))
+ (canon lift (core func $i "bar") async (callback (core func $i "callback")))
)
(instance $i (export "foo" (func $f)))
@@ -676,7 +676,7 @@ mod exported_resources {
(table (export "$imports") 1 1 funcref)
)
(core instance $indirect-dtor (instantiate $indirect-dtor))
- (type $b-x (resource (rep i32) (dtor (func $indirect-dtor "b-x-dtor"))))
+ (type $b-x (resource (rep i32) (dtor (core func $indirect-dtor "b-x-dtor"))))
(core func $b-x-drop (canon resource.drop $b-x))
(core func $b-x-rep (canon resource.rep $b-x))
(core func $b-x-new (canon resource.new $b-x))
diff --git a/tests/all/component_model/bindgen/ownership.rs b/tests/all/component_model/bindgen/ownership.rs
index e3f9f2cfd0..b3ae6870b3 100644
--- a/tests/all/component_model/bindgen/ownership.rs
+++ b/tests/all/component_model/bindgen/ownership.rs
@@ -52,8 +52,8 @@ fn component() -> String {
(func $f_foo
(param "a" (list (list string)))
(result (list (list string)))
- (canon lift (core func $i "core_foo_export") (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (canon lift (core func $i "core_foo_export") (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
)
)
@@ -61,16 +61,16 @@ fn component() -> String {
(func $f_bar
(param "a" $thing)
- (canon lift (core func $i "core_bar_export") (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (canon lift (core func $i "core_bar_export") (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
)
)
(func $f_baz
(param "a" $thing)
(result $thing)
- (canon lift (core func $i "core_baz_export") (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (canon lift (core func $i "core_baz_export") (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
)
)
diff --git a/tests/all/component_model/bindgen/results.rs b/tests/all/component_model/bindgen/results.rs
index 9252e4e005..557c5e0722 100644
--- a/tests/all/component_model/bindgen/results.rs
+++ b/tests/all/component_model/bindgen/results.rs
@@ -45,7 +45,7 @@ mod empty_error {
)
)
(core func $core_empty_error
- (canon lower (func $i "empty-error") (memory $libc "memory"))
+ (canon lower (func $i "empty-error") (memory (core memory $libc "memory")))
)
(core instance $i (instantiate $m
(with "" (instance (export "core_empty_error" (func $core_empty_error))))
@@ -55,7 +55,7 @@ mod empty_error {
(export "empty-error")
(param "a" f64)
(result (result f64))
- (canon lift (core func $i "core_empty_error_export") (memory $libc "memory"))
+ (canon lift (core func $i "core_empty_error_export") (memory (core memory $libc "memory")))
)
)
"#,
@@ -159,7 +159,7 @@ mod string_error {
)
)
(core func $core_string_error
- (canon lower (func $i "string-error") (memory $libc "memory") (realloc (func $libc "realloc")))
+ (canon lower (func $i "string-error") (memory (core memory $libc "memory")) (realloc (core func $libc "realloc")))
)
(core instance $i (instantiate $m
(with "" (instance (export "core_string_error" (func $core_string_error))))
@@ -169,7 +169,7 @@ mod string_error {
(export "string-error")
(param "a" f64)
(result (result f64 (error string)))
- (canon lift (core func $i "core_string_error_export") (memory $libc "memory"))
+ (canon lift (core func $i "core_string_error_export") (memory (core memory $libc "memory")))
)
)
"#
@@ -317,7 +317,7 @@ mod enum_error {
)
)
(core func $core_enum_error
- (canon lower (func $i "enum-error") (memory $libc "memory") (realloc (func $libc "realloc")))
+ (canon lower (func $i "enum-error") (memory (core memory $libc "memory")) (realloc (core func $libc "realloc")))
)
(core instance $i (instantiate $m
(with "" (instance (export "core_enum_error" (func $core_enum_error))))
@@ -326,7 +326,7 @@ mod enum_error {
(func $f_enum_error
(param "a" f64)
(result (result f64 (error $err')))
- (canon lift (core func $i "core_enum_error_export") (memory $libc "memory"))
+ (canon lift (core func $i "core_enum_error_export") (memory (core memory $libc "memory")))
)
(component $nested
@@ -481,7 +481,7 @@ mod record_error {
)
)
(core func $core_record_error
- (canon lower (func $i "record-error") (memory $libc "memory") (realloc (func $libc "realloc")))
+ (canon lower (func $i "record-error") (memory (core memory $libc "memory")) (realloc (core func $libc "realloc")))
)
(core instance $i (instantiate $m
(with "" (instance (export "core_record_error" (func $core_record_error))))
@@ -490,7 +490,7 @@ mod record_error {
(func $f_record_error
(param "a" f64)
(result (result f64 (error (record (field "line" u32) (field "col" u32)))))
- (canon lift (core func $i "core_record_error_export") (memory $libc "memory"))
+ (canon lift (core func $i "core_record_error_export") (memory (core memory $libc "memory")))
)
(component $nested
@@ -662,7 +662,7 @@ mod variant_error {
)
)
(core func $core_variant_error
- (canon lower (func $i "variant-error") (memory $libc "memory") (realloc (func $libc "realloc")))
+ (canon lower (func $i "variant-error") (memory (core memory $libc "memory")) (realloc (core func $libc "realloc")))
)
(core instance $i (instantiate $m
(with "" (instance (export "core_variant_error" (func $core_variant_error))))
@@ -671,7 +671,7 @@ mod variant_error {
(func $f_variant_error
(param "a" f64)
(result (result f64 (error $e3')))
- (canon lift (core func $i "core_variant_error_export") (memory $libc "memory"))
+ (canon lift (core func $i "core_variant_error_export") (memory (core memory $libc "memory")))
)
(component $nested
@@ -849,7 +849,7 @@ mod multiple_interfaces_error {
)
)
(core func $core_enum_error
- (canon lower (func $i "enum-error") (memory $libc "memory") (realloc (func $libc "realloc")))
+ (canon lower (func $i "enum-error") (memory (core memory $libc "memory")) (realloc (core func $libc "realloc")))
)
(core instance $i (instantiate $m
(with "" (instance (export "core_enum_error" (func $core_enum_error))))
@@ -858,7 +858,7 @@ mod multiple_interfaces_error {
(func $f_enum_error
(param "a" f64)
(result (result f64 (error $err')))
- (canon lift (core func $i "core_enum_error_export") (memory $libc "memory"))
+ (canon lift (core func $i "core_enum_error_export") (memory (core memory $libc "memory")))
)
(component $nested
@@ -1025,7 +1025,7 @@ mod with_remapping {
)
)
(core func $core_empty_error
- (canon lower (func $i "empty-error") (memory $libc "memory"))
+ (canon lower (func $i "empty-error") (memory (core memory $libc "memory")))
)
(core instance $i (instantiate $m
(with "" (instance (export "core_empty_error" (func $core_empty_error))))
@@ -1035,7 +1035,7 @@ mod with_remapping {
(export "empty-error")
(param "a" f64)
(result (result f64))
- (canon lift (core func $i "core_empty_error_export") (memory $libc "memory"))
+ (canon lift (core func $i "core_empty_error_export") (memory (core memory $libc "memory")))
)
)
"#,
diff --git a/tests/all/component_model/call_hook.rs b/tests/all/component_model/call_hook.rs
index b0af1322b3..fd51fa8396 100644
--- a/tests/all/component_model/call_hook.rs
+++ b/tests/all/component_model/call_hook.rs
@@ -100,8 +100,8 @@ fn call_func_with_realloc() -> Result<()> {
(func (export "list8-to-str") (param "a" (list u8)) (result string)
(canon lift
(core func $i "roundtrip")
- (memory $i "memory")
- (realloc (func $i "realloc"))
+ (memory (core memory $i "memory"))
+ (realloc (core func $i "realloc"))
)
)
)"#
@@ -150,7 +150,7 @@ fn call_func_with_post_return() -> Result<()> {
(func (export "export")
(canon lift
(core func $i "roundtrip")
- (post-return (func $i "post-return"))
+ (post-return (core func $i "post-return"))
)
)
)"#;
@@ -651,7 +651,7 @@ async fn concurrent_behavior_balanced() -> Result<()> {
(with "" (instance (export "task.return" (func $task-return))))
))
(func (export "foo") async (param "p1" u32) (result u32)
- (canon lift (core func $i "foo") async (callback (func $i "callback")))
+ (canon lift (core func $i "foo") async (callback (core func $i "callback")))
)
)
@@ -659,7 +659,7 @@ async fn concurrent_behavior_balanced() -> Result<()> {
(import "a" (func $foo async (param "p1" u32) (result u32)))
(core module $libc (memory (export "memory") 1))
(core instance $libc (instantiate $libc))
- (core func $foo (canon lower (func $foo) async (memory $libc "memory")))
+ (core func $foo (canon lower (func $foo) async (memory (core memory $libc "memory"))))
(core module $m
(import "libc" "memory" (memory 1))
(import "" "foo" (func $foo (param i32 i32) (result i32)))
diff --git a/tests/all/component_model/dynamic.rs b/tests/all/component_model/dynamic.rs
index e214410064..c4997bd6d5 100644
--- a/tests/all/component_model/dynamic.rs
+++ b/tests/all/component_model/dynamic.rs
@@ -968,8 +968,8 @@ fn introspection() -> Result<()> {
(func (export "fn") (param "x" (option $Foo)) (result (option (tuple u32 u32)))
(canon lift
(core func $i3 "f")
- (memory $i3 "memory")
- (realloc (func $i3 "realloc"))
+ (memory (core memory $i3 "memory"))
+ (realloc (core func $i3 "realloc"))
)
)
)
diff --git a/tests/all/component_model/fixed_length_list.rs b/tests/all/component_model/fixed_length_list.rs
index 4a680b9517..b5c931d4c2 100644
--- a/tests/all/component_model/fixed_length_list.rs
+++ b/tests/all/component_model/fixed_length_list.rs
@@ -222,7 +222,7 @@ fn fixed_length_list_length_mismatch_rejected() -> Result<()> {
(type $ft (func (param "x" $lst) (result u32)))
(alias core export $i "run" (core func $run))
(func (export "run") (type $ft)
- (canon lift (core func $run) (memory $i "memory")))
+ (canon lift (core func $run) (memory (core memory $i "memory"))))
)
"#;
let mut config = Config::new();
diff --git a/tests/all/component_model/func.rs b/tests/all/component_model/func.rs
index 57281f1ecc..038fc789ff 100644
--- a/tests/all/component_model/func.rs
+++ b/tests/all/component_model/func.rs
@@ -66,22 +66,22 @@ fn typecheck() -> Result<()> {
(canon lift (core func $i "thunk"))
)
(func (export "take-string") (param "a" string)
- (canon lift (core func $i "take-string") (memory $i "memory") (realloc (func $i "realloc")))
+ (canon lift (core func $i "take-string") (memory (core memory $i "memory")) (realloc (core func $i "realloc")))
)
(func (export "take-two-args") (param "a" s32) (param "b" (list u8))
- (canon lift (core func $i "two-args") (memory $i "memory") (realloc (func $i "realloc")))
+ (canon lift (core func $i "two-args") (memory (core memory $i "memory")) (realloc (core func $i "realloc")))
)
(func (export "ret-tuple") (result (tuple u8 s8))
- (canon lift (core func $i "ret-one") (memory $i "memory") (realloc (func $i "realloc")))
+ (canon lift (core func $i "ret-one") (memory (core memory $i "memory")) (realloc (core func $i "realloc")))
)
(func (export "ret-tuple1") (result (tuple u32))
- (canon lift (core func $i "ret-one") (memory $i "memory") (realloc (func $i "realloc")))
+ (canon lift (core func $i "ret-one") (memory (core memory $i "memory")) (realloc (core func $i "realloc")))
)
(func (export "ret-string") (result string)
- (canon lift (core func $i "ret-one") (memory $i "memory") (realloc (func $i "realloc")))
+ (canon lift (core func $i "ret-one") (memory (core memory $i "memory")) (realloc (core func $i "realloc")))
)
(func (export "ret-list-u8") (result (list u8))
- (canon lift (core func $i "ret-one") (memory $i "memory") (realloc (func $i "realloc")))
+ (canon lift (core func $i "ret-one") (memory (core memory $i "memory")) (realloc (core func $i "realloc")))
)
)
"#;
@@ -659,10 +659,10 @@ fn tuple_result() -> Result<()> {
(type $result (tuple s8 u16 float32 float64))
(func (export "tuple")
(param "a" s8) (param "b" u16) (param "c" float32) (param "d" float64) (result $result)
- (canon lift (core func $i "foo") (memory $i "memory"))
+ (canon lift (core func $i "foo") (memory (core memory $i "memory")))
)
(func (export "invalid") (result $result)
- (canon lift (core func $i "invalid") (memory $i "memory"))
+ (canon lift (core func $i "invalid") (memory (core memory $i "memory")))
)
)
"#;
@@ -720,31 +720,31 @@ fn strings() -> Result<()> {
(func (export "list8-to-str") (param "a" (list u8)) (result string)
(canon lift
(core func $i "roundtrip")
- (memory $i "memory")
- (realloc (func $i "realloc"))
+ (memory (core memory $i "memory"))
+ (realloc (core func $i "realloc"))
)
)
(func (export "str-to-list8") (param "a" string) (result (list u8))
(canon lift
(core func $i "roundtrip")
- (memory $i "memory")
- (realloc (func $i "realloc"))
+ (memory (core memory $i "memory"))
+ (realloc (core func $i "realloc"))
)
)
(func (export "list16-to-str") (param "a" (list u16)) (result string)
(canon lift
(core func $i "roundtrip")
string-encoding=utf16
- (memory $i "memory")
- (realloc (func $i "realloc"))
+ (memory (core memory $i "memory"))
+ (realloc (core func $i "realloc"))
)
)
(func (export "str-to-list16") (param "a" string) (result (list u16))
(canon lift
(core func $i "roundtrip")
string-encoding=utf16
- (memory $i "memory")
- (realloc (func $i "realloc"))
+ (memory (core memory $i "memory"))
+ (realloc (core func $i "realloc"))
)
)
)"#
@@ -849,7 +849,7 @@ async fn test_many_parameters(dynamic: bool, concurrent: bool) -> Result<()> {
(i32.const 0)
"#,
- r#"async (callback (func $i "callback"))"#,
+ r#"async (callback (core func $i "callback"))"#,
)
} else {
(
@@ -906,7 +906,7 @@ async fn test_many_parameters(dynamic: bool, concurrent: bool) -> Result<()> {
(type $tuple (tuple (list u8) u32))
(core func $task-return (canon task.return
(result $tuple)
- (memory $libc "memory")
+ (memory (core memory $libc "memory"))
))
(core instance $i (instantiate $m
(with "" (instance (export "task.return" (func $task-return))))
@@ -933,8 +933,8 @@ async fn test_many_parameters(dynamic: bool, concurrent: bool) -> Result<()> {
(func (export "many-param") (type $t)
(canon lift
(core func $i "foo")
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
{async_opts}
)
)
@@ -1126,7 +1126,7 @@ async fn test_many_results(dynamic: bool, concurrent: bool) -> Result<()> {
call $task-return
i32.const 0
"#,
- r#"async (callback (func $i "callback"))"#,
+ r#"async (callback (core func $i "callback"))"#,
)
} else {
("", "")
@@ -1377,7 +1377,7 @@ async fn test_many_results(dynamic: bool, concurrent: bool) -> Result<()> {
))
(core func $task-return (canon task.return
(result $tuple)
- (memory $libc "memory")
+ (memory (core memory $libc "memory"))
))
(core instance $i (instantiate $m
(with "" (instance (export "task.return" (func $task-return))))
@@ -1388,8 +1388,8 @@ async fn test_many_results(dynamic: bool, concurrent: bool) -> Result<()> {
(func (export "many-results") (type $t)
(canon lift
(core func $i "foo")
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
{async_opts}
)
)
@@ -1562,10 +1562,10 @@ fn some_traps() -> Result<()> {
(core instance $i (instantiate $m))
(func (export "take-list-unreachable") (param "a" (list u8))
- (canon lift (core func $i "take-list") (memory $i "memory") (realloc (func $i "realloc")))
+ (canon lift (core func $i "take-list") (memory (core memory $i "memory")) (realloc (core func $i "realloc")))
)
(func (export "take-string-unreachable") (param "a" string)
- (canon lift (core func $i "take-list") (memory $i "memory") (realloc (func $i "realloc")))
+ (canon lift (core func $i "take-list") (memory (core memory $i "memory")) (realloc (core func $i "realloc")))
)
(type $t (func
@@ -1581,7 +1581,7 @@ fn some_traps() -> Result<()> {
(param "s10" string)
))
(func (export "take-many-unreachable") (type $t)
- (canon lift (core func $i "take-many") (memory $i "memory") (realloc (func $i "realloc")))
+ (canon lift (core func $i "take-many") (memory (core memory $i "memory")) (realloc (core func $i "realloc")))
)
(core module $m2
@@ -1595,13 +1595,13 @@ fn some_traps() -> Result<()> {
(core instance $i2 (instantiate $m2))
(func (export "take-list-base-oob") (param "a" (list u8))
- (canon lift (core func $i2 "take-list") (memory $i2 "memory") (realloc (func $i2 "realloc")))
+ (canon lift (core func $i2 "take-list") (memory (core memory $i2 "memory")) (realloc (core func $i2 "realloc")))
)
(func (export "take-string-base-oob") (param "a" string)
- (canon lift (core func $i2 "take-list") (memory $i2 "memory") (realloc (func $i2 "realloc")))
+ (canon lift (core func $i2 "take-list") (memory (core memory $i2 "memory")) (realloc (core func $i2 "realloc")))
)
(func (export "take-many-base-oob") (type $t)
- (canon lift (core func $i2 "take-many") (memory $i2 "memory") (realloc (func $i2 "realloc")))
+ (canon lift (core func $i2 "take-many") (memory (core memory $i2 "memory")) (realloc (core func $i2 "realloc")))
)
(core module $m3
@@ -1615,13 +1615,13 @@ fn some_traps() -> Result<()> {
(core instance $i3 (instantiate $m3))
(func (export "take-list-end-oob") (param "a" (list u8))
- (canon lift (core func $i3 "take-list") (memory $i3 "memory") (realloc (func $i3 "realloc")))
+ (canon lift (core func $i3 "take-list") (memory (core memory $i3 "memory")) (realloc (core func $i3 "realloc")))
)
(func (export "take-string-end-oob") (param "a" string)
- (canon lift (core func $i3 "take-list") (memory $i3 "memory") (realloc (func $i3 "realloc")))
+ (canon lift (core func $i3 "take-list") (memory (core memory $i3 "memory")) (realloc (core func $i3 "realloc")))
)
(func (export "take-many-end-oob") (type $t)
- (canon lift (core func $i3 "take-many") (memory $i3 "memory") (realloc (func $i3 "realloc")))
+ (canon lift (core func $i3 "take-many") (memory (core memory $i3 "memory")) (realloc (core func $i3 "realloc")))
)
(core module $m4
@@ -1643,7 +1643,7 @@ fn some_traps() -> Result<()> {
(core instance $i4 (instantiate $m4))
(func (export "take-many-second-oob") (type $t)
- (canon lift (core func $i4 "take-many") (memory $i4 "memory") (realloc (func $i4 "realloc")))
+ (canon lift (core func $i4 "take-many") (memory (core memory $i4 "memory")) (realloc (core func $i4 "realloc")))
)
)"#
);
@@ -1848,8 +1848,8 @@ fn char_bool_memory() -> Result<()> {
(func (export "ret-tuple") (param "a" u32) (param "b" u32) (result (tuple bool char))
(canon lift (core func $i "ret-tuple")
- (memory $i "memory")
- (realloc (func $i "realloc")))
+ (memory (core memory $i "memory"))
+ (realloc (core func $i "realloc")))
)
)"#
);
@@ -1907,14 +1907,14 @@ fn string_list_oob() -> Result<()> {
(func (export "ret-list-u8") (result (list u8))
(canon lift (core func $i "ret-list")
- (memory $i "memory")
- (realloc (func $i "realloc"))
+ (memory (core memory $i "memory"))
+ (realloc (core func $i "realloc"))
)
)
(func (export "ret-string") (result string)
(canon lift (core func $i "ret-list")
- (memory $i "memory")
- (realloc (func $i "realloc"))
+ (memory (core memory $i "memory"))
+ (realloc (core func $i "realloc"))
)
)
)"#
@@ -2039,32 +2039,32 @@ fn option() -> Result<()> {
(core instance $i (instantiate $m))
(func (export "option-u8-to-tuple") (param "a" (option u8)) (result (tuple u32 u32))
- (canon lift (core func $i "pass1") (memory $i "memory"))
+ (canon lift (core func $i "pass1") (memory (core memory $i "memory")))
)
(func (export "option-u32-to-tuple") (param "a" (option u32)) (result (tuple u32 u32))
- (canon lift (core func $i "pass1") (memory $i "memory"))
+ (canon lift (core func $i "pass1") (memory (core memory $i "memory")))
)
(func (export "option-string-to-tuple") (param "a" (option string)) (result (tuple u32 string))
(canon lift
(core func $i "pass2")
- (memory $i "memory")
- (realloc (func $i "realloc"))
+ (memory (core memory $i "memory"))
+ (realloc (core func $i "realloc"))
)
)
(func (export "to-option-u8") (param "a" u32) (param "b" u32) (result (option u8))
- (canon lift (core func $i "pass1") (memory $i "memory"))
+ (canon lift (core func $i "pass1") (memory (core memory $i "memory")))
)
(func (export "to-option-u32") (param "a" u32) (param "b" u32) (result (option u32))
(canon lift
(core func $i "pass1")
- (memory $i "memory")
+ (memory (core memory $i "memory"))
)
)
(func (export "to-option-string") (param "a" u32) (param "b" string) (result (option string))
(canon lift
(core func $i "pass2")
- (memory $i "memory")
- (realloc (func $i "realloc"))
+ (memory (core memory $i "memory"))
+ (realloc (core func $i "realloc"))
)
)
)"#
@@ -2198,14 +2198,14 @@ fn expected() -> Result<()> {
(canon lift (core func $i "pass0"))
)
(func (export "take-expected-u8-f32") (param "a" (result u8 (error float32))) (result (tuple u32 u32))
- (canon lift (core func $i "pass1") (memory $i "memory"))
+ (canon lift (core func $i "pass1") (memory (core memory $i "memory")))
)
(type $list (list u8))
(func (export "take-expected-string") (param "a" (result string (error $list))) (result (tuple u32 string))
(canon lift
(core func $i "pass2")
- (memory $i "memory")
- (realloc (func $i "realloc"))
+ (memory (core memory $i "memory"))
+ (realloc (core func $i "realloc"))
)
)
(func (export "to-expected-unit") (param "a" u32) (result (result))
@@ -2214,8 +2214,8 @@ fn expected() -> Result<()> {
(func (export "to-expected-s16-f32") (param "a" u32) (param "b" u32) (result (result s16 (error float32)))
(canon lift
(core func $i "pass1")
- (memory $i "memory")
- (realloc (func $i "realloc"))
+ (memory (core memory $i "memory"))
+ (realloc (core func $i "realloc"))
)
)
)"#
@@ -2322,8 +2322,8 @@ fn fancy_list() -> Result<()> {
(result (tuple u32 u32 (list u8)))
(canon lift
(core func $i "take")
- (memory $i "memory")
- (realloc (func $i "realloc"))
+ (memory (core memory $i "memory"))
+ (realloc (core func $i "realloc"))
)
)
)"#
@@ -2426,22 +2426,22 @@ fn invalid_alignment() -> Result<()> {
(param "s9" string) (param "s10" string) (param "s11" string) (param "s12" string)
(canon lift
(core func $i "take-i32")
- (memory $i "memory")
- (realloc (func $i "realloc"))
+ (memory (core memory $i "memory"))
+ (realloc (core func $i "realloc"))
)
)
(func (export "string-ret") (result string)
(canon lift
(core func $i "ret-1")
- (memory $i "memory")
- (realloc (func $i "realloc"))
+ (memory (core memory $i "memory"))
+ (realloc (core func $i "realloc"))
)
)
(func (export "list-u32-ret") (result (list u32))
(canon lift
(core func $i "ret-unaligned-list")
- (memory $i "memory")
- (realloc (func $i "realloc"))
+ (memory (core memory $i "memory"))
+ (realloc (core func $i "realloc"))
)
)
)"#
@@ -2587,28 +2587,28 @@ fn raw_slice_of_various_types() -> Result<()> {
)
(core instance $i (instantiate $m))
(func (export "list-u8") (result (list u8))
- (canon lift (core func $i "list8") (memory $i "memory"))
+ (canon lift (core func $i "list8") (memory (core memory $i "memory")))
)
(func (export "list-i8") (result (list s8))
- (canon lift (core func $i "list8") (memory $i "memory"))
+ (canon lift (core func $i "list8") (memory (core memory $i "memory")))
)
(func (export "list-u16") (result (list u16))
- (canon lift (core func $i "list16") (memory $i "memory"))
+ (canon lift (core func $i "list16") (memory (core memory $i "memory")))
)
(func (export "list-i16") (result (list s16))
- (canon lift (core func $i "list16") (memory $i "memory"))
+ (canon lift (core func $i "list16") (memory (core memory $i "memory")))
)
(func (export "list-u32") (result (list u32))
- (canon lift (core func $i "list32") (memory $i "memory"))
+ (canon lift (core func $i "list32") (memory (core memory $i "memory")))
)
(func (export "list-i32") (result (list s32))
- (canon lift (core func $i "list32") (memory $i "memory"))
+ (canon lift (core func $i "list32") (memory (core memory $i "memory")))
)
(func (export "list-u64") (result (list u64))
- (canon lift (core func $i "list64") (memory $i "memory"))
+ (canon lift (core func $i "list64") (memory (core memory $i "memory")))
)
(func (export "list-i64") (result (list s64))
- (canon lift (core func $i "list64") (memory $i "memory"))
+ (canon lift (core func $i "list64") (memory (core memory $i "memory")))
)
)
"#;
@@ -2770,12 +2770,12 @@ fn lower_then_lift() -> Result<()> {
(core instance $libc (instantiate $libc))
(core func $f_lower
- (canon lower (func $f) (memory $libc "memory"))
+ (canon lower (func $f) (memory (core memory $libc "memory")))
)
(func $f2 (param "a" string)
(canon lift (core func $f_lower)
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
)
)
(export "f" (func $f2))
@@ -2810,12 +2810,12 @@ fn lower_then_lift() -> Result<()> {
(core instance $libc (instantiate $libc))
(core func $f_lower
- (canon lower (func $f) (memory $libc "memory"))
+ (canon lower (func $f) (memory (core memory $libc "memory")))
)
(func $f2 (param "a" string) (result string)
(canon lift (core func $f_lower)
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
)
)
(export "f" (func $f2))
@@ -2864,7 +2864,7 @@ fn errors_that_poison_instance() -> Result<()> {
)
(core instance $m2 (instantiate $m2))
(func (export "f3") (param "a" string)
- (canon lift (core func $m2 "f") (realloc (func $m2 "r")) (memory $m2 "m"))
+ (canon lift (core func $m2 "f") (realloc (core func $m2 "r")) (memory (core memory $m2 "m")))
)
(core module $m3
@@ -2873,7 +2873,7 @@ fn errors_that_poison_instance() -> Result<()> {
)
(core instance $m3 (instantiate $m3))
(func (export "f4") (result string)
- (canon lift (core func $m3 "f") (memory $m3 "m"))
+ (canon lift (core func $m3 "f") (memory (core memory $m3 "m")))
)
)
"#
@@ -3178,7 +3178,7 @@ async fn thread_index_via_resource_drop(style: ApiStyle) -> Result<()> {
(core instance $m (instantiate $m (with "" (instance
(export "thread.index" (func $thread-index))
))))
- (type $r (resource (rep i32) (dtor (func $m "dtor"))))
+ (type $r (resource (rep i32) (dtor (core func $m "dtor"))))
(core func $new (canon resource.new $r))
(core module $m2
(import "" "new" (func $new (param i32) (result i32)))
@@ -3450,8 +3450,8 @@ fn map_trampoline_alignment() -> Result<()> {
)
(core instance $libc (instantiate $libc))
(core func $echo_lower (canon lower (func $echo)
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
))
(core instance $echo_inst (instantiate $echo_mod
(with "libc" (instance $libc))
@@ -3460,8 +3460,8 @@ fn map_trampoline_alignment() -> Result<()> {
(func (export "echo2") (param "m" (map u8 u64)) (result (map u8 u64))
(canon lift
(core func $echo_inst "echo")
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
)
)
)
@@ -3488,8 +3488,8 @@ fn map_trampoline_alignment() -> Result<()> {
)
(core instance $libc (instantiate $libc))
(core func $echo_lower (canon lower (func $echo)
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
))
(core instance $echo_inst (instantiate $echo_mod
(with "libc" (instance $libc))
@@ -3498,8 +3498,8 @@ fn map_trampoline_alignment() -> Result<()> {
(func (export "echo2") (param "m" (map u8 u64)) (result (map u8 u64))
(canon lift
(core func $echo_inst "echo")
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
)
)
)
@@ -3586,8 +3586,8 @@ fn map_trampoline_alignment_u32_u64() -> Result<()> {
)
(core instance $libc (instantiate $libc))
(core func $echo_lower (canon lower (func $echo)
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
))
(core instance $echo_inst (instantiate $echo_mod
(with "libc" (instance $libc))
@@ -3596,8 +3596,8 @@ fn map_trampoline_alignment_u32_u64() -> Result<()> {
(func (export "echo2") (param "m" (map u32 u64)) (result (map u32 u64))
(canon lift
(core func $echo_inst "echo")
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
)
)
)
@@ -3623,8 +3623,8 @@ fn map_trampoline_alignment_u32_u64() -> Result<()> {
)
(core instance $libc (instantiate $libc))
(core func $echo_lower (canon lower (func $echo)
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
))
(core instance $echo_inst (instantiate $echo_mod
(with "libc" (instance $libc))
@@ -3633,8 +3633,8 @@ fn map_trampoline_alignment_u32_u64() -> Result<()> {
(func (export "echo2") (param "m" (map u32 u64)) (result (map u32 u64))
(canon lift
(core func $echo_inst "echo")
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
)
)
)
@@ -3717,8 +3717,8 @@ fn map_trampoline_alignment_u8_u32() -> Result<()> {
)
(core instance $libc (instantiate $libc))
(core func $echo_lower (canon lower (func $echo)
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
))
(core instance $echo_inst (instantiate $echo_mod
(with "libc" (instance $libc))
@@ -3727,8 +3727,8 @@ fn map_trampoline_alignment_u8_u32() -> Result<()> {
(func (export "echo2") (param "m" (map u8 u32)) (result (map u8 u32))
(canon lift
(core func $echo_inst "echo")
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
)
)
)
@@ -3754,8 +3754,8 @@ fn map_trampoline_alignment_u8_u32() -> Result<()> {
)
(core instance $libc (instantiate $libc))
(core func $echo_lower (canon lower (func $echo)
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
))
(core instance $echo_inst (instantiate $echo_mod
(with "libc" (instance $libc))
@@ -3764,8 +3764,8 @@ fn map_trampoline_alignment_u8_u32() -> Result<()> {
(func (export "echo2") (param "m" (map u8 u32)) (result (map u8 u32))
(canon lift
(core func $echo_inst "echo")
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
)
)
)
@@ -3848,8 +3848,8 @@ fn map_trampoline_alignment_u16_u64() -> Result<()> {
)
(core instance $libc (instantiate $libc))
(core func $echo_lower (canon lower (func $echo)
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
))
(core instance $echo_inst (instantiate $echo_mod
(with "libc" (instance $libc))
@@ -3858,8 +3858,8 @@ fn map_trampoline_alignment_u16_u64() -> Result<()> {
(func (export "echo2") (param "m" (map u16 u64)) (result (map u16 u64))
(canon lift
(core func $echo_inst "echo")
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
)
)
)
@@ -3885,8 +3885,8 @@ fn map_trampoline_alignment_u16_u64() -> Result<()> {
)
(core instance $libc (instantiate $libc))
(core func $echo_lower (canon lower (func $echo)
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
))
(core instance $echo_inst (instantiate $echo_mod
(with "libc" (instance $libc))
@@ -3895,8 +3895,8 @@ fn map_trampoline_alignment_u16_u64() -> Result<()> {
(func (export "echo2") (param "m" (map u16 u64)) (result (map u16 u64))
(canon lift
(core func $echo_inst "echo")
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
)
)
)
@@ -3979,8 +3979,8 @@ fn map_trampoline_alignment_u8_u16() -> Result<()> {
)
(core instance $libc (instantiate $libc))
(core func $echo_lower (canon lower (func $echo)
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
))
(core instance $echo_inst (instantiate $echo_mod
(with "libc" (instance $libc))
@@ -3989,8 +3989,8 @@ fn map_trampoline_alignment_u8_u16() -> Result<()> {
(func (export "echo2") (param "m" (map u8 u16)) (result (map u8 u16))
(canon lift
(core func $echo_inst "echo")
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
)
)
)
@@ -4016,8 +4016,8 @@ fn map_trampoline_alignment_u8_u16() -> Result<()> {
)
(core instance $libc (instantiate $libc))
(core func $echo_lower (canon lower (func $echo)
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
))
(core instance $echo_inst (instantiate $echo_mod
(with "libc" (instance $libc))
@@ -4026,8 +4026,8 @@ fn map_trampoline_alignment_u8_u16() -> Result<()> {
(func (export "echo2") (param "m" (map u8 u16)) (result (map u8 u16))
(canon lift
(core func $echo_inst "echo")
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
)
)
)
@@ -4110,8 +4110,8 @@ fn map_trampoline_alignment_u64_u8() -> Result<()> {
)
(core instance $libc (instantiate $libc))
(core func $echo_lower (canon lower (func $echo)
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
))
(core instance $echo_inst (instantiate $echo_mod
(with "libc" (instance $libc))
@@ -4120,8 +4120,8 @@ fn map_trampoline_alignment_u64_u8() -> Result<()> {
(func (export "echo2") (param "m" (map u64 u8)) (result (map u64 u8))
(canon lift
(core func $echo_inst "echo")
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
)
)
)
@@ -4147,8 +4147,8 @@ fn map_trampoline_alignment_u64_u8() -> Result<()> {
)
(core instance $libc (instantiate $libc))
(core func $echo_lower (canon lower (func $echo)
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
))
(core instance $echo_inst (instantiate $echo_mod
(with "libc" (instance $libc))
@@ -4157,8 +4157,8 @@ fn map_trampoline_alignment_u64_u8() -> Result<()> {
(func (export "echo2") (param "m" (map u64 u8)) (result (map u64 u8))
(canon lift
(core func $echo_inst "echo")
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
)
)
)
diff --git a/tests/all/component_model/import.rs b/tests/all/component_model/import.rs
index 00e81e4744..f89f10837f 100644
--- a/tests/all/component_model/import.rs
+++ b/tests/all/component_model/import.rs
@@ -30,7 +30,7 @@ fn can_compile() -> Result<()> {
r#"(component
(import "a" (func $f (param "a" string)))
{libc}
- (core func (canon lower (func $f) (memory $libc "memory") (realloc (func $libc "realloc"))))
+ (core func (canon lower (func $f) (memory (core memory $libc "memory")) (realloc (core func $libc "realloc"))))
)"#
),
)?;
@@ -40,14 +40,14 @@ fn can_compile() -> Result<()> {
r#"(component
(import "f1" (func $f1 (param "a" string) (result string)))
{libc}
- (core func (canon lower (func $f1) (memory $libc "memory") (realloc (func $libc "realloc"))))
+ (core func (canon lower (func $f1) (memory (core memory $libc "memory")) (realloc (core func $libc "realloc"))))
(import "f2" (func $f2 (param "a" u32) (result (list u8))))
(core instance $libc2 (instantiate $libc))
- (core func (canon lower (func $f2) (memory $libc2 "memory") (realloc (func $libc2 "realloc"))))
+ (core func (canon lower (func $f2) (memory (core memory $libc2 "memory")) (realloc (core func $libc2 "realloc"))))
- (core func (canon lower (func $f1) (memory $libc2 "memory") (realloc (func $libc2 "realloc"))))
- (core func (canon lower (func $f2) (memory $libc "memory") (realloc (func $libc "realloc"))))
+ (core func (canon lower (func $f1) (memory (core memory $libc2 "memory")) (realloc (core func $libc2 "realloc"))))
+ (core func (canon lower (func $f2) (memory (core memory $libc "memory")) (realloc (core func $libc "realloc"))))
)"#
),
)?;
@@ -57,7 +57,7 @@ fn can_compile() -> Result<()> {
r#"(component
(import "log" (func $log (param "a" string)))
{libc}
- (core func $log_lower (canon lower (func $log) (memory $libc "memory") (realloc (func $libc "realloc"))))
+ (core func $log_lower (canon lower (func $log) (memory (core memory $libc "memory")) (realloc (core func $libc "realloc"))))
(core module $logger
(import "host" "log" (func $log (param i32 i32)))
@@ -96,7 +96,7 @@ fn simple() -> Result<()> {
)
(core instance $libc (instantiate $libc))
(core func $log_lower
- (canon lower (func $log) (memory $libc "memory") (realloc (func $libc "realloc")))
+ (canon lower (func $log) (memory (core memory $libc "memory")) (realloc (core func $libc "realloc")))
)
(core module $m
(import "libc" "memory" (memory 1))
@@ -186,7 +186,7 @@ fn functions_in_instances() -> Result<()> {
)
(core instance $libc (instantiate $libc))
(core func $log_lower
- (canon lower (func $log) (memory $libc "memory") (realloc (func $libc "realloc")))
+ (canon lower (func $log) (memory (core memory $libc "memory")) (realloc (core func $libc "realloc")))
)
(core module $m
(import "libc" "memory" (memory 1))
@@ -313,11 +313,11 @@ fn attempt_to_leave_during_malloc() -> Result<()> {
)
(core func $thunk_lower
- (canon lower (func $thunk) (memory $m "memory") (realloc (func $m "realloc")))
+ (canon lower (func $thunk) (memory (core memory $m "memory")) (realloc (core func $m "realloc")))
)
(core func $ret_string_lower
- (canon lower (func $ret_string) (memory $m "memory") (realloc (func $m "realloc")))
+ (canon lower (func $ret_string) (memory (core memory $m "memory")) (realloc (core func $m "realloc")))
)
(core instance (instantiate $host_shim_filler_inner
@@ -332,7 +332,7 @@ fn attempt_to_leave_during_malloc() -> Result<()> {
(canon lift (core func $m "run"))
)
(func (export "take-string") (param "a" string)
- (canon lift (core func $m "take-string") (memory $m "memory") (realloc (func $m "realloc")))
+ (canon lift (core func $m "take-string") (memory (core memory $m "memory")) (realloc (core func $m "realloc")))
)
)
"#;
@@ -556,7 +556,7 @@ async fn test_stack_and_heap_args_and_rets(concurrent: bool) -> Result<()> {
)
"#,
"async",
- r#"async (callback (func $m "callback"))"#,
+ r#"async (callback (core func $m "callback"))"#,
"async",
)
} else {
@@ -626,23 +626,23 @@ async fn test_stack_and_heap_args_and_rets(concurrent: bool) -> Result<()> {
(core instance $libc (instantiate (module $libc)))
(core func $f1_lower (canon lower (func $f1)
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
{async_lower_opts}
))
(core func $f2_lower (canon lower (func $f2)
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
{async_lower_opts}
))
(core func $f3_lower (canon lower (func $f3)
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
{async_lower_opts}
))
(core func $f4_lower (canon lower (func $f4)
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
{async_lower_opts}
))
@@ -999,10 +999,10 @@ fn bad_import_alignment() -> Result<()> {
(core instance $libc_panic (instantiate $libc_panic))
(core func $unaligned_retptr_lower
- (canon lower (func $unaligned_retptr) (memory $libc_panic "memory") (realloc (func $libc_panic "realloc")))
+ (canon lower (func $unaligned_retptr) (memory (core memory $libc_panic "memory")) (realloc (core func $libc_panic "realloc")))
)
(core func $unaligned_argptr_lower
- (canon lower (func $unaligned_argptr) (memory $libc_panic "memory") (realloc (func $libc_panic "realloc")))
+ (canon lower (func $unaligned_argptr) (memory (core memory $libc_panic "memory")) (realloc (core func $libc_panic "realloc")))
)
(core module $m
@@ -1202,7 +1202,7 @@ fn use_types_across_component_boundaries() -> Result<()> {
(type $func-type (func (param "my-record" $my-record)))
(alias core export $instance "my-func" (core func $my-func))
(alias core export $instance "memory" (core memory $memory))
- (func $my-func (type $func-type) (canon lift (core func $my-func) (memory $memory) string-encoding=utf8 (realloc (func $instance "realloc"))))
+ (func $my-func (type $func-type) (canon lift (core func $my-func) (memory $memory) string-encoding=utf8 (realloc (core func $instance "realloc"))))
(export $export "my-func" (func $my-func))
)"#
),
@@ -1239,7 +1239,7 @@ fn hostcall_fuel_limits_val() -> Result<()> {
call $hi)
)
(core instance $libc (instantiate $libc))
- (core func $hi (canon lower (func $hi) (memory $libc "memory")))
+ (core func $hi (canon lower (func $hi) (memory (core memory $libc "memory"))))
(core instance $i (instantiate $m
(with "libc" (instance $libc))
(with "" (instance (export "hi" (func $hi))))
diff --git a/tests/all/component_model/nested.rs b/tests/all/component_model/nested.rs
index 67f24f1a67..9e4b84f9f1 100644
--- a/tests/all/component_model/nested.rs
+++ b/tests/all/component_model/nested.rs
@@ -76,8 +76,8 @@ fn thread_options_through_inner() -> Result<()> {
(core func $host_lower
(canon lower
(func $host)
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
)
)
@@ -100,7 +100,7 @@ fn thread_options_through_inner() -> Result<()> {
(func (export "run") (param "a" u32) (result string)
(canon lift
(core func $m "run")
- (memory $m "memory")
+ (memory (core memory $m "memory"))
)
)
)
diff --git a/tests/all/component_model/post_return.rs b/tests/all/component_model/post_return.rs
index 39ba3111b4..49f896e647 100644
--- a/tests/all/component_model/post_return.rs
+++ b/tests/all/component_model/post_return.rs
@@ -55,7 +55,7 @@ async fn invoke_post_return(style: ApiStyle, typed: bool) -> Result<()> {
(func (export "thunk")
(canon lift
(core func $i "thunk")
- (post-return (func $i "post-return"))
+ (post-return (core func $i "post-return"))
)
)
)
@@ -125,16 +125,16 @@ fn post_return_all_types() -> Result<()> {
)
(core instance $i (instantiate $m))
(func (export "i32") (result u32)
- (canon lift (core func $i "i32") (post-return (func $i "post-i32")))
+ (canon lift (core func $i "i32") (post-return (core func $i "post-i32")))
)
(func (export "i64") (result u64)
- (canon lift (core func $i "i64") (post-return (func $i "post-i64")))
+ (canon lift (core func $i "i64") (post-return (core func $i "post-i64")))
)
(func (export "f32") (result float32)
- (canon lift (core func $i "f32") (post-return (func $i "post-f32")))
+ (canon lift (core func $i "f32") (post-return (core func $i "post-f32")))
)
(func (export "f64") (result float64)
- (canon lift (core func $i "f64") (post-return (func $i "post-f64")))
+ (canon lift (core func $i "f64") (post-return (core func $i "post-f64")))
)
)
"#;
@@ -183,8 +183,8 @@ fn post_return_string() -> Result<()> {
(func (export "get") (result string)
(canon lift
(core func $i "get")
- (post-return (func $i "post"))
- (memory $i "memory")
+ (post-return (core func $i "post"))
+ (memory (core memory $i "memory"))
)
)
)
@@ -213,7 +213,7 @@ fn trap_in_post_return_poisons_instance() -> Result<()> {
(func (export "f")
(canon lift
(core func $i "f")
- (post-return (func $i "post"))
+ (post-return (core func $i "post"))
)
)
)
diff --git a/tests/all/component_model/resources.rs b/tests/all/component_model/resources.rs
index 6f1fed7895..81d877ae74 100644
--- a/tests/all/component_model/resources.rs
+++ b/tests/all/component_model/resources.rs
@@ -437,7 +437,7 @@ fn manually_destroy() -> Result<()> {
(func (export "pass") (param i32) (result i32) local.get 0)
)
(core instance $i (instantiate $m))
- (type $t2' (resource (rep i32) (dtor (func $i "dtor"))))
+ (type $t2' (resource (rep i32) (dtor (core func $i "dtor"))))
(export $t2 "t2" (type $t2'))
(core func $ctor (canon resource.new $t2))
(func (export "[constructor]t2") (param "rep" u32) (result (own $t2))
@@ -699,7 +699,7 @@ fn cannot_reenter_during_import() -> Result<()> {
))
))
- (type $t2' (resource (rep i32) (dtor (func $i "dtor"))))
+ (type $t2' (resource (rep i32) (dtor (core func $i "dtor"))))
(export $t2 "t" (type $t2'))
(core func $ctor (canon resource.new $t2))
(func (export "ctor") (param "x" u32) (result (own $t2))
@@ -1737,7 +1737,7 @@ async fn drop_after_sync_lowered_async_host_function() -> Result<()> {
(func (export "call") async
(canon lift (core func $i "call")
async
- (callback (func $i "cb"))))
+ (callback (core func $i "cb"))))
)
(component $B
@@ -1779,7 +1779,7 @@ async fn drop_after_sync_lowered_async_host_function() -> Result<()> {
(func (export "call") async (param "x" (borrow $r))
(canon lift (core func $i "call")
async
- (callback (func $i "cb"))))
+ (callback (core func $i "cb"))))
)
(instance $a (instantiate $A (with "f" (func $f))))
(instance $b (instantiate $B
diff --git a/tests/all/component_model/stream_sync_dropped.rs b/tests/all/component_model/stream_sync_dropped.rs
index a4ca2843b5..67f7151a97 100644
--- a/tests/all/component_model/stream_sync_dropped.rs
+++ b/tests/all/component_model/stream_sync_dropped.rs
@@ -87,7 +87,7 @@ async fn stream_read_sync_dropped_retires_host_producer() -> Result<()> {
)
)
(type $s (stream u8))
- (core func $stream.read (canon stream.read $s async (memory $libc "mem")))
+ (core func $stream.read (canon stream.read $s async (memory (core memory $libc "mem"))))
(core instance $i (instantiate $m
(with "" (instance
(export "stream.read" (func $stream.read))
@@ -168,7 +168,7 @@ async fn stream_write_sync_dropped_retires_host_consumer() -> Result<()> {
)
(type $s (stream u8))
(core func $stream.new (canon stream.new $s))
- (core func $stream.write (canon stream.write $s async (memory $libc "mem")))
+ (core func $stream.write (canon stream.write $s async (memory (core memory $libc "mem"))))
(core instance $i (instantiate $m
(with "" (instance
(export "stream.new" (func $stream.new))
diff --git a/tests/all/component_model/strings.rs b/tests/all/component_model/strings.rs
index 173f829e7b..3710d2886f 100644
--- a/tests/all/component_model/strings.rs
+++ b/tests/all/component_model/strings.rs
@@ -108,8 +108,8 @@ fn test_roundtrip(engine: &Engine, src: &str, dst: &str) -> Result<()> {
(import "echo" (func $echo (param "a" string) (result string)))
(core instance $libc (instantiate $libc))
(core func $echo (canon lower (func $echo)
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
string-encoding={encoding}
))
(core instance $echo (instantiate $echo
@@ -119,8 +119,8 @@ fn test_roundtrip(engine: &Engine, src: &str, dst: &str) -> Result<()> {
(func (export "echo2") (param "a" string) (result string)
(canon lift
(core func $echo "echo")
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
string-encoding={encoding}
)
)
@@ -216,7 +216,7 @@ fn test_ptr_out_of_bounds(engine: &Engine, src: &str, dst: &str) -> Result<()> {
)
(core instance $m (instantiate $m))
(func (export "a") (param "a" string)
- (canon lift (core func $m "") (realloc (func $m "realloc")) (memory $m "memory")
+ (canon lift (core func $m "") (realloc (core func $m "realloc")) (memory (core memory $m "memory"))
string-encoding={dst})
)
)
@@ -227,7 +227,7 @@ fn test_ptr_out_of_bounds(engine: &Engine, src: &str, dst: &str) -> Result<()> {
(memory (export "memory") 1)
)
(core instance $libc (instantiate $libc))
- (core func $f (canon lower (func $f) string-encoding={src} (memory $libc "memory")))
+ (core func $f (canon lower (func $f) string-encoding={src} (memory (core memory $libc "memory"))))
(core module $m
(import "" "" (func $f (param i32 i32)))
@@ -284,7 +284,7 @@ fn test_ptr_overflow(engine: &Engine, src: &str, dst: &str) -> Result<()> {
)
(core instance $m (instantiate $m))
(func (export "a") (param "a" string)
- (canon lift (core func $m "") (realloc (func $m "realloc")) (memory $m "memory")
+ (canon lift (core func $m "") (realloc (core func $m "realloc")) (memory (core memory $m "memory"))
string-encoding={dst})
)
)
@@ -295,7 +295,7 @@ fn test_ptr_overflow(engine: &Engine, src: &str, dst: &str) -> Result<()> {
(memory (export "memory") 1)
)
(core instance $libc (instantiate $libc))
- (core func $f (canon lower (func $f) string-encoding={src} (memory $libc "memory")))
+ (core func $f (canon lower (func $f) string-encoding={src} (memory (core memory $libc "memory"))))
(core module $m
(import "" "" (func $f (param i32 i32)))
@@ -389,7 +389,7 @@ fn test_realloc_oob(engine: &Engine, src: &str, dst: &str) -> Result<()> {
)
(core instance $m (instantiate $m))
(func (export "a") (param "a" string)
- (canon lift (core func $m "") (realloc (func $m "realloc")) (memory $m "memory")
+ (canon lift (core func $m "") (realloc (core func $m "realloc")) (memory (core memory $m "memory"))
string-encoding={dst})
)
)
@@ -400,7 +400,7 @@ fn test_realloc_oob(engine: &Engine, src: &str, dst: &str) -> Result<()> {
(memory (export "memory") 1)
)
(core instance $libc (instantiate $libc))
- (core func $f (canon lower (func $f) string-encoding={src} (memory $libc "memory")))
+ (core func $f (canon lower (func $f) string-encoding={src} (memory (core memory $libc "memory"))))
(core module $m
(import "" "" (func $f (param i32 i32)))
@@ -535,7 +535,7 @@ fn test_raw_when_encoded(
)
(core instance $m (instantiate $m))
(func (export "a") (param "a" string)
- (canon lift (core func $m "") (realloc (func $m "realloc")) (memory $m "memory")
+ (canon lift (core func $m "") (realloc (core func $m "realloc")) (memory (core memory $m "memory"))
string-encoding={dst})
)
)
@@ -547,7 +547,7 @@ fn test_raw_when_encoded(
(func (export "realloc") (param i32 i32 i32 i32) (result i32) i32.const 0)
)
(core instance $libc (instantiate $libc))
- (core func $f (canon lower (func $f) string-encoding={src} (memory $libc "memory")))
+ (core func $f (canon lower (func $f) string-encoding={src} (memory (core memory $libc "memory"))))
(core module $m
(import "" "" (func $f (param i32 i32)))
@@ -555,8 +555,8 @@ fn test_raw_when_encoded(
)
(core instance $m (instantiate $m (with "" (instance (export "" (func $f))))))
(func (export "f") (param "a" (list u8)) (param "b" u32) (canon lift (core func $m "f")
- (memory $libc "memory")
- (realloc (func $libc "realloc"))))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))))
)
(instance $c (instantiate $c))
@@ -607,7 +607,7 @@ fn pass_string_on_component_boundary() -> Result<()> {
)
(core instance $m (instantiate $m))
(func (export "a") (param "a" string)
- (canon lift (core func $m "") (realloc (func $m "realloc")) (memory $m "memory"))
+ (canon lift (core func $m "") (realloc (core func $m "realloc")) (memory (core memory $m "memory")))
)
)
@@ -620,7 +620,7 @@ fn pass_string_on_component_boundary() -> Result<()> {
(data (memory 0) (i32.const 0) "0123456789abcdef")
)
(core instance $libc (instantiate $libc))
- (core func $f (canon lower (func $f) (memory $libc "memory")))
+ (core func $f (canon lower (func $f) (memory (core memory $libc "memory"))))
(core module $m
(import "" "" (func $f (param i32 i32)))
(func (export "f")
diff --git a/tests/all/pulley_provenance_test_async_component.wat b/tests/all/pulley_provenance_test_async_component.wat
index 8eae46e80d..a4328978c4 100644
--- a/tests/all/pulley_provenance_test_async_component.wat
+++ b/tests/all/pulley_provenance_test_async_component.wat
@@ -9,7 +9,7 @@
(core func $task_return (canon task.return))
(core func $waitable_set_new (canon waitable-set.new))
- (core func $waitable_set_wait (canon waitable-set.wait (memory $libc "memory")))
+ (core func $waitable_set_wait (canon waitable-set.wait (memory (core memory $libc "memory"))))
(core func $waitable_join (canon waitable.join))
(canon lower (func $run_stackless) async (core func $run_stackless))
@@ -92,7 +92,7 @@
(export "run-stackless" (func $run_stackless))
(export "run-stackful" (func $run_stackful))))))
- (func (export "run-stackless") async (canon lift (core func $i "run-stackless") async (callback (func $i "cb"))))
+ (func (export "run-stackless") async (canon lift (core func $i "run-stackless") async (callback (core func $i "cb"))))
(func (export "run-stackful") async (canon lift (core func $i "run-stackful") async))
)
@@ -176,13 +176,13 @@
)
(type $s (stream u8))
(core func $stream.new (canon stream.new $s))
- (core func $stream.read (canon stream.read $s async (memory $libc "mem")))
- (core func $stream.write (canon stream.write $s async (memory $libc "mem")))
+ (core func $stream.read (canon stream.read $s async (memory (core memory $libc "mem"))))
+ (core func $stream.write (canon stream.write $s async (memory (core memory $libc "mem"))))
(core func $stream.drop-readable (canon stream.drop-readable $s))
(core func $stream.drop-writable (canon stream.drop-writable $s))
(core func $waitable-set.new (canon waitable-set.new))
(core func $waitable.join (canon waitable.join))
- (core func $waitable-set.wait (canon waitable-set.wait (memory $libc "mem")))
+ (core func $waitable-set.wait (canon waitable-set.wait (memory (core memory $libc "mem"))))
(core func $waitable-set.drop (canon waitable-set.drop))
(core instance $ics (instantiate $ics
(with "" (instance
diff --git a/tests/all/pulley_provenance_test_component.wat b/tests/all/pulley_provenance_test_component.wat
index 0ca44483fb..45d92cc4b2 100644
--- a/tests/all/pulley_provenance_test_component.wat
+++ b/tests/all/pulley_provenance_test_component.wat
@@ -77,12 +77,12 @@
(core func $host-empty (canon lower (func $host-empty)))
(core func $host-u32 (canon lower (func $host-u32)))
(core func $host-enum (canon lower (func $host-enum)))
- (core func $host-option (canon lower (func $host-option) (memory $libc "memory")))
- (core func $host-result (canon lower (func $host-result) (memory $libc "memory")))
+ (core func $host-option (canon lower (func $host-option) (memory (core memory $libc "memory"))))
+ (core func $host-result (canon lower (func $host-result) (memory (core memory $libc "memory"))))
(core func $host-string (canon lower (func $host-string)
- (memory $libc "memory") (realloc (func $libc "realloc"))))
+ (memory (core memory $libc "memory")) (realloc (core func $libc "realloc"))))
(core func $host-list (canon lower (func $host-list)
- (memory $libc "memory") (realloc (func $libc "realloc"))))
+ (memory (core memory $libc "memory")) (realloc (core func $libc "realloc"))))
(type $a (resource (rep i32)))
(core func $new-a (canon resource.new $a))
@@ -152,15 +152,15 @@
(func (export "guest-enum") (param "x" $e) (result $e)
(canon lift (core func $i "guest-enum")))
(func (export "guest-option") (param "x" (option u8)) (result (option u8))
- (canon lift (core func $i "guest-option") (memory $libc "memory")))
+ (canon lift (core func $i "guest-option") (memory (core memory $libc "memory"))))
(func (export "guest-result") (param "x" $result) (result $result)
- (canon lift (core func $i "guest-result") (memory $libc "memory")))
+ (canon lift (core func $i "guest-result") (memory (core memory $libc "memory"))))
(func (export "guest-string") (param "x" string) (result string)
- (canon lift (core func $i "guest-string") (memory $libc "memory")
- (realloc (func $libc "realloc"))))
+ (canon lift (core func $i "guest-string") (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))))
(func (export "guest-list") (param "x" (list string)) (result (list string))
- (canon lift (core func $i "guest-list") (memory $libc "memory")
- (realloc (func $libc "realloc"))))
+ (canon lift (core func $i "guest-list") (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))))
(func (export "resource-intrinsics")
(canon lift (core func $i "resource-intrinsics") ))
diff --git a/tests/misc_testsuite/component-model-threading/drop-subtask-on-separate-thread.wast b/tests/misc_testsuite/component-model-threading/drop-subtask-on-separate-thread.wast
index ef57f68d5a..9c726c10fd 100644
--- a/tests/misc_testsuite/component-model-threading/drop-subtask-on-separate-thread.wast
+++ b/tests/misc_testsuite/component-model-threading/drop-subtask-on-separate-thread.wast
@@ -62,7 +62,7 @@
(core func $never-return (canon lower (func $host "never-return") async))
(core func $cancel (canon subtask.cancel))
(core func $drop-subtask (canon subtask.drop))
- (core func $thread.new-indirect (canon thread.new-indirect $start-func-ty (table $table)))
+ (core func $thread.new-indirect (canon thread.new-indirect $start-func-ty (core table $table)))
(core func $thread.index (canon thread.index))
(core func $thread.suspend-then-resume (canon thread.suspend-then-resume))
(core func $thread.resume-later (canon thread.resume-later))
diff --git a/tests/misc_testsuite/component-model-threading/many-threads-indexed.wast b/tests/misc_testsuite/component-model-threading/many-threads-indexed.wast
index 9e74c33589..60d99f9a88 100644
--- a/tests/misc_testsuite/component-model-threading/many-threads-indexed.wast
+++ b/tests/misc_testsuite/component-model-threading/many-threads-indexed.wast
@@ -99,7 +99,7 @@
(alias core export $libc "__indirect_function_table" (core table $indirect-function-table))
(core func $thread-new-indirect
- (canon thread.new-indirect $start-func-ty (table $indirect-function-table)))
+ (canon thread.new-indirect $start-func-ty (core table $indirect-function-table)))
(core func $thread-yield (canon thread.yield))
(core func $thread-index (canon thread.index))
(core func $thread-yield-then-resume (canon thread.yield-then-resume))
diff --git a/tests/misc_testsuite/component-model-threading/stackful-cancellation.wast b/tests/misc_testsuite/component-model-threading/stackful-cancellation.wast
index 78968728b5..c1ccd1b12a 100644
--- a/tests/misc_testsuite/component-model-threading/stackful-cancellation.wast
+++ b/tests/misc_testsuite/component-model-threading/stackful-cancellation.wast
@@ -183,7 +183,7 @@
(core func $task-cancel (canon task.cancel))
(core func $thread-new-indirect
- (canon thread.new-indirect $start-func-ty (table $indirect-function-table)))
+ (canon thread.new-indirect $start-func-ty (core table $indirect-function-table)))
(core func $thread-yield (canon thread.yield))
(core func $thread-yield-cancellable (canon thread.yield cancellable))
(core func $thread-index (canon thread.index))
@@ -194,10 +194,10 @@
(core func $thread-suspend-then-resume-cancellable (canon thread.suspend-then-resume cancellable))
(core func $thread-suspend (canon thread.suspend))
(core func $thread-suspend-cancellable (canon thread.suspend cancellable))
- (core func $future.read (canon future.read $FT (memory $memory "mem")))
+ (core func $future.read (canon future.read $FT (memory (core memory $memory "mem"))))
(core func $waitable-set.new (canon waitable-set.new))
(core func $waitable.join (canon waitable.join))
- (core func $waitable-set.wait (canon waitable-set.wait (memory $memory "mem")))
+ (core func $waitable-set.wait (canon waitable-set.wait (memory (core memory $memory "mem"))))
;; Instantiate the main module
(core instance $cm (
@@ -345,16 +345,16 @@
)
(core func $waitable-set.new (canon waitable-set.new))
- (core func $waitable-set.wait (canon waitable-set.wait (memory $memory "mem")))
+ (core func $waitable-set.wait (canon waitable-set.wait (memory (core memory $memory "mem"))))
(core func $waitable.join (canon waitable.join))
(core func $subtask.cancel (canon subtask.cancel async))
(core func $future.new (canon future.new $FT))
- (core func $future.write (canon future.write $FT (memory $memory "mem")))
+ (core func $future.write (canon future.write $FT (memory (core memory $memory "mem"))))
(core func $thread.yield (canon thread.yield))
- (canon lower (func $run-yield) async (memory $memory "mem") (core func $run-yield'))
- (canon lower (func $run-suspend) async (memory $memory "mem") (core func $run-suspend'))
- (canon lower (func $run-suspend-then-resume) async (memory $memory "mem") (core func $run-suspend-then-resume'))
- (canon lower (func $run-yield-then-resume) async (memory $memory "mem") (core func $run-yield-then-resume'))
+ (canon lower (func $run-yield) async (memory (core memory $memory "mem")) (core func $run-yield'))
+ (canon lower (func $run-suspend) async (memory (core memory $memory "mem")) (core func $run-suspend'))
+ (canon lower (func $run-suspend-then-resume) async (memory (core memory $memory "mem")) (core func $run-suspend-then-resume'))
+ (canon lower (func $run-yield-then-resume) async (memory (core memory $memory "mem")) (core func $run-yield-then-resume'))
(core instance $dm (instantiate $DM (with "" (instance
(export "mem" (memory $memory "mem"))
(export "run-yield" (func $run-yield'))
diff --git a/tests/misc_testsuite/component-model-threading/subtask-drop-multithreaded.wast b/tests/misc_testsuite/component-model-threading/subtask-drop-multithreaded.wast
index cb3b0a37ab..4970a554ac 100644
--- a/tests/misc_testsuite/component-model-threading/subtask-drop-multithreaded.wast
+++ b/tests/misc_testsuite/component-model-threading/subtask-drop-multithreaded.wast
@@ -43,7 +43,7 @@
(core instance $libc (instantiate $libc))
(core type $start-func-ty (func (param i32)))
(alias core export $libc "table" (core table $table))
- (core func $thread.new-indirect (canon thread.new-indirect $start-func-ty (table $table)))
+ (core func $thread.new-indirect (canon thread.new-indirect $start-func-ty (core table $table)))
(core func $task.return (canon task.return))
(core func $thread.yield (canon thread.yield))
(core instance $m (instantiate $m (with "" (instance
@@ -52,7 +52,7 @@
(export "thread.yield" (func $thread.yield))
(export "table" (table $table))
))))
- (func (export "do-work") async (canon lift (core func $m "do-work") async (callback (func $m "callback"))))
+ (func (export "do-work") async (canon lift (core func $m "do-work") async (callback (core func $m "callback"))))
)
;; Outer component (caller)
@@ -112,7 +112,7 @@
(export "waitable-set.wait" (func $waitable-set.wait))
(export "memory" (memory $memory))
))))
- (func (export "run") async (canon lift (core func $m "run") async (callback (func $m "callback"))))
+ (func (export "run") async (canon lift (core func $m "run") async (callback (core func $m "callback"))))
)
(instance $callee (instantiate $callee))
diff --git a/tests/misc_testsuite/component-model-threading/suspend-trap.wast b/tests/misc_testsuite/component-model-threading/suspend-trap.wast
index 3d2256e260..2c0958b227 100644
--- a/tests/misc_testsuite/component-model-threading/suspend-trap.wast
+++ b/tests/misc_testsuite/component-model-threading/suspend-trap.wast
@@ -37,7 +37,7 @@
(core func $task-cancel (canon task.cancel))
(core func $thread-new-indirect
- (canon thread.new-indirect $start-func-ty (table $libc "table")))
+ (canon thread.new-indirect $start-func-ty (core table $libc "table")))
(core func $thread-yield (canon thread.yield))
(core func $thread-yield-then-resume (canon thread.yield-then-resume))
diff --git a/tests/misc_testsuite/component-model-threading/thread-new-indirect-multi-table.wast b/tests/misc_testsuite/component-model-threading/thread-new-indirect-multi-table.wast
index 2a7db25165..3d0e0b401f 100644
--- a/tests/misc_testsuite/component-model-threading/thread-new-indirect-multi-table.wast
+++ b/tests/misc_testsuite/component-model-threading/thread-new-indirect-multi-table.wast
@@ -37,9 +37,9 @@
(alias core export $libc "t1" (core table $t1))
(core func $thread-new-indirect-t0
- (canon thread.new-indirect $start-func-ty (table $t0)))
+ (canon thread.new-indirect $start-func-ty (core table $t0)))
(core func $thread-new-indirect-t1
- (canon thread.new-indirect $start-func-ty (table $t1)))
+ (canon thread.new-indirect $start-func-ty (core table $t1)))
(core func $thread-index (canon thread.index))
(core instance $i (instantiate $m
diff --git a/tests/misc_testsuite/component-model-threading/threading-builtins.wast b/tests/misc_testsuite/component-model-threading/threading-builtins.wast
index c10fa3c5f9..9fa11cd390 100644
--- a/tests/misc_testsuite/component-model-threading/threading-builtins.wast
+++ b/tests/misc_testsuite/component-model-threading/threading-builtins.wast
@@ -75,7 +75,7 @@
(alias core export $libc "__indirect_function_table" (core table $indirect-function-table))
(core func $thread-new-indirect
- (canon thread.new-indirect $start-func-ty (table $indirect-function-table)))
+ (canon thread.new-indirect $start-func-ty (core table $indirect-function-table)))
(core func $thread-yield (canon thread.yield))
(core func $thread-index (canon thread.index))
(core func $thread-yield-then-resume (canon thread.yield-then-resume))
@@ -115,7 +115,7 @@
(export "thread.index" (func $thread.index))
))))
(func (export "run")
- (canon lift (core func $dm "run") (post-return (func $dm "post-return"))))
+ (canon lift (core func $dm "run") (post-return (core func $dm "post-return"))))
)
(assert_trap (invoke "run") "cannot leave component instance")
@@ -143,8 +143,8 @@
))))
(func (export "run") (param "s" string) (canon lift
(core func $m "run")
- (memory $m "memory")
- (realloc (func $m "realloc"))
+ (memory (core memory $m "memory"))
+ (realloc (core func $m "realloc"))
))
)
(assert_trap (invoke "run" (str.const "x")) "cannot leave component instance")
diff --git a/tests/misc_testsuite/component-model-threading/threading-trap-in-post-return.wast b/tests/misc_testsuite/component-model-threading/threading-trap-in-post-return.wast
index 18fba270b7..2706ffa35a 100644
--- a/tests/misc_testsuite/component-model-threading/threading-trap-in-post-return.wast
+++ b/tests/misc_testsuite/component-model-threading/threading-trap-in-post-return.wast
@@ -7,7 +7,7 @@
(core instance $memory (instantiate $Memory))
(core type $ft (func (param i32)))
- (core func $thread.new-indirect (canon thread.new-indirect $ft (table $memory "t")))
+ (core func $thread.new-indirect (canon thread.new-indirect $ft (core table $memory "t")))
(core func $thread.suspend (canon thread.suspend))
(core func $thread.resume-later (canon thread.resume-later))
(core func $thread.suspend-then-resume (canon thread.suspend-then-resume))
@@ -44,25 +44,25 @@
))))
(func (export "trap-calling-thread-new-indirect")
(canon lift (core func $dm "noop")
- (post-return (func $dm "trap-calling-thread-new-indirect"))))
+ (post-return (core func $dm "trap-calling-thread-new-indirect"))))
(func (export "trap-calling-thread-suspend")
(canon lift (core func $dm "noop")
- (post-return (func $dm "trap-calling-thread-suspend"))))
+ (post-return (core func $dm "trap-calling-thread-suspend"))))
(func (export "trap-calling-thread-resume-later")
(canon lift (core func $dm "noop")
- (post-return (func $dm "trap-calling-thread-resume-later"))))
+ (post-return (core func $dm "trap-calling-thread-resume-later"))))
(func (export "trap-calling-thread-suspend-then-resume")
(canon lift (core func $dm "noop")
- (post-return (func $dm "trap-calling-thread-suspend-then-resume"))))
+ (post-return (core func $dm "trap-calling-thread-suspend-then-resume"))))
(func (export "trap-calling-thread-yield-then-resume")
(canon lift (core func $dm "noop")
- (post-return (func $dm "trap-calling-thread-yield-then-resume"))))
+ (post-return (core func $dm "trap-calling-thread-yield-then-resume"))))
(func (export "trap-calling-thread-suspend-then-promote")
(canon lift (core func $dm "noop")
- (post-return (func $dm "trap-calling-thread-suspend-then-promote"))))
+ (post-return (core func $dm "trap-calling-thread-suspend-then-promote"))))
(func (export "trap-calling-thread-yield-then-promote")
(canon lift (core func $dm "noop")
- (post-return (func $dm "trap-calling-thread-yield-then-promote"))))
+ (post-return (core func $dm "trap-calling-thread-yield-then-promote"))))
)
(component instance $i $Tester)
diff --git a/tests/misc_testsuite/component-model-threading/yield-cancellable.wast b/tests/misc_testsuite/component-model-threading/yield-cancellable.wast
index 80d6a8968b..b74efa9f4b 100644
--- a/tests/misc_testsuite/component-model-threading/yield-cancellable.wast
+++ b/tests/misc_testsuite/component-model-threading/yield-cancellable.wast
@@ -7,7 +7,7 @@
(core instance $libc (instantiate $libc))
(core type $start-func-ty (func (param i32)))
(core func $thread.new-indirect
- (canon thread.new-indirect $start-func-ty (table $libc "t")))
+ (canon thread.new-indirect $start-func-ty (core table $libc "t")))
(core func $thread.resume-later (canon thread.resume-later))
(core func $thread.index (canon thread.index))
(core func $thread.yield-cancellable (canon thread.yield cancellable))
@@ -53,6 +53,6 @@
(export "tbl" (table $libc "t"))))))
(func (export "run") async
- (canon lift (core func $i "run") async (callback (func $i "cb"))))
+ (canon lift (core func $i "run") async (callback (core func $i "cb"))))
)
(assert_return (invoke "run"))
diff --git a/tests/misc_testsuite/component-model/adapter.wast b/tests/misc_testsuite/component-model/adapter.wast
index 8432d5841a..9d8a7f5cb7 100644
--- a/tests/misc_testsuite/component-model/adapter.wast
+++ b/tests/misc_testsuite/component-model/adapter.wast
@@ -40,8 +40,8 @@
(func (export "thunk") (param "a" string)
(canon lift
(core func $i "")
- (memory $i "memory")
- (realloc (func $i "realloc"))
+ (memory (core memory $i "memory"))
+ (realloc (core func $i "realloc"))
)
)
@@ -49,8 +49,8 @@
(canon lift
(core func $i "")
string-encoding=utf8
- (memory $i "memory")
- (realloc (func $i "realloc"))
+ (memory (core memory $i "memory"))
+ (realloc (core func $i "realloc"))
)
)
@@ -58,8 +58,8 @@
(canon lift
(core func $i "")
string-encoding=utf16
- (memory $i "memory")
- (realloc (func $i "realloc"))
+ (memory (core memory $i "memory"))
+ (realloc (core func $i "realloc"))
)
)
@@ -67,8 +67,8 @@
(canon lift
(core func $i "")
string-encoding=latin1+utf16
- (memory $i "memory")
- (realloc (func $i "realloc"))
+ (memory (core memory $i "memory"))
+ (realloc (core func $i "realloc"))
)
)
)
@@ -128,8 +128,8 @@
(func $f (param "a" (list $t))
(canon lift
(core func $m "x")
- (realloc (func $m "realloc"))
- (memory $m "memory")
+ (realloc (core func $m "realloc"))
+ (memory (core memory $m "memory"))
)
)
(export "empty-list" (func $f))
diff --git a/tests/misc_testsuite/component-model/async/backpressure-deadlock.wast b/tests/misc_testsuite/component-model/async/backpressure-deadlock.wast
index 7e4e79bb77..8f6a7161aa 100644
--- a/tests/misc_testsuite/component-model/async/backpressure-deadlock.wast
+++ b/tests/misc_testsuite/component-model/async/backpressure-deadlock.wast
@@ -33,7 +33,7 @@
(func (export "turn-on-backpressure") (canon lift (core func $i "turn-on-backpressure")))
(func (export "f") async
- (canon lift (core func $i "f") async (callback (func $i "callback"))))
+ (canon lift (core func $i "f") async (callback (core func $i "callback"))))
)
(instance $A (instantiate $A))
@@ -46,11 +46,11 @@
(core module $libc (memory (export "mem") 1))
(core instance $libc (instantiate $libc))
- (core func $f (canon lower (func $A "f") async (memory $libc "mem")))
+ (core func $f (canon lower (func $A "f") async (memory (core memory $libc "mem"))))
(core func $turn-on-backpressure (canon lower (func $A "turn-on-backpressure")))
(core func $waitable-set.new (canon waitable-set.new))
(core func $waitable.join (canon waitable.join))
- (core func $waitable-set.wait (canon waitable-set.wait (memory $libc "mem")))
+ (core func $waitable-set.wait (canon waitable-set.wait (memory (core memory $libc "mem"))))
(core module $m
(import "" "f" (func $f (result i32)))
diff --git a/tests/misc_testsuite/component-model/async/callback-yield-then-exit.wast b/tests/misc_testsuite/component-model/async/callback-yield-then-exit.wast
index 8d2df57239..c3648c07e5 100644
--- a/tests/misc_testsuite/component-model/async/callback-yield-then-exit.wast
+++ b/tests/misc_testsuite/component-model/async/callback-yield-then-exit.wast
@@ -22,7 +22,7 @@
))
(func (export "foo") async (param "p1" u32) (result u32)
- (canon lift (core func $i "foo") async (callback (func $i "callback")))
+ (canon lift (core func $i "foo") async (callback (core func $i "callback")))
)
)
diff --git a/tests/misc_testsuite/component-model/async/cancel-host.wast b/tests/misc_testsuite/component-model/async/cancel-host.wast
index 362bc7014d..5de7900557 100644
--- a/tests/misc_testsuite/component-model/async/cancel-host.wast
+++ b/tests/misc_testsuite/component-model/async/cancel-host.wast
@@ -141,12 +141,12 @@
i32.shr_u
)
)
- (core func $slow (canon lower (func $host "return-two-slowly") async (memory $mem "mem")))
+ (core func $slow (canon lower (func $host "return-two-slowly") async (memory (core memory $mem "mem"))))
(core func $subtask.cancel (canon subtask.cancel))
(core func $subtask.drop (canon subtask.drop))
(core func $waitable-set.new (canon waitable-set.new))
(core func $waitable.join (canon waitable.join))
- (core func $waitable-set.wait (canon waitable-set.wait (memory $mem "mem")))
+ (core func $waitable-set.wait (canon waitable-set.wait (memory (core memory $mem "mem"))))
(core func $waitable-set.drop (canon waitable-set.drop))
(core instance $i (instantiate $m
(with "" (instance
@@ -230,12 +230,12 @@
i32.shr_u
)
)
- (core func $slow (canon lower (func $host "return-two-slowly") async (memory $mem "mem")))
+ (core func $slow (canon lower (func $host "return-two-slowly") async (memory (core memory $mem "mem"))))
(core func $subtask.cancel (canon subtask.cancel))
(core func $subtask.drop (canon subtask.drop))
(core func $waitable-set.new (canon waitable-set.new))
(core func $waitable.join (canon waitable.join))
- (core func $waitable-set.wait (canon waitable-set.wait (memory $mem "mem")))
+ (core func $waitable-set.wait (canon waitable-set.wait (memory (core memory $mem "mem"))))
(core func $thread.yield (canon thread.yield))
(core instance $i (instantiate $m
(with "" (instance
@@ -359,12 +359,12 @@
(call $waitable-set.drop (local.get $ws))
)
)
- (core func $echo (canon lower (func $host "echo-slowly") async (memory $mem "mem")))
+ (core func $echo (canon lower (func $host "echo-slowly") async (memory (core memory $mem "mem"))))
(core func $subtask.cancel (canon subtask.cancel))
(core func $subtask.drop (canon subtask.drop))
(core func $waitable-set.new (canon waitable-set.new))
(core func $waitable.join (canon waitable.join))
- (core func $waitable-set.wait (canon waitable-set.wait (memory $mem "mem")))
+ (core func $waitable-set.wait (canon waitable-set.wait (memory (core memory $mem "mem"))))
(core func $waitable-set.drop (canon waitable-set.drop))
(core instance $i (instantiate $m
(with "" (instance
@@ -456,8 +456,8 @@
i32.shr_u
)
)
- (core func $slow-sync (canon lower (func $host "return-two-slowly") (memory $mem "mem")))
- (core func $slow-async (canon lower (func $host "return-two-slowly") async (memory $mem "mem")))
+ (core func $slow-sync (canon lower (func $host "return-two-slowly") (memory (core memory $mem "mem"))))
+ (core func $slow-async (canon lower (func $host "return-two-slowly") async (memory (core memory $mem "mem"))))
(core func $subtask.cancel (canon subtask.cancel))
(core func $subtask.drop (canon subtask.drop))
(core instance $i (instantiate $m
diff --git a/tests/misc_testsuite/component-model/async/cancel-sibling-subtask.wast b/tests/misc_testsuite/component-model/async/cancel-sibling-subtask.wast
index 29d4a6bd75..611dbfe173 100644
--- a/tests/misc_testsuite/component-model/async/cancel-sibling-subtask.wast
+++ b/tests/misc_testsuite/component-model/async/cancel-sibling-subtask.wast
@@ -28,7 +28,7 @@
))
))
(func (export "f") async
- (canon lift (core func $i "a") async (callback (func $i "cb"))))
+ (canon lift (core func $i "a") async (callback (core func $i "cb"))))
)
(component $b
diff --git a/tests/misc_testsuite/component-model/async/cancel-sync-and-waitable.wast b/tests/misc_testsuite/component-model/async/cancel-sync-and-waitable.wast
index b079f44541..9ee82c8888 100644
--- a/tests/misc_testsuite/component-model/async/cancel-sync-and-waitable.wast
+++ b/tests/misc_testsuite/component-model/async/cancel-sync-and-waitable.wast
@@ -22,7 +22,7 @@
(core instance $libc (instantiate $libc))
(core func $new (canon future.new $f))
- (core func $write (canon future.write $f async (memory $libc "mem")))
+ (core func $write (canon future.write $f async (memory (core memory $libc "mem"))))
(core func $cancel (canon future.cancel-write $f))
(core func $ws-new (canon waitable-set.new))
(core func $join (canon waitable.join))
@@ -75,7 +75,7 @@
(core instance $libc (instantiate $libc))
(core func $new (canon future.new $f))
- (core func $read (canon future.read $f async (memory $libc "mem")))
+ (core func $read (canon future.read $f async (memory (core memory $libc "mem"))))
(core func $cancel (canon future.cancel-read $f))
(core func $ws-new (canon waitable-set.new))
(core func $join (canon waitable.join))
@@ -128,7 +128,7 @@
(core instance $libc (instantiate $libc))
(core func $new (canon stream.new $s))
- (core func $write (canon stream.write $s async (memory $libc "mem")))
+ (core func $write (canon stream.write $s async (memory (core memory $libc "mem"))))
(core func $cancel (canon stream.cancel-write $s))
(core func $ws-new (canon waitable-set.new))
(core func $join (canon waitable.join))
@@ -181,7 +181,7 @@
(core instance $libc (instantiate $libc))
(core func $new (canon stream.new $s))
- (core func $read (canon stream.read $s async (memory $libc "mem")))
+ (core func $read (canon stream.read $s async (memory (core memory $libc "mem"))))
(core func $cancel (canon stream.cancel-read $s))
(core func $ws-new (canon waitable-set.new))
(core func $join (canon waitable.join))
diff --git a/tests/misc_testsuite/component-model/async/drop-deadlock.wast b/tests/misc_testsuite/component-model/async/drop-deadlock.wast
index 98ad9eef3b..c912a8250d 100644
--- a/tests/misc_testsuite/component-model/async/drop-deadlock.wast
+++ b/tests/misc_testsuite/component-model/async/drop-deadlock.wast
@@ -18,7 +18,7 @@
(canon lift (core func $i "set-backpressure")))
(func (export "target") async
- (canon lift (core func $i "target") async (callback (func $i "callback"))))
+ (canon lift (core func $i "target") async (callback (core func $i "callback"))))
)
(assert_return (invoke "set-backpressure"))
diff --git a/tests/misc_testsuite/component-model/async/drop-host.wast b/tests/misc_testsuite/component-model/async/drop-host.wast
index 286f8d3f2e..90d0d2ec23 100644
--- a/tests/misc_testsuite/component-model/async/drop-host.wast
+++ b/tests/misc_testsuite/component-model/async/drop-host.wast
@@ -38,7 +38,7 @@
i32.shr_u
)
)
- (core func $slow (canon lower (func $host "return-two-slowly") async (memory $mem "mem")))
+ (core func $slow (canon lower (func $host "return-two-slowly") async (memory (core memory $mem "mem"))))
(core func $thread.yield (canon thread.yield))
(core func $subtask.drop (canon subtask.drop))
(core instance $i (instantiate $m
diff --git a/tests/misc_testsuite/component-model/async/drop-waitable-set-stackful.wast b/tests/misc_testsuite/component-model/async/drop-waitable-set-stackful.wast
index 1c1100f45c..6022127b28 100644
--- a/tests/misc_testsuite/component-model/async/drop-waitable-set-stackful.wast
+++ b/tests/misc_testsuite/component-model/async/drop-waitable-set-stackful.wast
@@ -37,7 +37,7 @@
)
)
(canon waitable-set.new (core func $waitable-set.new))
- (canon waitable-set.wait (memory $memory "mem") (core func $waitable-set.wait))
+ (canon waitable-set.wait (memory (core memory $memory "mem")) (core func $waitable-set.wait))
(canon waitable-set.drop (core func $waitable-set.drop))
(core instance $core (instantiate $Core (with "" (instance
(export "mem" (memory $memory "mem"))
@@ -87,7 +87,7 @@
unreachable
)
)
- (canon lower (func $c "wait-on-set") async (memory $memory "mem") (core func $wait-on-set'))
+ (canon lower (func $c "wait-on-set") async (memory (core memory $memory "mem")) (core func $wait-on-set'))
(canon lower (func $c "drop-while-waiting") (core func $drop-while-waiting'))
(core instance $core (instantiate $Core (with "" (instance
(export "mem" (memory $memory "mem"))
diff --git a/tests/misc_testsuite/component-model/async/error-context.wast b/tests/misc_testsuite/component-model/async/error-context.wast
index 8f6c00410b..217ed80260 100644
--- a/tests/misc_testsuite/component-model/async/error-context.wast
+++ b/tests/misc_testsuite/component-model/async/error-context.wast
@@ -8,7 +8,7 @@
(core module $m
(import "" "error-context.new" (func $error-context-new (param i32 i32) (result i32)))
)
- (core func $error-context-new (canon error-context.new (memory $libc "memory")))
+ (core func $error-context-new (canon error-context.new (memory (core memory $libc "memory"))))
(core instance $i (instantiate $m (with "" (instance (export "error-context.new" (func $error-context-new))))))
)
@@ -22,7 +22,7 @@
(core module $m
(import "" "error-context.debug-message" (func $error-context-debug-message (param i32 i32)))
)
- (core func $error-context-debug-message (canon error-context.debug-message (memory $libc "memory") (realloc (func $libc "realloc"))))
+ (core func $error-context-debug-message (canon error-context.debug-message (memory (core memory $libc "memory")) (realloc (core func $libc "realloc"))))
(core instance $i (instantiate $m (with "" (instance (export "error-context.debug-message" (func $error-context-debug-message))))))
)
@@ -67,8 +67,8 @@
)
)
- (core func $error-context.new (canon error-context.new (memory $libc "memory")))
- (core func $error-context.debug-message (canon error-context.debug-message (memory $libc "memory") (realloc (func $libc "realloc"))))
+ (core func $error-context.new (canon error-context.new (memory (core memory $libc "memory"))))
+ (core func $error-context.debug-message (canon error-context.debug-message (memory (core memory $libc "memory")) (realloc (core func $libc "realloc"))))
(core func $error-context.drop (canon error-context.drop))
(core instance $core (instantiate $Core (with "" (instance
diff --git a/tests/misc_testsuite/component-model/async/exceptions.wast b/tests/misc_testsuite/component-model/async/exceptions.wast
index d0e2fccb7f..68010c0d29 100644
--- a/tests/misc_testsuite/component-model/async/exceptions.wast
+++ b/tests/misc_testsuite/component-model/async/exceptions.wast
@@ -31,7 +31,7 @@
)
(core instance $a (instantiate $a))
(func (export "run") async (param "b" bool)
- (canon lift (core func $a "run") async (callback (func $a "cb"))))
+ (canon lift (core func $a "run") async (callback (core func $a "cb"))))
)
(component $B
(import "a" (instance $a
@@ -100,7 +100,7 @@
(core instance $libc (instantiate $libc))
(core func $waitable-set.new (canon waitable-set.new))
(core func $waitable.join (canon waitable.join))
- (core func $waitable-set.wait (canon waitable-set.wait (memory $libc "m")))
+ (core func $waitable-set.wait (canon waitable-set.wait (memory (core memory $libc "m"))))
(core module $b
(import "" "run" (func $run (param i32) (result i32)))
@@ -159,7 +159,7 @@
)
(core instance $a (instantiate $a))
(func (export "run") async (param "b" bool)
- (canon lift (core func $a "run") async (callback (func $a "cb"))))
+ (canon lift (core func $a "run") async (callback (core func $a "cb"))))
)
(component $B
(import "a" (instance $a
@@ -172,7 +172,7 @@
(core instance $libc (instantiate $libc))
(core func $waitable-set.new (canon waitable-set.new))
(core func $waitable.join (canon waitable.join))
- (core func $waitable-set.wait (canon waitable-set.wait (memory $libc "m")))
+ (core func $waitable-set.wait (canon waitable-set.wait (memory (core memory $libc "m"))))
(core module $b
(import "" "run" (func $run (param i32) (result i32)))
diff --git a/tests/misc_testsuite/component-model/async/fused.wast b/tests/misc_testsuite/component-model/async/fused.wast
index 32cf57ff1b..d7b644f594 100644
--- a/tests/misc_testsuite/component-model/async/fused.wast
+++ b/tests/misc_testsuite/component-model/async/fused.wast
@@ -20,7 +20,7 @@
))
(func (export "foo") async (param "p1" u32) (result u32)
- (canon lift (core func $i "foo") async (callback (func $i "callback")))
+ (canon lift (core func $i "foo") async (callback (core func $i "callback")))
)
)
@@ -28,7 +28,7 @@
(import "a" (func $foo async (param "p1" u32) (result u32)))
(core module $libc (memory (export "memory") 1))
(core instance $libc (instantiate $libc))
- (core func $foo (canon lower (func $foo) async (memory $libc "memory")))
+ (core func $foo (canon lower (func $foo) async (memory (core memory $libc "memory"))))
(core module $m
(import "libc" "memory" (memory 1))
(import "" "foo" (func $foo (param i32 i32) (result i32)))
@@ -73,7 +73,7 @@
(import "a" (func $foo async (param "p1" u32) (result u32)))
(core module $libc (memory (export "memory") 1))
(core instance $libc (instantiate $libc))
- (core func $foo (canon lower (func $foo) async (memory $libc "memory")))
+ (core func $foo (canon lower (func $foo) async (memory (core memory $libc "memory"))))
(core module $m
(import "libc" "memory" (memory 1))
(import "" "foo" (func $foo (param i32 i32) (result i32)))
@@ -117,7 +117,7 @@
))
(func (export "foo") async (param "p1" u32) (result u32)
- (canon lift (core func $i "foo") async (callback (func $i "callback")))
+ (canon lift (core func $i "foo") async (callback (core func $i "callback")))
)
)
diff --git a/tests/misc_testsuite/component-model/async/future-cancel-read-dropped.wast b/tests/misc_testsuite/component-model/async/future-cancel-read-dropped.wast
index c74742c175..f556aede05 100644
--- a/tests/misc_testsuite/component-model/async/future-cancel-read-dropped.wast
+++ b/tests/misc_testsuite/component-model/async/future-cancel-read-dropped.wast
@@ -6,9 +6,9 @@
(core func $new (canon future.new $f))
(core module $libc (memory (export "mem") 1))
(core instance $libc (instantiate $libc))
- (core func $read (canon future.read $f async (memory $libc "mem")))
+ (core func $read (canon future.read $f async (memory (core memory $libc "mem"))))
(core func $cancel (canon future.cancel-read $f))
- (core func $write (canon future.write $f async (memory $libc "mem")))
+ (core func $write (canon future.write $f async (memory (core memory $libc "mem"))))
(core func $drop-write (canon future.drop-writable $f))
(core module $m
(import "" "new" (func $new (result i64)))
diff --git a/tests/misc_testsuite/component-model/async/future-cancel-write-completed.wast b/tests/misc_testsuite/component-model/async/future-cancel-write-completed.wast
index 40a15db92f..5f970609d2 100644
--- a/tests/misc_testsuite/component-model/async/future-cancel-write-completed.wast
+++ b/tests/misc_testsuite/component-model/async/future-cancel-write-completed.wast
@@ -10,7 +10,7 @@
(core module $libc (memory (export "mem") 1))
(core instance $libc (instantiate $libc))
- (core func $read (canon future.read $f async (memory $libc "mem")))
+ (core func $read (canon future.read $f async (memory (core memory $libc "mem"))))
(core func $drop-read (canon future.drop-readable $f))
(core module $inner
(import "" "read" (func $read (param i32 i32) (result i32)))
@@ -50,7 +50,7 @@
(core func $new (canon future.new $f))
(core module $libc (memory (export "mem") 1))
(core instance $libc (instantiate $libc))
- (core func $write (canon future.write $f async (memory $libc "mem")))
+ (core func $write (canon future.write $f async (memory (core memory $libc "mem"))))
(core func $cancel (canon future.cancel-write $f))
(core func $drain (canon lower (func $c "f")))
(core module $m
diff --git a/tests/misc_testsuite/component-model/async/future-cancel-write-dropped.wast b/tests/misc_testsuite/component-model/async/future-cancel-write-dropped.wast
index f0a7a312bf..fad109f92c 100644
--- a/tests/misc_testsuite/component-model/async/future-cancel-write-dropped.wast
+++ b/tests/misc_testsuite/component-model/async/future-cancel-write-dropped.wast
@@ -6,7 +6,7 @@
(core func $new (canon future.new $f))
(core module $libc (memory (export "mem") 1))
(core instance $libc (instantiate $libc))
- (core func $write (canon future.write $f async (memory $libc "mem")))
+ (core func $write (canon future.write $f async (memory (core memory $libc "mem"))))
(core func $cancel (canon future.cancel-write $f))
(core func $drop-read (canon future.drop-readable $f))
(core module $m
diff --git a/tests/misc_testsuite/component-model/async/future-drop-writable-after-notified-drop.wast b/tests/misc_testsuite/component-model/async/future-drop-writable-after-notified-drop.wast
index 6d8f80c2a3..6a133df686 100644
--- a/tests/misc_testsuite/component-model/async/future-drop-writable-after-notified-drop.wast
+++ b/tests/misc_testsuite/component-model/async/future-drop-writable-after-notified-drop.wast
@@ -9,7 +9,7 @@
(type $f (future u32))
(core func $future.new (canon future.new $f))
- (core func $future.write (canon future.write $f async (memory $libc "mem")))
+ (core func $future.write (canon future.write $f async (memory (core memory $libc "mem"))))
(core func $future.drop-writable (canon future.drop-writable $f))
(core func $task.return (canon task.return))
(core func $waitable-set.new (canon waitable-set.new))
@@ -77,7 +77,7 @@
(func (export "get-future") (result (future u32))
(canon lift (core func $ci "get-future")))
(func (export "write-and-wait") async
- (canon lift (core func $ci "write-and-wait") async (callback (func $ci "write-and-wait-cb"))))
+ (canon lift (core func $ci "write-and-wait") async (callback (core func $ci "write-and-wait-cb"))))
)
(component $B
@@ -96,7 +96,7 @@
(core func $waitable-set.new (canon waitable-set.new))
(core func $waitable-set.drop (canon waitable-set.drop))
(core func $waitable.join (canon waitable.join))
- (core func $waitable-set.wait (canon waitable-set.wait (memory $libc "mem")))
+ (core func $waitable-set.wait (canon waitable-set.wait (memory (core memory $libc "mem"))))
(core func $subtask.drop (canon subtask.drop))
(core module $dm
diff --git a/tests/misc_testsuite/component-model/async/future-read.wast b/tests/misc_testsuite/component-model/async/future-read.wast
index 829e2d2cfc..498d2893a5 100644
--- a/tests/misc_testsuite/component-model/async/future-read.wast
+++ b/tests/misc_testsuite/component-model/async/future-read.wast
@@ -10,7 +10,7 @@
(core instance $libc (instantiate $libc))
(type $future (future))
- (core func $read (canon future.read $future (memory $libc "memory")))
+ (core func $read (canon future.read $future (memory (core memory $libc "memory"))))
(core module $m
(import "" "read" (func $read (param i32 i32) (result i32)))
@@ -71,7 +71,7 @@
(core instance $libc (instantiate $libc))
(type $future (future))
- (core func $read (canon future.read $future (memory $libc "memory") async))
+ (core func $read (canon future.read $future (memory (core memory $libc "memory")) async))
(core module $m
(import "" "read" (func $read (param i32 i32) (result i32)))
@@ -131,7 +131,7 @@
(core instance $libc (instantiate $libc))
(type $future (future))
- (core func $read (canon future.read $future (memory $libc "memory")))
+ (core func $read (canon future.read $future (memory (core memory $libc "memory"))))
(core module $m
(import "" "read" (func $read (param i32 i32) (result i32)))
@@ -151,7 +151,7 @@
))
))
(func (export "run") async (param "x" $future)
- (canon lift (core func $i "run") async (callback (func $i "cb"))))
+ (canon lift (core func $i "run") async (callback (core func $i "cb"))))
)
(instance $child (instantiate $child))
@@ -196,7 +196,7 @@
(core instance $libc (instantiate $libc))
(type $future (future))
- (core func $read (canon future.read $future (memory $libc "memory") async))
+ (core func $read (canon future.read $future (memory (core memory $libc "memory")) async))
(core func $return (canon task.return))
(core module $m
@@ -220,7 +220,7 @@
))
))
(func (export "run") async (param "x" $future)
- (canon lift (core func $i "run") async (callback (func $i "cb"))))
+ (canon lift (core func $i "run") async (callback (core func $i "cb"))))
)
(instance $child (instantiate $child))
diff --git a/tests/misc_testsuite/component-model/async/futures-must-write.wast b/tests/misc_testsuite/component-model/async/futures-must-write.wast
index 2158c888a8..4f9426b734 100644
--- a/tests/misc_testsuite/component-model/async/futures-must-write.wast
+++ b/tests/misc_testsuite/component-model/async/futures-must-write.wast
@@ -46,7 +46,7 @@
)
(type $FT (future u8))
(canon future.new $FT (core func $future.new))
- (canon future.write $FT async (memory $memory "mem") (core func $future.write))
+ (canon future.write $FT async (memory (core memory $memory "mem")) (core func $future.write))
(canon future.drop-writable $FT (core func $future.drop-writable))
(core instance $cm (instantiate $CM (with "" (instance
(export "mem" (memory $memory "mem"))
@@ -101,7 +101,7 @@
)
(type $FT (future u8))
(canon future.new $FT (core func $future.new))
- (canon future.read $FT async (memory $memory "mem") (core func $future.read))
+ (canon future.read $FT async (memory (core memory $memory "mem")) (core func $future.read))
(canon future.drop-readable $FT (core func $future.drop-readable))
(canon lower (func $c "start-future") (core func $start-future'))
(canon lower (func $c "attempt-write") (core func $attempt-write'))
diff --git a/tests/misc_testsuite/component-model/async/futures.wast b/tests/misc_testsuite/component-model/async/futures.wast
index 86ebc5bc68..7086d2a00d 100644
--- a/tests/misc_testsuite/component-model/async/futures.wast
+++ b/tests/misc_testsuite/component-model/async/futures.wast
@@ -19,7 +19,7 @@
(import "" "future.read" (func $future-read (param i32 i32) (result i32)))
)
(type $future-type (future u8))
- (core func $future-read (canon future.read $future-type async (memory $libc "memory")))
+ (core func $future-read (canon future.read $future-type async (memory (core memory $libc "memory"))))
(core instance $i (instantiate $m (with "" (instance (export "future.read" (func $future-read))))))
)
@@ -34,7 +34,7 @@
(import "" "future.read" (func $future-read (param i32 i32) (result i32)))
)
(type $future-type (future string))
- (core func $future-read (canon future.read $future-type async (memory $libc "memory") (realloc (func $libc "realloc"))))
+ (core func $future-read (canon future.read $future-type async (memory (core memory $libc "memory")) (realloc (core func $libc "realloc"))))
(core instance $i (instantiate $m (with "" (instance (export "future.read" (func $future-read))))))
)
@@ -46,7 +46,7 @@
(import "" "future.write" (func $future-write (param i32 i32) (result i32)))
)
(type $future-type (future u8))
- (core func $future-write (canon future.write $future-type async (memory $libc "memory")))
+ (core func $future-write (canon future.write $future-type async (memory (core memory $libc "memory"))))
(core instance $i (instantiate $m (with "" (instance (export "future.write" (func $future-write))))))
)
diff --git a/tests/misc_testsuite/component-model/async/intra-futures.wast b/tests/misc_testsuite/component-model/async/intra-futures.wast
index 3677074064..adc1a0ad50 100644
--- a/tests/misc_testsuite/component-model/async/intra-futures.wast
+++ b/tests/misc_testsuite/component-model/async/intra-futures.wast
@@ -12,8 +12,8 @@
(type $s (future string))
(core func $future.new (canon future.new $s))
- (core func $future.read (canon future.read $s async (memory $libc "m") (realloc (func $libc "realloc"))))
- (core func $future.write (canon future.write $s async (memory $libc "m")))
+ (core func $future.read (canon future.read $s async (memory (core memory $libc "m")) (realloc (core func $libc "realloc"))))
+ (core func $future.write (canon future.write $s async (memory (core memory $libc "m"))))
(core module $m
(import "" "m" (memory 1))
diff --git a/tests/misc_testsuite/component-model/async/intra-streams.wast b/tests/misc_testsuite/component-model/async/intra-streams.wast
index ec4c0661bb..e234c68d1a 100644
--- a/tests/misc_testsuite/component-model/async/intra-streams.wast
+++ b/tests/misc_testsuite/component-model/async/intra-streams.wast
@@ -13,8 +13,8 @@
(type $s (stream string))
(core func $stream.new (canon stream.new $s))
- (core func $stream.read (canon stream.read $s async (memory $libc "m") (realloc (func $libc "realloc"))))
- (core func $stream.write (canon stream.write $s async (memory $libc "m")))
+ (core func $stream.read (canon stream.read $s async (memory (core memory $libc "m")) (realloc (core func $libc "realloc"))))
+ (core func $stream.write (canon stream.write $s async (memory (core memory $libc "m"))))
(core module $m
(import "" "m" (memory 1))
@@ -64,8 +64,8 @@
(type $s (stream u64))
(core func $stream.new (canon stream.new $s))
- (core func $stream.read (canon stream.read $s async (memory $libc "m")))
- (core func $stream.write (canon stream.write $s async (memory $libc "m")))
+ (core func $stream.read (canon stream.read $s async (memory (core memory $libc "m"))))
+ (core func $stream.write (canon stream.write $s async (memory (core memory $libc "m"))))
(core module $m
(import "" "m" (memory 1))
@@ -124,8 +124,8 @@
(type $s (stream u64))
(core func $stream.new (canon stream.new $s))
- (core func $stream.read (canon stream.read $s async (memory $libc "m1")))
- (core func $stream.write (canon stream.write $s async (memory $libc "m2")))
+ (core func $stream.read (canon stream.read $s async (memory (core memory $libc "m1"))))
+ (core func $stream.write (canon stream.write $s async (memory (core memory $libc "m2"))))
(core module $m
(import "libc" "m1" (memory $m1 1))
@@ -185,8 +185,8 @@
(type $s (stream u64))
(core func $stream.new (canon stream.new $s))
- (core func $stream.read (canon stream.read $s async (memory $libc "m1")))
- (core func $stream.write (canon stream.write $s async (memory $libc "m2")))
+ (core func $stream.read (canon stream.read $s async (memory (core memory $libc "m1"))))
+ (core func $stream.write (canon stream.write $s async (memory (core memory $libc "m2"))))
(core module $m
(import "libc" "m1" (memory $m1 1))
diff --git a/tests/misc_testsuite/component-model/async/join-during-sync-read.wast b/tests/misc_testsuite/component-model/async/join-during-sync-read.wast
index ee792c3768..4a1dac834c 100644
--- a/tests/misc_testsuite/component-model/async/join-during-sync-read.wast
+++ b/tests/misc_testsuite/component-model/async/join-during-sync-read.wast
@@ -40,13 +40,13 @@
(core type $start-func-ty (func (param i32)))
(alias core export $libc "table" (core table $table))
- (core func $thread.new-indirect (canon thread.new-indirect $start-func-ty (table $table)))
+ (core func $thread.new-indirect (canon thread.new-indirect $start-func-ty (core table $table)))
(core func $thread.yield-then-resume (canon thread.yield-then-resume))
(core func $waitable-set.new (canon waitable-set.new))
(core func $waitable.join (canon waitable.join))
(type $future (future))
(core func $future.new (canon future.new $future))
- (core func $future.read (canon future.read $future (memory $libc "memory")))
+ (core func $future.read (canon future.read $future (memory (core memory $libc "memory"))))
(core instance $m (instantiate $m
(with "" (instance
diff --git a/tests/misc_testsuite/component-model/async/lift.wast b/tests/misc_testsuite/component-model/async/lift.wast
index 1ee381e243..9d2a24145b 100644
--- a/tests/misc_testsuite/component-model/async/lift.wast
+++ b/tests/misc_testsuite/component-model/async/lift.wast
@@ -10,6 +10,6 @@
(core instance $i (instantiate $m))
(func (export "foo") async (param "p1" u32) (result u32)
- (canon lift (core func $i "foo") async (callback (func $i "callback")))
+ (canon lift (core func $i "foo") async (callback (core func $i "callback")))
)
)
diff --git a/tests/misc_testsuite/component-model/async/lower.wast b/tests/misc_testsuite/component-model/async/lower.wast
index a58509b044..bda784a54d 100644
--- a/tests/misc_testsuite/component-model/async/lower.wast
+++ b/tests/misc_testsuite/component-model/async/lower.wast
@@ -5,7 +5,7 @@
(import "host-echo-u32" (func $foo async (param "p1" u32) (result u32)))
(core module $libc (memory (export "memory") 1))
(core instance $libc (instantiate $libc))
- (core func $foo (canon lower (func $foo) async (memory $libc "memory")))
+ (core func $foo (canon lower (func $foo) async (memory (core memory $libc "memory"))))
(core module $m
(func (import "" "foo") (param i32 i32) (result i32))
)
diff --git a/tests/misc_testsuite/component-model/async/many-params-with-retptr.wast b/tests/misc_testsuite/component-model/async/many-params-with-retptr.wast
index 818fc48264..c30f40413a 100644
--- a/tests/misc_testsuite/component-model/async/many-params-with-retptr.wast
+++ b/tests/misc_testsuite/component-model/async/many-params-with-retptr.wast
@@ -85,8 +85,8 @@
(core func $f_lower
(canon lower
(func $f)
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
string-encoding=latin1+utf16
)
)
@@ -132,8 +132,8 @@
(func (export "echo-export") (type $sig)
(canon lift
(core func $i "echo-export")
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
string-encoding=latin1+utf16)
)
)
@@ -157,11 +157,11 @@
(func (export "echo-export") (type $export_sig)
(canon lift
(core func $i "echo-export")
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
string-encoding=utf8
async
- (callback (func $i "callback"))
+ (callback (core func $i "callback"))
)
)
)
diff --git a/tests/misc_testsuite/component-model/async/partial-stream-copies.wast b/tests/misc_testsuite/component-model/async/partial-stream-copies.wast
index b83db0652b..9d9a636877 100644
--- a/tests/misc_testsuite/component-model/async/partial-stream-copies.wast
+++ b/tests/misc_testsuite/component-model/async/partial-stream-copies.wast
@@ -109,12 +109,12 @@
)
)
(type $ST (stream u8))
- (canon task.return (result $ST) (memory $memory "mem") (core func $task.return))
+ (canon task.return (result $ST) (memory (core memory $memory "mem")) (core func $task.return))
(canon waitable.join (core func $waitable.join))
(canon waitable-set.new (core func $waitable-set.new))
(canon stream.new $ST (core func $stream.new))
- (canon stream.read $ST async (memory $memory "mem") (core func $stream.read))
- (canon stream.write $ST async (memory $memory "mem") (core func $stream.write))
+ (canon stream.read $ST async (memory (core memory $memory "mem")) (core func $stream.read))
+ (canon stream.write $ST async (memory (core memory $memory "mem")) (core func $stream.write))
(canon stream.drop-readable $ST (core func $stream.drop-readable))
(canon stream.drop-writable $ST (core func $stream.drop-writable))
(core instance $cm (instantiate $CM (with "" (instance
@@ -130,7 +130,7 @@
))))
(func (export "transform") async (param "in" (stream u8)) (result (stream u8)) (canon lift
(core func $cm "transform")
- async (memory $memory "mem") (callback (func $cm "transform_cb"))
+ async (memory (core memory $memory "mem")) (callback (core func $cm "transform_cb"))
))
)
@@ -214,13 +214,13 @@
(type $ST (stream u8))
(canon waitable.join (core func $waitable.join))
(canon waitable-set.new (core func $waitable-set.new))
- (canon waitable-set.wait (memory $memory "mem") (core func $waitable-set.wait))
+ (canon waitable-set.wait (memory (core memory $memory "mem")) (core func $waitable-set.wait))
(canon stream.new $ST (core func $stream.new))
- (canon stream.read $ST async (memory $memory "mem") (core func $stream.read))
- (canon stream.write $ST async (memory $memory "mem") (core func $stream.write))
+ (canon stream.read $ST async (memory (core memory $memory "mem")) (core func $stream.read))
+ (canon stream.write $ST async (memory (core memory $memory "mem")) (core func $stream.write))
(canon stream.drop-readable $ST (core func $stream.drop-readable))
(canon stream.drop-writable $ST (core func $stream.drop-writable))
- (canon lower (func $transform) async (memory $memory "mem") (core func $transform'))
+ (canon lower (func $transform) async (memory (core memory $memory "mem")) (core func $transform'))
(core instance $dm (instantiate $DM (with "" (instance
(export "mem" (memory $memory "mem"))
(export "waitable.join" (func $waitable.join))
diff --git a/tests/misc_testsuite/component-model/async/reenter-during-yield.wast b/tests/misc_testsuite/component-model/async/reenter-during-yield.wast
index 576e7cc6b9..a2131a11a6 100644
--- a/tests/misc_testsuite/component-model/async/reenter-during-yield.wast
+++ b/tests/misc_testsuite/component-model/async/reenter-during-yield.wast
@@ -32,7 +32,7 @@
(canon lift
(core func $a "yield-loop")
async
- (callback (func $a "callback"))
+ (callback (core func $a "callback"))
)
)
(func (export "noop") (canon lift (core func $a "noop")))
diff --git a/tests/misc_testsuite/component-model/async/reentrance.wast b/tests/misc_testsuite/component-model/async/reentrance.wast
index 197798e7cc..06e5a1751d 100644
--- a/tests/misc_testsuite/component-model/async/reentrance.wast
+++ b/tests/misc_testsuite/component-model/async/reentrance.wast
@@ -15,14 +15,14 @@
(with "" (instance (export "task.return" (func $task-return))))
))
(func $shim-export async (param "p1" u32) (result u32)
- (canon lift (core func $shim "export") async (callback (func $shim "callback")))
+ (canon lift (core func $shim "export") async (callback (core func $shim "callback")))
)
(component $inner
(import "import" (func $import async (param "p1" u32) (result u32)))
(core module $libc (memory (export "memory") 1))
(core instance $libc (instantiate $libc))
- (core func $import (canon lower (func $import) async (memory $libc "memory")))
+ (core func $import (canon lower (func $import) async (memory (core memory $libc "memory"))))
(core module $m
(import "libc" "memory" (memory 1))
@@ -47,14 +47,14 @@
(with "libc" (instance $libc))
))
(func (export "export") async (param "p1" u32) (result u32)
- (canon lift (core func $i "export") async (callback (func $i "callback")))
+ (canon lift (core func $i "export") async (callback (core func $i "callback")))
)
)
(instance $inner (instantiate $inner (with "import" (func $shim-export))))
(core module $libc (memory (export "memory") 1))
(core instance $libc (instantiate $libc))
- (core func $inner-export (canon lower (func $inner "export") async (memory $libc "memory")))
+ (core func $inner-export (canon lower (func $inner "export") async (memory (core memory $libc "memory"))))
(core module $donut
(import "" "funcs" (table 1 1 funcref))
@@ -85,7 +85,7 @@
(with "libc" (instance $libc))
))
(func (export "export") async (param "p1" u32) (result u32)
- (canon lift (core func $donut "export") async (callback (func $donut "callback")))
+ (canon lift (core func $donut "export") async (callback (core func $donut "callback")))
)
)
diff --git a/tests/misc_testsuite/component-model/async/stackful.wast b/tests/misc_testsuite/component-model/async/stackful.wast
index b72f88a3cd..30cca1d32c 100644
--- a/tests/misc_testsuite/component-model/async/stackful.wast
+++ b/tests/misc_testsuite/component-model/async/stackful.wast
@@ -36,7 +36,7 @@
(import "a" (func $foo async (param "p1" u32) (result u32)))
(core module $libc (memory (export "memory") 1))
(core instance $libc (instantiate $libc))
- (core func $foo (canon lower (func $foo) async (memory $libc "memory")))
+ (core func $foo (canon lower (func $foo) async (memory (core memory $libc "memory"))))
(core module $m
(import "libc" "memory" (memory 1))
(import "" "foo" (func $foo (param i32 i32) (result i32)))
@@ -113,7 +113,7 @@
(core module $m
(import "" "waitable-set.wait" (func $waitable-set-wait (param i32 i32) (result i32)))
)
- (core func $waitable-set-wait (canon waitable-set.wait cancellable (memory $libc "memory")))
+ (core func $waitable-set-wait (canon waitable-set.wait cancellable (memory (core memory $libc "memory"))))
(core instance $i (instantiate $m (with "" (instance (export "waitable-set.wait" (func $waitable-set-wait))))))
)
@@ -124,7 +124,7 @@
(core module $m
(import "" "waitable-set.poll" (func $waitable-set-poll (param i32 i32) (result i32)))
)
- (core func $waitable-set-poll (canon waitable-set.poll cancellable (memory $libc "memory")))
+ (core func $waitable-set-poll (canon waitable-set.poll cancellable (memory (core memory $libc "memory"))))
(core instance $i (instantiate $m (with "" (instance (export "waitable-set.poll" (func $waitable-set-poll))))))
)
diff --git a/tests/misc_testsuite/component-model/async/stream-big-read-and-writes.wast b/tests/misc_testsuite/component-model/async/stream-big-read-and-writes.wast
index fb0493602c..5443251a09 100644
--- a/tests/misc_testsuite/component-model/async/stream-big-read-and-writes.wast
+++ b/tests/misc_testsuite/component-model/async/stream-big-read-and-writes.wast
@@ -71,7 +71,7 @@
)
(core func $stream.new (canon stream.new $s))
- (core func $stream.write (canon stream.write $s async (memory $libc "memory")))
+ (core func $stream.write (canon stream.write $s async (memory (core memory $libc "memory"))))
(core instance $m (instantiate $m
(with "libc" (instance $libc))
@@ -82,6 +82,6 @@
))
(func (export "run") async
- (canon lift (core func $m "run") async (callback (func $m "cb"))))
+ (canon lift (core func $m "run") async (callback (core func $m "cb"))))
)
(assert_trap (invoke "run") "out of bounds")
diff --git a/tests/misc_testsuite/component-model/async/stream-cancel-finished-op.wast b/tests/misc_testsuite/component-model/async/stream-cancel-finished-op.wast
index 3fdd6b325c..5c2dbe4097 100644
--- a/tests/misc_testsuite/component-model/async/stream-cancel-finished-op.wast
+++ b/tests/misc_testsuite/component-model/async/stream-cancel-finished-op.wast
@@ -180,21 +180,21 @@
(core func $waitable-set.new (canon waitable-set.new))
(core func $waitable.join (canon waitable.join))
- (core func $waitable-set.wait (canon waitable-set.wait (memory $libc "mem")))
- (core func $waitable-set.poll (canon waitable-set.poll (memory $libc "mem")))
+ (core func $waitable-set.wait (canon waitable-set.wait (memory (core memory $libc "mem"))))
+ (core func $waitable-set.poll (canon waitable-set.poll (memory (core memory $libc "mem"))))
(core func $waitable-set.drop (canon waitable-set.drop))
(type $s (stream u8))
(core func $stream.new (canon stream.new $s))
- (core func $stream.read (canon stream.read $s async (memory $libc "mem")))
- (core func $stream.write (canon stream.write $s async (memory $libc "mem")))
+ (core func $stream.read (canon stream.read $s async (memory (core memory $libc "mem"))))
+ (core func $stream.write (canon stream.write $s async (memory (core memory $libc "mem"))))
(core func $stream.cancel-read (canon stream.cancel-read $s))
(core func $stream.cancel-write (canon stream.cancel-write $s))
(core func $stream.drop-readable (canon stream.drop-readable $s))
(core func $stream.drop-writable (canon stream.drop-writable $s))
(type $f (future u8))
(core func $future.new (canon future.new $f))
- (core func $future.read (canon future.read $f async (memory $libc "mem")))
- (core func $future.write (canon future.write $f async (memory $libc "mem")))
+ (core func $future.read (canon future.read $f async (memory (core memory $libc "mem"))))
+ (core func $future.write (canon future.write $f async (memory (core memory $libc "mem"))))
(core func $future.cancel-read (canon future.cancel-read $f))
(core func $future.cancel-write (canon future.cancel-write $f))
(core func $future.drop-readable (canon future.drop-readable $f))
diff --git a/tests/misc_testsuite/component-model/async/stream-zero-ops.wast b/tests/misc_testsuite/component-model/async/stream-zero-ops.wast
index d3d72e1a96..802f999b68 100644
--- a/tests/misc_testsuite/component-model/async/stream-zero-ops.wast
+++ b/tests/misc_testsuite/component-model/async/stream-zero-ops.wast
@@ -60,7 +60,7 @@
(core func $waitable-set.drop (canon waitable-set.drop))
(core instance $libc (instantiate $libc))
- (core func $waitable-set.wait (canon waitable-set.wait (memory $libc "m")))
+ (core func $waitable-set.wait (canon waitable-set.wait (memory (core memory $libc "m"))))
(core instance $i (instantiate $m
(with "libc" (instance $libc))
@@ -174,7 +174,7 @@
(core func $subtask.drop (canon subtask.drop))
(core instance $libc (instantiate $libc))
- (core func $waitable-set.wait (canon waitable-set.wait (memory $libc "m")))
+ (core func $waitable-set.wait (canon waitable-set.wait (memory (core memory $libc "m"))))
(core instance $i (instantiate $m
(with "libc" (instance $libc))
diff --git a/tests/misc_testsuite/component-model/async/streams-massive-send.wast b/tests/misc_testsuite/component-model/async/streams-massive-send.wast
index cef67174de..3b1de46bfa 100644
--- a/tests/misc_testsuite/component-model/async/streams-massive-send.wast
+++ b/tests/misc_testsuite/component-model/async/streams-massive-send.wast
@@ -139,9 +139,9 @@
(func (export "cb") (param i32 i32 i32) (result i32) unreachable)
)
(core func $future.new (canon future.new $f))
- (core func $future.write (canon future.write $f (memory $libc "memory")))
+ (core func $future.write (canon future.write $f (memory (core memory $libc "memory"))))
(core func $stream.new (canon stream.new $s))
- (core func $stream.write (canon stream.write $s (memory $libc "memory")))
+ (core func $stream.write (canon stream.write $s (memory (core memory $libc "memory"))))
(core func $task.return-future (canon task.return (result $f)))
(core func $task.return-stream (canon task.return (result $s)))
(core instance $m (instantiate $m
@@ -158,10 +158,10 @@
(func (export "big-stream") async (result $s)
(canon lift (core func $m "big-stream") async
- (callback (func $m "cb"))))
+ (callback (core func $m "cb"))))
(func (export "big-future") async (result $f)
(canon lift (core func $m "big-future") async
- (callback (func $m "cb"))))
+ (callback (core func $m "cb"))))
)
(component $B
@@ -203,14 +203,14 @@
(core func $big-future (canon lower (func $a "big-future")))
(core func $stream.read
(canon stream.read $s
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
)
)
(core func $future.read
(canon future.read $f
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
)
)
(core instance $m (instantiate $m
diff --git a/tests/misc_testsuite/component-model/async/streams.wast b/tests/misc_testsuite/component-model/async/streams.wast
index 9cff682c88..38c8d111c6 100644
--- a/tests/misc_testsuite/component-model/async/streams.wast
+++ b/tests/misc_testsuite/component-model/async/streams.wast
@@ -18,7 +18,7 @@
(import "" "stream.read" (func $stream-read (param i32 i32 i32) (result i32)))
)
(type $stream-type (stream u8))
- (core func $stream-read (canon stream.read $stream-type async (memory $libc "memory")))
+ (core func $stream-read (canon stream.read $stream-type async (memory (core memory $libc "memory"))))
(core instance $i (instantiate $m (with "" (instance (export "stream.read" (func $stream-read))))))
)
@@ -43,7 +43,7 @@
(import "" "stream.read" (func $stream-read (param i32 i32 i32) (result i32)))
)
(type $stream-type (stream string))
- (core func $stream-read (canon stream.read $stream-type async (memory $libc "memory") (realloc (func $libc "realloc"))))
+ (core func $stream-read (canon stream.read $stream-type async (memory (core memory $libc "memory")) (realloc (core func $libc "realloc"))))
(core instance $i (instantiate $m (with "" (instance (export "stream.read" (func $stream-read))))))
)
@@ -55,7 +55,7 @@
(import "" "stream.write" (func $stream-write (param i32 i32 i32) (result i32)))
)
(type $stream-type (stream u8))
- (core func $stream-write (canon stream.write $stream-type async (memory $libc "memory")))
+ (core func $stream-write (canon stream.write $stream-type async (memory (core memory $libc "memory"))))
(core instance $i (instantiate $m (with "" (instance (export "stream.write" (func $stream-write))))))
)
@@ -169,8 +169,8 @@
)
(type $s (stream u8))
(core func $stream.new (canon stream.new $s))
- (core func $stream.read (canon stream.read $s async (memory $libc "mem")))
- (core func $stream.write (canon stream.write $s async (memory $libc "mem")))
+ (core func $stream.read (canon stream.read $s async (memory (core memory $libc "mem"))))
+ (core func $stream.write (canon stream.write $s async (memory (core memory $libc "mem"))))
(core instance $ics (instantiate $ics
(with "" (instance
(export "stream.new" (func $stream.new))
diff --git a/tests/misc_testsuite/component-model/async/subtask-wait.wast b/tests/misc_testsuite/component-model/async/subtask-wait.wast
index 999c87d3a2..e671b58016 100644
--- a/tests/misc_testsuite/component-model/async/subtask-wait.wast
+++ b/tests/misc_testsuite/component-model/async/subtask-wait.wast
@@ -17,7 +17,7 @@
(core instance $a (instantiate $a))
(func (export "run") async
- (canon lift (core func $a "run") async (callback (func $a "run-cb"))))
+ (canon lift (core func $a "run") async (callback (core func $a "run-cb"))))
)
(component $B
(import "a" (instance $a (export "run" (func async))))
@@ -29,7 +29,7 @@
(core func $new (canon waitable-set.new))
(core func $join (canon waitable.join))
(core func $drop (canon waitable-set.drop))
- (core func $wait (canon waitable-set.wait (memory $libc "memory")))
+ (core func $wait (canon waitable-set.wait (memory (core memory $libc "memory"))))
(core module $b
(import "" "run" (func $run_a (result i32)))
diff --git a/tests/misc_testsuite/component-model/async/sync-and-async-waitable.wast b/tests/misc_testsuite/component-model/async/sync-and-async-waitable.wast
index ac9491bfbc..1b8e026d20 100644
--- a/tests/misc_testsuite/component-model/async/sync-and-async-waitable.wast
+++ b/tests/misc_testsuite/component-model/async/sync-and-async-waitable.wast
@@ -49,9 +49,9 @@
)
(canon waitable.join (core func $waitable.join))
(canon waitable-set.new (core func $waitable-set.new))
- (canon waitable-set.wait (memory $memory "mem") (core func $waitable-set.wait))
+ (canon waitable-set.wait (memory (core memory $memory "mem")) (core func $waitable-set.wait))
(canon future.new $FT (core func $future.new))
- (canon future.write $FT (memory $memory "mem") (core func $future.write-sync))
+ (canon future.write $FT (memory (core memory $memory "mem")) (core func $future.write-sync))
(core instance $cm (instantiate $CM (with "" (instance
(export "mem" (memory $memory "mem"))
(export "waitable.join" (func $waitable.join))
@@ -102,9 +102,9 @@
(call $acknowledge-future-write)
)
)
- (canon future.read $FT async (memory $memory "mem") (core func $future.read))
+ (canon future.read $FT async (memory (core memory $memory "mem")) (core func $future.read))
(canon lower (func $c "start-future") (core func $start-future'))
- (canon lower (func $c "future-write-sync") async (memory $memory "mem") (core func $future-write-sync.async))
+ (canon lower (func $c "future-write-sync") async (memory (core memory $memory "mem")) (core func $future-write-sync.async))
(canon lower (func $c "acknowledge-future-write") (core func $acknowledge-future-write'))
(core instance $core (instantiate $Core (with "" (instance
(export "mem" (memory $memory "mem"))
diff --git a/tests/misc_testsuite/component-model/async/sync-streams.wast b/tests/misc_testsuite/component-model/async/sync-streams.wast
index c7dfb35092..e7f96b5cb2 100644
--- a/tests/misc_testsuite/component-model/async/sync-streams.wast
+++ b/tests/misc_testsuite/component-model/async/sync-streams.wast
@@ -78,11 +78,11 @@
)
)
(type $ST (stream u8))
- (canon task.return (memory $memory "mem") (core func $task.return0))
- (canon task.return (result $ST) (memory $memory "mem") (core func $task.return1))
+ (canon task.return (memory (core memory $memory "mem")) (core func $task.return0))
+ (canon task.return (result $ST) (memory (core memory $memory "mem")) (core func $task.return1))
(canon stream.new $ST (core func $stream.new))
- (canon stream.read $ST (memory $memory "mem") (core func $stream.read))
- (canon stream.write $ST (memory $memory "mem") (core func $stream.write))
+ (canon stream.read $ST (memory (core memory $memory "mem")) (core func $stream.read))
+ (canon stream.write $ST (memory (core memory $memory "mem")) (core func $stream.write))
(canon stream.drop-readable $ST (core func $stream.drop-readable))
(canon stream.drop-writable $ST (core func $stream.drop-writable))
(core instance $cm (instantiate $CM (with "" (instance
@@ -97,11 +97,11 @@
))))
(func (export "get") async (result (stream u8)) (canon lift
(core func $cm "get")
- async (memory $memory "mem") (callback (func $cm "get_cb"))
+ async (memory (core memory $memory "mem")) (callback (core func $cm "get_cb"))
))
(func (export "set") async (param "in" (stream u8)) (canon lift
(core func $cm "set")
- async (memory $memory "mem") (callback (func $cm "set_cb"))
+ async (memory (core memory $memory "mem")) (callback (core func $cm "set_cb"))
))
)
(component $D
@@ -157,8 +157,8 @@
)
(type $ST (stream u8))
(canon stream.new $ST (core func $stream.new))
- (canon stream.read $ST async (memory $memory "mem") (core func $stream.read))
- (canon stream.write $ST async (memory $memory "mem") (core func $stream.write))
+ (canon stream.read $ST async (memory (core memory $memory "mem")) (core func $stream.read))
+ (canon stream.write $ST async (memory (core memory $memory "mem")) (core func $stream.write))
(canon stream.drop-readable $ST (core func $stream.drop-readable))
(canon stream.drop-writable $ST (core func $stream.drop-writable))
(canon lower (func $get) (core func $get'))
diff --git a/tests/misc_testsuite/component-model/async/task-builtins.wast b/tests/misc_testsuite/component-model/async/task-builtins.wast
index e266ef6e21..e2910f9acc 100644
--- a/tests/misc_testsuite/component-model/async/task-builtins.wast
+++ b/tests/misc_testsuite/component-model/async/task-builtins.wast
@@ -37,7 +37,7 @@
(core module $m
(import "" "waitable-set.wait" (func $waitable-set-wait (param i32 i32) (result i32)))
)
- (core func $waitable-set-wait (canon waitable-set.wait (memory $libc "memory")))
+ (core func $waitable-set-wait (canon waitable-set.wait (memory (core memory $libc "memory"))))
(core instance $i (instantiate $m (with "" (instance (export "waitable-set.wait" (func $waitable-set-wait))))))
)
@@ -48,7 +48,7 @@
(core module $m
(import "" "waitable-set.poll" (func $waitable-set-poll (param i32 i32) (result i32)))
)
- (core func $waitable-set-poll (canon waitable-set.poll (memory $libc "memory")))
+ (core func $waitable-set-poll (canon waitable-set.poll (memory (core memory $libc "memory"))))
(core instance $i (instantiate $m (with "" (instance (export "waitable-set.poll" (func $waitable-set-poll))))))
)
@@ -118,7 +118,7 @@
(export "context.set" (func $context.set))
))))
(func (export "run")
- (canon lift (core func $dm "run") (post-return (func $dm "post-return"))))
+ (canon lift (core func $dm "run") (post-return (core func $dm "post-return"))))
)
(assert_return (invoke "run"))
@@ -192,8 +192,8 @@
))))
(func (export "run") (param "x" string)
(canon lift (core func $m "run")
- (realloc (func $libc "realloc"))
- (memory $libc "memory")
+ (realloc (core func $libc "realloc"))
+ (memory (core memory $libc "memory"))
)
)
)
@@ -207,7 +207,7 @@
(core module $libc (memory (export "memory") 1))
(core instance $libc (instantiate $libc))
- (core func $task.return (canon task.return (result string) (memory $libc "memory")))
+ (core func $task.return (canon task.return (result string) (memory (core memory $libc "memory"))))
(core module $m
(import "" "task.return" (func $task.return (param i32 i32)))
@@ -240,11 +240,11 @@
))
))
(func (export "run-sync") (result string)
- (canon lift (core func $m "run-sync") (memory $libc "memory"))
+ (canon lift (core func $m "run-sync") (memory (core memory $libc "memory")))
)
(func (export "run-async") async (result string)
- (canon lift (core func $m "run-async") (memory $libc "memory") async
- (callback (func $m "run-async-cb")))
+ (canon lift (core func $m "run-async") (memory (core memory $libc "memory")) async
+ (callback (core func $m "run-async-cb")))
)
)
@@ -291,28 +291,28 @@
(core func $sync-to-sync
(canon lower (func $a "run-sync")
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
)
)
(core func $async-to-sync
(canon lower (func $a "run-async")
async
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
)
)
(core func $sync-to-async
(canon lower (func $a "run-sync")
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
)
)
(core func $async-to-async
(canon lower (func $a "run-async")
async
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
)
)
@@ -435,8 +435,8 @@
(core func $run
(canon lower (func $host "return-hi")
- (memory $libc "memory")
- (realloc (func $libc "realloc"))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))
)
)
@@ -480,8 +480,8 @@
(core module $libc
(memory (export "memory") 1))
(core instance $libc (instantiate $libc))
- (core func $run-reader-future (canon lower (func $reader "run-future") (memory $libc "memory") async))
- (core func $run-reader-stream (canon lower (func $reader "run-stream") (memory $libc "memory") async))
+ (core func $run-reader-future (canon lower (func $reader "run-future") (memory (core memory $libc "memory")) async))
+ (core func $run-reader-stream (canon lower (func $reader "run-stream") (memory (core memory $libc "memory")) async))
(core module $m
(import "" "future.write" (func $future.write (param i32 i32) (result i32)))
(import "" "stream.write" (func $stream.write (param i32 i32 i32) (result i32)))
@@ -573,13 +573,13 @@
)
(canon future.new $FT (core func $future.new))
(canon future.write $FT async
- (memory $libc "memory") (core func $future.write))
+ (memory (core memory $libc "memory")) (core func $future.write))
(canon stream.new $ST (core func $stream.new))
(canon stream.write $ST async
- (memory $libc "memory") (core func $stream.write))
+ (memory (core memory $libc "memory")) (core func $stream.write))
(canon waitable.join (core func $waitable.join))
(canon waitable-set.new (core func $waitable-set.new))
- (canon task.return (result u32) (memory $libc "memory") (core func $task.return))
+ (canon task.return (result u32) (memory (core memory $libc "memory")) (core func $task.return))
(canon context.set i32 0 (core func $context.set))
(core instance $M (instantiate $m (with "" (instance
@@ -596,8 +596,8 @@
))))
(func (export "run") async (result u32)
- (canon lift (core func $M "run") (memory $libc "memory")
- async (callback (func $M "run-cb")))
+ (canon lift (core func $M "run") (memory (core memory $libc "memory"))
+ async (callback (core func $M "run-cb")))
)
)
@@ -646,14 +646,14 @@
(type $ST (stream string))
(canon future.new $FT (core func $future.new))
(canon future.read $FT
- (memory $libc "memory") (realloc (func $libc "realloc")) (core func $future.read))
+ (memory (core memory $libc "memory")) (realloc (core func $libc "realloc")) (core func $future.read))
(canon stream.new $ST (core func $stream.new))
(canon stream.read $ST
- (memory $libc "memory") (realloc (func $libc "realloc")) (core func $stream.read))
+ (memory (core memory $libc "memory")) (realloc (core func $libc "realloc")) (core func $stream.read))
(canon waitable.join (core func $waitable.join))
(canon waitable-set.new (core func $waitable-set.new))
- (canon waitable-set.wait (memory $libc "memory") (core func $waitable-set.wait))
- (canon task.return (result u32) (memory $libc "memory") (core func $task.return))
+ (canon waitable-set.wait (memory (core memory $libc "memory")) (core func $waitable-set.wait))
+ (canon task.return (result u32) (memory (core memory $libc "memory")) (core func $task.return))
(core module $m
(import "" "future.read" (func $future.read (param i32 i32) (result i32)))
@@ -700,13 +700,13 @@
(export "task.return" (func $task.return))
(export "memory" (memory 1))))))
(func (export "run-future") async (param "future" $FT) (result u32)
- (canon lift (core func $M "run-future") (memory $libc "memory") (realloc (func $libc "realloc"))
- async (callback (func $M "run-cb"))
+ (canon lift (core func $M "run-future") (memory (core memory $libc "memory")) (realloc (core func $libc "realloc"))
+ async (callback (core func $M "run-cb"))
)
)
(func (export "run-stream") async (param "stream" $ST) (result u32)
- (canon lift (core func $M "run-stream") (memory $libc "memory") (realloc (func $libc "realloc"))
- async (callback (func $M "run-cb"))
+ (canon lift (core func $M "run-stream") (memory (core memory $libc "memory")) (realloc (core func $libc "realloc"))
+ async (callback (core func $M "run-cb"))
)
)
)
diff --git a/tests/misc_testsuite/component-model/async/task-deletion.wast b/tests/misc_testsuite/component-model/async/task-deletion.wast
index 76c08e6904..6e0b73a7d6 100644
--- a/tests/misc_testsuite/component-model/async/task-deletion.wast
+++ b/tests/misc_testsuite/component-model/async/task-deletion.wast
@@ -110,7 +110,7 @@
(core func $task-return (canon task.return (result u32)))
(core func $task-cancel (canon task.cancel))
(core func $thread-new-indirect
- (canon thread.new-indirect $start-func-ty (table $indirect-function-table)))
+ (canon thread.new-indirect $start-func-ty (core table $indirect-function-table)))
(core func $thread-yield (canon thread.yield))
(core func $thread-yield-cancellable (canon thread.yield cancellable))
(core func $thread-index (canon thread.index))
@@ -123,7 +123,7 @@
(core func $thread-suspend-cancellable (canon thread.suspend cancellable))
(core func $waitable-set.new (canon waitable-set.new))
(core func $waitable.join (canon waitable.join))
- (core func $waitable-set.wait (canon waitable-set.wait (memory $memory "mem")))
+ (core func $waitable-set.wait (canon waitable-set.wait (memory (core memory $memory "mem"))))
;; Instantiate the main module
(core instance $cm (
@@ -151,19 +151,19 @@
(func (export "explicit-thread-calls-return-stackful") async (result u32)
(canon lift (core func $cm "explicit-thread-calls-return-stackful") async))
(func (export "explicit-thread-calls-return-stackless") async (result u32)
- (canon lift (core func $cm "explicit-thread-calls-return-stackless") async (callback (func $cm "cb"))))
+ (canon lift (core func $cm "explicit-thread-calls-return-stackless") async (callback (core func $cm "cb"))))
(func (export "explicit-thread-suspends-sync") async (result u32)
(canon lift (core func $cm "explicit-thread-suspends-sync")))
(func (export "explicit-thread-suspends-stackful") async (result u32)
(canon lift (core func $cm "explicit-thread-suspends-stackful") async))
(func (export "explicit-thread-suspends-stackless") async (result u32)
- (canon lift (core func $cm "explicit-thread-suspends-stackless") async (callback (func $cm "cb"))))
+ (canon lift (core func $cm "explicit-thread-suspends-stackless") async (callback (core func $cm "cb"))))
(func (export "explicit-thread-yield-loops-sync") async (result u32)
(canon lift (core func $cm "explicit-thread-yield-loops-sync")))
(func (export "explicit-thread-yield-loops-stackful") async (result u32)
(canon lift (core func $cm "explicit-thread-yield-loops-stackful") async))
(func (export "explicit-thread-yield-loops-stackless") async (result u32)
- (canon lift (core func $cm "explicit-thread-yield-loops-stackless") async (callback (func $cm "cb"))))
+ (canon lift (core func $cm "explicit-thread-yield-loops-stackless") async (callback (core func $cm "cb"))))
)
(component $D
@@ -249,28 +249,28 @@
)
(core func $waitable-set.new (canon waitable-set.new))
- (core func $waitable-set.wait (canon waitable-set.wait (memory $memory "mem")))
+ (core func $waitable-set.wait (canon waitable-set.wait (memory (core memory $memory "mem"))))
(core func $waitable.join (canon waitable.join))
(core func $subtask.cancel (canon subtask.cancel async))
(core func $thread.yield (canon thread.yield))
;; sync lowered
- (canon lower (func $explicit-thread-calls-return-stackful) (memory $memory "mem") (core func $explicit-thread-calls-return-stackful'))
- (canon lower (func $explicit-thread-calls-return-stackless) (memory $memory "mem") (core func $explicit-thread-calls-return-stackless'))
- (canon lower (func $explicit-thread-suspends-sync) (memory $memory "mem") (core func $explicit-thread-suspends-sync'))
- (canon lower (func $explicit-thread-suspends-stackful) (memory $memory "mem") (core func $explicit-thread-suspends-stackful'))
- (canon lower (func $explicit-thread-suspends-stackless) (memory $memory "mem") (core func $explicit-thread-suspends-stackless'))
- (canon lower (func $explicit-thread-yield-loops-sync) (memory $memory "mem") (core func $explicit-thread-yield-loops-sync'))
- (canon lower (func $explicit-thread-yield-loops-stackful) (memory $memory "mem") (core func $explicit-thread-yield-loops-stackful'))
- (canon lower (func $explicit-thread-yield-loops-stackless) (memory $memory "mem") (core func $explicit-thread-yield-loops-stackless'))
+ (canon lower (func $explicit-thread-calls-return-stackful) (memory (core memory $memory "mem")) (core func $explicit-thread-calls-return-stackful'))
+ (canon lower (func $explicit-thread-calls-return-stackless) (memory (core memory $memory "mem")) (core func $explicit-thread-calls-return-stackless'))
+ (canon lower (func $explicit-thread-suspends-sync) (memory (core memory $memory "mem")) (core func $explicit-thread-suspends-sync'))
+ (canon lower (func $explicit-thread-suspends-stackful) (memory (core memory $memory "mem")) (core func $explicit-thread-suspends-stackful'))
+ (canon lower (func $explicit-thread-suspends-stackless) (memory (core memory $memory "mem")) (core func $explicit-thread-suspends-stackless'))
+ (canon lower (func $explicit-thread-yield-loops-sync) (memory (core memory $memory "mem")) (core func $explicit-thread-yield-loops-sync'))
+ (canon lower (func $explicit-thread-yield-loops-stackful) (memory (core memory $memory "mem")) (core func $explicit-thread-yield-loops-stackful'))
+ (canon lower (func $explicit-thread-yield-loops-stackless) (memory (core memory $memory "mem")) (core func $explicit-thread-yield-loops-stackless'))
;; async lowered
- (canon lower (func $explicit-thread-calls-return-stackful) async (memory $memory "mem") (core func $explicit-thread-calls-return-stackful-async'))
- (canon lower (func $explicit-thread-calls-return-stackless) async (memory $memory "mem") (core func $explicit-thread-calls-return-stackless-async'))
- (canon lower (func $explicit-thread-suspends-sync) async (memory $memory "mem") (core func $explicit-thread-suspends-sync-async'))
- (canon lower (func $explicit-thread-suspends-stackful) async (memory $memory "mem") (core func $explicit-thread-suspends-stackful-async'))
- (canon lower (func $explicit-thread-suspends-stackless) async (memory $memory "mem") (core func $explicit-thread-suspends-stackless-async'))
- (canon lower (func $explicit-thread-yield-loops-sync) async (memory $memory "mem") (core func $explicit-thread-yield-loops-sync-async'))
- (canon lower (func $explicit-thread-yield-loops-stackful) async (memory $memory "mem") (core func $explicit-thread-yield-loops-stackful-async'))
- (canon lower (func $explicit-thread-yield-loops-stackless) async (memory $memory "mem") (core func $explicit-thread-yield-loops-stackless-async'))
+ (canon lower (func $explicit-thread-calls-return-stackful) async (memory (core memory $memory "mem")) (core func $explicit-thread-calls-return-stackful-async'))
+ (canon lower (func $explicit-thread-calls-return-stackless) async (memory (core memory $memory "mem")) (core func $explicit-thread-calls-return-stackless-async'))
+ (canon lower (func $explicit-thread-suspends-sync) async (memory (core memory $memory "mem")) (core func $explicit-thread-suspends-sync-async'))
+ (canon lower (func $explicit-thread-suspends-stackful) async (memory (core memory $memory "mem")) (core func $explicit-thread-suspends-stackful-async'))
+ (canon lower (func $explicit-thread-suspends-stackless) async (memory (core memory $memory "mem")) (core func $explicit-thread-suspends-stackless-async'))
+ (canon lower (func $explicit-thread-yield-loops-sync) async (memory (core memory $memory "mem")) (core func $explicit-thread-yield-loops-sync-async'))
+ (canon lower (func $explicit-thread-yield-loops-stackful) async (memory (core memory $memory "mem")) (core func $explicit-thread-yield-loops-stackful-async'))
+ (canon lower (func $explicit-thread-yield-loops-stackless) async (memory (core memory $memory "mem")) (core func $explicit-thread-yield-loops-stackless-async'))
(core instance $dm (instantiate $DM (with "" (instance
(export "mem" (memory $memory "mem"))
(export "explicit-thread-calls-return-stackful" (func $explicit-thread-calls-return-stackful'))
diff --git a/tests/misc_testsuite/component-model/async/task-return-traps.wast b/tests/misc_testsuite/component-model/async/task-return-traps.wast
index 94b2c7dc24..8df62ac06f 100644
--- a/tests/misc_testsuite/component-model/async/task-return-traps.wast
+++ b/tests/misc_testsuite/component-model/async/task-return-traps.wast
@@ -14,7 +14,7 @@
(core instance $i (instantiate $m
(with "" (instance (export "task.return" (func $task-return))))
))
- (func (export "foo") async (canon lift (core func $i "foo") async (callback (func $i "callback"))))
+ (func (export "foo") async (canon lift (core func $i "foo") async (callback (core func $i "callback"))))
)
(assert_trap (invoke "foo") "async-lifted export failed to produce a result")
@@ -39,7 +39,7 @@
(core type $start-func-ty (func (param i32)))
(alias core export $libc "__indirect_function_table" (core table $indirect-function-table))
(core func $thread-new-indirect
- (canon thread.new-indirect $start-func-ty (table $indirect-function-table)))
+ (canon thread.new-indirect $start-func-ty (core table $indirect-function-table)))
(core func $thread.resume-later (canon thread.resume-later))
(core func $task-return (canon task.return))
(core instance $i (instantiate $m
@@ -50,7 +50,7 @@
))
(with "libc" (instance $libc))
))
- (func (export "foo") async (canon lift (core func $i "foo") async (callback (func $i "callback"))))
+ (func (export "foo") async (canon lift (core func $i "foo") async (callback (core func $i "callback"))))
)
(assert_trap (invoke "foo") "async-lifted export failed to produce a result")
@@ -74,7 +74,7 @@
(core type $start-func-ty (func (param i32)))
(alias core export $libc "__indirect_function_table" (core table $indirect-function-table))
(core func $thread-new-indirect
- (canon thread.new-indirect $start-func-ty (table $indirect-function-table)))
+ (canon thread.new-indirect $start-func-ty (core table $indirect-function-table)))
(core func $thread.resume-later (canon thread.resume-later))
(core func $task-return (canon task.return))
(core instance $i (instantiate $m
@@ -125,7 +125,7 @@
(import "" "task.return" (func $task-return))
(func (export "foo") (call $task-return))
)
- (core func $task-return (canon task.return (memory $libc "memory")))
+ (core func $task-return (canon task.return (memory (core memory $libc "memory"))))
(core instance $i (instantiate $m
(with "" (instance (export "task.return" (func $task-return))))
))
diff --git a/tests/misc_testsuite/component-model/async/trap-if-done.wast b/tests/misc_testsuite/component-model/async/trap-if-done.wast
index 49e64cb103..d9812e14f2 100644
--- a/tests/misc_testsuite/component-model/async/trap-if-done.wast
+++ b/tests/misc_testsuite/component-model/async/trap-if-done.wast
@@ -116,14 +116,14 @@
(type $ST (stream u8))
(canon waitable.join (core func $waitable.join))
(canon waitable-set.new (core func $waitable-set.new))
- (canon waitable-set.wait (memory $memory "mem") (core func $waitable-set.wait))
+ (canon waitable-set.wait (memory (core memory $memory "mem")) (core func $waitable-set.wait))
(canon future.new $FT (core func $future.new))
- (canon future.write $FT async (memory $memory "mem") (core func $future.write))
- (canon future.write $FT (memory $memory "mem") (core func $future.write-sync))
+ (canon future.write $FT async (memory (core memory $memory "mem")) (core func $future.write))
+ (canon future.write $FT (memory (core memory $memory "mem")) (core func $future.write-sync))
(canon future.drop-writable $FT (core func $future.drop-writable))
(canon stream.new $ST (core func $stream.new))
- (canon stream.write $ST async (memory $memory "mem") (core func $stream.write))
- (canon stream.write $ST (memory $memory "mem") (core func $stream.write-sync))
+ (canon stream.write $ST async (memory (core memory $memory "mem")) (core func $stream.write))
+ (canon stream.write $ST (memory (core memory $memory "mem")) (core func $stream.write-sync))
(canon stream.drop-writable $ST (core func $stream.drop-writable))
(core instance $cm (instantiate $CM (with "" (instance
(export "mem" (memory $memory "mem"))
@@ -507,19 +507,19 @@
(type $ST (stream u8))
(canon waitable.join (core func $waitable.join))
(canon waitable-set.new (core func $waitable-set.new))
- (canon waitable-set.wait (memory $memory "mem") (core func $waitable-set.wait))
+ (canon waitable-set.wait (memory (core memory $memory "mem")) (core func $waitable-set.wait))
(canon future.new $FT (core func $future.new))
- (canon future.read $FT async (memory $memory "mem") (core func $future.read))
- (canon future.read $FT (memory $memory "mem") (core func $future.read-sync))
+ (canon future.read $FT async (memory (core memory $memory "mem")) (core func $future.read))
+ (canon future.read $FT (memory (core memory $memory "mem")) (core func $future.read-sync))
(canon future.drop-readable $FT (core func $future.drop-readable))
(canon stream.new $ST (core func $stream.new))
- (canon stream.read $ST async (memory $memory "mem") (core func $stream.read))
- (canon stream.read $ST (memory $memory "mem") (core func $stream.read-sync))
+ (canon stream.read $ST async (memory (core memory $memory "mem")) (core func $stream.read))
+ (canon stream.read $ST (memory (core memory $memory "mem")) (core func $stream.read-sync))
(canon stream.drop-readable $ST (core func $stream.drop-readable))
(canon lower (func $c "start-future") (core func $start-future'))
(canon lower (func $c "future-write") (core func $future-write'))
(canon lower (func $c "future-write-sync") (core func $future-write-sync.sync))
- (canon lower (func $c "future-write-sync") async (memory $memory "mem") (core func $future-write-sync.async))
+ (canon lower (func $c "future-write-sync") async (memory (core memory $memory "mem")) (core func $future-write-sync.async))
(canon lower (func $c "acknowledge-future-write") (core func $acknowledge-future-write'))
(canon lower (func $c "future-drop-writable") (core func $future-drop-writable'))
(canon lower (func $c "start-stream") (core func $start-stream'))
@@ -673,8 +673,8 @@
(core module $libc (memory (export "memory") 1))
(core instance $libc (instantiate $libc))
(core func $new (canon future.new $f))
- (core func $read (canon future.read $f async (memory $libc "memory")))
- (core func $write (canon future.write $f async (memory $libc "memory")))
+ (core func $read (canon future.read $f async (memory (core memory $libc "memory"))))
+ (core func $write (canon future.write $f async (memory (core memory $libc "memory"))))
(core func $consume (canon lower (func $consume-import)))
(core module $m
(import "" "new" (func $new (result i64)))
diff --git a/tests/misc_testsuite/component-model/async/wait-forever.wast b/tests/misc_testsuite/component-model/async/wait-forever.wast
index e25b29ac40..82ce24b2a1 100644
--- a/tests/misc_testsuite/component-model/async/wait-forever.wast
+++ b/tests/misc_testsuite/component-model/async/wait-forever.wast
@@ -30,7 +30,7 @@
))
(func (export "run") async
- (canon lift (core func $i "run") async (callback (func $i "cb"))))
+ (canon lift (core func $i "run") async (callback (core func $i "cb"))))
)
(instance $child (instantiate $child))
diff --git a/tests/misc_testsuite/component-model/async/wait-forever2.wast b/tests/misc_testsuite/component-model/async/wait-forever2.wast
index 21e0ba4eb4..6c48fadd93 100644
--- a/tests/misc_testsuite/component-model/async/wait-forever2.wast
+++ b/tests/misc_testsuite/component-model/async/wait-forever2.wast
@@ -27,7 +27,7 @@
))))
(func (export "f") async (result u32) (canon lift
(core func $cm "f")
- async (memory $memory "mem") (callback (func $cm "cb"))
+ async (memory (core memory $memory "mem")) (callback (core func $cm "cb"))
))
)
@@ -55,8 +55,8 @@
)
(canon waitable.join (core func $waitable.join))
(canon waitable-set.new (core func $waitable-set.new))
- (canon waitable-set.wait (memory $memory "mem") (core func $waitable-set.wait))
- (canon lower (func $f) async (memory $memory "mem") (core func $f'))
+ (canon waitable-set.wait (memory (core memory $memory "mem")) (core func $waitable-set.wait))
+ (canon lower (func $f) async (memory (core memory $memory "mem")) (core func $f'))
(core instance $dm (instantiate $DM (with "" (instance
(export "mem" (memory $memory "mem"))
(export "waitable.join" (func $waitable.join))
diff --git a/tests/misc_testsuite/component-model/async/waitable-set-stale-entry.wast b/tests/misc_testsuite/component-model/async/waitable-set-stale-entry.wast
index 8138d36581..be126f2533 100644
--- a/tests/misc_testsuite/component-model/async/waitable-set-stale-entry.wast
+++ b/tests/misc_testsuite/component-model/async/waitable-set-stale-entry.wast
@@ -11,8 +11,8 @@
(core func $waitable-set.new (canon waitable-set.new))
(core func $waitable-set.drop (canon waitable-set.drop))
(core func $waitable.join (canon waitable.join))
- (core func $waitable-set.poll (canon waitable-set.poll (memory $libc "m")))
- (core func $waitable-set.wait (canon waitable-set.wait (memory $libc "m")))
+ (core func $waitable-set.poll (canon waitable-set.poll (memory (core memory $libc "m"))))
+ (core func $waitable-set.wait (canon waitable-set.wait (memory (core memory $libc "m"))))
(core module $m
(import "" "m" (memory 1))
@@ -114,7 +114,7 @@
(func (export "drop-read-then-wait") async (canon lift (core func $i "drop-read-then-wait")))
(func (export "drop-write-then-poll") async (canon lift (core func $i "drop-write-then-poll")))
(func (export "drop-read-then-wait-cb") async
- (canon lift (core func $i "drop-read-then-wait-cb") async (callback (func $i "cb")))
+ (canon lift (core func $i "drop-read-then-wait-cb") async (callback (core func $i "cb")))
)
(func (export "drop-readable-leaves-set") async (canon lift (core func $i "drop-readable-leaves-set")))
(func (export "drop-writable-leaves-set") async (canon lift (core func $i "drop-writable-leaves-set")))
diff --git a/tests/misc_testsuite/component-model/async/yield-when-cancelled.wast b/tests/misc_testsuite/component-model/async/yield-when-cancelled.wast
index bc2e679c01..e72d774403 100644
--- a/tests/misc_testsuite/component-model/async/yield-when-cancelled.wast
+++ b/tests/misc_testsuite/component-model/async/yield-when-cancelled.wast
@@ -48,7 +48,7 @@
))
))
- (func (export "f") async (canon lift (core func $i "f") async (callback (func $i "f-callback"))))
+ (func (export "f") async (canon lift (core func $i "f") async (callback (core func $i "f-callback"))))
)
(instance $a (instantiate $a))
diff --git a/tests/misc_testsuite/component-model/big-strings.wast b/tests/misc_testsuite/component-model/big-strings.wast
index d0c36510c9..b31a47c7a5 100644
--- a/tests/misc_testsuite/component-model/big-strings.wast
+++ b/tests/misc_testsuite/component-model/big-strings.wast
@@ -53,24 +53,24 @@
(func (export "utf8") (param "x" string)
(canon lift
(core func $i "f")
- (memory $i "m")
- (realloc (func $i "realloc"))
+ (memory (core memory $i "m"))
+ (realloc (core func $i "realloc"))
string-encoding=utf8
)
)
(func (export "utf16") (param "x" string)
(canon lift
(core func $i "f")
- (memory $i "m")
- (realloc (func $i "realloc"))
+ (memory (core memory $i "m"))
+ (realloc (core func $i "realloc"))
string-encoding=utf16
)
)
(func (export "latin1-utf16") (param "x" string)
(canon lift
(core func $i "f")
- (memory $i "m")
- (realloc (func $i "realloc"))
+ (memory (core memory $i "m"))
+ (realloc (core func $i "realloc"))
string-encoding=latin1+utf16
)
)
@@ -88,17 +88,17 @@
(core module $libc (memory (export "mem") 1))
(core instance $libc (instantiate $libc))
- (core func $utf8-utf8 (canon lower (func $a "utf8") string-encoding=utf8 (memory $libc "mem")))
- (core func $utf8-utf16 (canon lower (func $a "utf16") string-encoding=utf8 (memory $libc "mem")))
- (core func $utf8-latin1+utf16 (canon lower (func $a "latin1-utf16") string-encoding=utf8 (memory $libc "mem")))
+ (core func $utf8-utf8 (canon lower (func $a "utf8") string-encoding=utf8 (memory (core memory $libc "mem"))))
+ (core func $utf8-utf16 (canon lower (func $a "utf16") string-encoding=utf8 (memory (core memory $libc "mem"))))
+ (core func $utf8-latin1+utf16 (canon lower (func $a "latin1-utf16") string-encoding=utf8 (memory (core memory $libc "mem"))))
- (core func $utf16-utf8 (canon lower (func $a "utf8") string-encoding=utf16 (memory $libc "mem")))
- (core func $utf16-utf16 (canon lower (func $a "utf16") string-encoding=utf16 (memory $libc "mem")))
- (core func $utf16-latin1+utf16 (canon lower (func $a "latin1-utf16") string-encoding=utf16 (memory $libc "mem")))
+ (core func $utf16-utf8 (canon lower (func $a "utf8") string-encoding=utf16 (memory (core memory $libc "mem"))))
+ (core func $utf16-utf16 (canon lower (func $a "utf16") string-encoding=utf16 (memory (core memory $libc "mem"))))
+ (core func $utf16-latin1+utf16 (canon lower (func $a "latin1-utf16") string-encoding=utf16 (memory (core memory $libc "mem"))))
- (core func $latin1+utf16-utf8 (canon lower (func $a "utf8") string-encoding=latin1+utf16 (memory $libc "mem")))
- (core func $latin1+utf16-utf16 (canon lower (func $a "utf16") string-encoding=latin1+utf16 (memory $libc "mem")))
- (core func $latin1+utf16-latin1+utf16 (canon lower (func $a "latin1-utf16") string-encoding=latin1+utf16 (memory $libc "mem")))
+ (core func $latin1+utf16-utf8 (canon lower (func $a "utf8") string-encoding=latin1+utf16 (memory (core memory $libc "mem"))))
+ (core func $latin1+utf16-utf16 (canon lower (func $a "utf16") string-encoding=latin1+utf16 (memory (core memory $libc "mem"))))
+ (core func $latin1+utf16-latin1+utf16 (canon lower (func $a "latin1-utf16") string-encoding=latin1+utf16 (memory (core memory $libc "mem"))))
(core module $m
(import "" "utf8-utf8" (func $utf8-utf8 (param i32 i32)))
diff --git a/tests/misc_testsuite/component-model/enums.wast b/tests/misc_testsuite/component-model/enums.wast
index 5b68094c88..6e8b401eee 100644
--- a/tests/misc_testsuite/component-model/enums.wast
+++ b/tests/misc_testsuite/component-model/enums.wast
@@ -48,7 +48,7 @@
))
(export $e "e" (type $e'))
(func (export "return-two") (param "e" $e) (result (tuple $e $e))
- (canon lift (core func $i "return-two") (memory $i "mem")))
+ (canon lift (core func $i "return-two") (memory (core memory $i "mem"))))
)
(assert_return (invoke "return-two" (enum.const "E1"))
diff --git a/tests/misc_testsuite/component-model/error-context-trap-in-post-return.wast b/tests/misc_testsuite/component-model/error-context-trap-in-post-return.wast
index 715238041d..3672f052fc 100644
--- a/tests/misc_testsuite/component-model/error-context-trap-in-post-return.wast
+++ b/tests/misc_testsuite/component-model/error-context-trap-in-post-return.wast
@@ -7,11 +7,11 @@
)
(core instance $memory (instantiate $Memory))
- (core func $error-context.new (canon error-context.new (memory $memory "mem")))
+ (core func $error-context.new (canon error-context.new (memory (core memory $memory "mem"))))
(core func $error-context.debug-message
(canon error-context.debug-message
- (memory $memory "mem")
- (realloc (func $memory "realloc"))))
+ (memory (core memory $memory "mem"))
+ (realloc (core func $memory "realloc"))))
(core func $error-context.drop (canon error-context.drop))
(core module $DM
@@ -33,13 +33,13 @@
))))
(func (export "trap-calling-error-context-new")
(canon lift (core func $dm "noop")
- (post-return (func $dm "trap-calling-error-context-new"))))
+ (post-return (core func $dm "trap-calling-error-context-new"))))
(func (export "trap-calling-error-context-debug-message")
(canon lift (core func $dm "noop")
- (post-return (func $dm "trap-calling-error-context-debug-message"))))
+ (post-return (core func $dm "trap-calling-error-context-debug-message"))))
(func (export "trap-calling-error-context-drop")
(canon lift (core func $dm "noop")
- (post-return (func $dm "trap-calling-error-context-drop"))))
+ (post-return (core func $dm "trap-calling-error-context-drop"))))
)
(component instance $i0 $Tester)
diff --git a/tests/misc_testsuite/component-model/exceptions.wast b/tests/misc_testsuite/component-model/exceptions.wast
index 21d9957417..631150748d 100644
--- a/tests/misc_testsuite/component-model/exceptions.wast
+++ b/tests/misc_testsuite/component-model/exceptions.wast
@@ -98,8 +98,8 @@
(core instance $i (instantiate $m))
(func (export "f") (param "s" string)
(canon lift (core func $i "f")
- (memory $i "memory")
- (realloc (func $i "realloc")))))
+ (memory (core memory $i "memory"))
+ (realloc (core func $i "realloc")))))
(component $B
(import "f" (func $f (param "s" string)))
@@ -107,7 +107,7 @@
(memory (export "memory") 1)
(data (i32.const 16) "hello"))
(core instance $libc (instantiate $libc))
- (core func $f-core (canon lower (func $f) (memory $libc "memory")))
+ (core func $f-core (canon lower (func $f) (memory (core memory $libc "memory"))))
(core module $m
(import "" "f" (func $f (param i32 i32)))
(func (export "run")
@@ -137,7 +137,7 @@
(func (export "post-f") (throw $t)))
(core instance $i (instantiate $m))
(func (export "f")
- (canon lift (core func $i "f") (post-return (func $i "post-f")))))
+ (canon lift (core func $i "f") (post-return (core func $i "post-f")))))
(component $B
(import "f" (func $f))
@@ -182,7 +182,7 @@
call_ref $f))
(core instance $shim (instantiate $shim))
- (type $t (resource (rep i32) (dtor (func $shim "dtor"))))
+ (type $t (resource (rep i32) (dtor (core func $shim "dtor"))))
(core func $t.new (canon resource.new $t))
(core module $a
diff --git a/tests/misc_testsuite/component-model/memory64.wast b/tests/misc_testsuite/component-model/memory64.wast
index 04b9a2d36d..dd05cb794f 100644
--- a/tests/misc_testsuite/component-model/memory64.wast
+++ b/tests/misc_testsuite/component-model/memory64.wast
@@ -58,8 +58,8 @@
(func (export "roundtrip") (param "a" string) (result string)
(canon lift (core func $m "roundtrip")
- (memory $m "memory")
- (realloc (func $m "realloc"))))
+ (memory (core memory $m "memory"))
+ (realloc (core func $m "realloc"))))
)
(instance $c64 (instantiate $c64))
@@ -86,8 +86,8 @@
(core func $roundtrip
(canon lower (func $i "roundtrip")
- (memory $libc "memory")
- (realloc (func $libc "realloc"))))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))))
(core module $m
(import "" "memory" (memory 1))
@@ -111,8 +111,8 @@
(func (export "roundtrip") (param "a" string) (result string)
(canon lift (core func $m "roundtrip")
- (memory $libc "memory")
- (realloc (func $libc "realloc"))))
+ (memory (core memory $libc "memory"))
+ (realloc (core func $libc "realloc"))))
)
(instance $c32 (instantiate $c32 (with "backend" (instance $c64))))
diff --git a/tests/misc_testsuite/component-model/resources.wast b/tests/misc_testsuite/component-model/resources.wast
index de3e1c6899..36d05845e6 100644
--- a/tests/misc_testsuite/component-model/resources.wast
+++ b/tests/misc_testsuite/component-model/resources.wast
@@ -680,7 +680,7 @@
(core instance $i1 (instantiate $m1))
(type $r1 (resource (rep i32)))
- (type $r2 (resource (rep i32) (dtor (func $i1 "dtor"))))
+ (type $r2 (resource (rep i32) (dtor (core func $i1 "dtor"))))
(core func $drop1 (canon resource.drop $r1))
(core func $drop2 (canon resource.drop $r2))
@@ -1120,7 +1120,7 @@
(export "resource.rep" (func $resource.rep))
))))
(func (export "run")
- (canon lift (core func $dm "run") (post-return (func $dm "post-return"))))
+ (canon lift (core func $dm "run") (post-return (core func $dm "post-return"))))
)
(assert_return (invoke "run"))
diff --git a/tests/misc_testsuite/component-model/string-transcode-invalid.wast b/tests/misc_testsuite/component-model/string-transcode-invalid.wast
index 5e5a87cb15..c869518f3a 100644
--- a/tests/misc_testsuite/component-model/string-transcode-invalid.wast
+++ b/tests/misc_testsuite/component-model/string-transcode-invalid.wast
@@ -11,7 +11,7 @@
)
(core instance $i (instantiate $m))
(func (export "recv") (param "a" string)
- (canon lift (core func $i "recv") (realloc (func $i "realloc")) (memory $i "memory")
+ (canon lift (core func $i "recv") (realloc (core func $i "realloc")) (memory (core memory $i "memory"))
string-encoding=latin1+utf16)
)
)
@@ -26,7 +26,7 @@
)
(core instance $libc (instantiate $libc))
;; canon lower with utf16 — the source side of the mismatch.
- (core func $recv_lowered (canon lower (func $recv) string-encoding=utf16 (memory $libc "memory")))
+ (core func $recv_lowered (canon lower (func $recv) string-encoding=utf16 (memory (core memory $libc "memory"))))
(core module $m
(import "" "" (func $recv (param i32 i32)))
(import "libc" "memory" (memory 0))
diff --git a/tests/misc_testsuite/component-model/strings.wast b/tests/misc_testsuite/component-model/strings.wast
index ed24163b96..85060d78b9 100644
--- a/tests/misc_testsuite/component-model/strings.wast
+++ b/tests/misc_testsuite/component-model/strings.wast
@@ -12,9 +12,9 @@
)
(core instance $m (instantiate $m))
(func (export "f1") (result string)
- (canon lift (core func $m "f") (memory $m "m") string-encoding=utf16))
+ (canon lift (core func $m "f") (memory (core memory $m "m")) string-encoding=utf16))
(func (export "f2") (result string)
- (canon lift (core func $m "f") (memory $m "m") string-encoding=latin1+utf16))
+ (canon lift (core func $m "f") (memory (core memory $m "m")) string-encoding=latin1+utf16))
)
(component instance $A $A)
@@ -41,8 +41,8 @@
(func (export "a") (param "a" string)
(canon lift
(core func $m "")
- (realloc (func $m "realloc"))
- (memory $m "memory")
+ (realloc (core func $m "realloc"))
+ (memory (core memory $m "memory"))
string-encoding=utf16)
)
)
@@ -56,7 +56,7 @@
(data (memory 0) (i32.const 0) "àà")
)
(core instance $libc (instantiate $libc))
- (core func $f (canon lower (func $f) string-encoding=utf8 (memory $libc "memory")))
+ (core func $f (canon lower (func $f) string-encoding=utf8 (memory (core memory $libc "memory"))))
(core module $m
(import "" "" (func $f (param i32 i32)))
(func (export "f") (call $f (i32.const 0) (i32.const 4)))
@@ -91,8 +91,8 @@
(func (export "a") (param "a" string)
(canon lift
(core func $m "")
- (realloc (func $m "realloc"))
- (memory $m "memory")
+ (realloc (core func $m "realloc"))
+ (memory (core memory $m "memory"))
string-encoding=latin1+utf16)
)
)
@@ -106,7 +106,7 @@
(data (memory 0) (i32.const 0) "\41\00\a3\03")
)
(core instance $libc (instantiate $libc))
- (core func $f (canon lower (func $f) string-encoding=utf16 (memory $libc "memory")))
+ (core func $f (canon lower (func $f) string-encoding=utf16 (memory (core memory $libc "memory"))))
(core module $m
(import "" "" (func $f (param i32 i32)))
(func (export "f") (call $f (i32.const 0) (i32.const 2)))
@@ -140,8 +140,8 @@
(func (export "a") (param "a" string)
(canon lift
(core func $m "")
- (realloc (func $m "realloc"))
- (memory $m "memory")
+ (realloc (core func $m "realloc"))
+ (memory (core memory $m "memory"))
string-encoding=latin1+utf16)
)
)
@@ -154,7 +154,7 @@
(data (memory 0) (i32.const 0) "\41\00\41\00")
)
(core instance $libc (instantiate $libc))
- (core func $f (canon lower (func $f) string-encoding=latin1+utf16 (memory $libc "memory")))
+ (core func $f (canon lower (func $f) string-encoding=latin1+utf16 (memory (core memory $libc "memory"))))
(core module $m
(import "" "" (func $f (param i32 i32)))
;; the length here contains `UTF16_TAG` and it's additionally 1 code
@@ -191,8 +191,8 @@
(func (export "a") (param "a" string)
(canon lift
(core func $m "")
- (realloc (func $m "realloc"))
- (memory $m "memory")
+ (realloc (core func $m "realloc"))
+ (memory (core memory $m "memory"))
string-encoding=latin1+utf16)
)
)
@@ -207,7 +207,7 @@
(data (memory 0) (i32.const 0) "Ë")
)
(core instance $libc (instantiate $libc))
- (core func $f (canon lower (func $f) (memory $libc "memory")))
+ (core func $f (canon lower (func $f) (memory (core memory $libc "memory"))))
(core module $m
(import "" "" (func $f (param i32 i32)))
(func (export "f") (call $f (i32.const 0) (i32.const 2)))
@@ -271,8 +271,8 @@
(func (export "a") (param "a" string)
(canon lift
(core func $m "")
- (realloc (func $m "realloc"))
- (memory $m "memory")
+ (realloc (core func $m "realloc"))
+ (memory (core memory $m "memory"))
string-encoding=latin1+utf16)
)
)
@@ -291,7 +291,7 @@
(data (memory 0) (i32.const 0) "Ë┛")
)
(core instance $libc (instantiate $libc))
- (core func $f (canon lower (func $f) (memory $libc "memory")))
+ (core func $f (canon lower (func $f) (memory (core memory $libc "memory"))))
(core module $m
(import "" "" (func $f (param i32 i32)))
(func (export "f") (call $f (i32.const 0) (i32.const 5)))
@@ -346,8 +346,8 @@
(func (export "a") (param "a" string)
(canon lift
(core func $m "")
- (realloc (func $m "realloc"))
- (memory $m "memory")
+ (realloc (core func $m "realloc"))
+ (memory (core memory $m "memory"))
string-encoding=latin1+utf16)
)
)
@@ -363,7 +363,7 @@
(data (memory 0) (i32.const 0) "Ë┛")
)
(core instance $libc (instantiate $libc))
- (core func $f (canon lower (func $f) (memory $libc "memory")))
+ (core func $f (canon lower (func $f) (memory (core memory $libc "memory"))))
(core module $m
(import "" "" (func $f (param i32 i32)))
(func (export "f") (call $f (i32.const 0) (i32.const 5)))
diff --git a/tests/misc_testsuite/component-model/types.wast b/tests/misc_testsuite/component-model/types.wast
index 2fe0fa25ff..df4e12fce9 100644
--- a/tests/misc_testsuite/component-model/types.wast
+++ b/tests/misc_testsuite/component-model/types.wast
@@ -368,7 +368,7 @@
)
(core instance $m (instantiate $m))
(func (export "f") (param "a" u32) (result $t)
- (canon lift (core func $m "f") (memory $m "m"))
+ (canon lift (core func $m "f") (memory (core memory $m "m")))
)
)
diff --git a/tests/misc_testsuite/gc/component-async-suspended-fiber-roots.wast b/tests/misc_testsuite/gc/component-async-suspended-fiber-roots.wast
index 218a88b748..8bebc44980 100644
--- a/tests/misc_testsuite/gc/component-async-suspended-fiber-roots.wast
+++ b/tests/misc_testsuite/gc/component-async-suspended-fiber-roots.wast
@@ -82,7 +82,7 @@
(core func $drive (canon lower (func $drive) async))
(core func $ws-new (canon waitable-set.new))
(core func $w-join (canon waitable.join))
- (core func $ws-wait (canon waitable-set.wait (memory $libc "memory")))
+ (core func $ws-wait (canon waitable-set.wait (memory (core memory $libc "memory"))))
(core func $subtask-drop (canon subtask.drop))
(core module $m