Vincent Povirk madewokherd+8cd9@gmail.com writes:
It's odd, but it seems like the simplest way to write this.
I've tried what I think was your suggestion, and that's attached. I don't think it's an improvement.
You should short-circuit the src_space == dst_space case, that would simplify things a lot. Then you can probably have two switch statements, one to do src_space -> Page and then Page -> dst_space.