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 Basics

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.

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…

Advertisements