1. A method for compiling an original application, written in an intermediate code, said original application being executed by a virtual machine, said method comprising: a step of extracting at least one intermediate code instruction on at least one corresponding function entry point, using a processor; a first step of compiling, with the processor, the intermediate code of the application into a code integrating management of a control stream and calling said at least one entry point of each function performing the instructions of the intermediate code; and a second step of compiling, with the processor, compiled applications code and the intermediate code functions delivering an optimized native application comprising a native binary code.