Portable Just-in-Time Specialization of Dynamically Typed Scripting Languages
- Cite this paper as:
- Williams K., McCandless J., Gregg D. (2010) Portable Just-in-Time Specialization of Dynamically Typed Scripting Languages. In: Gao G.R., Pollock L.L., Cavazos J., Li X. (eds) Languages and Compilers for Parallel Computing. LCPC 2009. Lecture Notes in Computer Science, vol 5898. Springer, Berlin, Heidelberg
In this paper, we present a portable approach to JIT compilation for dynamically typed scripting languages. At runtime we generate ANSI C code and use the system’s native C compiler to compile this code. The C compiler runs on a separate thread to the interpreter allowing program execution to continue during JIT compilation. Dynamic languages have variables which may change type at any point in execution. Our interpreter profiles variable types at both whole method and partial method granularity. When a frequently executed region of code is discovered, the compilation thread generates a specialized version of the region based on the profiled types. In this paper, we evaluate the level of instruction specialization achieved by our profiling scheme as well as the overall performance of our JIT.
Unable to display preview. Download preview PDF.