Java's New and Unused Machine Instruction
Java's Virtual Machine (JVM) instruction set has been extremely stable since its first release on May 23, 1995. While the JVM has had several extreme makeovers through the various versions, the instruction set has remained unchanged. This is quite a testament to its original design.
Oracle introduced its first instruction set addition,
invokedynamic, with the release of Java 7, on July 28, 2011. This instruction, described in JSR 292, allows method invocation relying on dynamic type checking.
Interestingly, while the
invokedynamic instruction is available within the virtual machine, the Java compiler is not capable of generating this instruction.*
So, why was this single new instruction added, and what value does it have to developers? The answer lies in the broad use of the JVM. Several scripting languages, like Groovy and JRuby, benefit from the machine instruction.
The JVM has grown up to be more important than just to the Java language.
* - As of Java 7u2.
Find more interesting articles By Michael Portwood at www.MichaelPortwood.com