Real Time Recompilation of Running JavaScript
summary
Proof-of-concept recompiles running JavaScript without restarting the app, demoing live edits (the live demo trips in places). It generates functions with a direct eval injected compiler so closures and original call contexts survive, rewrites function declarations and named-function-expression rewrites via a parser, preserves arguments, and uses lazy cached recompilation to avoid constant eval overhead. Limitations: inserting new functions breaks the one-to-one mapping, injected compiler pollutes scope, and only reevaluated callbacks or functions pick up changes.
AI-written summary · about
chapters (10)
- 0:00Introduction to recompiling
- 1:14Concept of live compilation
- 3:51Basic live coding demo
- 6:12Overcoming limitation challenges
- 8:25Handling function arguments
- 13:26Managing closures
- 18:11Function expressions and loops
- 23:15Performance and caching
- 26:22The 'indirect direct' trick
- 28:51Recap and open issues
related talks
27mREPL/Playground, Let's do it Live!
30mVisualizing process evolution
31mLive React: Hot Reloading with Time Travel
30mReact Compiler
32mFeedback and the REPL
41mLet’s Make Development Fast Again!
25mTomorrow’s JavaScript debugger
22mTweak your page in real time, without leaving the comfort of your editor
