summaryrefslogtreecommitdiff
path: root/src/wasm-linker.cpp
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2017-02-01 21:28:50 -0800
committerGitHub <noreply@github.com>2017-02-01 21:28:50 -0800
commit5725c4376cf674378084e700073d0e3a7f3c95f3 (patch)
tree89cd26f480bcc581e33b0ad02cb4f6381d1cf29a /src/wasm-linker.cpp
parent7bc8f14d8699f56777a763f99ad8098fcf7c0583 (diff)
parentae6612e4c394af30bb0871ad9735ac853811f807 (diff)
downloadbinaryen-5725c4376cf674378084e700073d0e3a7f3c95f3.tar.gz
binaryen-5725c4376cf674378084e700073d0e3a7f3c95f3.tar.bz2
binaryen-5725c4376cf674378084e700073d0e3a7f3c95f3.zip
Merge pull request #893 from WebAssembly/shrink-asm-parser
Shrink asm.js ast
Diffstat (limited to 'src/wasm-linker.cpp')
-rw-r--r--src/wasm-linker.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/wasm-linker.cpp b/src/wasm-linker.cpp
index 757fc88ca..c2fc00562 100644
--- a/src/wasm-linker.cpp
+++ b/src/wasm-linker.cpp
@@ -82,11 +82,12 @@ void Linker::layout() {
// behavior.
for (auto* call : f.second) {
auto type = call->type;
- auto operands = std::move(call->operands);
+ ExpressionList operands(out.wasm.allocator);
+ operands.swap(call->operands);
auto target = call->target;
CallImport* newCall = ExpressionManipulator::convert<Call, CallImport>(call, out.wasm.allocator);
newCall->type = type;
- newCall->operands = std::move(operands);
+ newCall->operands.swap(operands);
newCall->target = target;
}
}