This implements bitcasts by traversing the pointer fields at interpretation-time, copying them into a buffer and then either creating a new primitive value from the buffer, or traversing the destination pointer and reading the field values from that buffer.
This is a bit non-idiomatic to the new interpreter since we do so much work at interpretation time instead of doing it at compile-time.
I can imagine ways to change this, but it would require bytecode instructions that are rather awkward, I think. So this is my attempt at
doing it this way instead.
It's also missing all the eligibility checks for bitcasts of course.
I have also not tested this on a big-endian host, which I definitely need to do (is the bit rotation needed if the host is BE and the target is BE?).
I'll try to leave a few comments in the diff.