This MR generalises the value representation of integers to preserve pointer provenance after a pointer-to-integer cast. However, this provenance information is lost on any arithmetic operation.
In the type system, this is handled using a new
l @ intptr<it> type (similar to
n @ int<it> but refined by a location instead of an integer). Elements of this type can be cast back to an owned pointer type (in which case the provenance is preserved) or to a normal
int type (in which case the provenance information is lost).