summaryrefslogtreecommitdiff
path: root/src/wasm-binary.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-binary.h')
-rw-r--r--src/wasm-binary.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/wasm-binary.h b/src/wasm-binary.h
index 3b3fa30f6..a5c6d0a46 100644
--- a/src/wasm-binary.h
+++ b/src/wasm-binary.h
@@ -1135,6 +1135,8 @@ enum ASTNodes {
BrOnNonFunc = 0x63,
BrOnNonData = 0x64,
BrOnNonI31 = 0x65,
+ StringNewWTF8 = 0x80,
+ StringNewWTF16 = 0x81,
};
enum MemoryAccess {
@@ -1145,6 +1147,12 @@ enum MemoryAccess {
enum MemoryFlags { HasMaximum = 1 << 0, IsShared = 1 << 1, Is64 = 1 << 2 };
+enum StringNewPolicy {
+ UTF8 = 0x00,
+ WTF8 = 0x01,
+ Replace = 0x02,
+};
+
enum FeaturePrefix {
FeatureUsed = '+',
FeatureRequired = '=',
@@ -1700,6 +1708,7 @@ public:
bool maybeVisitArraySet(Expression*& out, uint32_t code);
bool maybeVisitArrayLen(Expression*& out, uint32_t code);
bool maybeVisitArrayCopy(Expression*& out, uint32_t code);
+ bool maybeVisitStringNew(Expression*& out, uint32_t code);
void visitSelect(Select* curr, uint8_t code);
void visitReturn(Return* curr);
void visitMemorySize(MemorySize* curr);
@@ -1721,7 +1730,7 @@ public:
// Let is lowered into a block.
void visitLet(Block* curr);
- void throwError(std::string text);
+ [[noreturn]] void throwError(std::string text);
// Struct/Array instructions have an unnecessary heap type that is just for
// validation (except for the case of unreachability, but that's not a problem