[Wasm] Require location for buildConstI32 and fix all usages
This commit is contained in:
@@ -65,8 +65,8 @@ sealed class WasmDataMode {
|
||||
val memoryIdx: Int,
|
||||
val offset: MutableList<WasmInstr>
|
||||
) : WasmDataMode() {
|
||||
constructor(memoryIdx: Int, offset: Int) : this(memoryIdx, mutableListOf<WasmInstr>().also<MutableList<WasmInstr>> {
|
||||
WasmIrExpressionBuilder(it).buildConstI32(offset)
|
||||
constructor(memoryIdx: Int, offset: Int, location: SourceLocation) : this(memoryIdx, mutableListOf<WasmInstr>().also<MutableList<WasmInstr>> {
|
||||
WasmIrExpressionBuilder(it).buildConstI32(offset, location)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@ abstract class WasmExpressionBuilder {
|
||||
|
||||
abstract var numberOfNestedBlocks: Int
|
||||
|
||||
fun buildConstI32(value: Int, location: SourceLocation = SourceLocation.TBDLocation) {
|
||||
fun buildConstI32(value: Int, location: SourceLocation) {
|
||||
buildInstr(WasmOp.I32_CONST, location, WasmImmediate.ConstI32(value))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user