JDK-7001379 : bootstrap method data needs to be moved from constant pool to a classfile attribute
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 7
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-11-19
  • Updated: 2011-03-08
  • Resolved: 2011-03-08
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u25Fixed 7Fixed hs20Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
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.

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/build/hotspot/rev/dad31fc330cd
25-12-2010

EVALUATION http://hg.openjdk.java.net/jdk7/build/jdk/rev/32d6d7a39220
25-12-2010

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/dad31fc330cd
16-12-2010

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/dad31fc330cd
04-12-2010

EVALUATION http://mail.openjdk.java.net/pipermail/mlvm-dev/2010-November/002154.html
30-11-2010