Portable Just-in-Time Specialization of Dynamically Typed Scripting Languages

  • Kevin Williams
  • Jason McCandless
  • David Gregg
Conference paper

DOI: 10.1007/978-3-642-13374-9_27

Part of the Lecture Notes in Computer Science book series (LNCS, volume 5898)
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

Abstract

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.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Copyright information

© Springer-Verlag Berlin Heidelberg 2010

Authors and Affiliations

  • Kevin Williams
    • 1
  • Jason McCandless
    • 1
  • David Gregg
    • 1
  1. 1.Trinity College DublinDublinIreland

Personalised recommendations