Fwd: Request for review (L): 6964498: JSR 292 invokedynamic sites need local bootstrap methods
John Rose
john.r.rose at oracle.com
Sat Jul 10 22:25:36 PDT 2010
There are more JVM changes in the pipeline, FYI.
Bootstrap methods are going to be made specific to instructions, and (therefore) represented statically in the constant pool.
The new CP entry CONSTANT_InvokeDynamic will be an ordered pair of CP indexes, the first to a CONSTANT_MethodHandle (the BSM) and the second to a CONSTANT_NameAndType (which is the same as before).
For now, the JVM will accept both kinds of index in an invokedynamic instruction. The EG expects to get rid of the dynamically-registered BSM for invokedynamic, in favor of this new static notation in the classfile.
Notation in the Java language is TBD; the prototype uses annotations to declare BSMs, but that's not a kosher use of annotations.
-- John
From: John Rose <john.r.rose at oracle.com>
Date: July 10, 2010 10:17:26 PM PDT
To: hotspot compiler <hotspot-compiler-dev at openjdk.java.net>
Subject: Request for review (L): 6964498: JSR 292 invokedynamic sites need local bootstrap methods
These JVM changes implement per-call-site bootstrap methods. The JSR 292 EG is (almost certainly) going to change the bootstrap method from a dynamically specified per-class attribute to a statically-specified per-instruction attribute (in the constant pool). This is the implementation.
http://cr.openjdk.java.net/~jrose/6964498/webrev/
This JVM continues to run programs with old-style bootstrap methods, under a compatibility switch. These JVM changes will be pushed unilaterally, before corresponding JDK and javac changes.
-- John
P.S. Here, FYI, are some prototyped JDK and javac changes which work with the JVM webrev. They are almost certain to change, since we don't know yet on how to "spell" bootstrap methods in the Java language. Annotations are a convenient hack, but probably not the right final answer.
http://cr.openjdk.java.net/~jrose/6964498/jdk-webrev/
http://cr.openjdk.java.net/~jrose/6964498/lt-webrev/
More information about the mlvm-dev
mailing list