diff --git a/crates/cli/tests/reference/interface-types-anyref.wat b/crates/cli/tests/reference/interface-types-anyref.wat index 2e2aa6dc4a3..09f1584537c 100644 --- a/crates/cli/tests/reference/interface-types-anyref.wat +++ b/crates/cli/tests/reference/interface-types-anyref.wat @@ -1,12 +1,12 @@ (module (type (;0;) (func (param externref externref) (result externref))) - (func $externref_in_out_externref_shim (@name "externref_in_out externref shim") (type 0) (param externref externref) (result externref)) + (func $#func0 (@name "externref_in_out externref shim") (type 0) (param externref externref) (result externref)) (memory (;0;) 17) (export "memory" (memory 0)) - (export "externref_in_out" (func $externref_in_out_externref_shim)) + (export "externref_in_out" (func $#func0)) (@interface type (;0;) (func (param externref) (param externref) (result externref))) (@interface func (;0;) (type 0) arg.get 0 arg.get 1 - call-core $externref_in_out_externref_shim) + call-core $#func0) (@interface export "externref_in_out" (func 0))) diff --git a/crates/cli/tests/reference/interface-types-strings.wat b/crates/cli/tests/reference/interface-types-strings.wat index d554f205570..ddb2ce3d951 100644 --- a/crates/cli/tests/reference/interface-types-strings.wat +++ b/crates/cli/tests/reference/interface-types-strings.wat @@ -6,17 +6,17 @@ (func $__wbindgen_malloc (type 0) (param i32) (result i32)) (func $many_strings (type 3) (param i32 i32 i32 i32)) (func $__wbindgen_free (type 1) (param i32 i32)) - (func $strings_multivalue_shim (@name "strings multivalue shim") (type 2) (param i32 i32) (result i32 i32)) + (func $#func3 (@name "strings multivalue shim") (type 2) (param i32 i32) (result i32 i32)) (memory (;0;) 17) (export "memory" (memory 0)) - (export "strings" (func $strings_multivalue_shim)) + (export "strings" (func $#func3)) (export "many_strings" (func $many_strings)) (@interface type (;0;) (func (param string) (result string))) (@interface type (;1;) (func (param string) (param string))) (@interface func (;0;) (type 0) arg.get 0 string-to-memory $__wbindgen_malloc - call-core $strings_multivalue_shim + call-core $#func3 defer-call-core $__wbindgen_free memory-to-string) (@interface func (;1;) (type 1) diff --git a/crates/externref-xform/tests/anyref-param-owned.wat b/crates/externref-xform/tests/anyref-param-owned.wat index 0fd8eceba96..84171fc1bb8 100644 --- a/crates/externref-xform/tests/anyref-param-owned.wat +++ b/crates/externref-xform/tests/anyref-param-owned.wat @@ -12,7 +12,7 @@ (type (;0;) (func (result i32))) (type (;1;) (func (param i32))) (type (;2;) (func (param externref))) - (func $foo_externref_shim (@name "foo externref shim") (type 2) (param externref) + (func $#func0 (@name "foo externref shim") (type 2) (param externref) (local i32) call $alloc local.tee 1 @@ -24,5 +24,5 @@ i32.const 0) (func $foo (type 1) (param i32)) (table (;0;) 32 externref) - (export "foo" (func $foo_externref_shim))) + (export "foo" (func $#func0))) ;) diff --git a/crates/externref-xform/tests/anyref-param.wat b/crates/externref-xform/tests/anyref-param.wat index cc9a5c5163c..70da291a778 100644 --- a/crates/externref-xform/tests/anyref-param.wat +++ b/crates/externref-xform/tests/anyref-param.wat @@ -11,7 +11,7 @@ (module (type (;0;) (func (param i32))) (type (;1;) (func (param externref))) - (func $foo_externref_shim (@name "foo externref shim") (type 1) (param externref) + (func $#func0 (@name "foo externref shim") (type 1) (param externref) (local i32) global.get 0 i32.const 1 @@ -33,5 +33,5 @@ (func $foo (type 0) (param i32)) (table (;0;) 32 externref) (global (;0;) (mut i32) (i32.const 32)) - (export "foo" (func $foo_externref_shim))) + (export "foo" (func $#func0))) ;) diff --git a/crates/externref-xform/tests/clone-ref-intrinsic.wat b/crates/externref-xform/tests/clone-ref-intrinsic.wat index 639099d387b..e618dc458ea 100644 --- a/crates/externref-xform/tests/clone-ref-intrinsic.wat +++ b/crates/externref-xform/tests/clone-ref-intrinsic.wat @@ -17,7 +17,7 @@ (type (;1;) (func (param i32))) (type (;2;) (func (param i32) (result i32))) (type (;3;) (func (param externref) (result externref))) - (func $foo_externref_shim (@name "foo externref shim") (type 3) (param externref) (result externref) + (func $#func0 (@name "foo externref shim") (type 3) (param externref) (result externref) (local i32) call $alloc local.tee 1 @@ -44,5 +44,5 @@ i32.const 0) (func $dealloc (type 1) (param i32)) (table (;0;) 32 externref) - (export "foo" (func $foo_externref_shim))) + (export "foo" (func $#func0))) ;) diff --git a/crates/externref-xform/tests/drop-ref-intrinsic.wat b/crates/externref-xform/tests/drop-ref-intrinsic.wat index be2cef568ae..14dba696009 100644 --- a/crates/externref-xform/tests/drop-ref-intrinsic.wat +++ b/crates/externref-xform/tests/drop-ref-intrinsic.wat @@ -16,7 +16,7 @@ (type (;0;) (func (result i32))) (type (;1;) (func (param i32))) (type (;2;) (func (param externref))) - (func $foo_externref_shim (@name "foo externref shim") (type 2) (param externref) + (func $#func0 (@name "foo externref shim") (type 2) (param externref) (local i32) call $alloc local.tee 1 @@ -31,5 +31,5 @@ i32.const 0) (func $dealloc (type 1) (param i32)) (table (;0;) 32 externref) - (export "foo" (func $foo_externref_shim))) + (export "foo" (func $#func0))) ;) diff --git a/crates/externref-xform/tests/import-anyref-owned.wat b/crates/externref-xform/tests/import-anyref-owned.wat index 72c5b5ba65c..2e999901c0d 100644 --- a/crates/externref-xform/tests/import-anyref-owned.wat +++ b/crates/externref-xform/tests/import-anyref-owned.wat @@ -16,7 +16,7 @@ (type (;1;) (func (param i32))) (type (;2;) (func (param externref))) (import "" "a" (func $a (type 2))) - (func $a_externref_shim (@name "a externref shim") (type 1) (param i32) + (func $#func1 (@name "a externref shim") (type 1) (param i32) local.get 0 table.get 0 local.get 0 @@ -24,7 +24,7 @@ call $a) (func (;2;) (type 0) i32.const 0 - call $a_externref_shim) + call $#func1) (func $dealloc (type 1) (param i32)) (table (;0;) 32 externref) (export "foo" (func 2))) diff --git a/crates/externref-xform/tests/import-anyref-ret.wat b/crates/externref-xform/tests/import-anyref-ret.wat index cc396d833e7..0de6f44ae42 100644 --- a/crates/externref-xform/tests/import-anyref-ret.wat +++ b/crates/externref-xform/tests/import-anyref-ret.wat @@ -14,7 +14,7 @@ (type (;0;) (func (result i32))) (type (;1;) (func (result externref))) (import "" "a" (func $a (type 1))) - (func $a_externref_shim (@name "a externref shim") (type 0) (result i32) + (func $#func1 (@name "a externref shim") (type 0) (result i32) (local i32 externref) call $a local.set 1 @@ -24,7 +24,7 @@ table.set 0 local.get 0) (func (;2;) (type 0) (result i32) - call $a_externref_shim) + call $#func1) (func $alloc (type 0) (result i32) i32.const 0) (table (;0;) 32 externref) diff --git a/crates/externref-xform/tests/import-anyref.wat b/crates/externref-xform/tests/import-anyref.wat index f1188e08f0f..698e293a3f3 100644 --- a/crates/externref-xform/tests/import-anyref.wat +++ b/crates/externref-xform/tests/import-anyref.wat @@ -16,13 +16,13 @@ (type (;1;) (func (param i32))) (type (;2;) (func (param externref))) (import "" "a" (func $a (type 2))) - (func $a_externref_shim (@name "a externref shim") (type 1) (param i32) + (func $#func1 (@name "a externref shim") (type 1) (param i32) local.get 0 table.get 0 call $a) (func (;2;) (type 0) i32.const 0 - call $a_externref_shim) + call $#func1) (table (;0;) 32 externref) (export "foo" (func 2))) ;) diff --git a/crates/externref-xform/tests/mixed-export.wat b/crates/externref-xform/tests/mixed-export.wat index 5f800608314..11f35d46a8e 100644 --- a/crates/externref-xform/tests/mixed-export.wat +++ b/crates/externref-xform/tests/mixed-export.wat @@ -12,7 +12,7 @@ (type (;0;) (func (result i32))) (type (;1;) (func (param f32 i32 i64 i32 i32))) (type (;2;) (func (param f32 externref i64 externref i32))) - (func $a_externref_shim (@name "a externref shim") (type 2) (param f32 externref i64 externref i32) + (func $#func0 (@name "a externref shim") (type 2) (param f32 externref i64 externref i32) (local i32 i32) global.get 0 i32.const 1 @@ -44,5 +44,5 @@ (func $a (type 1) (param f32 i32 i64 i32 i32)) (table (;0;) 32 externref) (global (;0;) (mut i32) (i32.const 32)) - (export "a" (func $a_externref_shim))) + (export "a" (func $#func0))) ;) diff --git a/crates/externref-xform/tests/mixed.wat b/crates/externref-xform/tests/mixed.wat index da5e7d0ba3b..9582cf053a3 100644 --- a/crates/externref-xform/tests/mixed.wat +++ b/crates/externref-xform/tests/mixed.wat @@ -21,7 +21,7 @@ (type (;2;) (func (param f32 i32 i64 i32 i32))) (type (;3;) (func (param f32 externref i64 externref i32))) (import "" "a" (func $a (type 3))) - (func $a_externref_shim (@name "a externref shim") (type 2) (param f32 i32 i64 i32 i32) + (func $#func1 (@name "a externref shim") (type 2) (param f32 i32 i64 i32 i32) local.get 0 local.get 1 table.get 0 @@ -38,7 +38,7 @@ i64.const 3 i32.const 4 i32.const 5 - call $a_externref_shim) + call $#func1) (func $dealloc (type 1) (param i32)) (table (;0;) 32 externref) (export "foo" (func 2))) diff --git a/crates/externref-xform/tests/ret-anyref.wat b/crates/externref-xform/tests/ret-anyref.wat index dfa36482b52..be0610abd0c 100644 --- a/crates/externref-xform/tests/ret-anyref.wat +++ b/crates/externref-xform/tests/ret-anyref.wat @@ -14,7 +14,7 @@ (type (;0;) (func (result i32))) (type (;1;) (func (result externref))) (type (;2;) (func (param i32))) - (func $foo_externref_shim (@name "foo externref shim") (type 1) (result externref) + (func $#func0 (@name "foo externref shim") (type 1) (result externref) (local i32) call $foo local.tee 0 @@ -25,5 +25,5 @@ i32.const 0) (func $dealloc (type 2) (param i32)) (table (;0;) 32 externref) - (export "foo" (func $foo_externref_shim))) + (export "foo" (func $#func0))) ;) diff --git a/crates/externref-xform/tests/table-grow-intrinsic.wat b/crates/externref-xform/tests/table-grow-intrinsic.wat index 70670c045a6..20265152e47 100644 --- a/crates/externref-xform/tests/table-grow-intrinsic.wat +++ b/crates/externref-xform/tests/table-grow-intrinsic.wat @@ -25,7 +25,7 @@ local.get 1 table.grow 0 drop) - (func $foo_externref_shim (@name "foo externref shim") (type 2) (param externref) + (func $#func1 (@name "foo externref shim") (type 2) (param externref) (local i32) call $alloc local.tee 1 @@ -36,5 +36,5 @@ (func $alloc (type 0) (result i32) i32.const 0) (table (;0;) 32 externref) - (export "foo" (func $foo_externref_shim))) + (export "foo" (func $#func1))) ;) diff --git a/crates/externref-xform/tests/table-set-null-intrinsic.wat b/crates/externref-xform/tests/table-set-null-intrinsic.wat index eb9bdf82be4..39f043db865 100644 --- a/crates/externref-xform/tests/table-set-null-intrinsic.wat +++ b/crates/externref-xform/tests/table-set-null-intrinsic.wat @@ -16,7 +16,7 @@ (type (;0;) (func (result i32))) (type (;1;) (func (param i32))) (type (;2;) (func (param externref))) - (func $foo_externref_shim (@name "foo externref shim") (type 2) (param externref) + (func $#func0 (@name "foo externref shim") (type 2) (param externref) (local i32) call $alloc local.tee 1 @@ -31,5 +31,5 @@ (func $alloc (type 0) (result i32) i32.const 0) (table (;0;) 32 externref) - (export "foo" (func $foo_externref_shim))) + (export "foo" (func $#func0))) ;) diff --git a/crates/externref-xform/tests/table.wat b/crates/externref-xform/tests/table.wat index 60a9cf238ed..98e24308402 100644 --- a/crates/externref-xform/tests/table.wat +++ b/crates/externref-xform/tests/table.wat @@ -14,7 +14,7 @@ (type (;0;) (func (result i32))) (type (;1;) (func (param i32))) (type (;2;) (func (param externref))) - (func $closure0_externref_shim (@name "closure0 externref shim") (type 2) (param externref) + (func $#func0 (@name "closure0 externref shim") (type 2) (param externref) (local i32) call $alloc local.tee 1 @@ -29,5 +29,5 @@ (table (;1;) 32 externref) (export "func" (table 0)) (elem (;0;) (i32.const 0) func $foo) - (elem (;1;) (i32.const 1) func $closure0_externref_shim)) + (elem (;1;) (i32.const 1) func $#func0)) ;) diff --git a/crates/externref-xform/tests/tee-before-grow.wat b/crates/externref-xform/tests/tee-before-grow.wat index 4331c398f39..a168abac04e 100644 --- a/crates/externref-xform/tests/tee-before-grow.wat +++ b/crates/externref-xform/tests/tee-before-grow.wat @@ -28,7 +28,7 @@ local.get 1 table.grow 0 drop) - (func $foo_externref_shim (@name "foo externref shim") (type 2) (param externref) + (func $#func1 (@name "foo externref shim") (type 2) (param externref) (local i32) call $alloc local.tee 1 @@ -39,5 +39,5 @@ (func $alloc (type 0) (result i32) i32.const 0) (table (;0;) 32 externref) - (export "foo" (func $foo_externref_shim))) + (export "foo" (func $#func1))) ;) diff --git a/crates/multi-value-xform/tests/align.wat b/crates/multi-value-xform/tests/align.wat index e2f1cabe5f9..d8321950f9a 100644 --- a/crates/multi-value-xform/tests/align.wat +++ b/crates/multi-value-xform/tests/align.wat @@ -11,7 +11,7 @@ (module (type (;0;) (func (result f64 i32 i64))) (type (;1;) (func (param i32))) - (func $foo_multivalue_shim (@name "foo multivalue shim") (type 0) (result f64 i32 i64) + (func $#func0 (@name "foo multivalue shim") (type 0) (result f64 i32 i64) (local i32) global.get 0 i32.const 32 @@ -33,5 +33,5 @@ (func $foo (type 1) (param i32)) (memory (;0;) 1) (global (;0;) (mut i32) (i32.const 0)) - (export "foo" (func $foo_multivalue_shim))) + (export "foo" (func $#func0))) ;) diff --git a/crates/multi-value-xform/tests/many.wat b/crates/multi-value-xform/tests/many.wat index 2fc8402f9da..a5d75a4d590 100644 --- a/crates/multi-value-xform/tests/many.wat +++ b/crates/multi-value-xform/tests/many.wat @@ -11,7 +11,7 @@ (module (type (;0;) (func (result i32 f32 f64 i64))) (type (;1;) (func (param i32))) - (func $foo_multivalue_shim (@name "foo multivalue shim") (type 0) (result i32 f32 f64 i64) + (func $#func0 (@name "foo multivalue shim") (type 0) (result i32 f32 f64 i64) (local i32) global.get 0 i32.const 32 @@ -35,5 +35,5 @@ (func $foo (type 1) (param i32)) (memory (;0;) 1) (global (;0;) (mut i32) (i32.const 0)) - (export "foo" (func $foo_multivalue_shim))) + (export "foo" (func $#func0))) ;) diff --git a/crates/multi-value-xform/tests/simple.wat b/crates/multi-value-xform/tests/simple.wat index 56a5886874e..b80f9fa74d4 100644 --- a/crates/multi-value-xform/tests/simple.wat +++ b/crates/multi-value-xform/tests/simple.wat @@ -20,7 +20,7 @@ (type (;2;) (func (result f32))) (type (;3;) (func (result f64))) (type (;4;) (func (param i32))) - (func $i32_multivalue_shim (@name "i32 multivalue shim") (type 0) (result i32) + (func $#func0 (@name "i32 multivalue shim") (type 0) (result i32) (local i32) global.get 0 i32.const 16 @@ -35,7 +35,7 @@ i32.const 16 i32.add global.set 0) - (func $i64_multivalue_shim (@name "i64 multivalue shim") (type 1) (result i64) + (func $#func1 (@name "i64 multivalue shim") (type 1) (result i64) (local i32) global.get 0 i32.const 16 @@ -50,7 +50,7 @@ i32.const 16 i32.add global.set 0) - (func $f32_multivalue_shim (@name "f32 multivalue shim") (type 2) (result f32) + (func $#func2 (@name "f32 multivalue shim") (type 2) (result f32) (local i32) global.get 0 i32.const 16 @@ -65,7 +65,7 @@ i32.const 16 i32.add global.set 0) - (func $f64_multivalue_shim (@name "f64 multivalue shim") (type 3) (result f64) + (func $#func3 (@name "f64 multivalue shim") (type 3) (result f64) (local i32) global.get 0 i32.const 16 @@ -86,8 +86,8 @@ (func $f64 (type 4) (param i32)) (memory (;0;) 1) (global (;0;) (mut i32) (i32.const 0)) - (export "i32" (func $i32_multivalue_shim)) - (export "i64" (func $i64_multivalue_shim)) - (export "f32" (func $f32_multivalue_shim)) - (export "f64" (func $f64_multivalue_shim))) + (export "i32" (func $#func0)) + (export "i64" (func $#func1)) + (export "f32" (func $#func2)) + (export "f64" (func $#func3))) ;)