Repository: bytecodealliance/wasm-tools
Pull request #1369 (2024-01-13 14:26:56)

Provide public new method for Id AST node
Proposed fix for #135.

martinitus: Alternatively one could use `pub(crate)` fields in `Id` and drop the `new_unchecked` completely?
martinitus: You are welcome! Thanks for all the work you are putting into this!<3

I thought about this once more and changed it to the pub(crate) variant as it aligns best with the rest of the code (imo) and avoids exposing a potential pitfall in the public API (e.g. passing in a `"invalid argument"` as name). The wast crate can simply instantiate the Id directly!
alexcrichton: Ok I think that's fine, but I think the `pub(crate)` can be removed from the fields since it's not necessary to construct an `Id` within the same module. Replacing the one instance of `Id::new` that was there prior I think is ok to use struct-construction syntax, however.

Patch:
diff --git a/crates/wast/src/token.rs b/crates/wast/src/token.rs
index fef4c730..9dd15f97 100644
--- a/crates/wast/src/token.rs
+++ b/crates/wast/src/token.rs
@@ -2,9 +2,9 @@
 //! associated specifically with the wasm text format per se (useful in other
 //! contexts too perhaps).
 
-use crate::annotation;
-use crate::lexer::Float;
+use crate::lexer::{Float, Lexer, TokenKind};
 use crate::parser::{Cursor, Parse, Parser, Peek, Result};
+use crate::{annotation, Error};
 use std::fmt;
 use std::hash::{Hash, Hasher};
 use std::str;
@@ -58,8 +58,21 @@ pub struct Id<'a> {
 }
 
 impl<'a> Id<'a> {
-    fn new(name: &'a str, span: Span) -> Id<'a> {
-        Id { name, gen: 0, span }
+    /// Construct a new identifier from given string.
+    ///
+    /// Returns an error if the string does not contain a leading `$`, or is not a
+    /// valid WASM text format identifier.
+    pub fn new(name: &'a str, span: Span) -> Result<Id<'a>> {
+        let mut _pos: usize = 0;
+        let tok = Lexer::new(name).parse(&mut _pos)?;
+        match tok {
+            Some(tok) if tok.kind == TokenKind::Id => Ok(Id {
+                name: tok.id(name),
+                gen: 0,
+                span,
+            }),
+            _ => Err(Error::parse(span, name, "expected an identifier".into())),
+        }
     }
 
     pub(crate) fn gensym(span: Span, gen: u32) -> Id<'a> {
@@ -106,7 +119,14 @@ impl<'a> Parse<'a> for Id<'a> {
     fn parse(parser: Parser<'a>) -> Result<Self> {
         parser.step(|c| {
             if let Some((name, rest)) = c.id()? {
-                return Ok((Id::new(name, c.cur_span()), rest));
+                return Ok((
+                    Id {
+                        name,
+                        gen: 0,
+                        span: c.cur_span(),
+                    },
+                    rest,
+                ));
             }
             Err(c.error("expected an identifier"))
         })
diff --git a/crates/wit-component/src/encoding.rs b/crates/wit-component/src/encoding.rs
index 2665fbe2..92d03c35 100644
--- a/crates/wit-component/src/encoding.rs
+++ b/crates/wit-component/src/encoding.rs
@@ -550,7 +550,7 @@ impl<'a> EncodingState<'a> {
         let info = &self.info.info;
 
         // Encode a shim instantiation if needed
-        let shims = self.encode_shim_instantiation();
+        let shims = self.encode_shim_instantiation()?;
 
         // For each instance import into the main module create a
         // pseudo-core-wasm-module via a bag-of-exports.
@@ -1117,7 +1117,7 @@ impl<'a> EncodingState<'a> {
         Ok(func_index)
     }
 
-    fn encode_shim_instantiation(&mut self) -> Shims<'a> {
+    fn encode_shim_instantiation(&mut self) -> Result<Shims<'a>> {
         let mut signatures = Vec::new();
         let mut ret = Shims::default();
         let info = &self.info.info;
@@ -1138,7 +1138,8 @@ impl<'a> EncodingState<'a> {
                 &required.funcs,
                 info.metadata,
                 &mut signatures,
-            );
+            )
+            .context("failed to register indirect shims for main module")?;
         }
 
         // For all required adapter modules a shim is created for each required
@@ -1159,7 +1160,10 @@ impl<'a> EncodingState<'a> {
                     &required.funcs,
                     adapter.info.metadata,
                     &mut signatures,
-                );
+                )
+                .with_context(|| {
+                    format!("failed to register indirect shims for adapter {adapter_name}")
+                })?;
             }
 
             self.encode_resource_dtors(
@@ -1205,7 +1209,7 @@ impl<'a> EncodingState<'a> {
         );
 
         if ret.list.is_empty() {
-            return ret;
+            return Ok(ret);
         }
 
         for shim in ret.list.iter() {
@@ -1302,7 +1306,7 @@ impl<'a> EncodingState<'a> {
         self.fixups_module_index = Some(self.component.core_module(&fixups));
         self.shim_instance_index = Some(self.component.core_instantiate(shim_module_index, []));
 
-        return ret;
+        return Ok(ret);
 
         fn to_wasm_type(ty: &wasmparser::ValType) -> WasmType {
             match ty {
@@ -1792,7 +1796,7 @@ impl<'a> Shims<'a> {
         required: &IndexSet<String>,
         metadata: &ModuleMetadata,
         sigs: &mut Vec<WasmSignature>,
-    ) {
+    ) -> Result<()> {
         let interface = if core_wasm_module == BARE_FUNC_MODULE_NAME {
             None
         } else {
@@ -1811,8 +1815,15 @@ impl<'a> Shims<'a> {
 
                 Lowering::Indirect { sig, options } => {
                     sigs.push(sig.clone());
-                    let encoding =
-                        metadata.import_encodings[&(core_wasm_module.to_string(), name.clone())];
+                    let encoding = *metadata
+                        .import_encodings
+                        .get(&(core_wasm_module.to_string(), name.clone()))
+                        .ok_or_else(|| {
+                            anyhow::anyhow!(
+                                "missing component metadata for import of \
+                                `{core_wasm_module}::{name}`"
+                            )
+                        })?;
                     self.list.push(Shim {
                         name: shim_name,
                         debug_name: format!("indirect-{core_wasm_module}-{name}"),
@@ -1827,6 +1838,7 @@ impl<'a> Shims<'a> {
                 }
             }
         }
+        Ok(())
     }
 }
 


Test patch:
diff --git a/crates/wit-component/tests/components/error-missing-module-metadata/adapt-old.wat b/crates/wit-component/tests/components/error-missing-module-metadata/adapt-old.wat
new file mode 100644
index 00000000..deb5d349
--- /dev/null
+++ b/crates/wit-component/tests/components/error-missing-module-metadata/adapt-old.wat
@@ -0,0 +1,4 @@
+(module
+  (import "new" "log" (func $log (param i32 i32)))
+  (export "log" (func $log))
+)
diff --git a/crates/wit-component/tests/components/error-missing-module-metadata/adapt-old.wit b/crates/wit-component/tests/components/error-missing-module-metadata/adapt-old.wit
new file mode 100644
index 00000000..5e15bfae
--- /dev/null
+++ b/crates/wit-component/tests/components/error-missing-module-metadata/adapt-old.wit
@@ -0,0 +1,5 @@
+world adapt-old {
+  import new: interface {
+    log: func(s: string);
+  }
+}
diff --git a/crates/wit-component/tests/components/error-missing-module-metadata/error.txt b/crates/wit-component/tests/components/error-missing-module-metadata/error.txt
new file mode 100644
index 00000000..16f77976
--- /dev/null
+++ b/crates/wit-component/tests/components/error-missing-module-metadata/error.txt
@@ -0,0 +1,4 @@
+failed to register indirect shims for main module
+
+Caused by:
+    missing component metadata for import of `new::log`
\ No newline at end of file
diff --git a/crates/wit-component/tests/components/error-missing-module-metadata/module.wat b/crates/wit-component/tests/components/error-missing-module-metadata/module.wat
new file mode 100644
index 00000000..d3cca54e
--- /dev/null
+++ b/crates/wit-component/tests/components/error-missing-module-metadata/module.wat
@@ -0,0 +1,4 @@
+(module
+  (import "new" "log" (func $log (param i32 i32)))
+  (import "old" "log" (func (param i32 i32)))
+)
diff --git a/crates/wit-component/tests/components/error-missing-module-metadata/module.wit b/crates/wit-component/tests/components/error-missing-module-metadata/module.wit
new file mode 100644
index 00000000..84d41669
--- /dev/null
+++ b/crates/wit-component/tests/components/error-missing-module-metadata/module.wit
@@ -0,0 +1,4 @@
+package foo:foo;
+
+world module {
+}
diff --git a/tests/roundtrip.rs b/tests/roundtrip.rs
index ced12df2..f5f06aaa 100644
--- a/tests/roundtrip.rs
+++ b/tests/roundtrip.rs
@@ -608,10 +608,7 @@ impl TestState {
                 "simd" => features.simd = true,
                 "exception-handling" => features.exceptions = true,
                 "tail-call" => features.tail_call = true,
-                "memory64" => {
-                    features.memory64 = true;
-                    features.reference_types = false;
-                }
+                "memory64" => features.memory64 = true,
                 "component-model" => features.component_model = true,
                 "multi-memory" => features.multi_memory = true,
                 "extended-const" => features.extended_const = true,
@@ -715,7 +712,9 @@ fn error_matches(error: &str, message: &str) -> bool {
             // the spec interpreter will read past section boundaries when
             // decoding, wasmparser won't, producing different errors.
             || error.contains("unexpected end-of-file")
-            || error.contains("malformed section id");
+            || error.contains("malformed section id")
+            // FIXME(WebAssembly/memory64#45)
+            || error.contains("trailing bytes at end of section");
     }
 
     if message == "integer too large" {
@@ -730,7 +729,9 @@ fn error_matches(error: &str, message: &str) -> bool {
             // were inflated to a larger size while not updating the binary
             // encoding of the size of the section.
             || error.contains("invalid var_u32: integer representation too long")
-            || error.contains("malformed section id");
+            || error.contains("malformed section id")
+            // FIXME(WebAssembly/memory64#45)
+            || error.contains("trailing bytes at end of section");
     }
 
     // wasmparser blames a truncated file here, the spec interpreter blames the
@@ -748,7 +749,7 @@ fn error_matches(error: &str, message: &str) -> bool {
     // a missing End before failing to validate the botched instruction.  However
     // wasmparser fails to validate the botched instruction first
     if message == "unexpected end" {
-        return error.contains("type index out of bounds");
+        return error.contains("type index out of bounds") || error.contains("END opcode expected");
     }
 
     if message == "unexpected content after last section" {
@@ -756,7 +757,8 @@ fn error_matches(error: &str, message: &str) -> bool {
     }
 
     if message == "malformed limits flags" {
-        return error.contains("invalid memory limits flags");
+        return error.contains("invalid memory limits flags")
+            || error.contains("invalid table resizable limits flags");
     }
 
     if message == "zero flag expected" {
diff --git a/tests/snapshots/testsuite/imports.wast/100.print b/tests/snapshots/testsuite/imports.wast/100.print
index 9c95837f..03446a5f 100644
--- a/tests/snapshots/testsuite/imports.wast/100.print
+++ b/tests/snapshots/testsuite/imports.wast/100.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "table" (table (;0;) 10 25 funcref))
+  (import "spectest" "table" (table (;0;) 10 20 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/101.print b/tests/snapshots/testsuite/imports.wast/101.print
index 45fc0778..d1cff003 100644
--- a/tests/snapshots/testsuite/imports.wast/101.print
+++ b/tests/snapshots/testsuite/imports.wast/101.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "table" (table (;0;) 5 25 funcref))
+  (import "spectest" "table" (table (;0;) 5 20 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/102.print b/tests/snapshots/testsuite/imports.wast/102.print
new file mode 100644
index 00000000..65ae9839
--- /dev/null
+++ b/tests/snapshots/testsuite/imports.wast/102.print
@@ -0,0 +1,3 @@
+(module
+  (import "spectest" "table" (table (;0;) 0 20 funcref))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/103.print b/tests/snapshots/testsuite/imports.wast/103.print
new file mode 100644
index 00000000..9c95837f
--- /dev/null
+++ b/tests/snapshots/testsuite/imports.wast/103.print
@@ -0,0 +1,3 @@
+(module
+  (import "spectest" "table" (table (;0;) 10 25 funcref))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/104.print b/tests/snapshots/testsuite/imports.wast/104.print
new file mode 100644
index 00000000..45fc0778
--- /dev/null
+++ b/tests/snapshots/testsuite/imports.wast/104.print
@@ -0,0 +1,3 @@
+(module
+  (import "spectest" "table" (table (;0;) 5 25 funcref))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/114.print b/tests/snapshots/testsuite/imports.wast/117.print
similarity index 100%
rename from tests/snapshots/testsuite/imports.wast/114.print
rename to tests/snapshots/testsuite/imports.wast/117.print
diff --git a/tests/snapshots/testsuite/imports.wast/119.print b/tests/snapshots/testsuite/imports.wast/122.print
similarity index 100%
rename from tests/snapshots/testsuite/imports.wast/119.print
rename to tests/snapshots/testsuite/imports.wast/122.print
diff --git a/tests/snapshots/testsuite/imports.wast/127.print b/tests/snapshots/testsuite/imports.wast/127.print
deleted file mode 100644
index 1aad2d0f..00000000
--- a/tests/snapshots/testsuite/imports.wast/127.print
+++ /dev/null
@@ -1,3 +0,0 @@
-(module
-  (import "test" "memory-2-inf" (memory (;0;) 2))
-)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/128.print b/tests/snapshots/testsuite/imports.wast/128.print
deleted file mode 100644
index 546d8eae..00000000
--- a/tests/snapshots/testsuite/imports.wast/128.print
+++ /dev/null
@@ -1,3 +0,0 @@
-(module
-  (import "test" "memory-2-inf" (memory (;0;) 1))
-)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/129.print b/tests/snapshots/testsuite/imports.wast/129.print
deleted file mode 100644
index e40926e4..00000000
--- a/tests/snapshots/testsuite/imports.wast/129.print
+++ /dev/null
@@ -1,3 +0,0 @@
-(module
-  (import "test" "memory-2-inf" (memory (;0;) 0))
-)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/130.print b/tests/snapshots/testsuite/imports.wast/130.print
index 3c971460..1aad2d0f 100644
--- a/tests/snapshots/testsuite/imports.wast/130.print
+++ b/tests/snapshots/testsuite/imports.wast/130.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "memory" (memory (;0;) 1))
+  (import "test" "memory-2-inf" (memory (;0;) 2))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/131.print b/tests/snapshots/testsuite/imports.wast/131.print
index 83efcab8..546d8eae 100644
--- a/tests/snapshots/testsuite/imports.wast/131.print
+++ b/tests/snapshots/testsuite/imports.wast/131.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "memory" (memory (;0;) 0))
+  (import "test" "memory-2-inf" (memory (;0;) 1))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/132.print b/tests/snapshots/testsuite/imports.wast/132.print
index 404698c7..e40926e4 100644
--- a/tests/snapshots/testsuite/imports.wast/132.print
+++ b/tests/snapshots/testsuite/imports.wast/132.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "memory" (memory (;0;) 1 2))
+  (import "test" "memory-2-inf" (memory (;0;) 0))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/133.print b/tests/snapshots/testsuite/imports.wast/133.print
index 39db8755..3c971460 100644
--- a/tests/snapshots/testsuite/imports.wast/133.print
+++ b/tests/snapshots/testsuite/imports.wast/133.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "memory" (memory (;0;) 0 2))
+  (import "spectest" "memory" (memory (;0;) 1))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/134.print b/tests/snapshots/testsuite/imports.wast/134.print
index 897e9b71..83efcab8 100644
--- a/tests/snapshots/testsuite/imports.wast/134.print
+++ b/tests/snapshots/testsuite/imports.wast/134.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "memory" (memory (;0;) 1 3))
+  (import "spectest" "memory" (memory (;0;) 0))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/135.print b/tests/snapshots/testsuite/imports.wast/135.print
index c0d28c6b..404698c7 100644
--- a/tests/snapshots/testsuite/imports.wast/135.print
+++ b/tests/snapshots/testsuite/imports.wast/135.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "memory" (memory (;0;) 0 3))
+  (import "spectest" "memory" (memory (;0;) 1 2))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/136.print b/tests/snapshots/testsuite/imports.wast/136.print
new file mode 100644
index 00000000..39db8755
--- /dev/null
+++ b/tests/snapshots/testsuite/imports.wast/136.print
@@ -0,0 +1,3 @@
+(module
+  (import "spectest" "memory" (memory (;0;) 0 2))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/137.print b/tests/snapshots/testsuite/imports.wast/137.print
new file mode 100644
index 00000000..897e9b71
--- /dev/null
+++ b/tests/snapshots/testsuite/imports.wast/137.print
@@ -0,0 +1,3 @@
+(module
+  (import "spectest" "memory" (memory (;0;) 1 3))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/138.print b/tests/snapshots/testsuite/imports.wast/138.print
new file mode 100644
index 00000000..c0d28c6b
--- /dev/null
+++ b/tests/snapshots/testsuite/imports.wast/138.print
@@ -0,0 +1,3 @@
+(module
+  (import "spectest" "memory" (memory (;0;) 0 3))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/150.print b/tests/snapshots/testsuite/imports.wast/153.print
similarity index 100%
rename from tests/snapshots/testsuite/imports.wast/150.print
rename to tests/snapshots/testsuite/imports.wast/153.print
diff --git a/tests/snapshots/testsuite/imports.wast/156.print b/tests/snapshots/testsuite/imports.wast/156.print
deleted file mode 100644
index 7efe25f1..00000000
--- a/tests/snapshots/testsuite/imports.wast/156.print
+++ /dev/null
@@ -1,10 +0,0 @@
-(module $Mgm
-  (type (;0;) (func (result i32)))
-  (func (;0;) (type 0) (result i32)
-    i32.const 1
-    memory.grow
-  )
-  (memory (;0;) 1)
-  (export "memory" (memory 0))
-  (export "grow" (func 0))
-)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/159.print b/tests/snapshots/testsuite/imports.wast/159.print
index 477ca763..7efe25f1 100644
--- a/tests/snapshots/testsuite/imports.wast/159.print
+++ b/tests/snapshots/testsuite/imports.wast/159.print
@@ -1,10 +1,10 @@
-(module $Mgim1
+(module $Mgm
   (type (;0;) (func (result i32)))
-  (import "grown-memory" "memory" (memory (;0;) 2))
   (func (;0;) (type 0) (result i32)
     i32.const 1
     memory.grow
   )
+  (memory (;0;) 1)
   (export "memory" (memory 0))
   (export "grow" (func 0))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/162.print b/tests/snapshots/testsuite/imports.wast/162.print
index 80793cac..477ca763 100644
--- a/tests/snapshots/testsuite/imports.wast/162.print
+++ b/tests/snapshots/testsuite/imports.wast/162.print
@@ -1,8 +1,10 @@
-(module $Mgim2
+(module $Mgim1
   (type (;0;) (func (result i32)))
-  (import "grown-imported-memory" "memory" (memory (;0;) 3))
+  (import "grown-memory" "memory" (memory (;0;) 2))
   (func (;0;) (type 0) (result i32)
-    memory.size
+    i32.const 1
+    memory.grow
   )
-  (export "size" (func 0))
+  (export "memory" (memory 0))
+  (export "grow" (func 0))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/165.print b/tests/snapshots/testsuite/imports.wast/165.print
new file mode 100644
index 00000000..80793cac
--- /dev/null
+++ b/tests/snapshots/testsuite/imports.wast/165.print
@@ -0,0 +1,8 @@
+(module $Mgim2
+  (type (;0;) (func (result i32)))
+  (import "grown-imported-memory" "memory" (memory (;0;) 3))
+  (func (;0;) (type 0) (result i32)
+    memory.size
+  )
+  (export "size" (func 0))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/180.print b/tests/snapshots/testsuite/imports.wast/183.print
similarity index 100%
rename from tests/snapshots/testsuite/imports.wast/180.print
rename to tests/snapshots/testsuite/imports.wast/183.print
diff --git a/tests/snapshots/testsuite/imports.wast/41.print b/tests/snapshots/testsuite/imports.wast/41.print
index 0693cbec..44d1500c 100644
--- a/tests/snapshots/testsuite/imports.wast/41.print
+++ b/tests/snapshots/testsuite/imports.wast/41.print
@@ -1,5 +1,8 @@
 (module
   (type (;0;) (func (result i32)))
+  (type (;1;) (func (result i64)))
+  (type (;2;) (func (result f32)))
+  (type (;3;) (func (result f64)))
   (import "spectest" "global_i32" (global (;0;) i32))
   (import "spectest" "global_i32" (global (;1;) i32))
   (import "spectest" "global_i32" (global $x (;2;) i32))
@@ -19,8 +22,20 @@
   (func (;3;) (type 0) (result i32)
     global.get $y
   )
+  (func (;4;) (type 1) (result i64)
+    global.get 4
+  )
+  (func (;5;) (type 2) (result f32)
+    global.get 5
+  )
+  (func (;6;) (type 3) (result f64)
+    global.get 6
+  )
   (export "get-0" (func 0))
   (export "get-1" (func 1))
   (export "get-x" (func 2))
   (export "get-y" (func 3))
+  (export "get-4" (func 4))
+  (export "get-5" (func 5))
+  (export "get-6" (func 6))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/46.print b/tests/snapshots/testsuite/imports.wast/49.print
similarity index 100%
rename from tests/snapshots/testsuite/imports.wast/46.print
rename to tests/snapshots/testsuite/imports.wast/49.print
diff --git a/tests/snapshots/testsuite/imports.wast/47.print b/tests/snapshots/testsuite/imports.wast/50.print
similarity index 100%
rename from tests/snapshots/testsuite/imports.wast/47.print
rename to tests/snapshots/testsuite/imports.wast/50.print
diff --git a/tests/snapshots/testsuite/imports.wast/48.print b/tests/snapshots/testsuite/imports.wast/51.print
similarity index 100%
rename from tests/snapshots/testsuite/imports.wast/48.print
rename to tests/snapshots/testsuite/imports.wast/51.print
diff --git a/tests/snapshots/testsuite/imports.wast/69.print b/tests/snapshots/testsuite/imports.wast/72.print
similarity index 100%
rename from tests/snapshots/testsuite/imports.wast/69.print
rename to tests/snapshots/testsuite/imports.wast/72.print
diff --git a/tests/snapshots/testsuite/imports.wast/75.print b/tests/snapshots/testsuite/imports.wast/78.print
similarity index 100%
rename from tests/snapshots/testsuite/imports.wast/75.print
rename to tests/snapshots/testsuite/imports.wast/78.print
diff --git a/tests/snapshots/testsuite/imports.wast/81.print b/tests/snapshots/testsuite/imports.wast/81.print
deleted file mode 100644
index 9dfcbda8..00000000
--- a/tests/snapshots/testsuite/imports.wast/81.print
+++ /dev/null
@@ -1,6 +0,0 @@
-(module
-  (import "spectest" "table" (table (;0;) 0 funcref))
-  (import "spectest" "table" (table (;1;) 0 funcref))
-  (table (;2;) 10 funcref)
-  (table (;3;) 10 funcref)
-)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/82.print b/tests/snapshots/testsuite/imports.wast/82.print
deleted file mode 100644
index 72f38c2e..00000000
--- a/tests/snapshots/testsuite/imports.wast/82.print
+++ /dev/null
@@ -1,3 +0,0 @@
-(module
-  (import "test" "table-10-inf" (table (;0;) 10 funcref))
-)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/83.print b/tests/snapshots/testsuite/imports.wast/83.print
deleted file mode 100644
index 475c251b..00000000
--- a/tests/snapshots/testsuite/imports.wast/83.print
+++ /dev/null
@@ -1,3 +0,0 @@
-(module
-  (import "test" "table-10-inf" (table (;0;) 5 funcref))
-)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/84.print b/tests/snapshots/testsuite/imports.wast/84.print
index c8997038..9dfcbda8 100644
--- a/tests/snapshots/testsuite/imports.wast/84.print
+++ b/tests/snapshots/testsuite/imports.wast/84.print
@@ -1,3 +1,6 @@
 (module
-  (import "test" "table-10-inf" (table (;0;) 0 funcref))
+  (import "spectest" "table" (table (;0;) 0 funcref))
+  (import "spectest" "table" (table (;1;) 0 funcref))
+  (table (;2;) 10 funcref)
+  (table (;3;) 10 funcref)
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/85.print b/tests/snapshots/testsuite/imports.wast/85.print
index f1e85594..72f38c2e 100644
--- a/tests/snapshots/testsuite/imports.wast/85.print
+++ b/tests/snapshots/testsuite/imports.wast/85.print
@@ -1,3 +1,3 @@
 (module
-  (import "test" "table-10-20" (table (;0;) 10 funcref))
+  (import "test" "table-10-inf" (table (;0;) 10 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/86.print b/tests/snapshots/testsuite/imports.wast/86.print
index 4eca2099..475c251b 100644
--- a/tests/snapshots/testsuite/imports.wast/86.print
+++ b/tests/snapshots/testsuite/imports.wast/86.print
@@ -1,3 +1,3 @@
 (module
-  (import "test" "table-10-20" (table (;0;) 5 funcref))
+  (import "test" "table-10-inf" (table (;0;) 5 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/87.print b/tests/snapshots/testsuite/imports.wast/87.print
index 18937c5d..c8997038 100644
--- a/tests/snapshots/testsuite/imports.wast/87.print
+++ b/tests/snapshots/testsuite/imports.wast/87.print
@@ -1,3 +1,3 @@
 (module
-  (import "test" "table-10-20" (table (;0;) 0 funcref))
+  (import "test" "table-10-inf" (table (;0;) 0 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/88.print b/tests/snapshots/testsuite/imports.wast/88.print
index affb91ad..f1e85594 100644
--- a/tests/snapshots/testsuite/imports.wast/88.print
+++ b/tests/snapshots/testsuite/imports.wast/88.print
@@ -1,3 +1,3 @@
 (module
-  (import "test" "table-10-20" (table (;0;) 10 20 funcref))
+  (import "test" "table-10-20" (table (;0;) 10 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/89.print b/tests/snapshots/testsuite/imports.wast/89.print
index b27d0a18..4eca2099 100644
--- a/tests/snapshots/testsuite/imports.wast/89.print
+++ b/tests/snapshots/testsuite/imports.wast/89.print
@@ -1,3 +1,3 @@
 (module
-  (import "test" "table-10-20" (table (;0;) 5 20 funcref))
+  (import "test" "table-10-20" (table (;0;) 5 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/90.print b/tests/snapshots/testsuite/imports.wast/90.print
index d40ae2d3..18937c5d 100644
--- a/tests/snapshots/testsuite/imports.wast/90.print
+++ b/tests/snapshots/testsuite/imports.wast/90.print
@@ -1,3 +1,3 @@
 (module
-  (import "test" "table-10-20" (table (;0;) 0 20 funcref))
+  (import "test" "table-10-20" (table (;0;) 0 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/91.print b/tests/snapshots/testsuite/imports.wast/91.print
index eea2b23b..affb91ad 100644
--- a/tests/snapshots/testsuite/imports.wast/91.print
+++ b/tests/snapshots/testsuite/imports.wast/91.print
@@ -1,3 +1,3 @@
 (module
-  (import "test" "table-10-20" (table (;0;) 10 25 funcref))
+  (import "test" "table-10-20" (table (;0;) 10 20 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/92.print b/tests/snapshots/testsuite/imports.wast/92.print
index 339f1e02..b27d0a18 100644
--- a/tests/snapshots/testsuite/imports.wast/92.print
+++ b/tests/snapshots/testsuite/imports.wast/92.print
@@ -1,3 +1,3 @@
 (module
-  (import "test" "table-10-20" (table (;0;) 5 25 funcref))
+  (import "test" "table-10-20" (table (;0;) 5 20 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/93.print b/tests/snapshots/testsuite/imports.wast/93.print
index 5c845b5c..d40ae2d3 100644
--- a/tests/snapshots/testsuite/imports.wast/93.print
+++ b/tests/snapshots/testsuite/imports.wast/93.print
@@ -1,3 +1,3 @@
 (module
-  (import "test" "table-10-20" (table (;0;) 0 25 funcref))
+  (import "test" "table-10-20" (table (;0;) 0 20 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/94.print b/tests/snapshots/testsuite/imports.wast/94.print
index 64a52acf..eea2b23b 100644
--- a/tests/snapshots/testsuite/imports.wast/94.print
+++ b/tests/snapshots/testsuite/imports.wast/94.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "table" (table (;0;) 10 funcref))
+  (import "test" "table-10-20" (table (;0;) 10 25 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/95.print b/tests/snapshots/testsuite/imports.wast/95.print
index 218d7d9b..339f1e02 100644
--- a/tests/snapshots/testsuite/imports.wast/95.print
+++ b/tests/snapshots/testsuite/imports.wast/95.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "table" (table (;0;) 5 funcref))
+  (import "test" "table-10-20" (table (;0;) 5 25 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/96.print b/tests/snapshots/testsuite/imports.wast/96.print
index 2a0fa834..5c845b5c 100644
--- a/tests/snapshots/testsuite/imports.wast/96.print
+++ b/tests/snapshots/testsuite/imports.wast/96.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "table" (table (;0;) 0 funcref))
+  (import "test" "table-10-20" (table (;0;) 0 25 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/97.print b/tests/snapshots/testsuite/imports.wast/97.print
index 03446a5f..64a52acf 100644
--- a/tests/snapshots/testsuite/imports.wast/97.print
+++ b/tests/snapshots/testsuite/imports.wast/97.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "table" (table (;0;) 10 20 funcref))
+  (import "spectest" "table" (table (;0;) 10 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/98.print b/tests/snapshots/testsuite/imports.wast/98.print
index d1cff003..218d7d9b 100644
--- a/tests/snapshots/testsuite/imports.wast/98.print
+++ b/tests/snapshots/testsuite/imports.wast/98.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "table" (table (;0;) 5 20 funcref))
+  (import "spectest" "table" (table (;0;) 5 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/imports.wast/99.print b/tests/snapshots/testsuite/imports.wast/99.print
index 65ae9839..2a0fa834 100644
--- a/tests/snapshots/testsuite/imports.wast/99.print
+++ b/tests/snapshots/testsuite/imports.wast/99.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "table" (table (;0;) 0 20 funcref))
+  (import "spectest" "table" (table (;0;) 0 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/100.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/100.print
index 64a52acf..eea2b23b 100644
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/100.print
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/100.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "table" (table (;0;) 10 funcref))
+  (import "test" "table-10-20" (table (;0;) 10 25 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/101.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/101.print
index 218d7d9b..339f1e02 100644
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/101.print
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/101.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "table" (table (;0;) 5 funcref))
+  (import "test" "table-10-20" (table (;0;) 5 25 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/102.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/102.print
index 2a0fa834..5c845b5c 100644
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/102.print
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/102.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "table" (table (;0;) 0 funcref))
+  (import "test" "table-10-20" (table (;0;) 0 25 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/103.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/103.print
index 03446a5f..64a52acf 100644
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/103.print
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/103.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "table" (table (;0;) 10 20 funcref))
+  (import "spectest" "table" (table (;0;) 10 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/104.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/104.print
index d1cff003..218d7d9b 100644
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/104.print
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/104.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "table" (table (;0;) 5 20 funcref))
+  (import "spectest" "table" (table (;0;) 5 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/105.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/105.print
index 65ae9839..2a0fa834 100644
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/105.print
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/105.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "table" (table (;0;) 0 20 funcref))
+  (import "spectest" "table" (table (;0;) 0 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/106.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/106.print
index 9c95837f..03446a5f 100644
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/106.print
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/106.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "table" (table (;0;) 10 25 funcref))
+  (import "spectest" "table" (table (;0;) 10 20 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/107.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/107.print
index 45fc0778..d1cff003 100644
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/107.print
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/107.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "table" (table (;0;) 5 25 funcref))
+  (import "spectest" "table" (table (;0;) 5 20 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/108.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/108.print
new file mode 100644
index 00000000..65ae9839
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/108.print
@@ -0,0 +1,3 @@
+(module
+  (import "spectest" "table" (table (;0;) 0 20 funcref))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/109.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/109.print
new file mode 100644
index 00000000..9c95837f
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/109.print
@@ -0,0 +1,3 @@
+(module
+  (import "spectest" "table" (table (;0;) 10 25 funcref))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/110.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/110.print
new file mode 100644
index 00000000..45fc0778
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/110.print
@@ -0,0 +1,3 @@
+(module
+  (import "spectest" "table" (table (;0;) 5 25 funcref))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/120.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/123.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/exception-handling/imports.wast/120.print
rename to tests/snapshots/testsuite/proposals/exception-handling/imports.wast/123.print
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/125.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/128.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/exception-handling/imports.wast/125.print
rename to tests/snapshots/testsuite/proposals/exception-handling/imports.wast/128.print
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/133.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/133.print
deleted file mode 100644
index 1aad2d0f..00000000
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/133.print
+++ /dev/null
@@ -1,3 +0,0 @@
-(module
-  (import "test" "memory-2-inf" (memory (;0;) 2))
-)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/134.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/134.print
deleted file mode 100644
index 546d8eae..00000000
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/134.print
+++ /dev/null
@@ -1,3 +0,0 @@
-(module
-  (import "test" "memory-2-inf" (memory (;0;) 1))
-)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/135.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/135.print
deleted file mode 100644
index e40926e4..00000000
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/135.print
+++ /dev/null
@@ -1,3 +0,0 @@
-(module
-  (import "test" "memory-2-inf" (memory (;0;) 0))
-)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/136.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/136.print
index 3c971460..1aad2d0f 100644
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/136.print
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/136.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "memory" (memory (;0;) 1))
+  (import "test" "memory-2-inf" (memory (;0;) 2))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/137.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/137.print
index 83efcab8..546d8eae 100644
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/137.print
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/137.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "memory" (memory (;0;) 0))
+  (import "test" "memory-2-inf" (memory (;0;) 1))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/138.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/138.print
index 404698c7..e40926e4 100644
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/138.print
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/138.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "memory" (memory (;0;) 1 2))
+  (import "test" "memory-2-inf" (memory (;0;) 0))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/139.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/139.print
index 39db8755..3c971460 100644
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/139.print
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/139.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "memory" (memory (;0;) 0 2))
+  (import "spectest" "memory" (memory (;0;) 1))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/140.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/140.print
index 897e9b71..83efcab8 100644
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/140.print
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/140.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "memory" (memory (;0;) 1 3))
+  (import "spectest" "memory" (memory (;0;) 0))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/141.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/141.print
index c0d28c6b..404698c7 100644
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/141.print
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/141.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "memory" (memory (;0;) 0 3))
+  (import "spectest" "memory" (memory (;0;) 1 2))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/142.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/142.print
new file mode 100644
index 00000000..39db8755
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/142.print
@@ -0,0 +1,3 @@
+(module
+  (import "spectest" "memory" (memory (;0;) 0 2))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/143.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/143.print
new file mode 100644
index 00000000..897e9b71
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/143.print
@@ -0,0 +1,3 @@
+(module
+  (import "spectest" "memory" (memory (;0;) 1 3))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/144.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/144.print
new file mode 100644
index 00000000..c0d28c6b
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/144.print
@@ -0,0 +1,3 @@
+(module
+  (import "spectest" "memory" (memory (;0;) 0 3))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/156.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/159.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/exception-handling/imports.wast/156.print
rename to tests/snapshots/testsuite/proposals/exception-handling/imports.wast/159.print
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/162.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/162.print
deleted file mode 100644
index 7efe25f1..00000000
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/162.print
+++ /dev/null
@@ -1,10 +0,0 @@
-(module $Mgm
-  (type (;0;) (func (result i32)))
-  (func (;0;) (type 0) (result i32)
-    i32.const 1
-    memory.grow
-  )
-  (memory (;0;) 1)
-  (export "memory" (memory 0))
-  (export "grow" (func 0))
-)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/165.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/165.print
index 477ca763..7efe25f1 100644
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/165.print
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/165.print
@@ -1,10 +1,10 @@
-(module $Mgim1
+(module $Mgm
   (type (;0;) (func (result i32)))
-  (import "grown-memory" "memory" (memory (;0;) 2))
   (func (;0;) (type 0) (result i32)
     i32.const 1
     memory.grow
   )
+  (memory (;0;) 1)
   (export "memory" (memory 0))
   (export "grow" (func 0))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/168.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/168.print
index 80793cac..477ca763 100644
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/168.print
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/168.print
@@ -1,8 +1,10 @@
-(module $Mgim2
+(module $Mgim1
   (type (;0;) (func (result i32)))
-  (import "grown-imported-memory" "memory" (memory (;0;) 3))
+  (import "grown-memory" "memory" (memory (;0;) 2))
   (func (;0;) (type 0) (result i32)
-    memory.size
+    i32.const 1
+    memory.grow
   )
-  (export "size" (func 0))
+  (export "memory" (memory 0))
+  (export "grow" (func 0))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/171.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/171.print
new file mode 100644
index 00000000..80793cac
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/171.print
@@ -0,0 +1,8 @@
+(module $Mgim2
+  (type (;0;) (func (result i32)))
+  (import "grown-imported-memory" "memory" (memory (;0;) 3))
+  (func (;0;) (type 0) (result i32)
+    memory.size
+  )
+  (export "size" (func 0))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/186.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/189.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/exception-handling/imports.wast/186.print
rename to tests/snapshots/testsuite/proposals/exception-handling/imports.wast/189.print
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/47.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/47.print
index 0693cbec..44d1500c 100644
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/47.print
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/47.print
@@ -1,5 +1,8 @@
 (module
   (type (;0;) (func (result i32)))
+  (type (;1;) (func (result i64)))
+  (type (;2;) (func (result f32)))
+  (type (;3;) (func (result f64)))
   (import "spectest" "global_i32" (global (;0;) i32))
   (import "spectest" "global_i32" (global (;1;) i32))
   (import "spectest" "global_i32" (global $x (;2;) i32))
@@ -19,8 +22,20 @@
   (func (;3;) (type 0) (result i32)
     global.get $y
   )
+  (func (;4;) (type 1) (result i64)
+    global.get 4
+  )
+  (func (;5;) (type 2) (result f32)
+    global.get 5
+  )
+  (func (;6;) (type 3) (result f64)
+    global.get 6
+  )
   (export "get-0" (func 0))
   (export "get-1" (func 1))
   (export "get-x" (func 2))
   (export "get-y" (func 3))
+  (export "get-4" (func 4))
+  (export "get-5" (func 5))
+  (export "get-6" (func 6))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/52.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/55.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/exception-handling/imports.wast/52.print
rename to tests/snapshots/testsuite/proposals/exception-handling/imports.wast/55.print
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/53.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/56.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/exception-handling/imports.wast/53.print
rename to tests/snapshots/testsuite/proposals/exception-handling/imports.wast/56.print
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/54.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/57.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/exception-handling/imports.wast/54.print
rename to tests/snapshots/testsuite/proposals/exception-handling/imports.wast/57.print
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/75.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/78.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/exception-handling/imports.wast/75.print
rename to tests/snapshots/testsuite/proposals/exception-handling/imports.wast/78.print
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/81.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/84.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/exception-handling/imports.wast/81.print
rename to tests/snapshots/testsuite/proposals/exception-handling/imports.wast/84.print
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/87.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/87.print
deleted file mode 100644
index 9dfcbda8..00000000
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/87.print
+++ /dev/null
@@ -1,6 +0,0 @@
-(module
-  (import "spectest" "table" (table (;0;) 0 funcref))
-  (import "spectest" "table" (table (;1;) 0 funcref))
-  (table (;2;) 10 funcref)
-  (table (;3;) 10 funcref)
-)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/88.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/88.print
deleted file mode 100644
index 72f38c2e..00000000
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/88.print
+++ /dev/null
@@ -1,3 +0,0 @@
-(module
-  (import "test" "table-10-inf" (table (;0;) 10 funcref))
-)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/89.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/89.print
deleted file mode 100644
index 475c251b..00000000
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/89.print
+++ /dev/null
@@ -1,3 +0,0 @@
-(module
-  (import "test" "table-10-inf" (table (;0;) 5 funcref))
-)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/90.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/90.print
index c8997038..9dfcbda8 100644
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/90.print
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/90.print
@@ -1,3 +1,6 @@
 (module
-  (import "test" "table-10-inf" (table (;0;) 0 funcref))
+  (import "spectest" "table" (table (;0;) 0 funcref))
+  (import "spectest" "table" (table (;1;) 0 funcref))
+  (table (;2;) 10 funcref)
+  (table (;3;) 10 funcref)
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/91.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/91.print
index f1e85594..72f38c2e 100644
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/91.print
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/91.print
@@ -1,3 +1,3 @@
 (module
-  (import "test" "table-10-20" (table (;0;) 10 funcref))
+  (import "test" "table-10-inf" (table (;0;) 10 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/92.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/92.print
index 4eca2099..475c251b 100644
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/92.print
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/92.print
@@ -1,3 +1,3 @@
 (module
-  (import "test" "table-10-20" (table (;0;) 5 funcref))
+  (import "test" "table-10-inf" (table (;0;) 5 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/93.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/93.print
index 18937c5d..c8997038 100644
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/93.print
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/93.print
@@ -1,3 +1,3 @@
 (module
-  (import "test" "table-10-20" (table (;0;) 0 funcref))
+  (import "test" "table-10-inf" (table (;0;) 0 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/94.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/94.print
index affb91ad..f1e85594 100644
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/94.print
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/94.print
@@ -1,3 +1,3 @@
 (module
-  (import "test" "table-10-20" (table (;0;) 10 20 funcref))
+  (import "test" "table-10-20" (table (;0;) 10 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/95.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/95.print
index b27d0a18..4eca2099 100644
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/95.print
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/95.print
@@ -1,3 +1,3 @@
 (module
-  (import "test" "table-10-20" (table (;0;) 5 20 funcref))
+  (import "test" "table-10-20" (table (;0;) 5 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/96.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/96.print
index d40ae2d3..18937c5d 100644
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/96.print
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/96.print
@@ -1,3 +1,3 @@
 (module
-  (import "test" "table-10-20" (table (;0;) 0 20 funcref))
+  (import "test" "table-10-20" (table (;0;) 0 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/97.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/97.print
index eea2b23b..affb91ad 100644
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/97.print
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/97.print
@@ -1,3 +1,3 @@
 (module
-  (import "test" "table-10-20" (table (;0;) 10 25 funcref))
+  (import "test" "table-10-20" (table (;0;) 10 20 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/98.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/98.print
index 339f1e02..b27d0a18 100644
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/98.print
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/98.print
@@ -1,3 +1,3 @@
 (module
-  (import "test" "table-10-20" (table (;0;) 5 25 funcref))
+  (import "test" "table-10-20" (table (;0;) 5 20 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/99.print b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/99.print
index 5c845b5c..d40ae2d3 100644
--- a/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/99.print
+++ b/tests/snapshots/testsuite/proposals/exception-handling/imports.wast/99.print
@@ -1,3 +1,3 @@
 (module
-  (import "test" "table-10-20" (table (;0;) 0 25 funcref))
+  (import "test" "table-10-20" (table (;0;) 0 20 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/extended-const/elem.wast/102.print b/tests/snapshots/testsuite/proposals/extended-const/elem.wast/102.print
new file mode 100644
index 00000000..b5c736aa
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/extended-const/elem.wast/102.print
@@ -0,0 +1,14 @@
+(module
+  (type (;0;) (func (result i32)))
+  (type (;1;) (func (param i32) (result i32)))
+  (func (;0;) (type 0) (result i32)
+    i32.const 42
+  )
+  (func (;1;) (type 1) (param i32) (result i32)
+    local.get 0
+    call_indirect (type 0)
+  )
+  (table (;0;) 10 funcref)
+  (export "call_in_table" (func 1))
+  (elem (;0;) (offset i32.const 2 i32.const 1 i32.sub) funcref (ref.func 0))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/extended-const/elem.wast/105.print b/tests/snapshots/testsuite/proposals/extended-const/elem.wast/105.print
new file mode 100644
index 00000000..92f7b871
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/extended-const/elem.wast/105.print
@@ -0,0 +1,14 @@
+(module
+  (type (;0;) (func (result i32)))
+  (type (;1;) (func (param i32) (result i32)))
+  (func (;0;) (type 0) (result i32)
+    i32.const 42
+  )
+  (func (;1;) (type 1) (param i32) (result i32)
+    local.get 0
+    call_indirect (type 0)
+  )
+  (table (;0;) 10 funcref)
+  (export "call_in_table" (func 1))
+  (elem (;0;) (offset i32.const 2 i32.const 2 i32.mul) funcref (ref.func 0))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/extended-const/elem.wast/108.print b/tests/snapshots/testsuite/proposals/extended-const/elem.wast/108.print
new file mode 100644
index 00000000..1aadc82a
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/extended-const/elem.wast/108.print
@@ -0,0 +1,15 @@
+(module
+  (type (;0;) (func (result i32)))
+  (type (;1;) (func (param i32) (result i32)))
+  (import "spectest" "global_i32" (global (;0;) i32))
+  (func (;0;) (type 0) (result i32)
+    i32.const 42
+  )
+  (func (;1;) (type 1) (param i32) (result i32)
+    local.get 0
+    call_indirect (type 0)
+  )
+  (table (;0;) 10 funcref)
+  (export "call_in_table" (func 1))
+  (elem (;0;) (offset i32.const 2 global.get 0 i32.const 665 i32.sub i32.const 2 i32.add i32.mul) funcref (ref.func 0))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/extended-const/elem.wast/99.print b/tests/snapshots/testsuite/proposals/extended-const/elem.wast/99.print
new file mode 100644
index 00000000..e6beec5a
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/extended-const/elem.wast/99.print
@@ -0,0 +1,14 @@
+(module
+  (type (;0;) (func (result i32)))
+  (type (;1;) (func (param i32) (result i32)))
+  (func (;0;) (type 0) (result i32)
+    i32.const 42
+  )
+  (func (;1;) (type 1) (param i32) (result i32)
+    local.get 0
+    call_indirect (type 0)
+  )
+  (table (;0;) 10 funcref)
+  (export "call_in_table" (func 1))
+  (elem (;0;) (offset i32.const 1 i32.const 2 i32.add) funcref (ref.func 0))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/function-references/if.wast/0.print b/tests/snapshots/testsuite/proposals/function-references/if.wast/0.print
index 52884a2a..a44a9de2 100644
--- a/tests/snapshots/testsuite/proposals/function-references/if.wast/0.print
+++ b/tests/snapshots/testsuite/proposals/function-references/if.wast/0.print
@@ -862,6 +862,17 @@
     drop
     drop
   )
+  (func (;52;) (type $block-sig-1)
+    i32.const 0
+    if ;; label = @1
+    else
+    end
+    i32.const 1
+    i32.eqz
+    if ;; label = @1
+    else
+    end
+  )
   (table (;0;) 1 1 funcref)
   (memory (;0;) 1)
   (global $a (;0;) (mut i32) i32.const 10)
@@ -914,5 +925,6 @@
   (export "add64_u_with_carry" (func $add64_u_with_carry))
   (export "add64_u_saturated" (func $add64_u_saturated))
   (export "type-use" (func 51))
+  (export "atypical-condition" (func 52))
   (elem (;0;) (i32.const 0) func $func)
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/function-references/table.wast/29.print b/tests/snapshots/testsuite/proposals/function-references/table.wast/29.print
index 4262eacb..590d93b9 100644
--- a/tests/snapshots/testsuite/proposals/function-references/table.wast/29.print
+++ b/tests/snapshots/testsuite/proposals/function-references/table.wast/29.print
@@ -1,23 +1,6 @@
 (module
-  (type $dummy (;0;) (func))
-  (type (;1;) (func (result funcref)))
-  (func $dummy (;0;) (type $dummy))
-  (func (;1;) (type 1) (result funcref)
-    i32.const 1
-    table.get $t1
-  )
-  (func (;2;) (type 1) (result funcref)
-    i32.const 4
-    table.get $t2
-  )
-  (func (;3;) (type 1) (result funcref)
-    i32.const 7
-    table.get $t3
-  )
-  (table $t1 (;0;) 10 funcref)
-  (table $t2 (;1;) 10 funcref ref.func $dummy)
-  (table $t3 (;2;) 10 (ref 0) ref.func $dummy)
-  (export "get1" (func 1))
-  (export "get2" (func 2))
-  (export "get3" (func 3))
+  (type $f (;0;) (func))
+  (func $f (;0;) (type $f))
+  (global (;0;) (ref 0) ref.func $f)
+  (export "g" (global 0))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/function-references/table.wast/31.print b/tests/snapshots/testsuite/proposals/function-references/table.wast/31.print
new file mode 100644
index 00000000..97e86cfb
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/function-references/table.wast/31.print
@@ -0,0 +1,36 @@
+(module
+  (type $dummy (;0;) (func))
+  (type (;1;) (func (result funcref)))
+  (import "M" "g" (global $g (;0;) (ref 0)))
+  (func $dummy (;0;) (type $dummy))
+  (func (;1;) (type 1) (result funcref)
+    i32.const 1
+    table.get $t1
+  )
+  (func (;2;) (type 1) (result funcref)
+    i32.const 4
+    table.get $t2
+  )
+  (func (;3;) (type 1) (result funcref)
+    i32.const 7
+    table.get $t3
+  )
+  (func (;4;) (type 1) (result funcref)
+    i32.const 8
+    table.get $t4
+  )
+  (func (;5;) (type 1) (result funcref)
+    i32.const 9
+    table.get $t5
+  )
+  (table $t1 (;0;) 10 funcref)
+  (table $t2 (;1;) 10 funcref ref.func $dummy)
+  (table $t3 (;2;) 10 (ref 0) ref.func $dummy)
+  (table $t4 (;3;) 10 funcref global.get $g)
+  (table $t5 (;4;) 10 (ref 0) global.get $g)
+  (export "get1" (func 1))
+  (export "get2" (func 2))
+  (export "get3" (func 3))
+  (export "get4" (func 4))
+  (export "get5" (func 5))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/gc/array.wast/21.print b/tests/snapshots/testsuite/proposals/gc/array.wast/21.print
index 01c55fa8..9ff51873 100644
--- a/tests/snapshots/testsuite/proposals/gc/array.wast/21.print
+++ b/tests/snapshots/testsuite/proposals/gc/array.wast/21.print
@@ -13,7 +13,7 @@
     i32.const 3
     array.new_data $vec $d
   )
-  (func $get (;1;) (type 3) (param $i i32) (param $v (ref 0)) (result i32)
+  (func $get_u (;1;) (type 3) (param $i i32) (param $v (ref 0)) (result i32)
     local.get $v
     local.get $i
     array.get_u $vec
@@ -21,9 +21,19 @@
   (func (;2;) (type 4) (param $i i32) (result i32)
     local.get $i
     call $new
-    call $get
+    call $get_u
   )
-  (func $set_get (;3;) (type 5) (param $i i32) (param $v (ref 1)) (param $y i32) (result i32)
+  (func $get_s (;3;) (type 3) (param $i i32) (param $v (ref 0)) (result i32)
+    local.get $v
+    local.get $i
+    array.get_s $vec
+  )
+  (func (;4;) (type 4) (param $i i32) (result i32)
+    local.get $i
+    call $new
+    call $get_s
+  )
+  (func $set_get (;5;) (type 5) (param $i i32) (param $v (ref 1)) (param $y i32) (result i32)
     local.get $v
     local.get $i
     local.get $y
@@ -32,7 +42,7 @@
     local.get $i
     array.get_u $mvec
   )
-  (func (;4;) (type 6) (param $i i32) (param $y i32) (result i32)
+  (func (;6;) (type 6) (param $i i32) (param $y i32) (result i32)
     local.get $i
     i32.const 1
     i32.const 3
@@ -40,17 +50,18 @@
     local.get $y
     call $set_get
   )
-  (func $len (;5;) (type 7) (param $v (ref array)) (result i32)
+  (func $len (;7;) (type 7) (param $v (ref array)) (result i32)
     local.get $v
     array.len
   )
-  (func (;6;) (type 8) (result i32)
+  (func (;8;) (type 8) (result i32)
     call $new
     call $len
   )
   (export "new" (func $new))
-  (export "get" (func 2))
-  (export "set_get" (func 4))
-  (export "len" (func 6))
-  (data $d (;0;) "\00\01\02\03\04")
+  (export "get_u" (func 2))
+  (export "get_s" (func 4))
+  (export "set_get" (func 6))
+  (export "len" (func 8))
+  (data $d (;0;) "\00\01\02\ff\04")
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/gc/array.wast/29.print b/tests/snapshots/testsuite/proposals/gc/array.wast/31.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/gc/array.wast/29.print
rename to tests/snapshots/testsuite/proposals/gc/array.wast/31.print
diff --git a/tests/snapshots/testsuite/proposals/gc/array.wast/41.print b/tests/snapshots/testsuite/proposals/gc/array.wast/43.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/gc/array.wast/41.print
rename to tests/snapshots/testsuite/proposals/gc/array.wast/43.print
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/73.print b/tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/73.print
new file mode 100644
index 00000000..36f4498d
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/73.print
@@ -0,0 +1,9 @@
+(module
+  (type (;0;) (func))
+  (func (;0;) (type 0)
+    i64.const 0
+    i32.load offset=18446744073709551615
+    drop
+  )
+  (memory (;0;) i64 0)
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/81.print b/tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/83.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/81.print
rename to tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/83.print
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/85.print b/tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/85.print
new file mode 100644
index 00000000..1303df08
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/85.print
@@ -0,0 +1,4 @@
+(module
+  (memory (;0;) 0)
+  (data (;0;) (i32.const 0) "")
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/86.print b/tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/86.print
new file mode 100644
index 00000000..1303df08
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/86.print
@@ -0,0 +1,4 @@
+(module
+  (memory (;0;) 0)
+  (data (;0;) (i32.const 0) "")
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/87.print b/tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/87.print
new file mode 100644
index 00000000..1303df08
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/87.print
@@ -0,0 +1,4 @@
+(module
+  (memory (;0;) 0)
+  (data (;0;) (i32.const 0) "")
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/88.print b/tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/88.print
new file mode 100644
index 00000000..3a1c6fc5
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/88.print
@@ -0,0 +1,4 @@
+(module
+  (table (;0;) 0 funcref)
+  (elem (;0;) (i32.const 0) func)
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/89.print b/tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/89.print
new file mode 100644
index 00000000..3a1c6fc5
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/89.print
@@ -0,0 +1,4 @@
+(module
+  (table (;0;) 0 funcref)
+  (elem (;0;) (i32.const 0) func)
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/90.print b/tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/90.print
new file mode 100644
index 00000000..3a1c6fc5
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/90.print
@@ -0,0 +1,4 @@
+(module
+  (table (;0;) 0 funcref)
+  (elem (;0;) (i32.const 0) func)
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/91.print b/tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/91.print
new file mode 100644
index 00000000..3a1c6fc5
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary-leb128.wast/91.print
@@ -0,0 +1,4 @@
+(module
+  (table (;0;) 0 funcref)
+  (elem (;0;) (i32.const 0) func)
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/56.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/120.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/memory64/binary.wast/56.print
rename to tests/snapshots/testsuite/proposals/memory64/binary.wast/120.print
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/61.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/125.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/memory64/binary.wast/61.print
rename to tests/snapshots/testsuite/proposals/memory64/binary.wast/125.print
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/62.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/126.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/memory64/binary.wast/62.print
rename to tests/snapshots/testsuite/proposals/memory64/binary.wast/126.print
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/133.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/133.print
new file mode 100644
index 00000000..a72fa86b
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary.wast/133.print
@@ -0,0 +1,7 @@
+(module
+  (type (;0;) (func))
+  (func (;0;) (type 0))
+  (table (;0;) 0 funcref)
+  (memory (;0;) 0)
+  (elem (;0;) funcref (ref.func 0))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/134.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/134.print
new file mode 100644
index 00000000..8a3ff912
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary.wast/134.print
@@ -0,0 +1,7 @@
+(module
+  (type (;0;) (func))
+  (func (;0;) (type 0))
+  (table (;0;) 0 funcref)
+  (memory (;0;) 0)
+  (elem (;0;) funcref (ref.null func))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/63.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/135.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/memory64/binary.wast/63.print
rename to tests/snapshots/testsuite/proposals/memory64/binary.wast/135.print
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/66.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/138.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/memory64/binary.wast/66.print
rename to tests/snapshots/testsuite/proposals/memory64/binary.wast/138.print
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/75.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/147.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/memory64/binary.wast/75.print
rename to tests/snapshots/testsuite/proposals/memory64/binary.wast/147.print
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/80.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/152.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/memory64/binary.wast/80.print
rename to tests/snapshots/testsuite/proposals/memory64/binary.wast/152.print
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/86.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/158.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/memory64/binary.wast/86.print
rename to tests/snapshots/testsuite/proposals/memory64/binary.wast/158.print
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/89.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/161.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/memory64/binary.wast/89.print
rename to tests/snapshots/testsuite/proposals/memory64/binary.wast/161.print
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/92.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/164.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/memory64/binary.wast/92.print
rename to tests/snapshots/testsuite/proposals/memory64/binary.wast/164.print
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/96.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/168.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/memory64/binary.wast/96.print
rename to tests/snapshots/testsuite/proposals/memory64/binary.wast/168.print
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/101.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/173.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/memory64/binary.wast/101.print
rename to tests/snapshots/testsuite/proposals/memory64/binary.wast/173.print
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/103.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/175.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/memory64/binary.wast/103.print
rename to tests/snapshots/testsuite/proposals/memory64/binary.wast/175.print
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/37.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/37.print
new file mode 100644
index 00000000..f18cc54f
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary.wast/37.print
@@ -0,0 +1,3 @@
+(module
+  (memory (;0;) 2)
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/38.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/38.print
new file mode 100644
index 00000000..f18cc54f
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary.wast/38.print
@@ -0,0 +1,3 @@
+(module
+  (memory (;0;) 2)
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/39.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/39.print
new file mode 100644
index 00000000..e6b79c4e
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary.wast/39.print
@@ -0,0 +1,3 @@
+(module
+  (global (;0;) i32 i32.const 0)
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/40.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/40.print
new file mode 100644
index 00000000..98af8924
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary.wast/40.print
@@ -0,0 +1,3 @@
+(module
+  (global (;0;) i32 i32.const -1)
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/41.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/41.print
new file mode 100644
index 00000000..e6b79c4e
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary.wast/41.print
@@ -0,0 +1,3 @@
+(module
+  (global (;0;) i32 i32.const 0)
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/42.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/42.print
new file mode 100644
index 00000000..98af8924
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary.wast/42.print
@@ -0,0 +1,3 @@
+(module
+  (global (;0;) i32 i32.const -1)
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/43.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/43.print
new file mode 100644
index 00000000..78d137b2
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary.wast/43.print
@@ -0,0 +1,3 @@
+(module
+  (global (;0;) i64 i64.const 0)
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/44.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/44.print
new file mode 100644
index 00000000..9d144029
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary.wast/44.print
@@ -0,0 +1,3 @@
+(module
+  (global (;0;) i64 i64.const -1)
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/45.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/45.print
new file mode 100644
index 00000000..78d137b2
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary.wast/45.print
@@ -0,0 +1,3 @@
+(module
+  (global (;0;) i64 i64.const 0)
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/46.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/46.print
new file mode 100644
index 00000000..9d144029
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary.wast/46.print
@@ -0,0 +1,3 @@
+(module
+  (global (;0;) i64 i64.const -1)
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/47.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/47.print
new file mode 100644
index 00000000..1303df08
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary.wast/47.print
@@ -0,0 +1,4 @@
+(module
+  (memory (;0;) 0)
+  (data (;0;) (i32.const 0) "")
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/48.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/48.print
new file mode 100644
index 00000000..3a1c6fc5
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary.wast/48.print
@@ -0,0 +1,4 @@
+(module
+  (table (;0;) 0 funcref)
+  (elem (;0;) (i32.const 0) func)
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/49.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/49.print
new file mode 100644
index 00000000..1303df08
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary.wast/49.print
@@ -0,0 +1,4 @@
+(module
+  (memory (;0;) 0)
+  (data (;0;) (i32.const 0) "")
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/50.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/50.print
new file mode 100644
index 00000000..1303df08
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary.wast/50.print
@@ -0,0 +1,4 @@
+(module
+  (memory (;0;) 0)
+  (data (;0;) (i32.const 0) "")
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/51.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/51.print
new file mode 100644
index 00000000..1303df08
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary.wast/51.print
@@ -0,0 +1,4 @@
+(module
+  (memory (;0;) 0)
+  (data (;0;) (i32.const 0) "")
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/52.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/52.print
new file mode 100644
index 00000000..3a1c6fc5
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary.wast/52.print
@@ -0,0 +1,4 @@
+(module
+  (table (;0;) 0 funcref)
+  (elem (;0;) (i32.const 0) func)
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/53.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/53.print
new file mode 100644
index 00000000..3a1c6fc5
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary.wast/53.print
@@ -0,0 +1,4 @@
+(module
+  (table (;0;) 0 funcref)
+  (elem (;0;) (i32.const 0) func)
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/54.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/54.print
new file mode 100644
index 00000000..3a1c6fc5
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary.wast/54.print
@@ -0,0 +1,4 @@
+(module
+  (table (;0;) 0 funcref)
+  (elem (;0;) (i32.const 0) func)
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/binary.wast/55.print b/tests/snapshots/testsuite/proposals/memory64/binary.wast/55.print
new file mode 100644
index 00000000..3a1c6fc5
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/binary.wast/55.print
@@ -0,0 +1,4 @@
+(module
+  (table (;0;) 0 funcref)
+  (elem (;0;) (i32.const 0) func)
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/simd_address.wast/0.print b/tests/snapshots/testsuite/proposals/memory64/simd_address.wast/0.print
new file mode 100644
index 00000000..08b300ba
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/simd_address.wast/0.print
@@ -0,0 +1,87 @@
+(module
+  (type (;0;) (func (param i32) (result v128)))
+  (type (;1;) (func (result v128)))
+  (type (;2;) (func (param i32)))
+  (func (;0;) (type 0) (param $i i32) (result v128)
+    local.get $i
+    v128.load
+  )
+  (func (;1;) (type 0) (param $i i32) (result v128)
+    local.get $i
+    v128.load align=1
+  )
+  (func (;2;) (type 0) (param $i i32) (result v128)
+    local.get $i
+    v128.load offset=1 align=1
+  )
+  (func (;3;) (type 0) (param $i i32) (result v128)
+    local.get $i
+    v128.load offset=2 align=1
+  )
+  (func (;4;) (type 0) (param $i i32) (result v128)
+    local.get $i
+    v128.load offset=15 align=1
+  )
+  (func (;5;) (type 1) (result v128)
+    i32.const 0
+    v128.const i32x4 0x00000000 0x3f800000 0x40000000 0x40400000
+    v128.store
+    i32.const 0
+    v128.load
+  )
+  (func (;6;) (type 1) (result v128)
+    i32.const 0
+    v128.const i32x4 0x00000000 0x00000001 0x00000002 0x00000003
+    v128.store align=1
+    i32.const 0
+    v128.load align=1
+  )
+  (func (;7;) (type 1) (result v128)
+    i32.const 0
+    v128.const i32x4 0x00010000 0x00030002 0x00050004 0x00070006
+    v128.store offset=1 align=1
+    i32.const 0
+    v128.load offset=1 align=1
+  )
+  (func (;8;) (type 1) (result v128)
+    i32.const 0
+    v128.const i32x4 0x03020100 0x07060504 0x0b0a0908 0x0f0e0d0c
+    v128.store offset=2 align=1
+    i32.const 0
+    v128.load offset=2 align=1
+  )
+  (func (;9;) (type 1) (result v128)
+    i32.const 0
+    v128.const i32x4 0x00000000 0x00000001 0x00000002 0x00000003
+    v128.store offset=15 align=1
+    i32.const 0
+    v128.load offset=15
+  )
+  (func (;10;) (type 1) (result v128)
+    i32.const 0
+    v128.const i32x4 0x00000000 0x00000001 0x00000002 0x00000003
+    v128.store offset=65520 align=1
+    i32.const 0
+    v128.load offset=65520
+  )
+  (func (;11;) (type 2) (param $i i32)
+    local.get $i
+    v128.const i32x4 0x00000000 0x00000001 0x00000002 0x00000003
+    v128.store offset=1 align=1
+  )
+  (memory (;0;) 1)
+  (export "load_data_1" (func 0))
+  (export "load_data_2" (func 1))
+  (export "load_data_3" (func 2))
+  (export "load_data_4" (func 3))
+  (export "load_data_5" (func 4))
+  (export "store_data_0" (func 5))
+  (export "store_data_1" (func 6))
+  (export "store_data_2" (func 7))
+  (export "store_data_3" (func 8))
+  (export "store_data_4" (func 9))
+  (export "store_data_5" (func 10))
+  (export "store_data_6" (func 11))
+  (data (;0;) (i32.const 0) "\00\01\02\03\04\05\06\07\08\09\10\11\12\13\14\15")
+  (data (;1;) (i32.const 65505) "\16\17\18\19 !\22#$%&'()01")
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/simd_address.wast/41.print b/tests/snapshots/testsuite/proposals/memory64/simd_address.wast/41.print
new file mode 100644
index 00000000..d483545b
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/simd_address.wast/41.print
@@ -0,0 +1,10 @@
+(module
+  (type (;0;) (func))
+  (func (;0;) (type 0)
+    i32.const 0
+    v128.load offset=65521
+    drop
+  )
+  (memory (;0;) 1)
+  (export "v128.load_offset_65521" (func 0))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/memory64/simd_address.wast/44.print b/tests/snapshots/testsuite/proposals/memory64/simd_address.wast/44.print
new file mode 100644
index 00000000..22de1880
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/memory64/simd_address.wast/44.print
@@ -0,0 +1,10 @@
+(module
+  (type (;0;) (func))
+  (func (;0;) (type 0)
+    i32.const 0
+    v128.const i32x4 0x00000000 0x00000000 0x00000000 0x00000000
+    v128.store offset=65521
+  )
+  (memory (;0;) 1)
+  (export "v128.store_offset_65521" (func 0))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/100.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/100.print
index 9c95837f..03446a5f 100644
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/100.print
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/100.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "table" (table (;0;) 10 25 funcref))
+  (import "spectest" "table" (table (;0;) 10 20 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/101.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/101.print
index 45fc0778..d1cff003 100644
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/101.print
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/101.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "table" (table (;0;) 5 25 funcref))
+  (import "spectest" "table" (table (;0;) 5 20 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/102.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/102.print
new file mode 100644
index 00000000..65ae9839
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/102.print
@@ -0,0 +1,3 @@
+(module
+  (import "spectest" "table" (table (;0;) 0 20 funcref))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/103.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/103.print
new file mode 100644
index 00000000..9c95837f
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/103.print
@@ -0,0 +1,3 @@
+(module
+  (import "spectest" "table" (table (;0;) 10 25 funcref))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/104.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/104.print
new file mode 100644
index 00000000..45fc0778
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/104.print
@@ -0,0 +1,3 @@
+(module
+  (import "spectest" "table" (table (;0;) 5 25 funcref))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/114.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/117.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/multi-memory/imports.wast/114.print
rename to tests/snapshots/testsuite/proposals/multi-memory/imports.wast/117.print
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/119.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/122.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/multi-memory/imports.wast/119.print
rename to tests/snapshots/testsuite/proposals/multi-memory/imports.wast/122.print
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/124.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/124.print
deleted file mode 100644
index 1aad2d0f..00000000
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/124.print
+++ /dev/null
@@ -1,3 +0,0 @@
-(module
-  (import "test" "memory-2-inf" (memory (;0;) 2))
-)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/125.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/125.print
deleted file mode 100644
index 546d8eae..00000000
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/125.print
+++ /dev/null
@@ -1,3 +0,0 @@
-(module
-  (import "test" "memory-2-inf" (memory (;0;) 1))
-)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/126.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/126.print
deleted file mode 100644
index e40926e4..00000000
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/126.print
+++ /dev/null
@@ -1,3 +0,0 @@
-(module
-  (import "test" "memory-2-inf" (memory (;0;) 0))
-)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/127.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/127.print
index 3c971460..1aad2d0f 100644
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/127.print
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/127.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "memory" (memory (;0;) 1))
+  (import "test" "memory-2-inf" (memory (;0;) 2))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/128.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/128.print
index 83efcab8..546d8eae 100644
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/128.print
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/128.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "memory" (memory (;0;) 0))
+  (import "test" "memory-2-inf" (memory (;0;) 1))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/129.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/129.print
index 404698c7..e40926e4 100644
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/129.print
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/129.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "memory" (memory (;0;) 1 2))
+  (import "test" "memory-2-inf" (memory (;0;) 0))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/130.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/130.print
index 39db8755..3c971460 100644
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/130.print
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/130.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "memory" (memory (;0;) 0 2))
+  (import "spectest" "memory" (memory (;0;) 1))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/131.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/131.print
index 897e9b71..83efcab8 100644
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/131.print
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/131.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "memory" (memory (;0;) 1 3))
+  (import "spectest" "memory" (memory (;0;) 0))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/132.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/132.print
index c0d28c6b..404698c7 100644
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/132.print
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/132.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "memory" (memory (;0;) 0 3))
+  (import "spectest" "memory" (memory (;0;) 1 2))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/133.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/133.print
new file mode 100644
index 00000000..39db8755
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/133.print
@@ -0,0 +1,3 @@
+(module
+  (import "spectest" "memory" (memory (;0;) 0 2))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/134.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/134.print
new file mode 100644
index 00000000..897e9b71
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/134.print
@@ -0,0 +1,3 @@
+(module
+  (import "spectest" "memory" (memory (;0;) 1 3))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/135.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/135.print
new file mode 100644
index 00000000..c0d28c6b
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/135.print
@@ -0,0 +1,3 @@
+(module
+  (import "spectest" "memory" (memory (;0;) 0 3))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/147.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/150.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/multi-memory/imports.wast/147.print
rename to tests/snapshots/testsuite/proposals/multi-memory/imports.wast/150.print
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/153.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/153.print
deleted file mode 100644
index 7efe25f1..00000000
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/153.print
+++ /dev/null
@@ -1,10 +0,0 @@
-(module $Mgm
-  (type (;0;) (func (result i32)))
-  (func (;0;) (type 0) (result i32)
-    i32.const 1
-    memory.grow
-  )
-  (memory (;0;) 1)
-  (export "memory" (memory 0))
-  (export "grow" (func 0))
-)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/156.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/156.print
index 477ca763..7efe25f1 100644
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/156.print
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/156.print
@@ -1,10 +1,10 @@
-(module $Mgim1
+(module $Mgm
   (type (;0;) (func (result i32)))
-  (import "grown-memory" "memory" (memory (;0;) 2))
   (func (;0;) (type 0) (result i32)
     i32.const 1
     memory.grow
   )
+  (memory (;0;) 1)
   (export "memory" (memory 0))
   (export "grow" (func 0))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/159.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/159.print
index 80793cac..477ca763 100644
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/159.print
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/159.print
@@ -1,8 +1,10 @@
-(module $Mgim2
+(module $Mgim1
   (type (;0;) (func (result i32)))
-  (import "grown-imported-memory" "memory" (memory (;0;) 3))
+  (import "grown-memory" "memory" (memory (;0;) 2))
   (func (;0;) (type 0) (result i32)
-    memory.size
+    i32.const 1
+    memory.grow
   )
-  (export "size" (func 0))
+  (export "memory" (memory 0))
+  (export "grow" (func 0))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/162.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/162.print
new file mode 100644
index 00000000..80793cac
--- /dev/null
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/162.print
@@ -0,0 +1,8 @@
+(module $Mgim2
+  (type (;0;) (func (result i32)))
+  (import "grown-imported-memory" "memory" (memory (;0;) 3))
+  (func (;0;) (type 0) (result i32)
+    memory.size
+  )
+  (export "size" (func 0))
+)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/177.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/180.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/multi-memory/imports.wast/177.print
rename to tests/snapshots/testsuite/proposals/multi-memory/imports.wast/180.print
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/41.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/41.print
index 0693cbec..44d1500c 100644
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/41.print
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/41.print
@@ -1,5 +1,8 @@
 (module
   (type (;0;) (func (result i32)))
+  (type (;1;) (func (result i64)))
+  (type (;2;) (func (result f32)))
+  (type (;3;) (func (result f64)))
   (import "spectest" "global_i32" (global (;0;) i32))
   (import "spectest" "global_i32" (global (;1;) i32))
   (import "spectest" "global_i32" (global $x (;2;) i32))
@@ -19,8 +22,20 @@
   (func (;3;) (type 0) (result i32)
     global.get $y
   )
+  (func (;4;) (type 1) (result i64)
+    global.get 4
+  )
+  (func (;5;) (type 2) (result f32)
+    global.get 5
+  )
+  (func (;6;) (type 3) (result f64)
+    global.get 6
+  )
   (export "get-0" (func 0))
   (export "get-1" (func 1))
   (export "get-x" (func 2))
   (export "get-y" (func 3))
+  (export "get-4" (func 4))
+  (export "get-5" (func 5))
+  (export "get-6" (func 6))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/46.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/49.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/multi-memory/imports.wast/46.print
rename to tests/snapshots/testsuite/proposals/multi-memory/imports.wast/49.print
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/47.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/50.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/multi-memory/imports.wast/47.print
rename to tests/snapshots/testsuite/proposals/multi-memory/imports.wast/50.print
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/48.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/51.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/multi-memory/imports.wast/48.print
rename to tests/snapshots/testsuite/proposals/multi-memory/imports.wast/51.print
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/69.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/72.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/multi-memory/imports.wast/69.print
rename to tests/snapshots/testsuite/proposals/multi-memory/imports.wast/72.print
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/75.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/78.print
similarity index 100%
rename from tests/snapshots/testsuite/proposals/multi-memory/imports.wast/75.print
rename to tests/snapshots/testsuite/proposals/multi-memory/imports.wast/78.print
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/81.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/81.print
deleted file mode 100644
index 9dfcbda8..00000000
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/81.print
+++ /dev/null
@@ -1,6 +0,0 @@
-(module
-  (import "spectest" "table" (table (;0;) 0 funcref))
-  (import "spectest" "table" (table (;1;) 0 funcref))
-  (table (;2;) 10 funcref)
-  (table (;3;) 10 funcref)
-)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/82.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/82.print
deleted file mode 100644
index 72f38c2e..00000000
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/82.print
+++ /dev/null
@@ -1,3 +0,0 @@
-(module
-  (import "test" "table-10-inf" (table (;0;) 10 funcref))
-)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/83.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/83.print
deleted file mode 100644
index 475c251b..00000000
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/83.print
+++ /dev/null
@@ -1,3 +0,0 @@
-(module
-  (import "test" "table-10-inf" (table (;0;) 5 funcref))
-)
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/84.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/84.print
index c8997038..9dfcbda8 100644
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/84.print
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/84.print
@@ -1,3 +1,6 @@
 (module
-  (import "test" "table-10-inf" (table (;0;) 0 funcref))
+  (import "spectest" "table" (table (;0;) 0 funcref))
+  (import "spectest" "table" (table (;1;) 0 funcref))
+  (table (;2;) 10 funcref)
+  (table (;3;) 10 funcref)
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/85.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/85.print
index f1e85594..72f38c2e 100644
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/85.print
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/85.print
@@ -1,3 +1,3 @@
 (module
-  (import "test" "table-10-20" (table (;0;) 10 funcref))
+  (import "test" "table-10-inf" (table (;0;) 10 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/86.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/86.print
index 4eca2099..475c251b 100644
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/86.print
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/86.print
@@ -1,3 +1,3 @@
 (module
-  (import "test" "table-10-20" (table (;0;) 5 funcref))
+  (import "test" "table-10-inf" (table (;0;) 5 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/87.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/87.print
index 18937c5d..c8997038 100644
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/87.print
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/87.print
@@ -1,3 +1,3 @@
 (module
-  (import "test" "table-10-20" (table (;0;) 0 funcref))
+  (import "test" "table-10-inf" (table (;0;) 0 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/88.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/88.print
index affb91ad..f1e85594 100644
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/88.print
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/88.print
@@ -1,3 +1,3 @@
 (module
-  (import "test" "table-10-20" (table (;0;) 10 20 funcref))
+  (import "test" "table-10-20" (table (;0;) 10 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/89.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/89.print
index b27d0a18..4eca2099 100644
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/89.print
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/89.print
@@ -1,3 +1,3 @@
 (module
-  (import "test" "table-10-20" (table (;0;) 5 20 funcref))
+  (import "test" "table-10-20" (table (;0;) 5 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/90.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/90.print
index d40ae2d3..18937c5d 100644
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/90.print
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/90.print
@@ -1,3 +1,3 @@
 (module
-  (import "test" "table-10-20" (table (;0;) 0 20 funcref))
+  (import "test" "table-10-20" (table (;0;) 0 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/91.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/91.print
index eea2b23b..affb91ad 100644
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/91.print
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/91.print
@@ -1,3 +1,3 @@
 (module
-  (import "test" "table-10-20" (table (;0;) 10 25 funcref))
+  (import "test" "table-10-20" (table (;0;) 10 20 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/92.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/92.print
index 339f1e02..b27d0a18 100644
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/92.print
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/92.print
@@ -1,3 +1,3 @@
 (module
-  (import "test" "table-10-20" (table (;0;) 5 25 funcref))
+  (import "test" "table-10-20" (table (;0;) 5 20 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/93.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/93.print
index 5c845b5c..d40ae2d3 100644
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/93.print
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/93.print
@@ -1,3 +1,3 @@
 (module
-  (import "test" "table-10-20" (table (;0;) 0 25 funcref))
+  (import "test" "table-10-20" (table (;0;) 0 20 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/94.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/94.print
index 64a52acf..eea2b23b 100644
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/94.print
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/94.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "table" (table (;0;) 10 funcref))
+  (import "test" "table-10-20" (table (;0;) 10 25 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/95.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/95.print
index 218d7d9b..339f1e02 100644
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/95.print
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/95.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "table" (table (;0;) 5 funcref))
+  (import "test" "table-10-20" (table (;0;) 5 25 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/96.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/96.print
index 2a0fa834..5c845b5c 100644
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/96.print
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/96.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "table" (table (;0;) 0 funcref))
+  (import "test" "table-10-20" (table (;0;) 0 25 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/97.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/97.print
index 03446a5f..64a52acf 100644
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/97.print
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/97.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "table" (table (;0;) 10 20 funcref))
+  (import "spectest" "table" (table (;0;) 10 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/98.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/98.print
index d1cff003..218d7d9b 100644
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/98.print
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/98.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "table" (table (;0;) 5 20 funcref))
+  (import "spectest" "table" (table (;0;) 5 funcref))
 )
\ No newline at end of file
diff --git a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/99.print b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/99.print
index 65ae9839..2a0fa834 100644
--- a/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/99.print
+++ b/tests/snapshots/testsuite/proposals/multi-memory/imports.wast/99.print
@@ -1,3 +1,3 @@
 (module
-  (import "spectest" "table" (table (;0;) 0 20 funcref))
+  (import "spectest" "table" (table (;0;) 0 funcref))
 )
\ No newline at end of file
diff --git a/tests/testsuite b/tests/testsuite
index 26d62d0a..139fc876 160000
--- a/tests/testsuite
+++ b/tests/testsuite
@@ -1,1 +1,1 @@
-Subproject commit 26d62d0ad297b14218807cd20d9b568e11ec7bd9
+Subproject commit 139fc876068a2d37f0c4bdfaf05173c3c3702faf