| ... | @@ -4410,16 +4410,16 @@ fn airCondBr(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -4410,16 +4410,16 @@ fn airCondBr(self: *Self, inst: Air.Inst.Index) !void { |
| 4410 | // Capture the state of register and stack allocation state so that we can revert to it. | 4410 | // Capture the state of register and stack allocation state so that we can revert to it. |
| 4411 | const saved_state = try self.captureState(); | 4411 | const saved_state = try self.captureState(); |
| 4412 | | 4412 | |
| 4413 | try self.branch_stack.append(.{}); | 4413 | { |
| 4414 | errdefer { | 4414 | try self.branch_stack.append(.{}); |
| 4415 | _ = self.branch_stack.pop(); | 4415 | errdefer _ = self.branch_stack.pop(); |
| 4416 | } | | |
| 4417 | | 4416 | |
| 4418 | try self.ensureProcessDeathCapacity(liveness_condbr.then_deaths.len); | 4417 | try self.ensureProcessDeathCapacity(liveness_condbr.then_deaths.len); |
| 4419 | for (liveness_condbr.then_deaths) |operand| { | 4418 | for (liveness_condbr.then_deaths) |operand| { |
| 4420 | self.processDeath(operand); | 4419 | self.processDeath(operand); |
| | 4420 | } |
| | 4421 | try self.genBody(then_body); |
| 4421 | } | 4422 | } |
| 4422 | try self.genBody(then_body); | | |
| 4423 | | 4423 | |
| 4424 | // Revert to the previous register and stack allocation state. | 4424 | // Revert to the previous register and stack allocation state. |
| 4425 | | 4425 | |
| ... | @@ -4430,16 +4430,16 @@ fn airCondBr(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -4430,16 +4430,16 @@ fn airCondBr(self: *Self, inst: Air.Inst.Index) !void { |
| 4430 | | 4430 | |
| 4431 | try self.performReloc(reloc); | 4431 | try self.performReloc(reloc); |
| 4432 | | 4432 | |
| 4433 | try self.branch_stack.append(.{}); | 4433 | { |
| 4434 | errdefer { | 4434 | try self.branch_stack.append(.{}); |
| 4435 | _ = self.branch_stack.pop(); | 4435 | errdefer _ = self.branch_stack.pop(); |
| 4436 | } | | |
| 4437 | | 4436 | |
| 4438 | try self.ensureProcessDeathCapacity(liveness_condbr.else_deaths.len); | 4437 | try self.ensureProcessDeathCapacity(liveness_condbr.else_deaths.len); |
| 4439 | for (liveness_condbr.else_deaths) |operand| { | 4438 | for (liveness_condbr.else_deaths) |operand| { |
| 4440 | self.processDeath(operand); | 4439 | self.processDeath(operand); |
| | 4440 | } |
| | 4441 | try self.genBody(else_body); |
| 4441 | } | 4442 | } |
| 4442 | try self.genBody(else_body); | | |
| 4443 | | 4443 | |
| 4444 | var else_branch = self.branch_stack.pop(); | 4444 | var else_branch = self.branch_stack.pop(); |
| 4445 | defer else_branch.deinit(self.gpa); | 4445 | defer else_branch.deinit(self.gpa); |
| ... | @@ -4850,17 +4850,17 @@ fn airSwitch(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -4850,17 +4850,17 @@ fn airSwitch(self: *Self, inst: Air.Inst.Index) !void { |
| 4850 | // Capture the state of register and stack allocation state so that we can revert to it. | 4850 | // Capture the state of register and stack allocation state so that we can revert to it. |
| 4851 | const saved_state = try self.captureState(); | 4851 | const saved_state = try self.captureState(); |
| 4852 | | 4852 | |
| 4853 | try self.branch_stack.append(.{}); | 4853 | { |
| 4854 | errdefer { | 4854 | try self.branch_stack.append(.{}); |
| 4855 | _ = self.branch_stack.pop(); | 4855 | errdefer _ = self.branch_stack.pop(); |
| 4856 | } | | |
| 4857 | | 4856 | |
| 4858 | try self.ensureProcessDeathCapacity(liveness.deaths[case_i].len); | 4857 | try self.ensureProcessDeathCapacity(liveness.deaths[case_i].len); |
| 4859 | for (liveness.deaths[case_i]) |operand| { | 4858 | for (liveness.deaths[case_i]) |operand| { |
| 4860 | self.processDeath(operand); | 4859 | self.processDeath(operand); |
| 4861 | } | 4860 | } |
| 4862 | | 4861 | |
| 4863 | try self.genBody(case_body); | 4862 | try self.genBody(case_body); |
| | 4863 | } |
| 4864 | | 4864 | |
| 4865 | branch_stack.appendAssumeCapacity(self.branch_stack.pop()); | 4865 | branch_stack.appendAssumeCapacity(self.branch_stack.pop()); |
| 4866 | | 4866 | |
| ... | @@ -4878,18 +4878,18 @@ fn airSwitch(self: *Self, inst: Air.Inst.Index) !void { | ... | @@ -4878,18 +4878,18 @@ fn airSwitch(self: *Self, inst: Air.Inst.Index) !void { |
| 4878 | // Capture the state of register and stack allocation state so that we can revert to it. | 4878 | // Capture the state of register and stack allocation state so that we can revert to it. |
| 4879 | const saved_state = try self.captureState(); | 4879 | const saved_state = try self.captureState(); |
| 4880 | | 4880 | |
| 4881 | try self.branch_stack.append(.{}); | 4881 | { |
| 4882 | errdefer { | 4882 | try self.branch_stack.append(.{}); |
| 4883 | _ = self.branch_stack.pop(); | 4883 | errdefer _ = self.branch_stack.pop(); |
| 4884 | } | | |
| 4885 | | 4884 | |
| 4886 | const else_deaths = liveness.deaths.len - 1; | 4885 | const else_deaths = liveness.deaths.len - 1; |
| 4887 | try self.ensureProcessDeathCapacity(liveness.deaths[else_deaths].len); | 4886 | try self.ensureProcessDeathCapacity(liveness.deaths[else_deaths].len); |
| 4888 | for (liveness.deaths[else_deaths]) |operand| { | 4887 | for (liveness.deaths[else_deaths]) |operand| { |
| 4889 | self.processDeath(operand); | 4888 | self.processDeath(operand); |
| 4890 | } | 4889 | } |
| 4891 | | 4890 | |
| 4892 | try self.genBody(else_body); | 4891 | try self.genBody(else_body); |
| | 4892 | } |
| 4893 | | 4893 | |
| 4894 | branch_stack.appendAssumeCapacity(self.branch_stack.pop()); | 4894 | branch_stack.appendAssumeCapacity(self.branch_stack.pop()); |
| 4895 | | 4895 | |