[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [aspectj-users] Parameter construction pointcut?
- From: "Caplan, Josh" <jcaplan@xxxxxxxxxx>
- Date: Wed, 15 Aug 2007 11:56:54 -0700
- Delivered-to: email@example.com
- Thread-index: AcfcQ385b4uYotq8QCmZYCzf2UKg+QDJT8Dg
- Thread-topic: [aspectj-users] Parameter construction pointcut?
Eric Bodden wrote:
> what if any of the methods have side-effects?
Irrelevant. The point is to match the pointcut before the function's
arguments (the expressions in parentheses) are about to be evaluated.
In bytecode, there would need to be some kind of no-op marker that
indicates that "we are about to evaluate the arguments in order to make
a call to function f" (note: I am _not_ attempting to match on the
evaluation of _any_ expression on which the call f to depends). If
compiler optimizations interleave these evaluations arbitrarily with
other unrelated stuff before making the actual call to f, then I concede
that this is not possible. However, in light of the fact that
expressions _can_ have side-effects in Java, I would not expect the
compiler to do anything risky like that. In my example
f( g( h(), i( j() ) ), k() );
I would expect the bytecode to look like
or some other topological sort of the partial order. In any case,
markers would be necessary: