summaryrefslogtreecommitdiff
path: root/src/wasm/wasm-binary.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2022-07-18 15:50:22 -0700
committerGitHub <noreply@github.com>2022-07-18 22:50:22 +0000
commit6bac16b3895d6d94007fcdc5c098d52ba2a408e5 (patch)
tree4bd055a212e48e5e8d65cc601174d185d2937eb8 /src/wasm/wasm-binary.cpp
parent2b31aeb98a0fc8a5a505b3998d44990ed14e8c38 (diff)
downloadbinaryen-6bac16b3895d6d94007fcdc5c098d52ba2a408e5.tar.gz
binaryen-6bac16b3895d6d94007fcdc5c098d52ba2a408e5.tar.bz2
binaryen-6bac16b3895d6d94007fcdc5c098d52ba2a408e5.zip
[Strings] stringview_wtf16.length (#4809)
This measures the length of a view, so it seems simplest to make it a sub-operation of the existing measure instruction.
Diffstat (limited to 'src/wasm/wasm-binary.cpp')
-rw-r--r--src/wasm/wasm-binary.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/wasm/wasm-binary.cpp b/src/wasm/wasm-binary.cpp
index 59276124e..8108027d4 100644
--- a/src/wasm/wasm-binary.cpp
+++ b/src/wasm/wasm-binary.cpp
@@ -7214,6 +7214,8 @@ bool WasmBinaryBuilder::maybeVisitStringMeasure(Expression*& out,
op = StringMeasureWTF16;
} else if (code == BinaryConsts::StringIsUSV) {
op = StringMeasureIsUSV;
+ } else if (code == BinaryConsts::StringViewWTF16Length) {
+ op = StringMeasureWTF16View;
} else {
return false;
}