[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) {
|
override fun visitThrow(expression: IrThrow) {
|
||||||
generateExpression(expression.value)
|
generateExpression(expression.value)
|
||||||
body.buildThrow(functionContext.tagIdx)
|
body.buildThrow(functionContext.tagIdx, expression.getSourceLocation())
|
||||||
}
|
}
|
||||||
|
|
||||||
override fun visitTry(aTry: IrTry) {
|
override fun visitTry(aTry: IrTry) {
|
||||||
|
|||||||
@@ -94,8 +94,8 @@ abstract class WasmExpressionBuilder {
|
|||||||
buildBrInstr(WasmOp.BR, absoluteBlockLevel, location)
|
buildBrInstr(WasmOp.BR, absoluteBlockLevel, location)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun buildThrow(tagIdx: Int) {
|
fun buildThrow(tagIdx: Int, location: SourceLocation) {
|
||||||
buildInstr(WasmOp.THROW, WasmImmediate.TagIdx(tagIdx))
|
buildInstr(WasmOp.THROW, location, WasmImmediate.TagIdx(tagIdx))
|
||||||
}
|
}
|
||||||
|
|
||||||
@Suppress("UNUSED_PARAMETER")
|
@Suppress("UNUSED_PARAMETER")
|
||||||
|
|||||||
Reference in New Issue
Block a user