A few days ago Dave T. Lewis sent a mail on the VM mailing list giving pointers on documentation about the VM. I decided to write down in this post links to all the documentation I am aware of about it.
If you know some missing references, tell me, I will be happy to add them in this post.
- The “Back to the Future” paper by Dan Ingalls et al
- The VMMaker page on the swiki by Tim Rowledge
- “A Tour of the Squeak Object Engine” also by Tim
- General information about the Squeak VM
- The Blue book part 4: Virtual Machine implementation
- Deep into Pharo part 4: Language (Some info about closure and exception implementation)
According to Dave T. Lewis (I am quoting his own words):
You should definitely start with the Back to the Future paper. I find that
it is worth reading about once per year.
The Stack/Cog VM
The Cog VM provides better performance by mapping the contexts to the native stack, by providing a JIT compiler which maps the stack to registers and adds advanced inline caches to speed up message sends. Recently it also added a new memory manager.
- VMIL paper about Cog’s JIT
- The Cog Blog by Eliot Miranda
- Some of my blog posts: The Cog VM lookup, 7 points summary of the spur memory manager and Spur’s new object format
Related documents about high performance VMs
I can’t tell it enough, the Cog VM development is going in the direction of the Self VM to reach high performance. The implementation of the Self VM is described in Urs Hözle phd, which is very well written. The implementation of Cog’s JIT inline caches is widely inspired from the one described in Urs’ phd. The rest of the phd, type-feedback optimization, adaptive recompilation and dynamic deoptimization are currently being implemented through the Sista project. But as long as it is not on production, one can never know if the project will succeed…