Keynote: Popping into Ruby
summary
Compiler inspection finds an int parameter called popped threaded through the big switch in ic_compile_each that decides whether to emit instructions like put_string or discard a literal. A trivial file with "Ruby comp" then 2023 shows the string’s put_string vanishing because the compiler popped that unused literal, while a standalone 2023 or an assignment must stay. Prism (released as a gem, planned as a Ruby 3.3 flag) improves diagnostics with error tolerance and requires updating the compiler to handle its slightly different AST.
AI-written summary · about
chapters (15)
- 0:00Ruby internals intro
- 1:47About speaker & community
- 2:09Ruby under the hood
- 3:12Ruby code to parse trees
- 8:54Prism parser intro
- 11:21Prism vs Ruby error tolerance
- 16:58Parse trees to bytecode
- 18:41How compiler works
- 22:14Put string instruction
- 25:07Popped optimization intro
- 27:33When Ruby cannot pop values
- 31:46Popping optimizations impact
- 33:11Stop popping Ruby internals
- 35:18Ruby internals resources
- 36:42Contribute to Prism








