(
self, target: Register, get_val: Callable[[], Value], index: int, line: int
)
| 573 | self.activate_block(body_block) |
| 574 | |
| 575 | def assign_if_bitmap_unset( |
| 576 | self, target: Register, get_val: Callable[[], Value], index: int, line: int |
| 577 | ) -> None: |
| 578 | error_block, body_block = BasicBlock(), BasicBlock() |
| 579 | o = self.int_op( |
| 580 | bitmap_rprimitive, |
| 581 | self.builder.args[-1 - index // BITMAP_BITS], |
| 582 | Integer(1 << (index & (BITMAP_BITS - 1)), bitmap_rprimitive), |
| 583 | IntOp.AND, |
| 584 | line, |
| 585 | ) |
| 586 | b = self.add(ComparisonOp(o, Integer(0, bitmap_rprimitive), ComparisonOp.EQ, line)) |
| 587 | self.add(Branch(b, error_block, body_block, Branch.BOOL)) |
| 588 | self.activate_block(error_block) |
| 589 | self.add(Assign(target, self.coerce(get_val(), target.type, line))) |
| 590 | self.goto(body_block) |
| 591 | self.activate_block(body_block) |
| 592 | |
| 593 | def maybe_add_implicit_return(self) -> None: |
| 594 | if is_none_rprimitive(self.ret_types[-1]) or is_object_rprimitive(self.ret_types[-1]): |
no test coverage detected