Bug 108100

Summary: Binary weaving ITDs (including generic ones) #2
Product: [Tools] AspectJ Reporter: Andrew Clement <aclement>
Component: CompilerAssignee: Andrew Clement <aclement>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 1.5.0M3   
Target Milestone: 1.5.0RC1   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Andrew Clement CLA 2005-08-26 07:29:42 EDT
Relating to the first bug I raised on this.  Once that issue is resolved, we can
explore more interesting cases.  For example, for a generic type:

class Foo<T> {
}

binary weaving

aspect Goo {
  List<G> Foo<G>.x;
}

In the 'all source' case, this works by preserving an alias list in the ITD
which is then passed to scopes as required, in the above case the ITD for 'x'
has an alias list of 'G' indicating that when someone asks for G, what they
really mean is the first type variable defined in Foo.

However, the alias list is *not* persisted in the ITD that makes it to the disk
(it makes it to the disk as a munger).  Actually I just looked in
ResolvedTypeMunger and it has an unused field I should have deleted called
'typeVariableToGenericTypeVariableIndex' - left over from some prototype work.

I suspect for binary weaving of the munger to work, you need to persist the
alias list - the reason i dont right now is I couldnt write a testcase to verify
binary weaving was broken because of the first binary weaving ITD bug I've
raised (and I'm not putting in a bunch of serialization/deserialization
infrastructure without a way to verify its ok...).  I'm sure there are other
test strategies that could be used other than using Xreweavable like I did in
the first bug but what I did in that bug seemed such a straightforward way to do
it that I was shocked when it failed and it seemed so fundamental that it needed
fixing first...
Comment 1 Adrian Colyer CLA 2005-09-01 09:52:49 EDT
for M4
Comment 2 Adrian Colyer CLA 2005-09-08 04:11:43 EDT
this should have been tagged M4...
Comment 3 Andrew Clement CLA 2005-10-28 03:45:10 EDT
type aliases are preserved in the bytecode now.  basic binary weaving is working!!