Re: [abc-users] polyglot.util.InternalCompilerError on around advice by tracematch

From: Eric Bodden <bodden_at_st.informatik.tu-darmstadt.de>
Date: Mon, 14 Sep 2009 23:09:28 +0200

Sorry for the late response. I already sent this on the 7th but my
response got discarded by the list server.

Eric

2009/9/7 Eric Bodden <bodden_at_st.informatik.tu-darmstadt.de>:
> Hi.
>
> I had a brief look at this. I can confirm that there is a problem in
> SymbolCodegen.jrag, where SymbolDecl.perSymbolAdviceDecl() is
> computed. At this point, the method adds SootMethods into a list that
> should actually carry signatures. I am not sure how to fix this
> correctly, though. It would be easy to convert the methods into
> signatures but I am unsure whether there's not a more fundamental
> mistake going on there. Maybe Pavel or Julia can comment on this...
>
> Eric
>
> 2009/9/7 Kazunori Kawauchi <kazu_at_graco.c.u-tokyo.ac.jp>:
>> Hi,
>>
>> I'm trying to compile a java project by a development version of aspectbench
>> compiler with tracematch extension (-ext abc.ja.tm) checked out from the svn
>> repository (http://abc.comlab.ox.ac.uk/products/trunk/abc-full) on September 2,
>> 2009. But I can't compile the project when I define any piece of around advice
>> by tracemacth and receive the following error message:
>>
>>> Exception in thread "main" polyglot.util.InternalCompilerError: unhandled exception during weaving/optimisation
>>>         at abc.main.CompileSequence.runSequence(CompileSequence.java:142)
>>>         at abc.main.Main.run(Main.java:406)
>>>         at abc.main.Main.main(Main.java:144)
>>> Caused by: java.lang.ClassCastException: soot.SootMethod cannot be cast to abc.weaving.aspectinfo.MethodSig
>>>         at abc.weaving.aspectinfo.AdviceDecl.getLocalSootMethods(AdviceDecl.java:327)
>>>         at abc.weaving.weaver.around.AroundWeaver.buildAroundAdviceLocalMethodMap(AroundWeaver.java:295)
>>>         at abc.weaving.weaver.around.AroundWeaver.getEnclosingAroundAdviceMethod(AroundWeaver.java:309)
>>>         at abc.weaving.weaver.around.AdviceMethod.doWeave(AdviceMethod.java:193)
>>>         at abc.weaving.weaver.around.AroundWeaver.doWeave(AroundWeaver.java:154)
>>>         at abc.weaving.aspectinfo.AroundAdvice.weave(AroundAdvice.java:162)
>>>         at abc.weaving.weaver.PointcutCodeGen.weave_one(PointcutCodeGen.java:359)
>>>         at abc.weaving.weaver.PointcutCodeGen.weaveInAspectsPass(PointcutCodeGen.java:109)
>>>         at abc.weaving.weaver.Weaver.weaveAdvice(Weaver.java:413)
>>>         at abc.tm.weaving.weaver.TMWeaver.weaveAdvice(TMWeaver.java:75)
>>>         at abc.weaving.weaver.Weaver.weave(Weaver.java:277)
>>>         at abc.ja.tm.CompileSequence.weave(CompileSequence.java:221)
>>>         at abc.main.CompileSequence.runSequence(CompileSequence.java:115)
>>>         ... 2 more
>>
>> Though it is not a problem to compile my small sample code with tracematch's
>> around advice, my target java code (about 2,000 lines of code) with any piece of
>> tracematch around advice causes the above compile error.
>> The error is caused by defining a simple tracematch's around advice like this:
>>    void tracematch() {
>>        sym callEvent around :
>>            call(void TextEditor.changeBlock());
>>        callEvent {
>>            proceed();
>>        }
>>    }
>> In addition, It is not a problem that I define after/before advice by tracematch
>> and 'normal'(pure AspectJ's) around advice.
>>
>>
>> In fact, I tried to compile my java code by the latest stable version of abc
>> (version 1.3.0), but I got a compile error about advice precedence. This bug is
>> fixed by the current development version of abc, isn't it?
>>
>>
>> Regards,
>>
>> kazunori kawauchi
>> kazu_at_graco.c.u-tokyo.ac.jp
>> http://www.graco.c.u-tokyo.ac.jp/~kazu/
>>
>>
>
>
>
> --
> Eric Bodden
> Software Technology Group, Technische Universität Darmstadt, Germany
> Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
> Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt
>

-- 
Eric Bodden
Software Technology Group, Technische Universität Darmstadt, Germany
Tel: +49 6151 16-5478    Fax: +49 6151 16-5410
Mailing Address: S2|02 A209, Hochschulstraße 10, 64289 Darmstadt
Received on Mon Sep 14 2009 - 22:09:52 BST

This archive was generated by hypermail 2.2.0 : Tue Sep 15 2009 - 20:40:12 BST