United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: 6726015 JavaCompiler: replace desugarLater by compileStates
6726015 : JavaCompiler: replace desugarLater by compileStates

Details
Type:
Enhancement
Submit Date:
2008-07-15
Status:
Closed
Updated Date:
2012-01-13
Project Name:
JDK
Resolved Date:
2012-01-13
Component:
tools
OS:
generic
Sub-Component:
javac
CPU:
generic
Priority:
P4
Resolution:
Fixed
Affected Versions:
7
Fixed Versions:
7

Related Reports
Backport:
Relates:
Relates:
Relates:

Sub Tasks

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
                                     
2008-07-23



Hardware and Software, Engineered to Work Together