1. A method, comprising: receiving, by a computer, source code for an application, the source code comprising multiple instructions to be executed in a single thread; performing a static analysis on the application source code; identifying, in the static analysis, a given instruction comprising an asynchronous handler, and a plurality of entry points to the application; determining an order of execution of the multiple instructions; and generating an intermediate representation comprising the multiple instructions arranged in the determined order of execution.