Dynamic Language Support on the Java Virtual Machine

Download Now Date Added: Jan 2010
Format: HTML

Java Development Kit (JDK) 7 is a prototype of what could be in the next release of Java Platform, Standard Edition (Java SE). This introduces several key features that can be used to improve the performance, usability, and security of the Java platform. With the addition a new Java bytecode, invoke dynamic and an accompanying linkage mechanism will enable implementers of compilers for dynamically typed languages such as JRuby and Jython to generate bytecode that runs extremely fast in the Java Virtual Machine (JVM). The Java language also allows some dynamic type checking of values, especially receivers of virtual or interface method calls. Dynamic typing is also more flexible than static typing, because it enables programs to generate or configure types based on runtime data. The paper also shows the problems faced by dynamically typed languages. It also shows the example of commended version of the bytecode. The invoke virtual bytecode instruction invokes a method in addition to manipulating the operand stack. The JVM specification has specified four bytecodes for method invocation. JDK 7 includes a new package, java.dyn. One of the classes in the package is MethodHandle and other is Bootstrap Method. This paper will help to take advantage of the new invoke dynamic Java bytecode instruction for the JVM and the new method handle linkage mechanism.