Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-2204318 | 7 | John Rose | P3 | Closed | Fixed | b123 |
JDK-2205804 | 6u25 | John Rose | P3 | Resolved | Fixed | b01 |
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.
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.
- backported by
-
JDK-2205804 bootstrap method data needs to be moved from constant pool to a classfile attribute
-
- Resolved
-
-
JDK-2204318 bootstrap method data needs to be moved from constant pool to a classfile attribute
-
- Closed
-
- relates to
-
JDK-7001382 bytecode processing tools need to handle JSR 292 bytecode changes
-
- Closed
-
-
JDK-7008165 Garbage in ClassFormatError message
-
- Closed
-
-
JDK-6964498 JSR 292 invokedynamic sites need local bootstrap methods
-
- Closed
-