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

  • Kevin Williams
  • Jason McCandless
  • David Gregg
Part of the Lecture Notes in Computer Science book series (LNCS, volume 5898)

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.

References

  1. 1.
    Zaleski, M., Brown, A.D., Stoodley, K.: YETI: a graduallY extensible trace interpreter. In: VEE 2007: Proceedings of the 3rd international conference on Virtual execution environments, pp. 83–93. ACM, New York (2007)CrossRefGoogle Scholar
  2. 2.
    Gal, A., Probst, C.W., Franz, M.: HotpathVM: an effective jit compiler for resource-constrained devices. In: VEE 2006: Proceedings of the 2nd international conference on Virtual execution environments, pp. 144–153. ACM, New York (2006)CrossRefGoogle Scholar
  3. 3.
    Whaley, J.: Partial method compilation using dynamic profile information. In: OOPSLA 2001: Proceedings of the 16th ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications, pp. 166–179. ACM, New York (2001)CrossRefGoogle Scholar
  4. 4.
    Suganuma, T., Yasue, T., Nakatani, T.: A region-based compilation technique for a java just-in-time compiler. In: PLDI 2003: Proceedings of the ACM SIGPLAN 2003 conference on Programming language design and implementation, pp. 312–323. ACM, New York (2003)CrossRefGoogle Scholar
  5. 5.
    Suganuma, T., Yasue, T., Nakatani, T.: A region-based compilation technique for dynamic compilers. ACM Trans. Program. Lang. Syst. 28(1), 134–174 (2006)CrossRefGoogle Scholar

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