#separator:tab
#html:true
#notetype:Basic
#tags column:3
#deck:cracked.guide::Crafting Interpreters::Ch 23 Jumping Back and Forth
#columns:Front	Back	Tags
Crafting Interpreters ch 23, Jumping Back and Forth: what does it cover?	Control flow in bytecode: jump instructions with backpatching for if/else, logical operators, while loops with backward jumps, and for loops.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::23 cracked.guide::kind::about
Crafting Interpreters ch 23, Jumping Back and Forth: why does it matter?	Backpatching is how every assembler and compiler resolves forward jumps. You will see it again in real assemblers and in Knuth's MIX.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::23 cracked.guide::kind::why
Crafting Interpreters ch 23, Jumping Back and Forth: which part of the book is it in?	clox (bytecode VM, C)	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::23 cracked.guide::kind::part
Crafting Interpreters ch 23: what traps should you watch for?	<ul><li>Jump offsets off by the size of the operand bytes.</li><li>Not popping the condition value on both branches.</li></ul>	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::23 cracked.guide::kind::traps
Crafting Interpreters ch 23: which end-of-chapter challenges are worth your time?	Challenge 1 (a switch statement) and challenge 2 (continue) are both excellent. Challenge 3 is an open design question. Do challenges that change Lox's behavior on a separate git branch. The cracked.guide check runs the official test suite for this chapter, and a challenge that changes semantics (new syntax, different errors) can make tests fail on main.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::23 cracked.guide::kind::challenges
Crafting Interpreters ch 23, Jumping Back and Forth: how should you work through it?	Disassemble each control structure and draw the jump arrows. Off-by-one jump offsets are the usual bug; the disassembler shows them immediately.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::23 cracked.guide::kind::approach
