JDK-6726015 : JavaCompiler: replace desugarLater by compileStates
  • Type: Enhancement
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2008-07-15
  • Updated: 2012-01-13
  • Resolved: 2012-01-13
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 Other
7 b33Fixed OpenJDK6Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Description
This is a follow-on to "6325201: make erasure non-destructive".  The issue is that TransTypes is destructive, and can destroy info in the supertypes for a class. The fix was to defer desugaring a class until all its supertypes have passed through flow and attr.

The fix interferes with the ability to process all the classes in a file before writing out class files, in an effective manner, since the deferral puts a class back on the to-do queue, at the end, to processed after the supertypes have been processed.

Here is the webrev for the earlier fix:
http://sa.sfbay.sun.com/projects/langtools_data/mustang/6325201.2/

Instead of deferring the desugaring, it would be better to ensure that attr and flow have been called on any supertypes, doing the processing on demand as needed, if it has not been done already. This can be done by tracking the compilation state of each class, noting if the class has been through attr and flow. Then, the processing of the todo list can skip running attr and flow on any class that has already been done.

Comments
EVALUATION Yes
23-07-2008