summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ir/module-splitting.cpp1
-rw-r--r--src/passes/Poppify.cpp5
-rw-r--r--src/support/debug.h6
-rw-r--r--src/wasm-interpreter.h3
4 files changed, 7 insertions, 8 deletions
diff --git a/src/ir/module-splitting.cpp b/src/ir/module-splitting.cpp
index 111271063..b8abbb42e 100644
--- a/src/ir/module-splitting.cpp
+++ b/src/ir/module-splitting.cpp
@@ -156,6 +156,7 @@ Expression* TableSlotManager::Slot::makeExpr(Module& module) {
void TableSlotManager::addSlot(Name func, Slot slot) {
auto it = funcIndices.insert(std::make_pair(func, slot));
+ WASM_UNUSED(it);
assert(it.second && "Function already has multiple table slots");
}
diff --git a/src/passes/Poppify.cpp b/src/passes/Poppify.cpp
index 2ab222697..f787fb904 100644
--- a/src/passes/Poppify.cpp
+++ b/src/passes/Poppify.cpp
@@ -244,6 +244,7 @@ void Poppifier::emit(Expression* curr) {
void Poppifier::emitIfElse(If* curr) {
auto& scope = scopeStack.back();
+ WASM_UNUSED(scope);
assert(scope.kind == Scope::If);
patchScope(curr->ifTrue);
scopeStack.emplace_back(Scope::Else);
@@ -251,6 +252,7 @@ void Poppifier::emitIfElse(If* curr) {
void Poppifier::emitCatch(Try* curr, Index i) {
auto& scope = scopeStack.back();
+ WASM_UNUSED(scope);
if (i == 0) {
assert(scope.kind == Scope::Try);
patchScope(curr->body);
@@ -263,6 +265,7 @@ void Poppifier::emitCatch(Try* curr, Index i) {
void Poppifier::emitCatchAll(Try* curr) {
auto& scope = scopeStack.back();
+ WASM_UNUSED(scope);
if (curr->catchBodies.size() == 1) {
assert(scope.kind == Scope::Try);
patchScope(curr->body);
@@ -275,6 +278,7 @@ void Poppifier::emitCatchAll(Try* curr) {
void Poppifier::emitDelegate(Try* curr) {
auto& scope = scopeStack.back();
+ WASM_UNUSED(scope);
assert(scope.kind == Scope::Try);
patchScope(curr->body);
scopeStack.back().instrs.push_back(curr);
@@ -307,6 +311,7 @@ void Poppifier::emitScopeEnd(Expression* curr) {
void Poppifier::emitFunctionEnd() {
auto& scope = scopeStack.back();
+ WASM_UNUSED(scope);
assert(scope.kind == Scope::Func);
patchScope(func->body);
}
diff --git a/src/support/debug.h b/src/support/debug.h
index edb19ebda..f6f560b8f 100644
--- a/src/support/debug.h
+++ b/src/support/debug.h
@@ -44,12 +44,6 @@ void setDebugEnabled(const char* types);
#else
-// We have an option to build with assertions disabled
-// BYN_ASSERTIONS_ENABLED=OFF, but we currently don't recommend using and we
-// don't test with it.
-#error "binaryen is currently designed to be built with assertions enabled."
-#error "remove these #errors if you want to build without them anyway."
-
#define BYN_DEBUG_WITH_TYPE(...) \
do { \
} while (false)
diff --git a/src/wasm-interpreter.h b/src/wasm-interpreter.h
index f880e5c5a..b9a89c643 100644
--- a/src/wasm-interpreter.h
+++ b/src/wasm-interpreter.h
@@ -1896,8 +1896,7 @@ public:
this->module != nullptr) {
// If we are evaluating and not replacing the expression, remember the
// constant value set, if any, for subsequent gets.
- auto* global = this->module->getGlobal(curr->name);
- assert(global->mutable_);
+ assert(this->module->getGlobal(curr->name)->mutable_);
auto setFlow = ExpressionRunner<SubType>::visit(curr->value);
if (!setFlow.breaking()) {
setGlobalValue(curr->name, setFlow.values);