> Under what circumstances can they throw an exception ... (I think only
> if called during the init of the aspect class?) ... is that correct?
It depends on the aspect's per-clause when exactly that can happen. It
seems there is no easy way to determine this statically, otherwise we
should generally do that to avoid the checks within AspectOf().
If we can identify such cases where the aspect is guaranteed to be
bound, we could write a pass that changes those AspectOf() calls to call
a different method (we could call it AspectOfUnchecked()) to retrieve
the aspect. The inliner could then do something more intelligent with
these calls, knowing that they don't throw exceptions.
However, I'm not sure we can preserve the behavior in the case of low
memory conditions, that is if the aspect instance simply isn't created
because there is no memory. In that case, the exception could be thrown
even after class initialization. The same is true I think if the
aspect's constructor throws an exception. This exception is saved and
re-thrown by AspectOf() if I recall correctly.
Sascha
>
> Cheers, Laurie
>
>
> +-------------------------------------------------------------+
> | Laurie Hendren, Professor, School of Computer Science |
> | McGill University |
> | 318 McConnell Engineering Building tel: (514) 398-7391 |
> | 3480 University Street fax: (514) 398-3883 |
> | Montreal, Quebec H3A 2A7 hendren@cs.mcgill.ca |
> | CANADA http://www.sable.mcgill.ca/~hendren |
> | http://wwww.sable.mcgill.ca http://aspectbench.org |
> +-------------------------------------------------------------+
>
> On Fri, 8 Apr 2005, Sascha Kuzins wrote:
>
>
>>Hi Laurie!
>>
>>> - around inlining - Sascha ... did you want to play a bit with your
>>> more tuned inliners? Are there better experiments to do now?
>>> - also Chris G. noticed that after your do your inlining there are
>>> often dead calls to AspectOf() ... can these be removed?
>>
>>I'm working on this. The dead calls cannot be removed because they have
>>the possible side effect of throwing an exception.
>>(One idea to optimize this is to transform singleton aspects by making
>>all members static and not having any real aspect instance if there are
>>no derived aspects, but that's not feasible in the short term.)
>>
>>Sascha
>>
>>
>
>
>
Received on Fri Apr 8 14:22:59 2005
This archive was generated by hypermail 2.1.8 : Fri Apr 08 2005 - 14:30:04 BST