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.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/wasm-builder.h b/src/wasm-builder.h
index 20babacf1..7eebf3f04 100644
--- a/src/wasm-builder.h
+++ b/src/wasm-builder.h
@@ -989,6 +989,15 @@ public:
ret->finalize();
return ret;
}
+ StringNew*
+ makeStringNew(StringNewOp op, Expression* ptr, Expression* length) {
+ auto* ret = wasm.allocator.alloc<StringNew>();
+ ret->op = op;
+ ret->ptr = ptr;
+ ret->length = length;
+ ret->finalize();
+ return ret;
+ }
// Additional helpers