diff options
author | Alon Zakai <azakai@google.com> | 2022-07-13 14:38:10 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-13 14:38:10 -0700 |
commit | 9671e95adbfcf0984a7e9800a7ea2ed33e1670ad (patch) | |
tree | d7273e64ed26429d18568439cdfb7b1fb6369645 /src/passes/Print.cpp | |
parent | 7b9c18b98c020f887aa9cb1750543751ebe5c530 (diff) | |
download | binaryen-9671e95adbfcf0984a7e9800a7ea2ed33e1670ad.tar.gz binaryen-9671e95adbfcf0984a7e9800a7ea2ed33e1670ad.tar.bz2 binaryen-9671e95adbfcf0984a7e9800a7ea2ed33e1670ad.zip |
[Strings] stringview access operations (#4798)
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r-- | src/passes/Print.cpp | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 781c72376..f41bdcd26 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -2294,6 +2294,27 @@ struct PrintExpressionContents WASM_UNREACHABLE("invalid string.as*"); } } + void visitStringWTF8Advance(StringWTF8Advance* curr) { + printMedium(o, "stringview_wtf8.advance"); + } + void visitStringWTF16Get(StringWTF16Get* curr) { + printMedium(o, "stringview_wtf16.get_codeunit"); + } + void visitStringIterNext(StringIterNext* curr) { + printMedium(o, "stringview_iter.next"); + } + void visitStringIterMove(StringIterMove* curr) { + switch (curr->op) { + case StringIterMoveAdvance: + printMedium(o, "stringview_iter.advance"); + break; + case StringIterMoveRewind: + printMedium(o, "stringview_iter.rewind"); + break; + default: + WASM_UNREACHABLE("invalid string.move*"); + } + } }; // Prints an expression in s-expr format, including both the |