Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: AW: AW: [aspectj-users] Using AJ to change program flow

Jim,

This gets into an interesting area for expanding AOP. Gregor's previous post
alludes to one of the issues in having a join point for evaluating arguments
to a method call: this join point is brittle in the face of refactorings like
setting a local variable instead of inlining the call. 

One idea for supporting something like this would be a predictive data flow
pointcut, i.e., is the output of this method call only going to be used for a
call to a logger. I know Gregor has proposed having a predictive data flow
pointcut (and others have proposed similar concpets). If we had an efficient
mechanism like this, we could prevent the execution of methods whose output is
only going to be used by a logging call that won't proceed. 

Of course, you would also want to think about side effects in the methods.
It's generally bad design for methods that format log messages to have side
effects, but this can be a factor too.

We also shouldn't neglect the possibility that JVM's will perform this kind of
optimization as they compile bytecode into machine code (e.g., compile a
method assuming the log level is constant, and recompile if the log level
changes). However, I don't believe that JVM's do this today.

On Mon, 16 Aug 2004 13:09:09 -0400, Jim Carroll wrote
> Thanks to everyone that responded. 
> 
> It's clear now; I see where my confusion was. Upon reflection it 
> certainly makes more sense than the way I was viewing it. It would 
> be nice if it were possible (perhaps through some join point 
> selection semantics or a kind of '[before,after,around]paramseval' 
> advice) to do what I was trying to do. Certainly a 'join point' 
> exsits (theoretically) at a place 'prior to the parameter evaluation 
> of all calls to X' and it would be great if AspectJ had semantics 
> for selecting such a point.
> 
> Thanks again everyone,
> Jim
> 
> __________________________________________________________________
> Switch to Netscape Internet Service.
> As low as $9.95 a month -- Sign up today at http://isp.netscape.com/register
> 
> Netscape. Just the Net You Need.
> 
> New! Netscape Toolbar for Internet Explorer
> Search from anywhere on the Web and block those annoying pop-ups.
> Download now at http://channels.netscape.com/ns/search/install.jsp
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users



Ron Bodkin
Chief Technology Officer
New Aspects
m: (415) 509-2895


Back to the top