[Wasm] Minor: move buildUnreachable* helpers to more specific module

This commit is contained in:
Zalim Bashorov
2023-01-16 22:56:26 +01:00
parent 9e4b2b78e6
commit ab1cbc49dd
2 changed files with 14 additions and 13 deletions
@@ -206,16 +206,3 @@ abstract class WasmExpressionBuilder {
buildInstr(WasmOp.PSEUDO_COMMENT_GROUP_END)
}
}
fun WasmExpressionBuilder.buildUnreachableForVerifier() {
buildUnreachable(SourceLocation.NoLocation("This instruction should never be reached, but required for wasm verifier"))
}
fun WasmExpressionBuilder.buildUnreachableAfterNothingType() {
buildUnreachable(
SourceLocation.NoLocation(
"The unreachable instruction after an expression with Nothing type to make sure that " +
"execution doesn't come here (or it fails fast if so). It also might be required for wasm verifier."
)
)
}