1. A system for generating machine code from byte code in virtual machines, comprising: a computer including a virtual machine running thereon, for executing a software application, and further including a memory space or storage medium for storing byte code as part of the software application; and a compiler, further comprising an object dematerializer that generates machine code that initializes fields of a dematerialized object, to create a first code path; an dematerializer injector that simultaneously injects dematerialization code, by receiving a normal object reference, and transforming a code path with the normal object reference into a second code path using dematerialized object fields; and wherein the compiler then joins the first and second code paths together into a resultant code path that continue to use the dematerialized object.