For anyone who hasn't written a JIT I'd recommend writing a Brainfuck runtime one day. It's a tractable and strait forward project that will teach you how to do all of this. Start with implementing a direct interpreter and think of ways to make it faster.