summaryrefslogtreecommitdiff
path: root/test/lit/passes/string-gathering.wast
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2024-02-06 15:44:40 -0800
committerGitHub <noreply@github.com>2024-02-06 15:44:40 -0800
commita238cf95a8ee18e14b30a86097858dff19cf94aa (patch)
tree9d7b091d0d13c42ee0343928d49185bda2eb7f66 /test/lit/passes/string-gathering.wast
parent3a41065a27fc4e65d563ae983a06cbe774ad2ea7 (diff)
downloadbinaryen-a238cf95a8ee18e14b30a86097858dff19cf94aa.tar.gz
binaryen-a238cf95a8ee18e14b30a86097858dff19cf94aa.tar.bz2
binaryen-a238cf95a8ee18e14b30a86097858dff19cf94aa.zip
StringLowering: Start to lower instructions (#6281)
Diffstat (limited to 'test/lit/passes/string-gathering.wast')
-rw-r--r--test/lit/passes/string-gathering.wast20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/lit/passes/string-gathering.wast b/test/lit/passes/string-gathering.wast
index 657858fc0..8c315ddc1 100644
--- a/test/lit/passes/string-gathering.wast
+++ b/test/lit/passes/string-gathering.wast
@@ -27,12 +27,22 @@
;; CHECK: (global $global2 stringref (global.get $string.const_bar))
;; LOWER: (type $0 (func))
+ ;; LOWER: (type $1 (array (mut i16)))
+
+ ;; LOWER: (type $2 (func (param (ref null $1) i32 i32) (result (ref extern))))
+
+ ;; LOWER: (type $3 (func (param i32) (result (ref extern))))
+
;; LOWER: (import "string.const" "0" (global $string.const_bar (ref extern)))
;; LOWER: (import "string.const" "1" (global $string.const_other (ref extern)))
;; LOWER: (import "string.const" "2" (global $global (ref extern)))
+ ;; LOWER: (import "wasm:js-string" "fromCharCodeArray" (func $fromCharCodeArray (type $2) (param (ref null $1) i32 i32) (result (ref extern))))
+
+ ;; LOWER: (import "wasm:js-string" "fromCodePoint" (func $fromCodePoint (type $3) (param i32) (result (ref extern))))
+
;; LOWER: (global $global2 externref (global.get $string.const_bar))
(global $global2 (ref null string) (string.const "bar"))
@@ -111,6 +121,12 @@
;; Multiple possible reusable globals. Also test ignoring of imports.
(module
;; CHECK: (import "a" "b" (global $import (ref string)))
+ ;; LOWER: (type $0 (array (mut i16)))
+
+ ;; LOWER: (type $1 (func (param (ref null $0) i32 i32) (result (ref extern))))
+
+ ;; LOWER: (type $2 (func (param i32) (result (ref extern))))
+
;; LOWER: (import "a" "b" (global $import (ref extern)))
(import "a" "b" (global $import (ref string)))
@@ -122,6 +138,10 @@
;; LOWER: (import "string.const" "1" (global $global4 (ref extern)))
+ ;; LOWER: (import "wasm:js-string" "fromCharCodeArray" (func $fromCharCodeArray (type $1) (param (ref null $0) i32 i32) (result (ref extern))))
+
+ ;; LOWER: (import "wasm:js-string" "fromCodePoint" (func $fromCodePoint (type $2) (param i32) (result (ref extern))))
+
;; LOWER: (global $global2 (ref extern) (global.get $global1))
(global $global2 (ref string) (string.const "foo"))