summaryrefslogtreecommitdiff
path: root/src/wasm-builder.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/wasm-builder.h')
-rw-r--r--src/wasm-builder.h32
1 files changed, 32 insertions, 0 deletions
diff --git a/src/wasm-builder.h b/src/wasm-builder.h
index 9fe039af1..f636ea799 100644
--- a/src/wasm-builder.h
+++ b/src/wasm-builder.h
@@ -1041,6 +1041,38 @@ public:
ret->finalize();
return ret;
}
+ StringWTF8Advance*
+ makeStringWTF8Advance(Expression* ref, Expression* pos, Expression* bytes) {
+ auto* ret = wasm.allocator.alloc<StringWTF8Advance>();
+ ret->ref = ref;
+ ret->pos = pos;
+ ret->bytes = bytes;
+ ret->finalize();
+ return ret;
+ }
+ StringWTF16Get* makeStringWTF16Get(Expression* ref, Expression* pos) {
+ auto* ret = wasm.allocator.alloc<StringWTF16Get>();
+ ret->ref = ref;
+ ret->pos = pos;
+ ret->finalize();
+ return ret;
+ }
+ StringIterNext* makeStringIterNext(Expression* ref) {
+ auto* ret = wasm.allocator.alloc<StringIterNext>();
+ ret->ref = ref;
+ ret->finalize();
+ return ret;
+ }
+ StringIterMove* makeStringIterMove(StringIterMoveOp op,
+ Expression* ref,
+ Expression* num = nullptr) {
+ auto* ret = wasm.allocator.alloc<StringIterMove>();
+ ret->op = op;
+ ret->ref = ref;
+ ret->num = num;
+ ret->finalize();
+ return ret;
+ }
// Additional helpers