United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6983728 JSR 292 code for limited argument counts is unused and should be deleted
JDK-6983728 : JSR 292 code for limited argument counts is unused and should be deleted

Details
Type:
Bug
Submit Date:
2010-09-10
Status:
Resolved
Updated Date:
2013-06-26
Project Name:
JDK
Resolved Date:
2011-08-02
Component:
hotspot
OS:
generic
Sub-Component:
compiler
CPU:
generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:

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

Sub Tasks

Description
Some parts of the current JSR 292 implementation, such as MethodHandles.filterArguments, impose arbitrary small limits (around 10) on the number of arguments.

We need to remove these limits, allowing the full number of arguments.  This number ranges up to 255, per JVM spec 4.3.3 and 4.11.  Current implementation techniques which use "one class per arity" will need to be replaced by more generic techniques, since groups of 255 classes are not scalable, especially when the complexity is super-linear (as with descriptor polymorphism).
Other CRs have removed argument count limitations everywhere except for SPARC code and, and the now-obsolete common JDK code which works around the limitations of the SPARC port of JSR 292.

This is the SPARC change which updates the SPARC port to remove arguent count limitations (by implementing ricochet frames):

7045514: SPARC assembly code for JSR 292 ricochet frames

The present CR is a followup to that SPARC upgrade, and depends on it.  It requests the removal of the obsolete common code in the JDK, as soon as there is no longer any need for it on SPARC.

It includes the complete removal of the following files, which were workarounds for the lack of ricochet frames:
  FilterGeneric.java FilterOneArgument.java FromGeneric.java SpreadGeneric.java ToGeneric.java

Also, it removes obsolete test exclusions from MethodHandlesTest (key unit test), and extend argument counts of test cases past (obsolete) limits of about 10.

This change will help stabilize JSR 292 on JDK 7.

There is a tested patch for this change in the mlvm patch repository:

http://hg.openjdk.java.net/mlvm/mlvm/jdk/file/tip/meth-argcount-6983728.patch

                                    

Comments
EVALUATION

yes
                                     
2010-09-14
EVALUATION

This problem has been corrected by 6939861.  However, because it requires assembly code in the JVM, only the x86 port shows the correction.  Other ports (like SPARC) need to integrate the changes from 6939861, so this bug can be closed.
                                     
2011-05-13



Hardware and Software, Engineered to Work Together