[Wasm] Require location for buildThrow and fix all usages
This commit is contained in:
+1
-1
@@ -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")
|
||||
|
||||
Reference in New Issue
Block a user