[abc] thisJoinPoint identity stuff fixed (I hope..)

From: Ganesh Sittampalam <ganesh@earth.li>
Date: Sun Mar 05 2006 - 22:14:57 GMT

OK, I've finally fixed this. You now get two options, mainly because I was
trying desperately to make _one_ of them work with little success, until I
finally realised what the problem they both shared was. (Details below,
probably a lesson worth remembering for the future..)

-debug thisJoinPointObject

make them all into Objects.

-debug thisJoinPointDummy

make them all into DummyJP, which you must supply as part of the compile.
There's one in util/ (make sure to cvs up -d to get it). This class
implements the JoinPoint interface, so you should be able to get any code
that uses thisJoinPoint to compile, but you won't get any static type
safety, just runtime misbehaviour if you try to use things that are
omitted.

What was wrong:

Our sequence for initialising thisJoinPoint is roughly:

At the top of the method:

thisJoinPoint = null

at each use site:

if thisJoinPoint != null goto labeln
(initialise some parameters)
thisJoinPoint = constructJP(parameters)
labeln:

What I did to hack around this was to replace the bit in between the test
and the label with

thisJoinPoint = new Object
thisJoinPoint.<init>()

(or new DummyJP in the other case)

Unfortunately, this has the crucial failing of briefly leaving
thisJoinPoint with an uninitialised object. Since this sequence can
sometimes be covered by an exception range, and the exception handler
might itself try to repeat this sequence, the verifier complains, with its
usual unhelpful message.

The obvious fix is to make the sequence be this instead:

temp = new Object
temp.<init>()
thisJoinPoint = temp

Hope this helps someone in the future ;-)

Ganesh
Received on Sun Mar 05 22:14:59 2006

This archive was generated by hypermail 2.1.8 : Tue Mar 06 2007 - 16:13:27 GMT