Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] AspectJ Custom Attributes

Hi Eugene,

This point you made is very interesting and hadn't crossed my mind before:

>    Another huge reason is that annotation attributes allow to reuse
> and benefit from the class constant pool. So, you can share the same
> string, class and other literals and constants with the rest of the
> class bytecode. That not only decreases the bytecode size, but also
> give additional simplicity for static bytecode analysers (including
> tools like jarjar).

We made the AspectJ 'reweavable' option the default recently which has
increased the size of class files we create - this would be a way to
recover some of that space... however, if we just took what we store
in attributes at the moment and stuffed it into annotation with a
'byte[] value' in it, we wouldn't get this benefit... so clearly some
detailed thought needs to go into any potential switchover to
annotations.

And that is really my concern over doing it - the required engineering
effort given that 1.5 has been under development for what feels like
forever and we just want to ship the darn thing.  At some point we
have to draw a line and say *thats it, no more goodies in this
release*.  To move to annotations properly we need to ensure we
continue to support reading in old format .class files and we need to
make sure we can manipulate the annotations correctly without the
compiler getting a 1.5 dependency (I know this can be done, I just
think it needs some thought rather than being hacked in) - i think
those kind of changes would cause us to ship a  Milestone5 build next
rather than ReleaseCandidate1.  It would be a shame to rush an
implementation into 1.5.0 and be stuck with it after that ...

Andy.


Back to the top