1. A method for compiling an intermediate code of an original application while a virtual machine executes the original application, the method comprising: determining, by a processor, runtime functions in the intermediate code of the original application; generating, by the processor, code based on the intermediate code of the original application, wherein the generated code includes calls to the runtime functions enabling performance of instructions in the intermediate code; responsive to generating the code, integrating a control system associated with the virtual machine into the generated code, wherein the control system enables execution of the generated code at the virtual machine independent of an interpreter; and compiling, by the processor, the generated code and the runtime functions in the intermediate code to provide an optimized native application comprising a native binary code.