summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorThomas Lively <tlively@google.com>2024-02-26 22:54:32 -0800
committerGitHub <noreply@github.com>2024-02-26 22:54:32 -0800
commit063e1a2ea8e8fb5f9fa7a24c0a3ce559d6b6331c (patch)
tree011d4665360d394fba9612bc1c20f6f1be8e7326 /test
parentf8b07f75996b34142450435c75a811aa946a6d3b (diff)
downloadbinaryen-063e1a2ea8e8fb5f9fa7a24c0a3ce559d6b6331c.tar.gz
binaryen-063e1a2ea8e8fb5f9fa7a24c0a3ce559d6b6331c.tar.bz2
binaryen-063e1a2ea8e8fb5f9fa7a24c0a3ce559d6b6331c.zip
[StringLowering] Lower `stringview_wtf16.get_codeunit` to `charCodeAt` (#6353)
Previously we lowered this to `getCodePointAt`, which has different semantics around surrogate pairs.
Diffstat (limited to 'test')
-rw-r--r--test/lit/passes/string-gathering.wast4
-rw-r--r--test/lit/passes/string-lowering-instructions.wast4
2 files changed, 4 insertions, 4 deletions
diff --git a/test/lit/passes/string-gathering.wast b/test/lit/passes/string-gathering.wast
index a7d0418ec..efa6ba130 100644
--- a/test/lit/passes/string-gathering.wast
+++ b/test/lit/passes/string-gathering.wast
@@ -61,7 +61,7 @@
;; LOWER: (import "wasm:js-string" "length" (func $length (type $6) (param externref) (result i32)))
- ;; LOWER: (import "wasm:js-string" "codePointAt" (func $codePointAt (type $7) (param externref i32) (result i32)))
+ ;; LOWER: (import "wasm:js-string" "charCodeAt" (func $charCodeAt (type $7) (param externref i32) (result i32)))
;; LOWER: (import "wasm:js-string" "substring" (func $substring (type $8) (param externref i32 i32) (result (ref extern))))
@@ -182,7 +182,7 @@
;; LOWER: (import "wasm:js-string" "length" (func $length (type $5) (param externref) (result i32)))
- ;; LOWER: (import "wasm:js-string" "codePointAt" (func $codePointAt (type $6) (param externref i32) (result i32)))
+ ;; LOWER: (import "wasm:js-string" "charCodeAt" (func $charCodeAt (type $6) (param externref i32) (result i32)))
;; LOWER: (import "wasm:js-string" "substring" (func $substring (type $7) (param externref i32 i32) (result (ref extern))))
diff --git a/test/lit/passes/string-lowering-instructions.wast b/test/lit/passes/string-lowering-instructions.wast
index 550bf81b4..d1b8172e2 100644
--- a/test/lit/passes/string-lowering-instructions.wast
+++ b/test/lit/passes/string-lowering-instructions.wast
@@ -85,7 +85,7 @@
;; CHECK: (import "wasm:js-string" "length" (func $length (type $23) (param externref) (result i32)))
- ;; CHECK: (import "wasm:js-string" "codePointAt" (func $codePointAt (type $24) (param externref i32) (result i32)))
+ ;; CHECK: (import "wasm:js-string" "charCodeAt" (func $charCodeAt (type $24) (param externref i32) (result i32)))
;; CHECK: (import "wasm:js-string" "substring" (func $substring (type $25) (param externref i32 i32) (result (ref extern))))
@@ -245,7 +245,7 @@
)
;; CHECK: (func $string.get_codeunit (type $15) (param $ref externref) (result i32)
- ;; CHECK-NEXT: (call $codePointAt
+ ;; CHECK-NEXT: (call $charCodeAt
;; CHECK-NEXT: (local.get $ref)
;; CHECK-NEXT: (i32.const 2)
;; CHECK-NEXT: )