Re: [abc-users] Obtaining SootMethods from PerSetupAdvice

From: Nathan Weston <npweston_at_gmail.com>
Date: Wed, 14 May 2008 15:13:41 +0100

Hi Eric,

Thanks for your reply! My problem is that I'm not sure how to access
this method pre-weave (I'm performing this analysis as a compiler pass
after JIMPLIFY_DONE). Currently I use:

abc.main.Main.v().getAbcExtension().getGlobalAspectInfo().getWeavableClasses();

to find SootClasses, set them as ApplicationClasses and call
Scene.v().loadClass so I can get access to the methods they define.
However, using this technique, no methods called abc$perThisBind are
visible to analyse.

Thanks again,
Nath

On Wed, May 14, 2008 at 3:00 PM, Eric Bodden <eric.bodden_at_mail.mcgill.ca> wrote:
> Nathan, can you not just attach your tags to the method
> abc$perThisBind in this case?
>
> The fact that you have multiple aspect instances at runtime should not
> really matter because there's still only *one* such method. There are
> just multiple *calls* to this method inserted by PetThisSetup.
>
> Eric
>
> 2008/5/14 Nathan Weston <npweston_at_gmail.com>:
>> Thanks Eric! The difficulty is that I'm doing pre-analysis of advices
>> and attaching the results to SootMethods as tags, which I then retrieve
>> after weaving. This is possible with AdviceDecls, but I guess it's more
>> difficult when the advice applies perThis as the instances of the advice
>> are different?
>>
>> Nathan
>>
>>
>>
>>
>> Eric Bodden wrote:
>>
>> > Or another way you could look at it is that the advice body will
>> > always be called "abc$perThisBind', as this is the method for which a
>> > call is being inserted at the shadow.
>> >
>> > Eric
>> >
>> > 2008/5/13 Eric Bodden <eric.bodden_at_mail.mcgill.ca>:
>> >
>> > > Hi Nathan.
>> > >
>> > > Looking at the code I believe that the reason for not providing this
>> > > method is that there is no method being generated for PerThisSetup. If
>> > > I am not mistaken, all the functionality is implemented within
>> > > makeAdviceExecutionStmts, which just adds a bunch of statements to the
>> > > shadow (and no method call to an advice body).
>> > >
>> > > Eric
>> > >
>> > > 2008/5/13 Nathan Weston <npweston_at_gmail.com>:
>> > >
>> > >
>> > >
>> > > > Hello all,
>> > > >
>> > > >
>> > > > Is it possible to obtain the SootMethod implementation of a
>> PerSetupAdvice,
>> > > > especially a PerThisSetup? I mean in a similar method to
>> > > > getImpl().getSootMethod() for an AdviceDecl.
>> > > >
>> > > > Thanks for any help!
>> > > > Nathan
>> > > >
>> > > >
>> > >
>> > >
>> > >
>> > > --
>> > > Eric Bodden
>> > > Sable Research Group
>> > > McGill University, Montréal, Canada
>> > >
>> > >
>> >
>> >
>> >
>> >
>>
>>
>>
>
>
>
> --
> Eric Bodden
> Sable Research Group
> McGill University, Montréal, Canada
>
>
Received on Wed May 14 2008 - 15:13:45 BST

This archive was generated by hypermail 2.2.0 : Wed May 14 2008 - 15:20:12 BST