diff options
author | Thomas Lively <tlively@google.com> | 2024-02-07 15:04:51 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-07 15:04:51 -0800 |
commit | d4c3fddd3de605983398756d3b46e2f14e55aba2 (patch) | |
tree | d64c2d8ee79a5d204345f3ca1588ccbd4239f1cc /test/lit/wasm-split | |
parent | f12977dd8aae5a0a42e65a8e448bca1453f018c6 (diff) | |
download | binaryen-d4c3fddd3de605983398756d3b46e2f14e55aba2.tar.gz binaryen-d4c3fddd3de605983398756d3b46e2f14e55aba2.tar.bz2 binaryen-d4c3fddd3de605983398756d3b46e2f14e55aba2.zip |
Get more tests working with the new text parser (#6284)
The new parser enforces the rule that imports must come before declarations
(except for type declarations). The old parser does not enforce this rule, so
many of our tests did not follow it. Fix them to follow that rule and fix other
invalid syntax. Also add missing finalization of Load expressions in
wasm-builder.h that was causing a test to fail under the new parser and guard
against an error case in wasm-ir-builder.cpp that used to cause a segfault.
Diffstat (limited to 'test/lit/wasm-split')
-rw-r--r-- | test/lit/wasm-split/export-name-already-exists.wast | 4 | ||||
-rw-r--r-- | test/lit/wasm-split/merge-profiles.wast | 4 | ||||
-rw-r--r-- | test/lit/wasm-split/mismatched-hashes.wast | 4 | ||||
-rw-r--r-- | test/lit/wasm-split/print-profile.wast | 4 |
4 files changed, 8 insertions, 8 deletions
diff --git a/test/lit/wasm-split/export-name-already-exists.wast b/test/lit/wasm-split/export-name-already-exists.wast index 83951795a..a83055da1 100644 --- a/test/lit/wasm-split/export-name-already-exists.wast +++ b/test/lit/wasm-split/export-name-already-exists.wast @@ -4,6 +4,6 @@ ;; CHECK: error: Export foo already exists. (module - (memory 0 0) - (export "foo" (memory 0 0)) + (memory $m 0 0) + (export "foo" (memory $m)) ) diff --git a/test/lit/wasm-split/merge-profiles.wast b/test/lit/wasm-split/merge-profiles.wast index 2d09fefaa..1bd9c8a4a 100644 --- a/test/lit/wasm-split/merge-profiles.wast +++ b/test/lit/wasm-split/merge-profiles.wast @@ -22,8 +22,8 @@ ;; SPLIT-NEXT: Splitting out functions: qux{{$}} (module - (memory 0 0) - (export "memory" (memory 0 0)) + (memory $m 0 0) + (export "memory" (memory $m)) (export "foo" (func $foo)) (export "bar" (func $bar)) (export "baz" (func $baz)) diff --git a/test/lit/wasm-split/mismatched-hashes.wast b/test/lit/wasm-split/mismatched-hashes.wast index 347fb1746..8f2bd69fe 100644 --- a/test/lit/wasm-split/mismatched-hashes.wast +++ b/test/lit/wasm-split/mismatched-hashes.wast @@ -19,6 +19,6 @@ ;; RUN: wasm-split %s --profile=%t.prof -o1 %t.1.wasm -o2 %t.2.wasm (module - (memory 0 0) - (export "memory" (memory 0 0)) + (memory $m 0 0) + (export "memory" (memory $m)) ) diff --git a/test/lit/wasm-split/print-profile.wast b/test/lit/wasm-split/print-profile.wast index cea701629..ec37858bd 100644 --- a/test/lit/wasm-split/print-profile.wast +++ b/test/lit/wasm-split/print-profile.wast @@ -15,8 +15,8 @@ ;; UNESCAPED: - bar(double[3]) (module - (memory 0 0) - (export "memory" (memory 0 0)) + (memory $m 0 0) + (export "memory" (memory $m)) (export "foo" (func $foo)) (export "bar" (func $bar\28double\5b3\5d\29)) (func $foo |