summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2016-02-21 12:10:26 -0800
committerAlon Zakai <alonzakai@gmail.com>2016-02-21 12:10:26 -0800
commited567a4f49d3296dcf91bdb966c0deb077dacff7 (patch)
tree736f07fcd61a8c4623938220c6c3768c3d2b5807 /src/wasm.h
parent7bf31d447bca02947b56f05edf0a171c68c92c7a (diff)
parent1956794aa5200274d7b67329be55bf97af83f49e (diff)
downloadbinaryen-ed567a4f49d3296dcf91bdb966c0deb077dacff7.tar.gz
binaryen-ed567a4f49d3296dcf91bdb966c0deb077dacff7.tar.bz2
binaryen-ed567a4f49d3296dcf91bdb966c0deb077dacff7.zip
Merge pull request #209 from WebAssembly/asm-fixes
Asm fixes
Diffstat (limited to 'src/wasm.h')
-rw-r--r--src/wasm.h9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/wasm.h b/src/wasm.h
index 6aff3f55e..4c8dca331 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -104,6 +104,7 @@ inline const char* printWasmType(WasmType type) {
case WasmType::i64: return "i64";
case WasmType::f32: return "f32";
case WasmType::f64: return "f64";
+ case WasmType::unreachable: return "unreachable";
default: WASM_UNREACHABLE();
}
}
@@ -687,12 +688,6 @@ enum HostOp {
PageSize, MemorySize, GrowMemory, HasFeature
};
-#define assert_node(condition, node) \
- if (!(condition)) { \
- std::cerr << "node: " << (node) << std::endl; \
- assert(0 && #condition); \
- }
-
//
// Expressions
//
@@ -981,7 +976,7 @@ public:
if (isRelational()) {
type = i32;
} else {
- assert_node(left->type != unreachable && right->type != unreachable ? left->type == right->type : true, this);
+ assert(left->type != unreachable && right->type != unreachable ? left->type == right->type : true);
type = getReachableWasmType(left->type, right->type);
}
}