Merge virtual machine and code generation