Bytecodes meet Combinators: invokedynamic on the JVM
After reading article or paper 2011. 7. 28. 20:49JSR292를 보다가 invokedynmaic jvm instruction에 대한 자세한 글을 보게 되었다. 굿..
The Java Virtual Machine (JVM) has been widely adopted in part
because of its classfile format, which is portable, compact, modular,
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 provides
user-defined call site semantics. In 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. A dynamic
compiler can traverse both representations simultaneously, producing
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 conciseness
of bytecode with the dynamic flexibility of function pointers.
because of its classfile format, which is portable, compact, modular,
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 provides
user-defined call site semantics. In 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. A dynamic
compiler can traverse both representations simultaneously, producing
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 conciseness
of bytecode with the dynamic flexibility of function pointers.
'After reading article or paper' 카테고리의 다른 글
구글 TCP Fast Open paper (TFO)를 읽고 (1) | 2012.02.09 |
---|---|
Why Events Are A Bad Idea (for high-concurrency servers) 을 읽고 (0) | 2012.02.03 |
Twitter Shifting More Code to JVM, Citing Performance and Encapsulation As Primary Drivers 한글 번역 (0) | 2011.07.11 |
Virtual Machine Showdown: Stack Versus Registers (0) | 2011.01.22 |
Isolating CauseEffect Chains from Computer Programs (0) | 2007.12.15 |