Emit overflow error for fixed-width type conversion.
(self, target_type: RType, line: int)
| 656 | return res |
| 657 | |
| 658 | def emit_fixed_width_overflow_error(self, target_type: RType, line: int) -> None: |
| 659 | """Emit overflow error for fixed-width type conversion.""" |
| 660 | if is_int32_rprimitive(target_type): |
| 661 | self.call_c(int32_overflow, [], line) |
| 662 | elif is_int16_rprimitive(target_type): |
| 663 | self.call_c(int16_overflow, [], line) |
| 664 | elif is_uint8_rprimitive(target_type): |
| 665 | self.call_c(uint8_overflow, [], line) |
| 666 | else: |
| 667 | assert False, target_type |
| 668 | self.add(Unreachable()) |
| 669 | |
| 670 | def coerce_short_int_to_fixed_width(self, src: Value, target_type: RType, line: int) -> Value: |
| 671 | # short_int (CPyTagged) is guaranteed to be a tagged value, never a pointer, |
no test coverage detected