JDK-6983728 : JSR 292 code for limited argument counts is unused and should be deleted
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 7
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2010-09-10
  • Updated: 2013-06-26
  • Resolved: 2011-08-02
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 7 JDK 8 Other
7u2Fixed 8 b01Fixed hs22Fixed
Related Reports
Relates :  
Relates :  
Relates :  
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 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.
13-05-2011

EVALUATION yes
14-09-2010