[Wasm] provide "location" for pseudo-instructions using to add comments

This commit is contained in:
Zalim Bashorov
2023-01-16 23:12:50 +01:00
parent ab1cbc49dd
commit 2573201a87
@@ -195,14 +195,14 @@ abstract class WasmExpressionBuilder {
}
inline fun commentPreviousInstr(text: () -> String) {
buildInstr(WasmOp.PSEUDO_COMMENT_PREVIOUS_INSTR, WasmImmediate.ConstString(text()))
buildInstr(WasmOp.PSEUDO_COMMENT_PREVIOUS_INSTR, SourceLocation.NoLocation("Pseudo-instruction"), WasmImmediate.ConstString(text()))
}
inline fun commentGroupStart(text: () -> String) {
buildInstr(WasmOp.PSEUDO_COMMENT_GROUP_START, WasmImmediate.ConstString(text()))
buildInstr(WasmOp.PSEUDO_COMMENT_GROUP_START, SourceLocation.NoLocation("Pseudo-instruction"), WasmImmediate.ConstString(text()))
}
fun commentGroupEnd() {
buildInstr(WasmOp.PSEUDO_COMMENT_GROUP_END)
buildInstr(WasmOp.PSEUDO_COMMENT_GROUP_END, SourceLocation.NoLocation("Pseudo-instruction"))
}
}