diff options
author | Alon Zakai <azakai@google.com> | 2024-01-25 12:48:59 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-25 12:48:59 -0800 |
commit | 482f3aaf90167cb187ccbc6f1e32dcdb574e3f73 (patch) | |
tree | 14eca3191206d08a736636c7b1e38a11c682ce31 /test/lit/ctor-eval/string.wast | |
parent | c0e688ed0963605e062dfb00d681602bd8dc96d2 (diff) | |
download | binaryen-482f3aaf90167cb187ccbc6f1e32dcdb574e3f73.tar.gz binaryen-482f3aaf90167cb187ccbc6f1e32dcdb574e3f73.tar.bz2 binaryen-482f3aaf90167cb187ccbc6f1e32dcdb574e3f73.zip |
wasm-ctor-eval: Eval strings (#6244)
Diffstat (limited to 'test/lit/ctor-eval/string.wast')
-rw-r--r-- | test/lit/ctor-eval/string.wast | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/lit/ctor-eval/string.wast b/test/lit/ctor-eval/string.wast new file mode 100644 index 000000000..916fc2a28 --- /dev/null +++ b/test/lit/ctor-eval/string.wast @@ -0,0 +1,23 @@ +;; NOTE: Assertions have been generated by update_lit_checks.py --all-items and should not be edited. +;; RUN: foreach %s %t wasm-ctor-eval --ctors=test --kept-exports=test --quiet -all -S -o - | filecheck %s + +;; We should not error on precomputing this string. Nothing should change in +;; the output, as precomputing a string results in an identical string. + +(module + ;; CHECK: (type $0 (func (result anyref))) + + ;; CHECK: (global $global (ref string) (string.const "one")) + (global $global (ref string) (string.const "one")) + + (export "test" (func $test)) + + (func $test (result anyref) + (global.get $global) + ) +) +;; CHECK: (export "test" (func $test_1)) + +;; CHECK: (func $test_1 (type $0) (result anyref) +;; CHECK-NEXT: (global.get $global) +;; CHECK-NEXT: ) |