diff options
Diffstat (limited to 'src/wasm.h')
-rw-r--r-- | src/wasm.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/src/wasm.h b/src/wasm.h index 7e692bb96..baea1fabe 100644 --- a/src/wasm.h +++ b/src/wasm.h @@ -640,6 +640,7 @@ public: ArrayGetId, ArraySetId, ArrayLenId, + ArrayCopyId, RefAsId, NumExpressionIds }; @@ -1445,12 +1446,12 @@ class ArrayNew : public SpecificExpression<Expression::ArrayNewId> { public: ArrayNew(MixedArena& allocator) {} - Expression* rtt; - Expression* size; // If set, then the initial value is assigned to all entries in the array. If // not set, this is array.new_with_default and the default of the type is // used. Expression* init = nullptr; + Expression* size; + Expression* rtt; bool isWithDefault() { return !init; } @@ -1489,6 +1490,19 @@ public: void finalize(); }; +class ArrayCopy : public SpecificExpression<Expression::ArrayCopyId> { +public: + ArrayCopy(MixedArena& allocator) {} + + Expression* destRef; + Expression* destIndex; + Expression* srcRef; + Expression* srcIndex; + Expression* length; + + void finalize(); +}; + class RefAs : public SpecificExpression<Expression::RefAsId> { public: RefAs(MixedArena& allocator) {} |