Bug 132305 - Problems comparing structures for determining whether to incrementally compile
Summary: Problems comparing structures for determining whether to incrementally compile
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: DEVELOPMENT   Edit
Hardware: PC Windows XP
: P3 critical (vote)
Target Milestone: 1.5.1   Edit
Assignee: Andrew Clement CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-17 05:29 EST by Andrew Clement CLA
Modified: 2006-03-28 03:14 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Clement CLA 2006-03-17 05:29:57 EST
The code for determining whether compilation of a file has resulted in structural changes to the file has been changed recently to improve memory consumption.  We now store a compactstructurerepresentation of the bytecode for a class and on subsequent builds compare it with the new bytecode produced.  The new bytecode is processed using an Eclipse ClassReader object.  Unfortunately the compactstructure object is built using the resolvedtype information and not the classreader output - this leads to problems where methods/etc are in the bytecode but the resolvedtype has no knowledge of.  Two examples hit so far are:
this$0 - a field in inner types
access$0 - a method created for types with inner types that access private fields in their outer type.

I've patched things up to allow for these cases - longer term (if more cases crop up...) we may need to fix the compactstructure object such that it gets built from a classreader - then we will always be comparing appropriate data.

The problems with incorrect comparisons result in full builds when incremental builds would be sufficient.
Comment 1 Andrew Clement CLA 2006-03-18 07:06:25 EST
I had to do the rewrite in the end - so AjState builds compactstructure objects based on the classfilereader output, not on a resolvedtype.  tested and works in all situations we know that were causing problems.
Comment 2 Andrew Clement CLA 2006-03-28 03:14:30 EST
fixes available.