diff options
author | Alon Zakai <azakai@google.com> | 2022-07-07 15:43:22 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-07 15:43:22 -0700 |
commit | 19a437500a4c30f48355722653a01a8c44ff6bec (patch) | |
tree | 408bf64e92d17b38561561f138e1d03243774369 /src/passes/Print.cpp | |
parent | 9831b36d339b1cea61d5313f7dfa256fc1ee9bcc (diff) | |
download | binaryen-19a437500a4c30f48355722653a01a8c44ff6bec.tar.gz binaryen-19a437500a4c30f48355722653a01a8c44ff6bec.tar.bz2 binaryen-19a437500a4c30f48355722653a01a8c44ff6bec.zip |
[Strings] string.encode (#4776)
Diffstat (limited to 'src/passes/Print.cpp')
-rw-r--r-- | src/passes/Print.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/passes/Print.cpp b/src/passes/Print.cpp index 26140c030..49cade313 100644 --- a/src/passes/Print.cpp +++ b/src/passes/Print.cpp @@ -2257,6 +2257,21 @@ struct PrintExpressionContents WASM_UNREACHABLE("invalid string.measure*"); } } + void visitStringEncode(StringEncode* curr) { + switch (curr->op) { + case StringEncodeUTF8: + printMedium(o, "string.encode_wtf8 utf8"); + break; + case StringEncodeWTF8: + printMedium(o, "string.encode_wtf8 wtf8"); + break; + case StringEncodeWTF16: + printMedium(o, "string.encode_wtf16"); + break; + default: + WASM_UNREACHABLE("invalid string.encode*"); + } + } }; // Prints an expression in s-expr format, including both the |