> -----Original Message-----
> From:
aspectj-users-bounces@xxxxxxxxxxx> [mailto:
aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of
Bruno
> De Fraine
> Sent: 25 February 2009 12:01
> To:
aspectj-users@xxxxxxxxxxx> Subject: Re:
[aspectj-users] if(ENABLED) causes weave for constant
>
> On
25 Feb 2009, at 11:45, Neale Upstone wrote:
>
> > For some
development/debugging aspects, I want to be able
> to switch
>
> them
> > on and off and cause the weaver to ignore
them.
>
> You can try the following:
>
> pointcut
fail();
> pointcut isEnabled(): !fail(); // Remove "!" to
disable
>
> before() : publicCalls() &&
isEnabled()
> {
> ...
> }
>
> >> From
a weaving efficiency point of view, wouldn't it be better to
>
>> detect
> > that if() has been passed a constant and for
the pointcut
> > "publicCalls()
> > &&
if(ENABLED)" to apply to no joinpoints?
>
>
> Unlike
Java, it seems that AspectJ delays all if-tests until
>
runtime.
> However, I believe the research on SCoPE uses partial
evaluation
> techniques to optimize this and many other if-tests,
see:
>
http://portal.acm.org/citation.cfm?id=1218582>
>
Best regards,
> Bruno
>
> --
> Bruno De
Fraine
> Vrije Universiteit Brussel
> Faculty of Applied
Sciences, DINF - SSEL
> Room 4K208, Pleinlaan 2, B-1050
Brussels
> tel: +32 (0)2 629 29 75
> fax: +32 (0)2 629 28
70
> e-mail:
Bruno.De.Fraine@xxxxxxxxx>
>
>
_______________________________________________
> aspectj-users
mailing list
>
aspectj-users@xxxxxxxxxxx>
https://dev.eclipse.org/mailman/listinfo/aspectj-users>