|
Relates :
|
|
|
Relates :
|
|
|
Relates :
|
Currently, as a result of changes in 6964498, bootstrap information in a CONSTANT_InvokeDynamic constant pool entry is "inlined" into each such entry. This makes constant pool parsing somewhat more complex, due to the larger number (> 2) of constant pool entry fields. This will burden some JVM implementations, like IBM's, for which 32 bits is a hard limit on constant pool entry size.
We propose instead to move the BSM and its optional arguemnts to a new classfile attribute, BootstrapMethods. The CONSTANT_InvokeDynamic entry will contain (1) a 16-bit index into the BootstrapMethods table
struct BootstrapMethods_attr {
u2 name;
u4 size;
u2 bootstrap_method_count;
struct {
u2 bootstrap_method_ref; // CONSTANT_MethodHandle pool index
u2 bootstrap_argument_count;
u2 bootstrap_arguments[bootstrap_argument_count]; // constant pool indexes
} bootstrap_methods[bootstrap_method_count];
}
When an invokedynamic instruction is linked, its bootstrap method is called as documented in the JDK 7 package-info javadoc.
|