Hi,
On Sun, 20 Sep 2009, Antoine Marot wrote:
> I was having fun with abc and looking at the generated code with Dava when I
> noticed an odd code generation policy. Indeed, pertarget aspect instances are
> retrieved by calling a method on targets themselves. This implies that a
> method has to be introduced in the class of the target.
>
> Therefore, it is impossible to have aspect instances for unweavable classes.
> I guess the implementation is made this way to speed up the instance
> retrieval but isn't that an unnecessary limitation ?
>
> Is there another reason to not allow aspect instances for unweavable
> classes ?
My memory on the subject is rather vague, but I think this is just a
trade-off between efficiency+simplicity on the one hand and full
generality on the other. Since abc is a whole program compiler we also
weren't that concerned about unweavable classes in general.
Replacing the dispatch to the target class with a global mapping should be
quite feasible (but be careful about threading issues).
Ganesh
Received on Sun Sep 20 2009 - 12:34:08 BST
This archive was generated by hypermail 2.2.0 : Sun Sep 20 2009 - 13:20:10 BST