This trait abstracts over the kind of provenance that is associated with a
Pointer. It is
mostly opaque; the
Machine trait extends it with some more operations that also have access to
some global state.
Debug rendering is used to distplay bare provenance, and for the default impl of
Required Associated Constants§
Says whether the
offset field of
Pointers with this provenance is the actual physical address.
false, the offset must be relative. This means the bytes representing a pointer are different from what the Abstract Machine prescribes, so the interpreter must prevent any operation that would inspect the underlying bytes of a pointer, such as ptr-to-int transmutation. A
ReadPointerAsByteserror will be raised in such situations.
true, the interpreter will permit operations to inspect the underlying bytes of a pointer, and implement ptr-to-int transmutation by stripping provenance.
OFFSET_IS_ADDR == false, provenance must always be able to
identify the allocation this ptr points to (i.e., this must return
Otherwise this function is best-effort (but must agree with
(Identifying the offset in that allocation, however, is harder – use
Memory::ptr_get_alloc for that.)
Defines the ‘join’ of provenance: what happens when doing a pointer load and different bytes have different provenance.
Determines how a pointer should be printed.
Default impl is only good for when
OFFSET_IS_ADDR == true.