Control Structures
Problem with forward jumps
- Don't know the target at the point the jump instruction is emitted
Solution – backpatching
- plant the instruction with null target
- remember the position of the instruction
- once target is known, patch it back into the instruction at the recorded position