#separator:tab
#html:true
#notetype:Basic
#tags column:3
#deck:cracked.guide::Crafting Interpreters::Ch 15 A Virtual Machine
#columns:Front	Back	Tags
Crafting Interpreters ch 15, A Virtual Machine: what does it cover?	The virtual machine: the instruction pointer, the main dispatch loop, a value stack, and arithmetic instructions, with tracing of the stack as it runs.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::15 cracked.guide::kind::about
Crafting Interpreters ch 15, A Virtual Machine: why does it matter?	This loop is the beating heart of every bytecode interpreter. Understanding stack machines also helps you read JVM or WebAssembly bytecode.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::15 cracked.guide::kind::why
Crafting Interpreters ch 15, A Virtual Machine: which part of the book is it in?	clox (bytecode VM, C)	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::15 cracked.guide::kind::part
Crafting Interpreters ch 15: what traps should you watch for?	<ul><li>Stack overflow with the fixed-size stack, since pushes are unchecked.</li><li>Pop order for binary operators: the right operand is on top.</li></ul>	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::15 cracked.guide::kind::traps
Crafting Interpreters ch 15: which end-of-chapter challenges are worth your time?	Challenge 1 (write out bytecode for several expressions) is a quick and useful exercise. Challenge 3 (grow the stack dynamically) and challenge 4 (negate in place) are short C exercises worth doing.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::15 cracked.guide::kind::challenges
Crafting Interpreters ch 15, A Virtual Machine: how should you work through it?	Enable the execution trace and step through a few hand-built chunks. Notice how each instruction pushes and pops.	cracked.guide cracked.guide::phase::interpreters cracked.guide::chapter::15 cracked.guide::kind::approach
