United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-7001379 bootstrap method data needs to be moved from constant pool to a classfile attribute
JDK-7001379 : bootstrap method data needs to be moved from constant pool to a classfile attribute

Details
Type:
Bug
Submit Date:
2010-11-19
Status:
Closed
Updated Date:
2011-03-08
Project Name:
JDK
Resolved Date:
2011-03-08
Component:
hotspot
OS:
generic
Sub-Component:
compiler
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
hs20 (b04)

Related Reports
Backport:
Backport:
Relates:
Relates:
Relates:

Sub Tasks

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://mail.openjdk.java.net/pipermail/mlvm-dev/2010-November/002154.html
                                     
2010-11-30
EVALUATION

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

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

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

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



Hardware and Software, Engineered to Work Together