summaryrefslogtreecommitdiff
path: root/src/wasm/wat-parser.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2022-07-14 17:10:15 -0700
committerGitHub <noreply@github.com>2022-07-15 00:10:15 +0000
commit2b31aeb98a0fc8a5a505b3998d44990ed14e8c38 (patch)
treeb7e28f6ad6e3f77222e724afdb6d8668054410ea /src/wasm/wat-parser.cpp
parentc0151e99996a7b51d3d135fd5018c69e146b5c02 (diff)
downloadbinaryen-2b31aeb98a0fc8a5a505b3998d44990ed14e8c38.tar.gz
binaryen-2b31aeb98a0fc8a5a505b3998d44990ed14e8c38.tar.bz2
binaryen-2b31aeb98a0fc8a5a505b3998d44990ed14e8c38.zip
[Strings] stringview_*.slice (#4805)
Unfortunately one slice is the same as python [start:end], using 2 params, and the other slice is one param, [CURR:CURR+num] (where CURR is implied by the current state in the iter). So we can't use a single class here. Perhaps a different name would be good, like slice vs substring (like JS does), but I picked names to match the current spec.
Diffstat (limited to 'src/wasm/wat-parser.cpp')
-rw-r--r--src/wasm/wat-parser.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/wasm/wat-parser.cpp b/src/wasm/wat-parser.cpp
index 07503974d..e3a2ab588 100644
--- a/src/wasm/wat-parser.cpp
+++ b/src/wasm/wat-parser.cpp
@@ -1027,6 +1027,11 @@ Result<typename Ctx::InstrT> makeStringIterNext(Ctx&, ParseInput&);
template<typename Ctx>
Result<typename Ctx::InstrT>
makeStringIterMove(Ctx&, ParseInput&, StringIterMoveOp op);
+template<typename Ctx>
+Result<typename Ctx::InstrT>
+makeStringSliceWTF(Ctx&, ParseInput&, StringSliceWTFOp op);
+template<typename Ctx>
+Result<typename Ctx::InstrT> makeStringSliceIter(Ctx&, ParseInput&);
// Modules
template<typename Ctx>
@@ -1924,6 +1929,17 @@ makeStringIterMove(Ctx& ctx, ParseInput& in, StringIterMoveOp op) {
return in.err("unimplemented instruction");
}
+template<typename Ctx>
+Result<typename Ctx::InstrT>
+makeStringSliceWTF(Ctx& ctx, ParseInput& in, StringSliceWTFOp op) {
+ return in.err("unimplemented instruction");
+}
+
+template<typename Ctx>
+Result<typename Ctx::InstrT> makeStringSliceIter(Ctx& ctx, ParseInput& in) {
+ return in.err("unimplemented instruction");
+}
+
// =======
// Modules
// =======