[Wasm] Require location for buildStructGet and fix all usages

This commit is contained in:
Zalim Bashorov
2022-12-13 19:16:23 +01:00
parent 530438dfcb
commit e7dc443c18
2 changed files with 12 additions and 11 deletions
@@ -145,9 +145,10 @@ abstract class WasmExpressionBuilder {
buildInstr(WasmOp.GLOBAL_SET, location, WasmImmediate.GlobalIdx(global))
}
fun buildStructGet(struct: WasmSymbol<WasmTypeDeclaration>, fieldId: WasmSymbol<Int>) {
fun buildStructGet(struct: WasmSymbol<WasmTypeDeclaration>, fieldId: WasmSymbol<Int>, location: SourceLocation) {
buildInstr(
WasmOp.STRUCT_GET,
location,
WasmImmediate.GcType(struct),
WasmImmediate.StructFieldIdx(fieldId)
)