Bug 108100 - Binary weaving ITDs (including generic ones) #2
Summary: Binary weaving ITDs (including generic ones) #2
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Compiler (show other bugs)
Version: 1.5.0M3   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 1.5.0RC1   Edit
Assignee: Andrew Clement CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-08-26 07:29 EDT by Andrew Clement CLA
Modified: 2005-10-28 03:45 EDT (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 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!!