diff options
author | Alon Zakai <azakai@google.com> | 2022-07-07 10:32:57 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-07 10:32:57 -0700 |
commit | dc73f07807400eb48b8c4bc173bae37f188fc90b (patch) | |
tree | ed9672cb7847c6d9d33657151dc76fa4cb519ff3 /src/wasm-binary.h | |
parent | 876638f8fb5bfc8b264eddc6c0c0d54ed40d0095 (diff) | |
download | binaryen-dc73f07807400eb48b8c4bc173bae37f188fc90b.tar.gz binaryen-dc73f07807400eb48b8c4bc173bae37f188fc90b.tar.bz2 binaryen-dc73f07807400eb48b8c4bc173bae37f188fc90b.zip |
[Strings] string.measure (#4775)
Diffstat (limited to 'src/wasm-binary.h')
-rw-r--r-- | src/wasm-binary.h | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h index c88aa3895..cb881301f 100644 --- a/src/wasm-binary.h +++ b/src/wasm-binary.h @@ -1140,6 +1140,8 @@ enum ASTNodes { StringNewWTF8 = 0x80, StringNewWTF16 = 0x81, StringConst = 0x82, + StringMeasureWTF8 = 0x84, + StringMeasureWTF16 = 0x85, }; enum MemoryAccess { @@ -1150,7 +1152,7 @@ enum MemoryAccess { enum MemoryFlags { HasMaximum = 1 << 0, IsShared = 1 << 1, Is64 = 1 << 2 }; -enum StringNewPolicy { +enum StringPolicy { UTF8 = 0x00, WTF8 = 0x01, Replace = 0x02, @@ -1722,6 +1724,7 @@ public: bool maybeVisitArrayCopy(Expression*& out, uint32_t code); bool maybeVisitStringNew(Expression*& out, uint32_t code); bool maybeVisitStringConst(Expression*& out, uint32_t code); + bool maybeVisitStringMeasure(Expression*& out, uint32_t code); void visitSelect(Select* curr, uint8_t code); void visitReturn(Return* curr); void visitMemorySize(MemorySize* curr); |