summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDan Gohman <sunfish@mozilla.com>2016-01-27 15:43:24 -0800
committerDan Gohman <sunfish@mozilla.com>2016-01-27 15:43:24 -0800
commitd378fd9a098572d1517f8ac9ce8909fd38f11122 (patch)
treeb13eb1ccac726e66026790ebac9408b2ba1848a8 /src
parentf329e28d111ea3462fa89dacf53024fba1c52415 (diff)
parentace3199b27b4f15f30fd6a2f3dbe5534a0ccf6b5 (diff)
downloadbinaryen-d378fd9a098572d1517f8ac9ce8909fd38f11122.tar.gz
binaryen-d378fd9a098572d1517f8ac9ce8909fd38f11122.tar.bz2
binaryen-d378fd9a098572d1517f8ac9ce8909fd38f11122.zip
Merge pull request #146 from WebAssembly/update-tests
Latest LLVM + http://reviews.llvm.org/D16650
Diffstat (limited to 'src')
-rw-r--r--src/s2wasm.h9
-rw-r--r--src/wasm.h4
2 files changed, 11 insertions, 2 deletions
diff --git a/src/s2wasm.h b/src/s2wasm.h
index 82675df1b..5eeb808bb 100644
--- a/src/s2wasm.h
+++ b/src/s2wasm.h
@@ -905,6 +905,15 @@ private:
Name assign = getAssign();
skipComma();
setOutput(getInput(), assign);
+ } else if (match("tee_local")) {
+ Name assign = getAssign();
+ skipComma();
+ auto curr = allocator.alloc<SetLocal>();
+ curr->name = getAssign();
+ skipComma();
+ curr->value = getInput();
+ curr->type = curr->value->type;
+ setOutput(curr, assign);
} else if (match("return")) {
Block *temp;
if (!(func->body && (temp = func->body->dyn_cast<Block>()) && temp->name == FAKE_RETURN)) {
diff --git a/src/wasm.h b/src/wasm.h
index 5b56cd62d..987a8da6b 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -270,8 +270,8 @@ enum HostOp {
};
#define assert_node(condition, node) \
- if (!condition) { \
- std::cerr << "node: " << node << std::endl; \
+ if (!(condition)) { \
+ std::cerr << "node: " << (node) << std::endl; \
assert(0 && #condition); \
}