diff options
-rw-r--r-- | src/s2wasm.h | 2 | ||||
-rw-r--r-- | test/dot_s/function-data-sections.wast | 35 | ||||
-rw-r--r-- | test/dot_s/visibilities.wast | 28 |
3 files changed, 64 insertions, 1 deletions
diff --git a/src/s2wasm.h b/src/s2wasm.h index 9d50693e9..dd53fc8e0 100644 --- a/src/s2wasm.h +++ b/src/s2wasm.h @@ -311,7 +311,7 @@ private: s++; if (match("text")) parseText(); else if (match("type")) parseType(); - else if (match("weak")) getStr(); // contents are in the type that follows + else if (match("weak") || match("hidden") || match("protected") || match("internal")) getStr(); // contents are in the content that follows else if (match("imports")) skipImports(); else if (match("data")) {} else if (match("ident")) {} diff --git a/test/dot_s/function-data-sections.wast b/test/dot_s/function-data-sections.wast new file mode 100644 index 000000000..3620f33c6 --- /dev/null +++ b/test/dot_s/function-data-sections.wast @@ -0,0 +1,35 @@ +(module + (memory 16 4294967295 (segment 4 "\00\00\00\00") (segment 8 "\01\00\00\00") (segment 12 "33\13@")) + (export "foo" $foo) + (export "bar" $bar) + (export "qux" $qux) + (func $foo + (block $fake_return_waka123 + (block + (br $fake_return_waka123) + ) + ) + ) + (func $bar (param $$0 i32) (result i32) + (block $fake_return_waka123 + (block + (br $fake_return_waka123 + (get_local $$0) + ) + ) + ) + ) + (func $qux (param $$0 f64) (param $$1 f64) (result f64) + (block $fake_return_waka123 + (block + (br $fake_return_waka123 + (f64.add + (get_local $$0) + (get_local $$1) + ) + ) + ) + ) + ) +) +;; METADATA: { "asmConsts": {},"staticBump": 15 } diff --git a/test/dot_s/visibilities.wast b/test/dot_s/visibilities.wast new file mode 100644 index 000000000..261834b58 --- /dev/null +++ b/test/dot_s/visibilities.wast @@ -0,0 +1,28 @@ +(module + (memory 0 4294967295) + (export "foo" $foo) + (export "bar" $bar) + (export "qux" $qux) + (func $foo + (block $fake_return_waka123 + (block + (br $fake_return_waka123) + ) + ) + ) + (func $bar + (block $fake_return_waka123 + (block + (br $fake_return_waka123) + ) + ) + ) + (func $qux + (block $fake_return_waka123 + (block + (br $fake_return_waka123) + ) + ) + ) +) +;; METADATA: { "asmConsts": {},"staticBump": 0 } |