| ... | ... | @@ -1606,6 +1606,56 @@ fn walkInstruction( |
| 1606 | 1606 | .expr = .{ .binOpIndex = binop_index }, |
| 1607 | 1607 | }; |
| 1608 | 1608 | }, |
| 1609 | .array_mul => { |
| 1610 | const pl_node = data[@intFromEnum(inst)].pl_node; |
| 1611 | const extra = file.zir.extraData(Zir.Inst.ArrayMul, pl_node.payload_index); |
| 1612 | |
| 1613 | const binop_index = self.exprs.items.len; |
| 1614 | try self.exprs.append(self.arena, .{ .binOp = .{ .lhs = 0, .rhs = 0 } }); |
| 1615 | |
| 1616 | const lhs: DocData.WalkResult = try self.walkRef( |
| 1617 | file, |
| 1618 | parent_scope, |
| 1619 | parent_src, |
| 1620 | extra.data.lhs, |
| 1621 | false, |
| 1622 | call_ctx, |
| 1623 | ); |
| 1624 | const rhs: DocData.WalkResult = try self.walkRef( |
| 1625 | file, |
| 1626 | parent_scope, |
| 1627 | parent_src, |
| 1628 | extra.data.rhs, |
| 1629 | false, |
| 1630 | call_ctx, |
| 1631 | ); |
| 1632 | const res_ty: ?DocData.WalkResult = if (extra.data.res_ty != .none) |
| 1633 | try self.walkRef( |
| 1634 | file, |
| 1635 | parent_scope, |
| 1636 | parent_src, |
| 1637 | extra.data.res_ty, |
| 1638 | false, |
| 1639 | call_ctx, |
| 1640 | ) |
| 1641 | else |
| 1642 | null; |
| 1643 | |
| 1644 | const lhs_index = self.exprs.items.len; |
| 1645 | try self.exprs.append(self.arena, lhs.expr); |
| 1646 | const rhs_index = self.exprs.items.len; |
| 1647 | try self.exprs.append(self.arena, rhs.expr); |
| 1648 | self.exprs.items[binop_index] = .{ .binOp = .{ |
| 1649 | .name = @tagName(tags[@intFromEnum(inst)]), |
| 1650 | .lhs = lhs_index, |
| 1651 | .rhs = rhs_index, |
| 1652 | } }; |
| 1653 | |
| 1654 | return DocData.WalkResult{ |
| 1655 | .typeRef = if (res_ty) |rt| rt.expr else null, |
| 1656 | .expr = .{ .binOpIndex = binop_index }, |
| 1657 | }; |
| 1658 | }, |
| 1609 | 1659 | // compare operators |
| 1610 | 1660 | .cmp_eq, |
| 1611 | 1661 | .cmp_neq, |