summaryrefslogtreecommitdiff
path: root/src/ir
diff options
context:
space:
mode:
Diffstat (limited to 'src/ir')
-rw-r--r--src/ir/ReFinalize.cpp16
-rw-r--r--src/ir/abstract.h10
-rw-r--r--src/ir/bits.h4
-rw-r--r--src/ir/branch-utils.h4
-rw-r--r--src/ir/cost.h4
-rw-r--r--src/ir/utils.h14
6 files changed, 26 insertions, 26 deletions
diff --git a/src/ir/ReFinalize.cpp b/src/ir/ReFinalize.cpp
index bc5522c10..a8054d261 100644
--- a/src/ir/ReFinalize.cpp
+++ b/src/ir/ReFinalize.cpp
@@ -151,13 +151,15 @@ void ReFinalize::visitFunction(Function* curr) {
}
}
-void ReFinalize::visitFunctionType(FunctionType* curr) { WASM_UNREACHABLE(); }
-void ReFinalize::visitExport(Export* curr) { WASM_UNREACHABLE(); }
-void ReFinalize::visitGlobal(Global* curr) { WASM_UNREACHABLE(); }
-void ReFinalize::visitTable(Table* curr) { WASM_UNREACHABLE(); }
-void ReFinalize::visitMemory(Memory* curr) { WASM_UNREACHABLE(); }
-void ReFinalize::visitEvent(Event* curr) { WASM_UNREACHABLE(); }
-void ReFinalize::visitModule(Module* curr) { WASM_UNREACHABLE(); }
+void ReFinalize::visitFunctionType(FunctionType* curr) {
+ WASM_UNREACHABLE("unimp");
+}
+void ReFinalize::visitExport(Export* curr) { WASM_UNREACHABLE("unimp"); }
+void ReFinalize::visitGlobal(Global* curr) { WASM_UNREACHABLE("unimp"); }
+void ReFinalize::visitTable(Table* curr) { WASM_UNREACHABLE("unimp"); }
+void ReFinalize::visitMemory(Memory* curr) { WASM_UNREACHABLE("unimp"); }
+void ReFinalize::visitEvent(Event* curr) { WASM_UNREACHABLE("unimp"); }
+void ReFinalize::visitModule(Module* curr) { WASM_UNREACHABLE("unimp"); }
void ReFinalize::updateBreakValueType(Name name, Type type) {
if (type != unreachable || breakValues.count(name) == 0) {
diff --git a/src/ir/abstract.h b/src/ir/abstract.h
index 2653218b0..384f8b555 100644
--- a/src/ir/abstract.h
+++ b/src/ir/abstract.h
@@ -78,8 +78,7 @@ inline UnaryOp getUnary(Type type, Op op) {
break;
}
case v128: {
- assert(false && "v128 not implemented yet");
- WASM_UNREACHABLE();
+ WASM_UNREACHABLE("v128 not implemented yet");
}
case anyref: // there's no unary instructions for anyref
case exnref: // there's no unary instructions for exnref
@@ -88,7 +87,7 @@ inline UnaryOp getUnary(Type type, Op op) {
return InvalidUnary;
}
}
- WASM_UNREACHABLE();
+ WASM_UNREACHABLE("invalid type");
}
inline BinaryOp getBinary(Type type, Op op) {
@@ -210,8 +209,7 @@ inline BinaryOp getBinary(Type type, Op op) {
break;
}
case v128: {
- assert(false && "v128 not implemented yet");
- WASM_UNREACHABLE();
+ WASM_UNREACHABLE("v128 not implemented yet");
}
case anyref: // there's no binary instructions for anyref
case exnref: // there's no binary instructions for exnref
@@ -220,7 +218,7 @@ inline BinaryOp getBinary(Type type, Op op) {
return InvalidBinary;
}
}
- WASM_UNREACHABLE();
+ WASM_UNREACHABLE("invalid type");
}
} // namespace Abstract
diff --git a/src/ir/bits.h b/src/ir/bits.h
index faae4c723..cbac70d77 100644
--- a/src/ir/bits.h
+++ b/src/ir/bits.h
@@ -60,7 +60,7 @@ struct Bits {
} else if (type == i64) {
return amount & 63;
}
- WASM_UNREACHABLE();
+ WASM_UNREACHABLE("unexpected type");
}
static Index getEffectiveShifts(Expression* expr) {
@@ -70,7 +70,7 @@ struct Bits {
} else if (amount->type == i64) {
return getEffectiveShifts(amount->value.geti64(), i64);
}
- WASM_UNREACHABLE();
+ WASM_UNREACHABLE("unexpected type");
}
static Expression* makeSignExt(Expression* value, Index bytes, Module& wasm) {
diff --git a/src/ir/branch-utils.h b/src/ir/branch-utils.h
index 53279eee6..a22301e54 100644
--- a/src/ir/branch-utils.h
+++ b/src/ir/branch-utils.h
@@ -49,7 +49,7 @@ inline bool isBranchReachable(Expression* expr) {
} else if (auto* br = expr->dynCast<BrOnExn>()) {
return isBranchReachable(br);
}
- WASM_UNREACHABLE();
+ WASM_UNREACHABLE("unexpected expression type");
}
inline std::set<Name> getUniqueTargets(Break* br) { return {br->name}; }
@@ -90,7 +90,7 @@ inline bool replacePossibleTarget(Expression* branch, Name from, Name to) {
worked = true;
}
} else {
- WASM_UNREACHABLE();
+ WASM_UNREACHABLE("unexpected expression type");
}
return worked;
}
diff --git a/src/ir/cost.h b/src/ir/cost.h
index 60eb84b08..79be195f7 100644
--- a/src/ir/cost.h
+++ b/src/ir/cost.h
@@ -188,7 +188,7 @@ struct CostAnalyzer : public Visitor<CostAnalyzer, Index> {
case WidenHighUVecI16x8ToVecI32x4:
return 1;
case InvalidUnary:
- WASM_UNREACHABLE();
+ WASM_UNREACHABLE("invalid unary op");
}
return ret + visit(curr->value);
}
@@ -709,7 +709,7 @@ struct CostAnalyzer : public Visitor<CostAnalyzer, Index> {
ret = 1;
break;
case InvalidBinary:
- WASM_UNREACHABLE();
+ WASM_UNREACHABLE("invalid binary op");
}
return ret + visit(curr->left) + visit(curr->right);
}
diff --git a/src/ir/utils.h b/src/ir/utils.h
index e8c5b78b3..722277bc3 100644
--- a/src/ir/utils.h
+++ b/src/ir/utils.h
@@ -220,13 +220,13 @@ struct ReFinalizeNode : public OverriddenVisitor<ReFinalizeNode> {
void visitPush(Push* curr) { curr->finalize(); }
void visitPop(Pop* curr) { curr->finalize(); }
- void visitFunctionType(FunctionType* curr) { WASM_UNREACHABLE(); }
- void visitExport(Export* curr) { WASM_UNREACHABLE(); }
- void visitGlobal(Global* curr) { WASM_UNREACHABLE(); }
- void visitTable(Table* curr) { WASM_UNREACHABLE(); }
- void visitMemory(Memory* curr) { WASM_UNREACHABLE(); }
- void visitEvent(Event* curr) { WASM_UNREACHABLE(); }
- void visitModule(Module* curr) { WASM_UNREACHABLE(); }
+ void visitFunctionType(FunctionType* curr) { WASM_UNREACHABLE("unimp"); }
+ void visitExport(Export* curr) { WASM_UNREACHABLE("unimp"); }
+ void visitGlobal(Global* curr) { WASM_UNREACHABLE("unimp"); }
+ void visitTable(Table* curr) { WASM_UNREACHABLE("unimp"); }
+ void visitMemory(Memory* curr) { WASM_UNREACHABLE("unimp"); }
+ void visitEvent(Event* curr) { WASM_UNREACHABLE("unimp"); }
+ void visitModule(Module* curr) { WASM_UNREACHABLE("unimp"); }
// given a stack of nested expressions, update them all from child to parent
static void updateStack(ExpressionStack& expressionStack) {