Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Re: [Bug 30439] spurious "circular dependency" error

Wes Isberg writes:
 > It is not until runtime that it is determined whether the join point 
 > is in the control flow of f2() and/or f1(), so the compiler needs to 
 > order the advice.

Fair enough.  In this case, it would be nice to be able to declare
that I don't care what order is given to the advice, because I know
that they will never overlap.

 > (I believe that to implement a join point, the compiler 
 > must determine a partial order of all possible advice at the join
 > point.)

It seems like it's already using an arbitrary ordering between advice
(lexical within the same aspect), so why can't it arbitrarily convert
the partial order to a total order?

...Actually, it seems like the opposite is true: it's trying to impose
a total ordering on two pieces of advice (a `before' and an `after')
that shouldn't need to be related.  Here are the rules:

  If the two pieces of advice are defined in the same aspect, then
  there are two cases:

    If either are `after' advice, then the one that appears later in the
    aspect has precedence over the one that appears earlier.

    Otherwise, then the one that appears earlier in the aspect has
    precedence over the one that appears later.

I propose the following:

  If the two pieces of advice are defined in the same aspect, then
  there are three cases:

    If both are `before' advice, then the one that appears earlier in
    the aspect has precedence over the one that appears later.

    If both are `after' advice, then the one that appears later in the
    aspect has precedence over the one that appears earlier.

    Otherwise, it is undefined which has precedence.  [Read: it will
    be arbitrarily decided which has precedence.]

I'm not feeling very imaginative; can anyone come up with an example
where the ordering of `before' vs. `after' advice is observable?

--dougo@xxxxxxxxxxx

 > P.S. -
 > > [I'm mailing this to aspectj-users because the bugzilla return address
 > > bounced.  See http://dev.eclipse.org/bugs/show_bug.cgi?id=30439 for
 > > context.]
 > 
 > I don't think Bugzilla handles email entries; you'll always use the
 > web interface.

That's a pity...  It's a lot easier to have a discussion by email and
log it to the web than vice versa.


Back to the top