Someone is already working on type inference using VM caches.
See http://forum.world.st/parameters-of-the-virtual-machine-td48...