| ... | ... | @@ -871,7 +871,7 @@ pub const Context = struct { |
| 871 | 871 | }; |
| 872 | 872 | |
| 873 | 873 | for (args) |arg| { |
| 874 | | const arg_val = self.resolveInst(Air.indexToRef(arg)); |
| 874 | const arg_val = self.resolveInst(@intToEnum(Air.Inst.Ref, arg)); |
| 875 | 875 | try self.emitWValue(arg_val); |
| 876 | 876 | } |
| 877 | 877 | |
| ... | ... | @@ -959,7 +959,7 @@ pub const Context = struct { |
| 959 | 959 | try self.emitWValue(lhs); |
| 960 | 960 | try self.emitWValue(rhs); |
| 961 | 961 | |
| 962 | | const bin_ty = self.air.getRefType(bin_op.lhs); |
| 962 | const bin_ty = self.air.typeOf(bin_op.lhs); |
| 963 | 963 | const opcode: wasm.Opcode = buildOpcode(.{ |
| 964 | 964 | .op = op, |
| 965 | 965 | .valtype1 = try self.typeToValtype(bin_ty), |
| ... | ... | @@ -1179,7 +1179,7 @@ pub const Context = struct { |
| 1179 | 1179 | const data: Air.Inst.Data = self.air.instructions.items(.data)[inst]; |
| 1180 | 1180 | const lhs = self.resolveInst(data.bin_op.lhs); |
| 1181 | 1181 | const rhs = self.resolveInst(data.bin_op.rhs); |
| 1182 | | const lhs_ty = self.air.getRefType(data.bin_op.lhs); |
| 1182 | const lhs_ty = self.air.typeOf(data.bin_op.lhs); |
| 1183 | 1183 | |
| 1184 | 1184 | try self.emitWValue(lhs); |
| 1185 | 1185 | try self.emitWValue(rhs); |
| ... | ... | @@ -1211,7 +1211,7 @@ pub const Context = struct { |
| 1211 | 1211 | const br = self.air.instructions.items(.data)[inst].br; |
| 1212 | 1212 | |
| 1213 | 1213 | // if operand has codegen bits we should break with a value |
| 1214 | | if (self.air.getRefType(br.operand).hasCodeGenBits()) { |
| 1214 | if (self.air.typeOf(br.operand).hasCodeGenBits()) { |
| 1215 | 1215 | try self.emitWValue(self.resolveInst(br.operand)); |
| 1216 | 1216 | } |
| 1217 | 1217 | |
| ... | ... | @@ -1277,7 +1277,7 @@ pub const Context = struct { |
| 1277 | 1277 | const else_body = self.air.extra[extra.end + cases.len ..][0..extra.data.else_body_len]; |
| 1278 | 1278 | |
| 1279 | 1279 | const target = self.resolveInst(pl_op.operand); |
| 1280 | | const target_ty = self.air.getRefType(pl_op.operand); |
| 1280 | const target_ty = self.air.typeOf(pl_op.operand); |
| 1281 | 1281 | const valtype = try self.typeToValtype(target_ty); |
| 1282 | 1282 | // result type is always 'noreturn' |
| 1283 | 1283 | const blocktype = wasm.block_empty; |