[Wasm] Require location for buildThrow and fix all usages

This commit is contained in:
Zalim Bashorov
2022-12-13 20:20:32 +01:00
parent 1244cd1259
commit 42f2edd282
2 changed files with 3 additions and 3 deletions
@@ -142,7 +142,7 @@ class BodyGenerator(
override fun visitThrow(expression: IrThrow) {
generateExpression(expression.value)
body.buildThrow(functionContext.tagIdx)
body.buildThrow(functionContext.tagIdx, expression.getSourceLocation())
}
override fun visitTry(aTry: IrTry) {
@@ -94,8 +94,8 @@ abstract class WasmExpressionBuilder {
buildBrInstr(WasmOp.BR, absoluteBlockLevel, location)
}
fun buildThrow(tagIdx: Int) {
buildInstr(WasmOp.THROW, WasmImmediate.TagIdx(tagIdx))
fun buildThrow(tagIdx: Int, location: SourceLocation) {
buildInstr(WasmOp.THROW, location, WasmImmediate.TagIdx(tagIdx))
}
@Suppress("UNUSED_PARAMETER")