Bytecodes meet Combinators: invokedynamic on the JVM

  • Rose J
  • 39

    Readers

    Mendeley users who have this article in their library.
  • 34

    Citations

    Citations of this article.

Abstract

The Java Virtual Machine (JVM) has been widely adopted in part because of its classfile format, which is portable, compact, modu- lar, verifiable, and reasonably easy to work with. However, it was designed for just one language—Java—and so when it is used to express programs in other source languages, there are often “pain points” which retard both development and execution. The most salient pain points show up at a familiar place, the method call site.
To generalize method calls on the JVM, the JSR 292 Expert Group has designed a new invokedynamic instruction that pro- vides user-defined call site semantics.\tIn the chosen design, invokedynamic serves as a hinge-point between two coexisting kinds of intermediate language: bytecode containing dynamic call sites, and combinator graphs specifying call targets.\tA dynamic compiler can traverse both representations simultaneously, pro- ducing optimized machine code which is the seamless union of both kinds of input. As a final twist, the user-defined linkage of a call site may change, allowing the code to adapt as the application evolves over time. The result is a system balancing the concise- ness of bytecode with the dynamic flexibility of function pointers.

Author-supplied keywords

  • bytecode
  • combinators
  • compiler

Get free article suggestions today

Mendeley saves you time finding and organizing research

Sign up here
Already have an account ?Sign in

Find this document

Get full text

Authors

  • John Rose

Cite this document

Choose a citation style from the tabs below

Save time finding and organizing research with Mendeley

Sign up for free