From 2a543b48db250ea9cd7172b6db9a0b8d3657475a Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Fri, 30 Sep 2016 09:15:48 -0700 Subject: validate drop (#712) --- src/wasm-validator.h | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'src') diff --git a/src/wasm-validator.h b/src/wasm-validator.h index 3616313d3..3c580ce51 100644 --- a/src/wasm-validator.h +++ b/src/wasm-validator.h @@ -303,12 +303,7 @@ public: } void visitDrop(Drop* curr) { - // TODO: assert on this, when tests pass - if (getenv("BINARYEN_WARN_DROP")) { - if (!(isConcreteWasmType(curr->value->type) || curr->value->type == unreachable)) { - std::cerr << "warning: bad drop " << curr << " in " << (getFunction() ? getFunction()->name : Name("?")) << '\n'; - } - } + shouldBeTrue(isConcreteWasmType(curr->value->type) || curr->value->type == unreachable, curr, "can only drop a valid value"); } void visitReturn(Return* curr) { -- cgit v1.2.3