Community
Participate
Working Groups
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...
for M4
this should have been tagged M4...
type aliases are preserved in the bytecode now. basic binary weaving is working!!