[Wasm] provide "location" for pseudo-instructions using to add comments
This commit is contained in:
@@ -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"))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user