summaryrefslogtreecommitdiff
path: root/src/ir/ExpressionManipulator.cpp
diff options
context:
space:
mode:
authorThomas Lively <7121787+tlively@users.noreply.github.com>2019-02-05 12:35:09 -0800
committerGitHub <noreply@github.com>2019-02-05 12:35:09 -0800
commitf424f81886405fc26a415fc86900c0f8d0df14eb (patch)
tree5896c316f216fca9654f55e41809839d181ca53b /src/ir/ExpressionManipulator.cpp
parent484f62f985cb2180139d1cf991ac04ee41635417 (diff)
downloadbinaryen-f424f81886405fc26a415fc86900c0f8d0df14eb.tar.gz
binaryen-f424f81886405fc26a415fc86900c0f8d0df14eb.tar.bz2
binaryen-f424f81886405fc26a415fc86900c0f8d0df14eb.zip
Bulk memory operations (#1892)
Bulk memory operations The only parts missing are the interpreter implementation and spec tests.
Diffstat (limited to 'src/ir/ExpressionManipulator.cpp')
-rw-r--r--src/ir/ExpressionManipulator.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/ir/ExpressionManipulator.cpp b/src/ir/ExpressionManipulator.cpp
index 700f7fdb8..32ee442b7 100644
--- a/src/ir/ExpressionManipulator.cpp
+++ b/src/ir/ExpressionManipulator.cpp
@@ -129,9 +129,21 @@ Expression* flexibleCopy(Expression* original, Module& wasm, CustomCopier custom
Expression* visitSIMDShift(SIMDShift* curr) {
return builder.makeSIMDShift(curr->op, copy(curr->vec), copy(curr->shift));
}
- Expression* visitConst(Const *curr) {
+ Expression* visitConst(Const* curr) {
return builder.makeConst(curr->value);
}
+ Expression* visitMemoryInit(MemoryInit* curr) {
+ return builder.makeMemoryInit(curr->segment, copy(curr->dest), copy(curr->offset), copy(curr->size));
+ }
+ Expression* visitDataDrop(DataDrop* curr) {
+ return builder.makeDataDrop(curr->segment);
+ }
+ Expression* visitMemoryCopy(MemoryCopy* curr) {
+ return builder.makeMemoryCopy(copy(curr->dest), copy(curr->source), copy(curr->size));
+ }
+ Expression* visitMemoryFill(MemoryFill* curr) {
+ return builder.makeMemoryFill(copy(curr->dest), copy(curr->value), copy(curr->size));
+ }
Expression* visitUnary(Unary *curr) {
return builder.makeUnary(curr->op, copy(curr->value));
}